Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Visual C++ has no header named unistd.h
[simgrid.git] / src / surf / surfxml.c
index eee52c0..3dd7c67 100644 (file)
@@ -1903,7 +1903,14 @@ const char rcs_surfxml_flexml[] =
  "$" "Id: flexml.pl,v 1.61 2006/09/13 16:34:33 wdowling Exp $";
 
 /* ANSI headers. */
-#include <unistd.h>
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
+#  ifndef __STRICT_ANSI__
+#    include <io.h>
+#    include <process.h>
+#  endif
+#else
+#  include <unistd.h>
+#endif
 #include <stdio.h>
 #include <string.h>
 #include <assert.h>
@@ -2185,7 +2192,14 @@ const char* *surfxml_statenames=NULL;
  * down here because we want the user's section 1 to have been scanned first.
  * The user has a chance to override it with an option.
  */
-#include <unistd.h>
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
+#  ifndef __STRICT_ANSI__
+#    include <io.h>
+#    include <process.h>
+#  endif
+#else
+#  include <unistd.h>
+#endif
 #endif
 
 #ifndef YY_EXTRA_TYPE