aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.core/nihil.hh
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-07-01 17:07:04 +0100
committerLexi Winter <lexi@le-fay.org>2025-07-01 17:07:04 +0100
commit2e2d1bd3b6c7776b77c33b94f30ead89367a71e6 (patch)
tree54d37ffadf8e677938d9b7a28e4e9b71be1e75c1 /nihil.core/nihil.hh
parent36427c0966faa7aecd586b397ed9b845f18172f5 (diff)
downloadnihil-2e2d1bd3b6c7776b77c33b94f30ead89367a71e6.tar.gz
nihil-2e2d1bd3b6c7776b77c33b94f30ead89367a71e6.tar.bz2
add nihil.std
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)