Selaa lähdekoodia

Avoid defining HAVE_STRUCT_TIMESPEC at all instead of playing with #undefs which will always be fragile

Samuel Thibault 10 vuotta sitten
vanhempi
commit
cbb6fcc536
2 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 1
      configure.ac
  2. 0 2
      include/starpu_util.h

+ 1 - 1
configure.ac

@@ -208,7 +208,7 @@ then
 else
 else
     AC_CHECK_LIB([pthread], [pthread_create])
     AC_CHECK_LIB([pthread], [pthread_create])
 fi
 fi
-AC_CHECK_TYPES([struct timespec], 
+AC_CHECK_TYPE([struct timespec], 
 	       AC_DEFINE(STARPU_HAVE_STRUCT_TIMESPEC,[],[struct timespec is defined]),
 	       AC_DEFINE(STARPU_HAVE_STRUCT_TIMESPEC,[],[struct timespec is defined]),
 	       [], [
 	       [], [
 #include <sys/types.h>
 #include <sys/types.h>

+ 0 - 2
include/starpu_util.h

@@ -310,8 +310,6 @@ double starpu_timing_now(void);
 #endif
 #endif
 #include <time.h>
 #include <time.h>
 #if !defined(_MSC_VER) || defined(BUILDING_STARPU)
 #if !defined(_MSC_VER) || defined(BUILDING_STARPU)
-#undef HAVE_CONFIG_H
-#undef HAVE_STRUCT_TIMESPEC
 #include <pthread.h>
 #include <pthread.h>
 #endif
 #endif
 #ifndef STARPU_HAVE_STRUCT_TIMESPEC
 #ifndef STARPU_HAVE_STRUCT_TIMESPEC