A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use snprintf of Visual C++
[simgrid.git]
/
src
/
win32
/
compiler
/
visualc.h
diff --git
a/src/win32/compiler/visualc.h
b/src/win32/compiler/visualc.h
index
adb8905
..
cb19849
100644
(file)
--- a/
src/win32/compiler/visualc.h
+++ b/
src/win32/compiler/visualc.h
@@
-164,11
+164,31
@@
#undef HAVE_SIGNAL
#endif
#undef HAVE_SIGNAL
#endif
+/* "disable the snprintf replacement ( this function is broken on system v only" */
+
+
+
+#ifdef PREFER_PORTABLE_SNPRINTF
+# undef PREFER_PORTABLE_SNPRINTF 1
+#endif
+
+
/* The compiler has `snprintf' function. */
/* The compiler has `snprintf' function. */
-#ifndef HAVE_SNPRINTF
- #define HAVE_SNPRINTF 1
+#if _MSC_VER >= 1400
+# ifndef HAVE_SNPRINTF
+# define HAVE_SNPRINTF 1
+# ifndef PREFER_PORTABLE_SNPRINTF
+# define snprintf _snprintf
+# endif
+# endif
+#else
+# ifdef HAVE_SNPRINTF
+ #undef HAVE_SNPRINTF
+# endif
#endif
#endif
+
+
/* No `swapcontext' function. */
#if defined(HAVE_SWAPCONTEXT)
#undef HAVE_SWAPCONTEXT
/* No `swapcontext' function. */
#if defined(HAVE_SWAPCONTEXT)
#undef HAVE_SWAPCONTEXT
@@
-201,13
+221,6
@@
#define NEED_VASPRINTF
#endif
#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
/* The maximal size of any scalar on this arch */
#if !defined(SIZEOF_MAX)
#define SIZEOF_MAX 8