aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.core
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.core')
-rw-r--r--nihil.core/CMakeLists.txt1
-rw-r--r--nihil.core/nihil.hh26
2 files changed, 27 insertions, 0 deletions
diff --git a/nihil.core/CMakeLists.txt b/nihil.core/CMakeLists.txt
index 4564640..2a7b3e2 100644
--- a/nihil.core/CMakeLists.txt
+++ b/nihil.core/CMakeLists.txt
@@ -1,6 +1,7 @@
# This source code is released into the public domain.
add_library(nihil.core STATIC)
+target_include_directories(nihil.core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(nihil.core
PUBLIC FILE_SET modules TYPE CXX_MODULES FILES
nihil.core.ccm
diff --git a/nihil.core/nihil.hh b/nihil.core/nihil.hh
new file mode 100644
index 0000000..cd7e789
--- /dev/null
+++ b/nihil.core/nihil.hh
@@ -0,0 +1,26 @@
+/*
+* This source code is released into the public domain.
+ */
+
+#ifndef NIHIL_HH_INCLUDED
+#define NIHIL_HH_INCLUDED
+
+#if __has_include(<sys/param.h>)
+# include <sys/param.h>
+#endif
+
+#if defined(__FreeBSD_version)
+
+/* fexecve() added in FreeBSD 8.0 */
+#if (__FreeBSD_version >= 800000)
+# define NIHIL_HAVE_FEXECVE
+#endif
+
+/* getenv_r() added in FreeBSD 15.0 */
+#if (__FreeBSD_version >= 1500000)
+# define NIHIL_HAVE_GETENV_R
+#endif
+
+#endif // defined(__FreeBSD_version)
+
+#endif // !NIHIL_HH_INCLUDED