-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconftest.c
277 lines (273 loc) · 7.56 KB
/
conftest.c
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
/* confdefs.h */
#define PACKAGE_NAME "GRUB"
#define PACKAGE_TARNAME "grub"
#define PACKAGE_VERSION "2.13"
#define PACKAGE_STRING "GRUB 2.13"
#define PACKAGE_BUGREPORT "bug-grub@gnu.org"
#define PACKAGE_URL ""
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define HAVE_WCHAR_H 1
#define HAVE_FEATURES_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_DIRENT_H 1
#define HAVE_FNMATCH_H 1
#define HAVE_GETOPT_H 1
#define HAVE_SYS_CDEFS_H 1
#define HAVE_THREADS_H 1
#define HAVE_LIMITS_H 1
#define HAVE_LANGINFO_H 1
#define HAVE_SYS_MMAN_H 1
#define HAVE_MALLOC_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYSEXITS_H 1
#define HAVE_WCTYPE_H 1
#define STDC_HEADERS 1
#define _ALL_SOURCE 1
#define _DARWIN_C_SOURCE 1
#define _GNU_SOURCE 1
#define _HPUX_ALT_XOPEN_SOCKET_API 1
#define _NETBSD_SOURCE 1
#define _OPENBSD_SOURCE 1
#define _POSIX_PTHREAD_SEMANTICS 1
#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
#define __STDC_WANT_IEC_60559_DFP_EXT__ 1
#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
#define __STDC_WANT_LIB_EXT2__ 1
#define __STDC_WANT_MATH_SPEC_FUNCS__ 1
#define _TANDEM_SOURCE 1
#define __EXTENSIONS__ 1
#define PACKAGE "grub"
#define VERSION "2.13"
#define GRUB_BOOT_DIR_NAME "boot"
#define GRUB_DIR_NAME "grub"
#define YYTEXT_POINTER 1
#define ENABLE_NLS 1
#define HAVE_GETTEXT 1
#define HAVE_DCGETTEXT 1
#define SIZEOF_VOID_P 8
#define SIZEOF_LONG 8
#define SIZEOF_OFF_T 8
#define HAVE_POSIX_MEMALIGN 1
#define HAVE_MEMALIGN 1
#define HAVE_ATEXIT 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_MOUNT_H 1
#define HAVE_LIMITS_H 1
#define MAJOR_IN_SYSMACROS 1
#define HAVE_ALLOCA_H 1
#define HAVE_ALLOCA 1
#define restrict __restrict__
#define HAVE_DECL_CLEARERR_UNLOCKED 1
#define HAVE_DECL_FEOF_UNLOCKED 1
#define HAVE_DECL_FERROR_UNLOCKED 1
#define HAVE_DECL_FFLUSH_UNLOCKED 1
#define HAVE_DECL_FGETS_UNLOCKED 1
#define HAVE_DECL_FPUTC_UNLOCKED 1
#define HAVE_DECL_FPUTS_UNLOCKED 1
#define HAVE_DECL_FREAD_UNLOCKED 1
#define HAVE_DECL_FWRITE_UNLOCKED 1
#define HAVE_DECL_GETC_UNLOCKED 1
#define HAVE_DECL_GETCHAR_UNLOCKED 1
#define HAVE_DECL_PUTC_UNLOCKED 1
#define HAVE_DECL_PUTCHAR_UNLOCKED 1
#define HAVE_FLOCKFILE 1
#define HAVE_FUNLOCKFILE 1
#define HAVE_BTOWC 1
#define HAVE_FCHDIR 1
#define HAVE_FCNTL 1
#define HAVE_SYMLINK 1
#define HAVE_MEMPCPY 1
#define HAVE_FNMATCH 1
#define HAVE_MBSRTOWCS 1
#define HAVE_GETDELIM 1
#define HAVE_GETDTABLESIZE 1
#define HAVE_ISBLANK 1
#define HAVE_MBSINIT 1
#define HAVE_MBRTOWC 1
#define HAVE_ISASCII 1
#define HAVE_MPROTECT 1
#define HAVE_NL_LANGINFO 1
#define HAVE_LSTAT 1
#define HAVE_OPENAT 1
#define HAVE_PIPE 1
#define HAVE_ISWCTYPE 1
#define HAVE_SLEEP 1
#define HAVE_STRNDUP 1
#define HAVE_SNPRINTF 1
#define HAVE_WCRTOMB 1
#define HAVE_ISWCNTRL 1
#define HAVE_WCWIDTH 1
#define HAVE_WMEMPCPY 1
#define HAVE_DECL_STRERROR_R 1
#define HAVE_STRERROR_R 1
#define STRERROR_R_CHAR_P 1
#define HAVE_LANGINFO_CODESET 1
#define HAVE_MALLOC_POSIX 1
#define HAVE_DECL_FCHDIR 1
#define HAVE_WORKING_O_NOATIME 1
#define HAVE_WORKING_O_NOFOLLOW 1
#define HAVE_MBSTATE_T 1
#define HAVE_DECL_GETDELIM 1
#define HAVE_DECL_GETDTABLESIZE 1
#define HAVE_DECL_GETLINE 1
#define HAVE_GETOPT_H 1
#define HAVE_GETOPT_LONG_ONLY 1
#define HAVE_PTHREAD_API 1
#define SETLOCALE_NULL_ALL_MTSAFE 1
#define SETLOCALE_NULL_ONE_MTSAFE 1
#define HAVE_WINT_T 1
#define HAVE_LONG_LONG_INT 1
#define HAVE_UNSIGNED_LONG_LONG_INT 1
#define HAVE_WCHAR_T 1
#define HAVE_WEAK_SYMBOLS 1
#define USE_POSIX_THREADS 1
#define USE_POSIX_THREADS_FROM_LIBC 1
#define MALLOC_0_IS_NONNULL 1
#define HAVE_MAP_ANONYMOUS 1
#define HAVE_DECL_MEMRCHR 1
#define PROMOTED_MODE_T mode_t
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
#define HAVE_DECL_ALARM 1
#define HAVE__BOOL 1
#define HAVE_DECL_FCLOSEALL 1
#define __USE_MINGW_ANSI_STDIO 1
#define HAVE_DECL_ECVT 1
#define HAVE_DECL_FCVT 1
#define HAVE_DECL_GCVT 1
#define HAVE_DECL_STRDUP 1
#define HAVE_DECL_STRNDUP 1
#define HAVE_DECL_STRNLEN 1
#define _USE_STD_STAT 1
#define HAVE_DECL_EXECVPE 1
#define HAVE_INTTYPES_H_WITH_UINTMAX 1
#define HAVE_STDINT_H_WITH_UINTMAX 1
#define HAVE_INTMAX_T 1
#define DBL_EXPBIT0_WORD 1
#define DBL_EXPBIT0_BIT 20
#define HAVE_SNPRINTF 1
#define HAVE_STRNLEN 1
#define HAVE_WCSLEN 1
#define HAVE_WCSNLEN 1
#define HAVE_MBRTOWC 1
#define HAVE_WCRTOMB 1
#define HAVE_DECL__SNPRINTF 0
#define HAVE_SNPRINTF_RETVAL_C99 1
#define HAVE_SNPRINTF_TRUNCATION_C99 1
#define HAVE_DECL_VSNPRINTF 1
#define HAVE_DECL_WCSDUP 1
#define HAVE_TOWLOWER 1
#define HAVE_ALLOCA 1
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
#define HAVE_PROGRAM_INVOCATION_NAME 1
#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1
#define GNULIB_TEST_BTOWC 1
#define HAVE___BUILTIN_EXPECT 1
#define GNULIB_TEST_CALLOC_GNU 1
#define GNULIB_TEST_CALLOC_POSIX 1
#define GNULIB_TEST_CHDIR 1
#define GNULIB_TEST_CLOEXEC 1
#define GNULIB_TEST_CLOSE 1
#define HAVE_DIRFD 1
#define HAVE_DECL_DIRFD 1
#define GNULIB_TEST_DIRFD 1
#define GNULIB_TEST_DUP2 1
#define GNULIB_TEST_FCHDIR 1
#define GNULIB_TEST_FCNTL 1
#define GNULIB_FD_SAFER_FLAG 1
#define FLEXIBLE_ARRAY_MEMBER /**/
#define GNULIB_TEST_FNMATCH 1
#define HAVE_FREE_POSIX 1
#define GNULIB_TEST_FREE_POSIX 1
#define GNULIB_TEST_FSTAT 1
#define GNULIB_TEST_GETCWD 1
#define GNULIB_TEST_GETDELIM 1
#define GNULIB_TEST_GETDTABLESIZE 1
#define GNULIB_TEST_GETLINE 1
#define __GETOPT_PREFIX rpl_
#define GNULIB_TEST_GETOPT_POSIX 1
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
#define HAVE_DECL___ARGV 0
#define GNULIB_ISBLANK 1
#define HAVE___INLINE 1
#define GNULIB_TEST_LOCALECONV 1
#define HAVE_PTHREAD_RWLOCK 1
#define HAVE_PTHREAD_MUTEX_RECURSIVE 1
#define GNULIB_LOCK 1
#define GNULIB_TEST_MALLOC_GNU 1
#define GNULIB_TEST_MALLOC_POSIX 1
#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1
#define GNULIB_TEST_MBRTOWC 1
#define GNULIB_TEST_MBSINIT 1
#define GNULIB_TEST_MBSRTOWCS 1
#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H 0
#define HAVE_MBSTATE_T 1
#define HAVE_MBTOWC 1
#define GNULIB_TEST_MBTOWC 1
#define GNULIB_TEST_MEMCHR 1
#define HAVE_MEMPCPY 1
#define GNULIB_TEST_MEMPCPY 1
#define HAVE_MEMRCHR 1
#define GNULIB_TEST_MEMRCHR 1
#define GNULIB_MSVC_NOTHROW 1
#define FUNC_NL_LANGINFO_YESEXPR_WORKS 1
#define NL_LANGINFO_MTSAFE 1
#define GNULIB_TEST_NL_LANGINFO 1
#define GNULIB_TEST_OPEN 1
#define GNULIB_OPENAT 1
#define GNULIB_TEST_OPENAT 1
#define GNULIB_TEST_PIPE 1
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
#define HAVE_RAWMEMCHR 1
#define GNULIB_TEST_RAWMEMCHR 1
#define GNULIB_TEST_REALLOC_GNU 1
#define GNULIB_TEST_REALLOC_POSIX 1
#define HAVE_REALLOCARRAY 1
#define GNULIB_REALLOCARRAY 1
#define GNULIB_TEST_REALLOCARRAY 1
#define SETLOCALE_NULL_ALL_MTSAFE 1
#define SETLOCALE_NULL_ONE_MTSAFE 1
#define GNULIB_TEST_SETLOCALE_NULL 1
#define HAVE_STDINT_H 1
#define HAVE_DECL_SLEEP 1
/* end confdefs.h. */
#include <errno.h>
#include <unistd.h>
#include <signal.h>
static void
handle_alarm (int sig)
{
if (sig != SIGALRM)
_exit (2);
}
int
main (void)
{
/* Failure to compile this test due to missing alarm is okay,
since all such platforms (mingw) also lack sleep. */
unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
unsigned int remaining;
signal (SIGALRM, handle_alarm);
alarm (1);
remaining = sleep (pentecost);
if (remaining > pentecost)
return 3;
if (remaining <= pentecost - 10)
return 4;
return 0;
;
return 0;
}