From: Paul Eggert Date: Sat, 17 Sep 2016 18:05:07 +0000 (-0700) Subject: Define _GNU_SOURCE in files delaying config.h X-Git-Tag: emacs-26.0.90~1582 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7cd3d85013896dc4160f70228fc198c65a42b2e2;p=emacs.git 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. --- diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 2ba67df8bc9..185a9d1f62b 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -85,11 +85,8 @@ along with GNU Emacs. If not, see . */ be changed accordingly. */ -/* Make symbols like LLONG_WIDTH visible when the Gnulib - is included before . */ -#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 1db34260978..6cb8e748bd5 100644 --- a/src/w32.c +++ b/src/w32.c @@ -21,6 +21,9 @@ along with GNU Emacs. If not, see . */ Geoff Voelker (voelker@cs.washington.edu) 7-29-94 */ +/* Enable GNU extensions in gnulib replacement headers. */ +#define _GNU_SOURCE 1 + #include #include /* for offsetof */ #include diff --git a/src/w32notify.c b/src/w32notify.c index d4a113aaa4d..15e8a86cf17 100644 --- a/src/w32notify.c +++ b/src/w32notify.c @@ -81,6 +81,9 @@ along with GNU Emacs. If not, see . */ 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 #include diff --git a/src/w32proc.c b/src/w32proc.c index 90cef3231c8..e23b1b3563c 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -22,6 +22,9 @@ along with GNU Emacs. If not, see . */ Adapted from alarm.c by Tim Fleehart */ +/* Enable GNU extensions in gnulib replacement headers. */ +#define _GNU_SOURCE 1 + #include #include #include