From 2e2d1bd3b6c7776b77c33b94f30ead89367a71e6 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Tue, 1 Jul 2025 17:07:04 +0100 Subject: add nihil.std --- nihil.core/nihil.hh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'nihil.core/nihil.hh') 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() # include #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) -- cgit v1.2.3