Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
on windows getline function needs the stdio.h include file
[simgrid.git] / 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
  ****/