Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Move code in simgrid::mc
[simgrid.git] / src / xbt / xbt_os_file.c
index 2dda1b2..4cc64d2 100644 (file)
@@ -9,7 +9,11 @@
 #include "xbt/sysdep.h"
 #include "xbt/file.h"    /* this module */
 #include "xbt/log.h"
-#include "src/portable.h"
+#include "src/internal_config.h"
+
+#ifdef _WIN32
+#include <windows.h>
+#endif
 
 #ifndef _MSC_VER
 #include "libgen.h" /* POSIX dirname */
@@ -67,7 +71,7 @@ ssize_t xbt_getline(char **buf, size_t *n, FILE *stream)
  * The argument is never modified, and the returned value must be freed after use.
  */
 char *xbt_dirname(const char *path) {
-#if _MSC_VER
+#ifdef _MSC_VER
     char drive[_MAX_DRIVE];
     char dir[_MAX_DIR];
     errno_t err;
@@ -85,7 +89,7 @@ char *xbt_dirname(const char *path) {
  * The argument is never modified, and the returned value must be freed after use.
  */
 char *xbt_basename(const char *path) {
-#if _MSC_VER
+#ifdef _MSC_VER
     char file[1024];
     char ext[1024];
     errno_t err;