Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add XBT_PUBLIC tag to smpi variables
[simgrid.git] / include / xbt / misc.h
index 5260bce..ab21baf 100644 (file)
@@ -9,6 +9,11 @@
 #ifndef XBT_MISC_H
 #define XBT_MISC_H
 
+/* Define _GNU_SOURCE for getline, isfinite, etc. */
+#ifndef _GNU_SOURCE
+       #define _GNU_SOURCE
+#endif
+
 /* Attributes are only in recent versions of GCC */
 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4))
 # define _XBT_GNUC_PRINTF( format_idx, arg_idx )    \
 #  define XBT_PUBLIC_DATA(type)       extern type
 
 /* Link against the DLL */
-#elif (defined(_XBT_WIN32) && !defined(DLL_EXPORT) && !defined(DLL_STATIC))
+#elif (defined(_WIN32) && !defined(DLL_EXPORT) && !defined(DLL_STATIC))
 #  define XBT_PUBLIC(type)              __declspec(dllimport) type
 #  define XBT_EXPORT_NO_IMPORT(type)    type
 #  define XBT_IMPORT_NO_EXPORT(type)    __declspec(dllimport) type