Browse Source

include/starpu_util.h: only define struct timespec for MSVC versions older than 10.0 (i.e _MSC_VER <= 1600)

Nathalie Furmento 9 years ago
parent
commit
d0a3b993f9
1 changed files with 5 additions and 4 deletions
  1. 5 4
      include/starpu_util.h

+ 5 - 4
include/starpu_util.h

@@ -342,13 +342,14 @@ double starpu_timing_now(void);
 #if !defined(_MSC_VER) || defined(BUILDING_STARPU)
 #if !defined(_MSC_VER) || defined(BUILDING_STARPU)
 #include <pthread.h>
 #include <pthread.h>
 #endif
 #endif
-#if !defined(STARPU_HAVE_STRUCT_TIMESPEC) || defined(_MSC_VER)
+#if !defined(STARPU_HAVE_STRUCT_TIMESPEC) || (defined(_MSC_VER) && _MSC_VER <= 1600)
 /* If it didn't get defined in the standard places, then define it ourself */
 /* If it didn't get defined in the standard places, then define it ourself */
 #ifndef STARPU_TIMESPEC_DEFINED
 #ifndef STARPU_TIMESPEC_DEFINED
 #define STARPU_TIMESPEC_DEFINED 1
 #define STARPU_TIMESPEC_DEFINED 1
-struct timespec {
-  time_t  tv_sec;  /* Seconds */
-  long    tv_nsec; /* Nanoseconds */
+struct timespec
+{
+     time_t  tv_sec;  /* Seconds */
+     long    tv_nsec; /* Nanoseconds */
 };
 };
 #endif /* STARPU_TIMESPEC_DEFINED */
 #endif /* STARPU_TIMESPEC_DEFINED */
 #endif /* STARPU_HAVE_STRUCT_TIMESPEC */
 #endif /* STARPU_HAVE_STRUCT_TIMESPEC */