From: cherierm Date: Thu, 4 Oct 2007 07:51:16 +0000 (+0000) Subject: declare portable snprintf and vsnprintf functions for Visual C++ 7 X-Git-Tag: v3.3~1022 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9d8804c534eca423fe2ee8de4f0fe7b43420f76c?hp=f906123b75e746c913ebc0c9bddeac87d76f27e2;ds=sidebyside declare portable snprintf and vsnprintf functions for Visual C++ 7 git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4769 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/xbt/snprintf.c b/src/xbt/snprintf.c index 6196c886f1..0dbbadbec4 100644 --- a/src/xbt/snprintf.c +++ b/src/xbt/snprintf.c @@ -398,6 +398,12 @@ int vasnprintf (char **ptr, size_t str_m, const char *fmt, va_list ap); #if defined(HAVE_SNPRINTF) /* declare our portable snprintf routine under name portable_snprintf */ /* declare our portable vsnprintf routine under name portable_vsnprintf */ +# if defined(_MSC_VER) && (_MSC_VER >= 1400) +# define portable_snprintf _snprintf +# if !defined(NEED_SNPRINTF_ONLY) +# define portable_vsnprintf vsnprintf +# endif +# endif #else /* declare our portable routines under names snprintf and vsnprintf */ #define portable_snprintf snprintf