From: cherierm Date: Wed, 26 Sep 2007 14:13:50 +0000 (+0000) Subject: The windows implementation of simgrid use now the portable snprintf so, enable the... X-Git-Tag: v3.3~1060 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/771c4cd2f6fe9a8e22eb0cdcfa6086cbc24cee51 The windows implementation of simgrid use now the portable snprintf so, enable the PREFERE_PORTABLE_SNPRINTF macro and disable the HAVE_SNPRINTF macro git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4731 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/win32/compiler/visualc.h b/src/win32/compiler/visualc.h index 3833296bd4..c7268be43b 100644 --- a/src/win32/compiler/visualc.h +++ b/src/win32/compiler/visualc.h @@ -164,10 +164,21 @@ #undef HAVE_SIGNAL #endif +/* "disable the snprintf replacement ( this function is broken on system v only" */ + + + +#ifndef PREFER_PORTABLE_SNPRINTF +# define PREFER_PORTABLE_SNPRINTF 1 +#endif + /* The compiler has `snprintf' function. */ -#if _MSC_VER >= 7 /* FIXME: check version number */ -# ifndef HAVE_SNPRINTF - #define HAVE_SNPRINTF 1 +#if _MSC_VER >= 1400 +# ifdef HAVE_SNPRINTF +# undef HAVE_SNPRINTF 1 +# ifndef PREFER_PORTABLE_SNPRINTF +# define snprintf _snprintf +# endif # endif #else # ifdef HAVE_SNPRINTF @@ -207,13 +218,6 @@ #define NEED_VASPRINTF #endif -/* "disable the snprintf replacement ( this function is broken on system v only" */ - - -#if !defined(PREFER_PORTABLE_SNPRINTF) - #define PREFER_PORTABLE_SNPRINTF -#endif - /* The maximal size of any scalar on this arch */ #if !defined(SIZEOF_MAX) #define SIZEOF_MAX 8