]> git.eshelyaron.com Git - emacs.git/commitdiff
Define _GNU_SOURCE in files delaying config.h
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 17 Sep 2016 18:05:07 +0000 (11:05 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 17 Sep 2016 18:06:05 +0000 (11:06 -0700)
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
src/w32.c
src/w32notify.c
src/w32proc.c

index 2ba67df8bc90ab758abbe05d7f5c9cf6fbbadbaa..185a9d1f62b16f6a4157a845dcd45660ffc7bdea 100644 (file)
@@ -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
index 1db34260978825b4fe9190ebb5e4fec9bf2a77ce..6cb8e748bd52af21d1e8d34a827e70329885d25a 100644 (file)
--- 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 (voelker@cs.washington.edu)                         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>
index d4a113aaa4df2d9467041ccf895e6d4ff7fdea6c..15e8a86cf175f3b015f07bb21a2a535f026a3d6b 100644 (file)
@@ -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>
 
index 90cef3231c8e1fc1528b3064ddd91912a7e56ec5..e23b1b3563c5d3966b216061fbcb6165243ed67e 100644 (file)
@@ -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>