Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mac OS X doesn't provide the sem_timedwait() function.
[simgrid.git] / src / portable.h
index 537d24c..99de0b8 100644 (file)
@@ -163,4 +163,13 @@ XBT_PUBLIC(int)
 gettimeofday(struct timeval *tv, struct timezone *tz);
 #endif
 
 gettimeofday(struct timeval *tv, struct timezone *tz);
 #endif
 
+#define HAVE_SEM_TIMEDWAIT     1
+
+/* mac osx doesn't have the sem_timedwait() function */
+#if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) )
+#
+# undef HAVE_SEM_TIMEDWAIT
+#
+#endif
+
 #endif /* GRAS_PORTABLE_H */
 #endif /* GRAS_PORTABLE_H */