Fix minor build problems related to MinGW64.
authorFabrice Popineau <fabrice.popineau@supelec.fr>
Sat, 11 Jan 2014 13:36:06 +0000 (15:36 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 11 Jan 2014 13:36:06 +0000 (15:36 +0200)
 configure.ac: Read $srcdir/nt/mingw-cfg.site when $MSYSTEM is
 "MINGW64" as well.

 nt/inc/ms-w32.h (pthread_sigmask): Undefine if defined, for MinGW64.

 src/unexw32.c (_start) [__MINGW64__]: Define to __start.

ChangeLog
configure.ac
nt/ChangeLog
nt/inc/ms-w32.h
src/ChangeLog
src/unexw32.c

index 6cf2f87..436dcda 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-01-11  Fabrice Popineau  <fabrice.popineau@gmail.com>
+
+       * configure.ac: Read $srcdir/nt/mingw-cfg.site when $MSYSTEM is
+       "MINGW64" as well.
+
 2014-01-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        Merge from gnulib, incorporating:
index b3d28d1..8443d16 100644 (file)
@@ -24,7 +24,8 @@ dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 AC_PREREQ(2.65)
 AC_INIT(emacs, 24.3.50)
 
-if test "x$MSYSTEM" = "xMINGW32"
+dnl We get MINGW64 with MSYS2
+if test "x$MSYSTEM" = "xMINGW32" -o "x$MSYSTEM" = "xMINGW64"
 then
   . $srcdir/nt/mingw-cfg.site
 
index 5258253..551b973 100644 (file)
@@ -1,3 +1,7 @@
+2014-01-11  Fabrice Popineau  <fabrice.popineau@supelec.fr>
+
+       * inc/ms-w32.h (pthread_sigmask): Undefine if defined, for MinGW64.
+
 2013-12-31  Fabrice Popineau  <fabrice.popineau@supelec.fr>
 
        * inc/ms-w32.h (sys_kill): Fix prototype.
index 7f523cb..dca3476 100644 (file)
@@ -388,6 +388,11 @@ extern int sigemptyset (sigset_t *);
 extern int sigaddset (sigset_t *, int);
 extern int sigfillset (sigset_t *);
 extern int sigprocmask (int, const sigset_t *, sigset_t *);
+/* MinGW64 defines pthread_sigmask as zero in its pthread_signal.h
+   header, but we have an implementation for that function in w32proc.c.  */
+#ifdef pthread_sigmask
+#undef pthread_sigmask
+#endif
 extern int pthread_sigmask (int, const sigset_t *, sigset_t *);
 extern int sigismember (const sigset_t *, int);
 extern int setpgrp (int, int);
index 556fcce..6371642 100644 (file)
@@ -1,3 +1,7 @@
+2014-01-11  Fabrice Popineau  <fabrice.popineau@gmail.com>
+
+       * unexw32.c (_start) [__MINGW64__]: Define to __start.
+
 2014-01-11  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (try_window_id): Don't use this function's optimizations
index 5411cd2..f70cdd7 100644 (file)
@@ -85,6 +85,13 @@ DWORD_PTR  extra_bss_size_static = 0;
 
 PIMAGE_SECTION_HEADER heap_section;
 
+/* MinGW64 doesn't add a leading underscore to external symbols,
+   whereas configure.ac sets up LD_SWITCH_SYSTEM_TEMACS to force the
+   entry point at __start, with two underscores.  */
+#ifdef __MINGW64__
+#define _start __start
+#endif
+
 /* Startup code for running on NT.  When we are running as the dumped
    version, we need to bootstrap our heap and .bss section into our
    address space before we can actually hand off control to the startup