This repository has been archived by the owner on Mar 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
145 lines (112 loc) · 2.97 KB
/
config.h
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*
* This file must be suited to your system. Edit it if necessary.
*
* Several systems are already supported; see further below. On those systems,
* no editing should be necessary.
*/
/* Define if you have asprintf() and vasprintf(). */
/* #define HAVE_ASPRINTF */
/* Define if you have the err() family of functions. */
/* #define HAVE_ERR */
/* Define if you have explicit_bzero(). */
/* #define HAVE_EXPLICIT_BZERO */
/* Define if you have explicit_memset(). */
/* #define HAVE_EXPLICIT_MEMSET */
/* Define if your fopen() supports the "x" mode extension. */
/* #define HAVE_FOPEN_X_MODE */
/* Define if you have freezero(). */
/* #define HAVE_FREEZERO */
/* Define if you have getpagesize(). */
/* #define HAVE_GETPAGESIZE */
/* Define if you have getprogname(). */
/* #define HAVE_GETPROGNAME */
/* Define if you have memset_s(). */
/* #define HAVE_MEMSET_S */
/* Define if you have pledge(). */
/* #define HAVE_PLEDGE */
/* Define if you have readpassphrase(). */
/* #define HAVE_READPASSPHRASE */
/* Define if you have reallocarray(). */
/* #define HAVE_REALLOCARRAY */
/* Define if you have recallocarray(). */
/* #define HAVE_RECALLOCARRAY */
/* Define if you have strtonum(). */
/* #define HAVE_STRTONUM */
/* Define if you have unveil(). */
/* #define HAVE_UNVEIL */
#ifdef __DragonFly__
/* Untested */
#define HAVE_ASPRINTF
#define HAVE_ERR
#define HAVE_EXPLICIT_BZERO
#define HAVE_FOPEN_X_MODE
#define HAVE_FREEZERO
#define HAVE_GETPAGESIZE
#define HAVE_GETPROGNAME
#define HAVE_READPASSPHRASE
#define HAVE_REALLOCARRAY
#define HAVE_RECALLOCARRAY
#define HAVE_STRTONUM
#elif defined(__FreeBSD__)
#define HAVE_ASPRINTF
#define HAVE_ERR
#define HAVE_EXPLICIT_BZERO
#define HAVE_FOPEN_X_MODE
#define HAVE_GETPAGESIZE
#define HAVE_GETPROGNAME
#define HAVE_READPASSPHRASE
#define HAVE_REALLOCARRAY
#define HAVE_STRTONUM
#elif defined(__NetBSD__)
#define _OPENBSD_SOURCE
#define HAVE_ASPRINTF
#define HAVE_ERR
#define HAVE_EXPLICIT_MEMSET
#define HAVE_FOPEN_X_MODE
#define HAVE_GETPAGESIZE
#define HAVE_GETPROGNAME
#define HAVE_REALLOCARRAY
#define HAVE_STRTONUM
#elif defined(__OpenBSD__)
#define HAVE_ASPRINTF
#define HAVE_ERR
#define HAVE_EXPLICIT_BZERO
#define HAVE_FOPEN_X_MODE
#define HAVE_FREEZERO
#define HAVE_GETPAGESIZE
#define HAVE_GETPROGNAME
#define HAVE_PLEDGE
#define HAVE_READPASSPHRASE
#define HAVE_REALLOCARRAY
#define HAVE_RECALLOCARRAY
#define HAVE_STRTONUM
#define HAVE_UNVEIL
#elif defined(__linux__)
/* Tested on Debian 9.11 and 10.1 */
#define _GNU_SOURCE
#define HAVE_ASPRINTF
#define HAVE_ERR
#define HAVE_FOPEN_X_MODE
#define HAVE_GETPAGESIZE
/*
* Indirectly include features.h (for __GLIBC_PREREQ) or sys/cdefs.h (for
* __ANDROID_API__)
*/
#include <stdio.h>
#ifdef __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 25)
#define HAVE_EXPLICIT_BZERO
#endif
#if __GLIBC_PREREQ(2, 26)
#define HAVE_REALLOCARRAY
#endif
#endif
#ifdef __ANDROID_API__
#if __ANDROID_API__ >= 21
#define HAVE_GETPROGNAME
#endif
#if __ANDROID_API__ >= 29
#define HAVE_REALLOCARRAY
#endif
#endif
#endif