Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tiny documentation improvement
[simgrid.git] / src / portable.h
index 537d24c..aef3db0 100644 (file)
@@ -24,7 +24,9 @@
 
 /* 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
+#  ifndef _GNU_SOUCE
+#    define _GNU_SOURCE
+#  endif
 #  include <stdio.h>
 #endif
 
@@ -124,7 +126,7 @@ extern int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list
 #endif
 
 /* prototype of GNU functions  */
-#if defined(__GNUC__)
+#if (defined(__GNUC__) && !defined(__cplusplus))
 extern int asprintf  (char **ptr, const char *fmt, /*args*/ ...);
 extern int vasprintf (char **ptr, const char *fmt, va_list ap);
 #endif
@@ -156,11 +158,4 @@ extern int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
 void hexa_print(const char*name, unsigned char *data, int size);
 const char *hexa_str(unsigned char *data, int size, int downside);
 
-
-#if defined(WIN32)
-/* Visual C++ does not implements the gettimeofday() function */
-XBT_PUBLIC(int)
-gettimeofday(struct timeval *tv, struct timezone *tz);
-#endif
-
 #endif /* GRAS_PORTABLE_H */