summaryrefslogtreecommitdiffstats
path: root/src/zix_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/zix_config.h')
-rw-r--r--src/zix_config.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/zix_config.h b/src/zix_config.h
index 7be46e4..f4965f8 100644
--- a/src/zix_config.h
+++ b/src/zix_config.h
@@ -39,6 +39,15 @@
# endif
# endif
+// POSIX.1-2001: clock_gettime()
+# ifndef HAVE_CLOCK_GETTIME
+# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
+# define HAVE_CLOCK_GETTIME 1
+# else
+# define HAVE_CLOCK_GETTIME 0
+# endif
+# endif
+
// POSIX.1-2001: mlock()
# ifndef HAVE_MLOCK
# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
@@ -57,6 +66,15 @@
# endif
# endif
+// POSIX.1-2001: sem_timedwait()
+# ifndef HAVE_SEM_TIMEDWAIT
+# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
+# define HAVE_SEM_TIMEDWAIT 1
+# else
+# define HAVE_SEM_TIMEDWAIT 0
+# endif
+# endif
+
#endif // !defined(ZIX_NO_DEFAULT_CONFIG)
/*
@@ -67,6 +85,12 @@
if the build system defines them all.
*/
+#if HAVE_CLOCK_GETTIME
+# define USE_CLOCK_GETTIME 1
+#else
+# define USE_CLOCK_GETTIME 0
+#endif
+
#if HAVE_MLOCK
# define USE_MLOCK 1
#else
@@ -79,4 +103,10 @@
# define USE_POSIX_MEMALIGN 0
#endif
+#if HAVE_SEM_TIMEDWAIT
+# define USE_SEM_TIMEDWAIT 1
+#else
+# define USE_SEM_TIMEDWAIT 0
+#endif
+
#endif // ZIX_CONFIG_H