aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.core/nihil.hh
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.core/nihil.hh')
-rw-r--r--nihil.core/nihil.hh21
1 files changed, 12 insertions, 9 deletions
diff --git a/nihil.core/nihil.hh b/nihil.core/nihil.hh
index cd7e789..da37895 100644
--- a/nihil.core/nihil.hh
+++ b/nihil.core/nihil.hh
@@ -1,10 +1,11 @@
-/*
-* This source code is released into the public domain.
- */
+// This source code is released into the public domain.
#ifndef NIHIL_HH_INCLUDED
#define NIHIL_HH_INCLUDED
+#define NIHIL_HAVE_FEXECVE 0
+#define NIHIL_HAVE_GETENV_R 0
+
#if __has_include(<sys/param.h>)
# include <sys/param.h>
#endif
@@ -12,14 +13,16 @@
#if defined(__FreeBSD_version)
/* fexecve() added in FreeBSD 8.0 */
-#if (__FreeBSD_version >= 800000)
-# define NIHIL_HAVE_FEXECVE
-#endif
+# if (__FreeBSD_version >= 800000)
+# undef NIHIL_HAVE_FEXECVE
+# define NIHIL_HAVE_FEXECVE 1
+# endif
/* getenv_r() added in FreeBSD 15.0 */
-#if (__FreeBSD_version >= 1500000)
-# define NIHIL_HAVE_GETENV_R
-#endif
+# if (__FreeBSD_version >= 1500000)
+# undef NIHIL_HAVE_GETENV_R
+# define NIHIL_HAVE_GETENV_R 1
+# endif
#endif // defined(__FreeBSD_version)