Forráskód Böngészése

port r14528 from 1.1: Use the same strategy for getting struct timespec as in our pthread.h

Samuel Thibault 10 éve
szülő
commit
353d8160a0
1 módosított fájl, 6 hozzáadás és 6 törlés
  1. 6 6
      include/starpu_util.h

+ 6 - 6
include/starpu_util.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2014  Université de Bordeaux
+ * Copyright (C) 2010-2015  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -303,14 +303,14 @@ double starpu_timing_now(void);
 
 #ifdef _WIN32
 /* Try to fetch the system definition of timespec */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include <time.h>
-#if defined(__MINGW32__) || defined(__CYGWIN__)
-#include <sys/time.h>
-#endif
 #if !defined(_MSC_VER) || defined(BUILDING_STARPU)
 #include <pthread.h>
 #endif
-#if !defined(_TIMESPEC_DEFINED) && !defined(HAVE_STRUCT_TIMESPEC)
+#ifndef STARPU_HAVE_STRUCT_TIMESPEC
 /* If it didn't get defined in the standard places, then define it ourself */
 #ifndef STARPU_TIMESPEC_DEFINED
 #define STARPU_TIMESPEC_DEFINED 1
@@ -319,7 +319,7 @@ struct timespec {
   long    tv_nsec; /* Nanoseconds */
 };
 #endif /* STARPU_TIMESPEC_DEFINED */
-#endif
+#endif /* STARPU_HAVE_STRUCT_TIMESPEC */
 #else
 #include <sys/time.h>
 #endif /* _WIN32 */