aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.core/nihil.hh
blob: da37895f995fcbb64655e5135be37bb83f2ca810 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// 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

#if defined(__FreeBSD_version)

/* fexecve() added in FreeBSD 8.0 */
#	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)
#		undef NIHIL_HAVE_GETENV_R
#		define NIHIL_HAVE_GETENV_R 1
#	endif

#endif // defined(__FreeBSD_version)

#endif // !NIHIL_HH_INCLUDED