From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Anyone building Emacs trunk with MinGW w64 (32 bits) Date: Mon, 25 Mar 2013 20:46:35 +0100 Message-ID: <87fvzjcles.fsf@wanadoo.es> References: <87zjxumbjf.fsf@wanadoo.es> <83vc8f1t0x.fsf@gnu.org> <87sj3jcr6t.fsf@wanadoo.es> <86zjxrs4jm.fsf@gmail.com> <87k3ovcn1r.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1364240811 18320 80.91.229.3 (25 Mar 2013 19:46:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Mar 2013 19:46:51 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 25 20:47:18 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UKDMU-0003jO-9O for ged-emacs-devel@m.gmane.org; Mon, 25 Mar 2013 20:47:18 +0100 Original-Received: from localhost ([::1]:38745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKDM6-0003XU-B4 for ged-emacs-devel@m.gmane.org; Mon, 25 Mar 2013 15:46:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKDM2-0003X9-Cm for emacs-devel@gnu.org; Mon, 25 Mar 2013 15:46:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKDLz-0001Ya-GX for emacs-devel@gnu.org; Mon, 25 Mar 2013 15:46:50 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKDLz-0001YJ-6U for emacs-devel@gnu.org; Mon, 25 Mar 2013 15:46:47 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UKDMK-0003WX-RM for emacs-devel@gnu.org; Mon, 25 Mar 2013 20:47:08 +0100 Original-Received: from 87.red-88-15-56.dynamicip.rima-tde.net ([88.15.56.87]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Mar 2013 20:47:08 +0100 Original-Received: from ofv by 87.red-88-15-56.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Mar 2013 20:47:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 231 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 87.red-88-15-56.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:boOJoKFdqD6wBtw6IQsPhCmU/Qk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158165 Archived-At: Óscar Fuentes writes: > rzl24ozi@gmail.com writes: > >>> w32.c:4725:7: error: unknown type name 'REPARSE_DATA_BUFFER' >> >> 'REPARSE_DATA_BUFFER' is typedef'ed in w32.c with '#ifdef _MSC_VER'. >> I think that it should be changed to '#if defined(_MSC_VER) || defined(__MINGW64__)'. > > Thanks! Unfortunately, it seems that there is no macro that > discriminates MinGWW64 from MinGW, so removed the #if for now. With the changes below the project builds until gcc -o oo-spd/i386/temacs.bin -gdwarf-2 -g3 -Lc:/apps/GnuWin32/lib -Wl,-stack ,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-subsystem,conso le -Wl,-entry,__start -Wl,-Map,oo-spd/i386/temacs.map oo-spd/i386/firstfile.o oo -spd/i386/emacs.res oo-spd/i386/temacs0.a oo-spd/i386/temacs1.a oo-spd/i386/tema cs2.a oo-spd/i386/lastfile.a ../lib/oo-spd/i386/libgnu.a -lwinmm -ladvapi32 -lgd i32 -lcomdlg32 -luser32 -lmpr -lshell32 -lwinspool -lole32 -lcomctl32 -lusp10 oo-spd/i386/temacs1.a(fileio.o): In function `barf_or_query_if_file_exists': D:\dev\emacs\emacs\src/fileio.c:1900: undefined reference to `_imp__lstat' oo-spd/i386/temacs1.a(dired.o): In function `file_attributes': D:\dev\emacs\emacs\src/dired.c:943: undefined reference to `_imp__fstatat' oo-spd/i386/temacs1.a(dired.o): In function `file_name_completion_stat': D:\dev\emacs\emacs\src/dired.c:818: undefined reference to `_imp__fstatat' D:\dev\emacs\emacs\src/dired.c:820: undefined reference to `_imp__fstatat' collect2.exe: error: ld returned 1 exit status mingw32-make[3]: *** [oo-spd/i386/temacs.exe] Error 1 mingw32-make[3]: Leaving directory `D:/dev/emacs/emacs/src' I have no time for investigating why the linker searches for lstat and fstatat as if they were dllimports and ignores those defined in w32.c. The changes are not intended to be committed into trunk, they are just for the benefit of those who know what is going on. Modified lib-src/ntlib.c diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c index f431174..7d21e01 100644 --- a/lib-src/ntlib.c +++ b/lib-src/ntlib.c @@ -34,11 +34,13 @@ along with GNU Emacs. If not, see . */ #include "ntlib.h" +#ifndef _TIMESPEC_DEFINED struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; +#endif #define MAXPATHLEN _MAX_PATH Modified nt/addpm.c diff --git a/nt/addpm.c b/nt/addpm.c index 6ed625d..c26fa93 100644 --- a/nt/addpm.c +++ b/nt/addpm.c @@ -34,7 +34,9 @@ along with GNU Emacs. If not, see . */ installed, then the DDE fallback for creating icons the Windows 3.1 progman way will be used instead, but that is prone to lockups caused by other applications not servicing their message queues. */ -#define _WIN32_IE 0x400 +/* c:\apps\msys\1.0\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w6 */ +/* 4-mingw32/include/shlguid.h:16:2: error: #error _WIN32_IE setting conflicts */ +/* #define _WIN32_IE 0x400 */ /* Request C Object macros for COM interfaces. */ #define COBJMACROS 1 Modified nt/config.nt diff --git a/nt/config.nt b/nt/config.nt index 1fe707c..26d7119 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -1146,6 +1146,13 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if _setjmp and _longjmp work. */ #define HAVE__SETJMP 1 +/* eval.c:963:3: error: too few arguments to function '_setjmp' */ +/* In file included from lisp.h:24:0, */ +/* from eval.c:24: */ +/* c:\apps\msys\1.0\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w6 */ +/* 4-mingw32/include/setjmp.h:164:63: note: declared here */ +#define USE_NO_MINGW_SETJMP_TWO_ARGS 1 + /* Define to 1 if you have the `__builtin_unwind_init' function. */ #undef HAVE___BUILTIN_UNWIND_INIT Modified nt/inc/ms-w32.h diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index d3faa6d..d2188a2 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -154,7 +154,7 @@ extern char *getenv (); #ifdef emacs -#ifdef _MSC_VER +#if 1 #include #include #include Modified nt/inc/sys/time.h diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index e49f0ea..b6a016b 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h @@ -6,6 +6,10 @@ * have the below stuff. */ +#include +#include + +#ifndef _TIMESPEC_DEFINED struct timeval { long tv_sec; /* seconds */ @@ -17,6 +21,7 @@ struct timezone int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; +#endif void gettimeofday (struct timeval *, struct timezone *); @@ -24,13 +29,13 @@ void gettimeofday (struct timeval *, struct timezone *); #define ITIMER_PROF 1 /* MinGW64 defines 'struct itimerval' and _TIMESPEC_DEFINED in sys/types.h. */ -#ifndef _TIMESPEC_DEFINED +// #ifndef _TIMESPEC_DEFINED struct itimerval { struct timeval it_interval; /* timer interval */ struct timeval it_value; /* current value */ }; -#endif +// #endif int getitimer (int, struct itimerval *); int setitimer (int, struct itimerval *, struct itimerval *); Modified src/w32.c diff --git a/src/w32.c b/src/w32.c index 647faf9..95aee3b 100644 --- a/src/w32.c +++ b/src/w32.c @@ -127,7 +127,7 @@ typedef struct _PROCESS_MEMORY_COUNTERS_EX { #define SDDL_REVISION_1 1 #endif /* SDDL_REVISION_1 */ -#ifdef _MSC_VER +#if 1 /* MSVC doesn't provide the definition of REPARSE_DATA_BUFFER and the associated macros, except on ntifs.h, which cannot be included because it triggers conflicts with other Windows API headers. So @@ -2386,28 +2386,31 @@ get_emacs_configuration_options (void) #include +/* w32.c:2392:1: error: conflicting types for 'gettimeofday' */ +/* In file included from w32.c:32:0: */ +/* ../nt/inc/sys/time.h:25:6: note: previous declaration of 'gettimeofday' was here */ /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ -void -gettimeofday (struct timeval *tv, struct timezone *tz) -{ - struct _timeb tb; - _ftime (&tb); - - tv->tv_sec = tb.time; - tv->tv_usec = tb.millitm * 1000L; - /* Implementation note: _ftime sometimes doesn't update the dstflag - according to the new timezone when the system timezone is - changed. We could fix that by using GetSystemTime and - GetTimeZoneInformation, but that doesn't seem necessary, since - Emacs always calls gettimeofday with the 2nd argument NULL (see - current_emacs_time). */ - if (tz) - { - tz->tz_minuteswest = tb.timezone; /* minutes west of Greenwich */ - tz->tz_dsttime = tb.dstflag; /* type of dst correction */ - } -} +/* void */ +/* gettimeofday (struct timeval *tv, struct timezone *tz) */ +/* { */ +/* struct _timeb tb; */ +/* _ftime (&tb); */ + +/* tv->tv_sec = tb.time; */ +/* tv->tv_usec = tb.millitm * 1000L; */ +/* /\* Implementation note: _ftime sometimes doesn't update the dstflag */ +/* according to the new timezone when the system timezone is */ +/* changed. We could fix that by using GetSystemTime and */ +/* GetTimeZoneInformation, but that doesn't seem necessary, since */ +/* Emacs always calls gettimeofday with the 2nd argument NULL (see */ +/* current_emacs_time). *\/ */ +/* if (tz) */ +/* { */ +/* tz->tz_minuteswest = tb.timezone; /\* minutes west of Greenwich *\/ */ +/* tz->tz_dsttime = tb.dstflag; /\* type of dst correction *\/ */ +/* } */ +/* } */ /* Emulate fdutimens. */ Modified src/w32term.c diff --git a/src/w32term.c b/src/w32term.c index e02b5a6..6c29470 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -109,7 +109,7 @@ struct w32_display_info *x_display_list; Lisp_Object w32_display_name_list; -#if _WIN32_WINNT < 0x0500 +#if 0 // _WIN32_WINNT < 0x0500 /* Pre Windows 2000, this was not available, but define it here so that Emacs compiled on such a platform will run on newer versions. */