Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
The windows implementation of simgrid use now the portable snprintf so, enable the...
[simgrid.git] / src / win32 / compiler / visualc.h
index bc84a0b..c7268be 100644 (file)
        #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 defined(HAVE_SNPRINTF)
-       #undef 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
+       #undef HAVE_SNPRINTF
+#  endif
 #endif
 
 /* No `swapcontext' function. */
 #endif
 
 /* The compiler has the `vsnprintf' function. */
-/*#if !defined(HAVE_VSNPRINTF)
+#ifndef HAVE_VSNPRINTF
        #define HAVE_VSNPRINTF  1
-#endif*/
-
-
-/* enable the asprintf replacement */
-#if !defined(NEED_ASPRINTF)
-       #define NEED_ASPRINTF   1
 #endif
 
-/*#ifdef NEED_ASPRINTF
-#undef NEED_ASPRINTF
-#endif*/
-
 
-/* enable the vasprintf replacement */
-#if  !defined(NEED_VASPRINTF)
-       #define NEED_VASPRINTF  1
+/* disable the asprintf replacement */
+#ifndef NEED_ASPRINTF
+       #define NEED_ASPRINTF   
 #endif
 
-/* "disable the snprintf replacement ( this function is broken on system v only" */
-
-/* FIXME TO ANALYZE */
-#if defined(PREFER_PORTABLE_SNPRINTF)
-       #undef PREFER_PORTABLE_SNPRINTF 
-#endif
 
-#if !defined(PREFER_PORTABLE_SNPRINTF)
-       #define PREFER_PORTABLE_SNPRINTF        
+/* disable the vasprintf replacement */
+#ifndef NEED_VASPRINTF
+       #define NEED_VASPRINTF
 #endif
 
 /* The maximal size of any scalar on this arch */
@@ -403,6 +405,6 @@ typedef unsigned int uint32_t;
 #endif 
 
 
-
+typedef int ssize_t;
 
 #endif /* #ifndef __XBT_VISUALC_COMPILER_CONFIG_H__ */