emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anyone building Emacs trunk with MinGW w64 (32 bits)


From: Óscar Fuentes
Subject: Re: Anyone building Emacs trunk with MinGW w64 (32 bits)
Date: Mon, 25 Mar 2013 22:37:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

With the following diff, the build creates emacs.exe. The issue about
gettimeofday is pending.

        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 
<http://www.gnu.org/licenses/>.  */
 
 #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 
<http://www.gnu.org/licenses/>.  */
    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 
<http://www.gnu.org/licenses/>.  */
 /* 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 <sys/timeb.h>
 #include <sys/stat.h>
 #include <signal.h>
        Modified   nt/inc/sys/stat.h
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index c356283..958349a 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -108,9 +108,9 @@ extern int w32_stat_get_owner_group;
 
 _CRTIMP int __cdecl __MINGW_NOTHROW    fstat (int, struct stat*);
 _CRTIMP int __cdecl __MINGW_NOTHROW    chmod (const char*, int);
-_CRTIMP int __cdecl __MINGW_NOTHROW    stat (const char*, struct stat*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    lstat (const char*, struct stat*);
-_CRTIMP int __cdecl __MINGW_NOTHROW    fstatat (int, char const *,
+int __cdecl __MINGW_NOTHROW    stat (const char*, struct stat*);
+int __cdecl __MINGW_NOTHROW    lstat (const char*, struct stat*);
+int __cdecl __MINGW_NOTHROW    fstatat (int, char const *,
                                                 struct stat *, int);
 
 #endif /* INC_SYS_STAT_H_ */
        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 <sys/types.h>
+#include <time.h>
+
+#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..0a5c1e5 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -96,7 +96,7 @@ typedef struct _MEMORY_STATUS_EX {
 #ifndef _MSC_VER
 #include <w32api.h>
 #endif
-#if !defined (__MINGW32__) || __W32API_MAJOR_VERSION < 3 || 
(__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 15)
+#if 0 // !defined (__MINGW32__) || __W32API_MAJOR_VERSION < 3 || 
(__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 15)
 /* This either is not in psapi.h or guarded by higher value of
    _WIN32_WINNT than what we use.  w32api supplied with MinGW 3.15
    defines it in psapi.h  */
@@ -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 <sys/timeb.h>
+/* 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.  */
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]