Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
load stdio.h with _GNU_SOURCE defined ASAP before some random other system header...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 23 Mar 2007 22:03:21 +0000 (22:03 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 23 Mar 2007 22:03:21 +0000 (22:03 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3350 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/portable.h

index 589ce6b..a4d4f34 100644 (file)
 #  include "gras_config.h"
 #endif
 
+/* Load this asap to make sure that GNU_SOURCE is defined on need when stdio gets loaded by some random system header */
+#ifdef HAVE_GETLINE
+#  define _GNU_SOURCE
+#  include <stdio.h>
+#endif
+
 #include <stdarg.h>
 
 #ifdef HAVE_ERRNO_H
 #  define O_BINARY 0
 #endif
 
-#ifdef HAVE_GETLINE
-#  define _GNU_SOURCE
-#  include <stdio.h>
-#endif
-
 /****
  **** Time handling
  ****/