X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ef0988cf8eb71517681c60a18a417f185bd602c4..36b5d5f9f78b0d496663aa3b8d3e5f82ca48a5a1:/src/portable.h diff --git a/src/portable.h b/src/portable.h index f56b81db8f..aef3db02e7 100644 --- a/src/portable.h +++ b/src/portable.h @@ -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 #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