emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 7cd3d85: Define _GNU_SOURCE in files delaying confi


From: Paul Eggert
Subject: [Emacs-diffs] master 7cd3d85: Define _GNU_SOURCE in files delaying config.h
Date: Sat, 17 Sep 2016 18:06:09 +0000 (UTC)

branch: master
commit 7cd3d85013896dc4160f70228fc198c65a42b2e2
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Define _GNU_SOURCE in files delaying config.h
    
    Problem reported by Richard Copley in:
    http://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00440.html
    * src/w32.c, src/w32notify.c, src/w32proc.c (_GNU_SOURCE):
    Define early.
---
 src/unexmacosx.c |    5 +----
 src/w32.c        |    3 +++
 src/w32notify.c  |    3 +++
 src/w32proc.c    |    3 +++
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index 2ba67df..185a9d1 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -85,11 +85,8 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
    be changed accordingly.
 */
 
-/* Make symbols like LLONG_WIDTH visible when the Gnulib <limits.h>
-   is included before <config.h>.  */
-#ifndef _GNU_SOURCE
+/* Enable GNU extensions in gnulib replacement headers.  */
 #define _GNU_SOURCE 1
-#endif
 
 /* config.h #define:s malloc/realloc/free and then includes stdlib.h.
    We want the undefined versions, but if config.h includes stdlib.h
diff --git a/src/w32.c b/src/w32.c
index 1db3426..6cb8e74 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -21,6 +21,9 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
    Geoff Voelker (address@hidden)                         7-29-94
 */
 
+/* Enable GNU extensions in gnulib replacement headers.  */
+#define _GNU_SOURCE 1
+
 #include <mingw_time.h>
 #include <stddef.h> /* for offsetof */
 #include <stdlib.h>
diff --git a/src/w32notify.c b/src/w32notify.c
index d4a113a..15e8a86 100644
--- a/src/w32notify.c
+++ b/src/w32notify.c
@@ -81,6 +81,9 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
    thread to exit.  The main thread waits for some time for the worker
    thread to exit, and if it doesn't, terminates it forcibly.  */
 
+/* Enable GNU extensions in gnulib replacement headers.  */
+#define _GNU_SOURCE 1
+
 #include <stddef.h>
 #include <errno.h>
 
diff --git a/src/w32proc.c b/src/w32proc.c
index 90cef32..e23b1b3 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -22,6 +22,9 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
      Adapted from alarm.c by Tim Fleehart
 */
 
+/* Enable GNU extensions in gnulib replacement headers.  */
+#define _GNU_SOURCE 1
+
 #include <mingw_time.h>
 #include <stdio.h>
 #include <stdlib.h>



reply via email to

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