From 65fe7ce26905cc6a4e8cc05066817e8eb0779ecc Mon Sep 17 00:00:00 2001 From: cherierm Date: Fri, 21 Sep 2007 16:00:21 +0000 Subject: [PATCH] Visual C++ config doesn't use the gnu functions git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4674 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/portable.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/portable.h b/src/portable.h index 5e755819d1..a6a02209a9 100644 --- a/src/portable.h +++ b/src/portable.h @@ -106,7 +106,7 @@ ****/ /* prototype of C99 functions */ -#ifdef HAVE_SNPRINTF +#if defined(HAVE_SNPRINTF) && defined(_MSC_VER) #include #else # if (defined(_MSC_VER) && defined(DLL_EXPORT)) @@ -131,10 +131,11 @@ extern int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list #endif /* prototype of GNU functions */ -#ifndef __BORLANDC__ +#if !defined(__BORLANDC__) && !defined(_MSC_VER) extern int asprintf (char **ptr, const char *fmt, /*args*/ ...); extern int vasprintf (char **ptr, const char *fmt, va_list ap); #endif + extern int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...); extern int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap); -- 2.20.1