1 | # 1 "misc-utils/hardlink.c" |
---|
2 | # 1 "<built-in>" |
---|
3 | #define __STDC__ 1 |
---|
4 | #define __STDC_HOSTED__ 1 |
---|
5 | #define __GNUC__ 4 |
---|
6 | #define __GNUC_MINOR__ 2 |
---|
7 | #define __GNUC_PATCHLEVEL__ 1 |
---|
8 | #define __APPLE_CC__ 5577 |
---|
9 | #define __SIZE_TYPE__ long unsigned int |
---|
10 | #define __PTRDIFF_TYPE__ int |
---|
11 | #define __WCHAR_TYPE__ int |
---|
12 | #define __WINT_TYPE__ int |
---|
13 | #define __INTMAX_TYPE__ long long int |
---|
14 | #define __UINTMAX_TYPE__ long long unsigned int |
---|
15 | #define __GXX_ABI_VERSION 1002 |
---|
16 | #define __SCHAR_MAX__ 127 |
---|
17 | #define __SHRT_MAX__ 32767 |
---|
18 | #define __INT_MAX__ 2147483647 |
---|
19 | #define __LONG_MAX__ 2147483647L |
---|
20 | #define __LONG_LONG_MAX__ 9223372036854775807LL |
---|
21 | #define __WCHAR_MAX__ 2147483647 |
---|
22 | #define __CHAR_BIT__ 8 |
---|
23 | #define __INTMAX_MAX__ 9223372036854775807LL |
---|
24 | #define __FLT_EVAL_METHOD__ 0 |
---|
25 | #define __DEC_EVAL_METHOD__ 2 |
---|
26 | #define __FLT_RADIX__ 2 |
---|
27 | #define __FLT_MANT_DIG__ 24 |
---|
28 | #define __FLT_DIG__ 6 |
---|
29 | #define __FLT_MIN_EXP__ (-125) |
---|
30 | #define __FLT_MIN_10_EXP__ (-37) |
---|
31 | #define __FLT_MAX_EXP__ 128 |
---|
32 | #define __FLT_MAX_10_EXP__ 38 |
---|
33 | #define __FLT_MAX__ 3.40282347e+38F |
---|
34 | #define __FLT_MIN__ 1.17549435e-38F |
---|
35 | #define __FLT_EPSILON__ 1.19209290e-7F |
---|
36 | #define __FLT_DENORM_MIN__ 1.40129846e-45F |
---|
37 | #define __FLT_HAS_DENORM__ 1 |
---|
38 | #define __FLT_HAS_INFINITY__ 1 |
---|
39 | #define __FLT_HAS_QUIET_NAN__ 1 |
---|
40 | #define __DBL_MANT_DIG__ 53 |
---|
41 | #define __DBL_DIG__ 15 |
---|
42 | #define __DBL_MIN_EXP__ (-1021) |
---|
43 | #define __DBL_MIN_10_EXP__ (-307) |
---|
44 | #define __DBL_MAX_EXP__ 1024 |
---|
45 | #define __DBL_MAX_10_EXP__ 308 |
---|
46 | #define __DBL_MAX__ 1.7976931348623157e+308 |
---|
47 | #define __DBL_MIN__ 2.2250738585072014e-308 |
---|
48 | #define __DBL_EPSILON__ 2.2204460492503131e-16 |
---|
49 | #define __DBL_DENORM_MIN__ 4.9406564584124654e-324 |
---|
50 | #define __DBL_HAS_DENORM__ 1 |
---|
51 | #define __DBL_HAS_INFINITY__ 1 |
---|
52 | #define __DBL_HAS_QUIET_NAN__ 1 |
---|
53 | #define __LDBL_MANT_DIG__ 106 |
---|
54 | #define __LDBL_DIG__ 31 |
---|
55 | #define __LDBL_MIN_EXP__ (-968) |
---|
56 | #define __LDBL_MIN_10_EXP__ (-291) |
---|
57 | #define __LDBL_MAX_EXP__ 1024 |
---|
58 | #define __LDBL_MAX_10_EXP__ 308 |
---|
59 | #define __DECIMAL_DIG__ 33 |
---|
60 | #define __LDBL_MAX__ 1.79769313486231580793728971405301e+308L |
---|
61 | #define __LDBL_MIN__ 2.00416836000897277799610805135016e-292L |
---|
62 | #define __LDBL_EPSILON__ 4.94065645841246544176568792868221e-324L |
---|
63 | #define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L |
---|
64 | #define __LDBL_HAS_DENORM__ 1 |
---|
65 | #define __LDBL_HAS_INFINITY__ 1 |
---|
66 | #define __LDBL_HAS_QUIET_NAN__ 1 |
---|
67 | #define __DEC32_MANT_DIG__ 7 |
---|
68 | #define __DEC32_MIN_EXP__ (-95) |
---|
69 | #define __DEC32_MAX_EXP__ 96 |
---|
70 | #define __DEC32_MIN__ 1E-95DF |
---|
71 | #define __DEC32_MAX__ 9.999999E96DF |
---|
72 | #define __DEC32_EPSILON__ 1E-6DF |
---|
73 | #define __DEC32_DEN__ 0.000001E-95DF |
---|
74 | #define __DEC64_MANT_DIG__ 16 |
---|
75 | #define __DEC64_MIN_EXP__ (-383) |
---|
76 | #define __DEC64_MAX_EXP__ 384 |
---|
77 | #define __DEC64_MIN__ 1E-383DD |
---|
78 | #define __DEC64_MAX__ 9.999999999999999E384DD |
---|
79 | #define __DEC64_EPSILON__ 1E-15DD |
---|
80 | #define __DEC64_DEN__ 0.000000000000001E-383DD |
---|
81 | #define __DEC128_MANT_DIG__ 34 |
---|
82 | #define __DEC128_MIN_EXP__ (-6143) |
---|
83 | #define __DEC128_MAX_EXP__ 6144 |
---|
84 | #define __DEC128_MIN__ 1E-6143DL |
---|
85 | #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL |
---|
86 | #define __DEC128_EPSILON__ 1E-33DL |
---|
87 | #define __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL |
---|
88 | #define __REGISTER_PREFIX__ |
---|
89 | #define __USER_LABEL_PREFIX__ _ |
---|
90 | #define __VERSION__ "4.2.1 (Apple Inc. build 5577)" |
---|
91 | #define __GNUC_GNU_INLINE__ 1 |
---|
92 | #define __OPTIMIZE__ 1 |
---|
93 | #define __FINITE_MATH_ONLY__ 0 |
---|
94 | #define __pic__ 2 |
---|
95 | #define __PIC__ 2 |
---|
96 | #define _ARCH_PPC 1 |
---|
97 | #define _ARCH_PPCGR 1 |
---|
98 | #define __ALTIVEC__ 1 |
---|
99 | #define __VEC__ 10206 |
---|
100 | #define __vector __attribute__((altivec(vector__))) |
---|
101 | #define __pixel __attribute__((altivec(pixel__))) unsigned short |
---|
102 | #define __bool __attribute__((altivec(bool__))) unsigned |
---|
103 | #define __BIG_ENDIAN__ 1 |
---|
104 | #define _BIG_ENDIAN 1 |
---|
105 | #define __LONG_DOUBLE_128__ 1 |
---|
106 | #define __ppc__ 1 |
---|
107 | #define __POWERPC__ 1 |
---|
108 | #define __NATURAL_ALIGNMENT__ 1 |
---|
109 | #define __MACH__ 1 |
---|
110 | #define __APPLE__ 1 |
---|
111 | #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1058 |
---|
112 | #define __CONSTANT_CFSTRINGS__ 1 |
---|
113 | #define __strong |
---|
114 | #define __weak |
---|
115 | #define OBJC_NEW_PROPERTIES 1 |
---|
116 | # 1 "<command-line>" |
---|
117 | #define __DYNAMIC__ 1 |
---|
118 | #define HAVE_CONFIG_H 1 |
---|
119 | #define LOCALEDIR "/opt/local/share/locale" |
---|
120 | #define _PATH_RUNSTATEDIR "/opt/local/var/run" |
---|
121 | #define _PATH_SYSCONFSTATICDIR "/opt/local/lib" |
---|
122 | # 1 "./config.h" 1 |
---|
123 | # 11 "./config.h" |
---|
124 | #define CHFN_CHSH_PASSWORD 1 |
---|
125 | |
---|
126 | |
---|
127 | #define CONFIG_ADJTIME_PATH "/etc/adjtime" |
---|
128 | |
---|
129 | |
---|
130 | |
---|
131 | |
---|
132 | |
---|
133 | |
---|
134 | #define ENABLE_NLS 1 |
---|
135 | |
---|
136 | |
---|
137 | #define FS_SEARCH_PATH "/sbin:/sbin/fs.d:/sbin/fs" |
---|
138 | # 37 "./config.h" |
---|
139 | #define HAVE_CFLOCALECOPYCURRENT 1 |
---|
140 | |
---|
141 | |
---|
142 | |
---|
143 | #define HAVE_CFPREFERENCESCOPYAPPVALUE 1 |
---|
144 | |
---|
145 | |
---|
146 | |
---|
147 | |
---|
148 | |
---|
149 | #define HAVE_CLOCK_GETTIME 1 |
---|
150 | # 66 "./config.h" |
---|
151 | #define HAVE_DCGETTEXT 1 |
---|
152 | |
---|
153 | |
---|
154 | |
---|
155 | #define HAVE_DECL_BLK_ZONE_REP_CAPACITY 0 |
---|
156 | |
---|
157 | |
---|
158 | |
---|
159 | #define HAVE_DECL_CPU_ALLOC 0 |
---|
160 | |
---|
161 | |
---|
162 | |
---|
163 | #define HAVE_DECL_DIRFD 1 |
---|
164 | |
---|
165 | |
---|
166 | |
---|
167 | |
---|
168 | |
---|
169 | |
---|
170 | |
---|
171 | #define HAVE_DECL__NL_TIME_WEEK_1STDAY 0 |
---|
172 | # 95 "./config.h" |
---|
173 | #define HAVE_DLFCN_H 1 |
---|
174 | # 107 "./config.h" |
---|
175 | #define HAVE_ERR 1 |
---|
176 | |
---|
177 | |
---|
178 | #define HAVE_ERRNO_H 1 |
---|
179 | |
---|
180 | |
---|
181 | #define HAVE_ERRX 1 |
---|
182 | |
---|
183 | |
---|
184 | #define HAVE_ERR_H 1 |
---|
185 | # 125 "./config.h" |
---|
186 | #define HAVE_FCNTL_H 1 |
---|
187 | |
---|
188 | |
---|
189 | #define HAVE_FPURGE 1 |
---|
190 | |
---|
191 | |
---|
192 | #define HAVE_FSEEKO 1 |
---|
193 | |
---|
194 | |
---|
195 | #define HAVE_FSTATAT 1 |
---|
196 | |
---|
197 | |
---|
198 | #define HAVE_FSYNC 1 |
---|
199 | |
---|
200 | |
---|
201 | #define HAVE_FUTIMENS 1 |
---|
202 | |
---|
203 | |
---|
204 | #define HAVE_GETDOMAINNAME 1 |
---|
205 | |
---|
206 | |
---|
207 | #define HAVE_GETDTABLESIZE 1 |
---|
208 | |
---|
209 | |
---|
210 | |
---|
211 | |
---|
212 | |
---|
213 | #define HAVE_GETMNTINFO 1 |
---|
214 | |
---|
215 | |
---|
216 | #define HAVE_GETOPT_H 1 |
---|
217 | |
---|
218 | |
---|
219 | |
---|
220 | |
---|
221 | |
---|
222 | #define HAVE_GETRLIMIT 1 |
---|
223 | |
---|
224 | |
---|
225 | |
---|
226 | |
---|
227 | |
---|
228 | #define HAVE_GETTEXT 1 |
---|
229 | |
---|
230 | |
---|
231 | #define HAVE_GETTTYNAM 1 |
---|
232 | |
---|
233 | |
---|
234 | #define HAVE_GETUSERSHELL 1 |
---|
235 | |
---|
236 | |
---|
237 | #define HAVE_ICONV 1 |
---|
238 | # 185 "./config.h" |
---|
239 | #define HAVE_INTTYPES_H 1 |
---|
240 | # 194 "./config.h" |
---|
241 | #define HAVE_ISNAN 1 |
---|
242 | |
---|
243 | |
---|
244 | #define HAVE_JRAND48 1 |
---|
245 | |
---|
246 | |
---|
247 | |
---|
248 | |
---|
249 | |
---|
250 | #define HAVE_LANGINFO_H 1 |
---|
251 | # 212 "./config.h" |
---|
252 | #define HAVE_LCHOWN 1 |
---|
253 | # 236 "./config.h" |
---|
254 | #define HAVE_LIBNCURSESW 1 |
---|
255 | |
---|
256 | |
---|
257 | #define HAVE_LIBREADLINE 1 |
---|
258 | # 263 "./config.h" |
---|
259 | #define HAVE_LIBUTIL 1 |
---|
260 | # 341 "./config.h" |
---|
261 | #define HAVE_LOCALE_H 1 |
---|
262 | |
---|
263 | |
---|
264 | |
---|
265 | |
---|
266 | |
---|
267 | #define HAVE_MAGIC 1 |
---|
268 | |
---|
269 | |
---|
270 | #define HAVE_MEMORY_H 1 |
---|
271 | # 362 "./config.h" |
---|
272 | #define HAVE_NANOSLEEP 1 |
---|
273 | # 371 "./config.h" |
---|
274 | #define HAVE_NCURSES_H 1 |
---|
275 | # 380 "./config.h" |
---|
276 | #define HAVE_NETINET_IN_H 1 |
---|
277 | |
---|
278 | |
---|
279 | #define HAVE_NET_IF_DL_H 1 |
---|
280 | |
---|
281 | |
---|
282 | #define HAVE_NET_IF_H 1 |
---|
283 | |
---|
284 | |
---|
285 | #define HAVE_NEWLOCALE 1 |
---|
286 | |
---|
287 | |
---|
288 | |
---|
289 | |
---|
290 | |
---|
291 | #define HAVE_OPENAT 1 |
---|
292 | |
---|
293 | |
---|
294 | |
---|
295 | |
---|
296 | |
---|
297 | #define HAVE_PATHS_H 1 |
---|
298 | # 434 "./config.h" |
---|
299 | #define HAVE_QSORT_R 1 |
---|
300 | |
---|
301 | |
---|
302 | #define HAVE_REBOOT 1 |
---|
303 | |
---|
304 | |
---|
305 | #define HAVE_RESIZETERM 1 |
---|
306 | |
---|
307 | |
---|
308 | |
---|
309 | |
---|
310 | |
---|
311 | #define HAVE_SA_LEN 1 |
---|
312 | # 473 "./config.h" |
---|
313 | #define HAVE_SENDFILE 1 |
---|
314 | |
---|
315 | |
---|
316 | #define HAVE_SETITIMER 1 |
---|
317 | |
---|
318 | |
---|
319 | |
---|
320 | |
---|
321 | |
---|
322 | #define HAVE_SETPROGNAME 1 |
---|
323 | # 515 "./config.h" |
---|
324 | #define HAVE_SRANDOM 1 |
---|
325 | |
---|
326 | |
---|
327 | #define HAVE_STDINT_H 1 |
---|
328 | |
---|
329 | |
---|
330 | |
---|
331 | |
---|
332 | |
---|
333 | #define HAVE_STDLIB_H 1 |
---|
334 | |
---|
335 | |
---|
336 | #define HAVE_STRINGS_H 1 |
---|
337 | |
---|
338 | |
---|
339 | #define HAVE_STRING_H 1 |
---|
340 | |
---|
341 | |
---|
342 | |
---|
343 | |
---|
344 | |
---|
345 | #define HAVE_STRNDUP 1 |
---|
346 | |
---|
347 | |
---|
348 | #define HAVE_STRNLEN 1 |
---|
349 | |
---|
350 | |
---|
351 | #define HAVE_STRSIGNAL_DECL 1 |
---|
352 | |
---|
353 | |
---|
354 | #define HAVE_STRTOD_L 1 |
---|
355 | # 554 "./config.h" |
---|
356 | #define HAVE_STRUCT_TM_TM_ZONE 1 |
---|
357 | |
---|
358 | |
---|
359 | |
---|
360 | |
---|
361 | |
---|
362 | #define HAVE_SWAPON 1 |
---|
363 | |
---|
364 | |
---|
365 | #define HAVE_SYSCONF 1 |
---|
366 | # 572 "./config.h" |
---|
367 | #define HAVE_SYS_DISK_H 1 |
---|
368 | |
---|
369 | |
---|
370 | |
---|
371 | |
---|
372 | |
---|
373 | #define HAVE_SYS_FILE_H 1 |
---|
374 | |
---|
375 | |
---|
376 | #define HAVE_SYS_IOCCOM_H 1 |
---|
377 | |
---|
378 | |
---|
379 | #define HAVE_SYS_IOCTL_H 1 |
---|
380 | # 593 "./config.h" |
---|
381 | #define HAVE_SYS_MOUNT_H 1 |
---|
382 | |
---|
383 | |
---|
384 | #define HAVE_SYS_PARAM_H 1 |
---|
385 | |
---|
386 | |
---|
387 | |
---|
388 | |
---|
389 | |
---|
390 | #define HAVE_SYS_RESOURCE_H 1 |
---|
391 | # 611 "./config.h" |
---|
392 | #define HAVE_SYS_SOCKET_H 1 |
---|
393 | |
---|
394 | |
---|
395 | #define HAVE_SYS_SOCKIO_H 1 |
---|
396 | |
---|
397 | |
---|
398 | #define HAVE_SYS_STAT_H 1 |
---|
399 | |
---|
400 | |
---|
401 | |
---|
402 | |
---|
403 | |
---|
404 | #define HAVE_SYS_SYSCALL_H 1 |
---|
405 | # 632 "./config.h" |
---|
406 | #define HAVE_SYS_TIME_H 1 |
---|
407 | |
---|
408 | |
---|
409 | #define HAVE_SYS_TTYDEFAULTS_H 1 |
---|
410 | |
---|
411 | |
---|
412 | #define HAVE_SYS_TYPES_H 1 |
---|
413 | |
---|
414 | |
---|
415 | #define HAVE_SYS_UCRED_H 1 |
---|
416 | |
---|
417 | |
---|
418 | #define HAVE_SYS_UN_H 1 |
---|
419 | |
---|
420 | |
---|
421 | #define HAVE_SYS_XATTR_H 1 |
---|
422 | |
---|
423 | |
---|
424 | #define HAVE_TERM_H 1 |
---|
425 | |
---|
426 | |
---|
427 | #define HAVE_TIMEGM 1 |
---|
428 | # 662 "./config.h" |
---|
429 | #define HAVE_TM_GMTOFF 1 |
---|
430 | |
---|
431 | |
---|
432 | |
---|
433 | #define HAVE_TM_ZONE 1 |
---|
434 | |
---|
435 | |
---|
436 | |
---|
437 | |
---|
438 | |
---|
439 | |
---|
440 | #define HAVE_UNION_SEMUN 1 |
---|
441 | |
---|
442 | |
---|
443 | #define HAVE_UNISTD_H 1 |
---|
444 | |
---|
445 | |
---|
446 | #define HAVE_UNLINKAT 1 |
---|
447 | # 688 "./config.h" |
---|
448 | #define HAVE_USELOCALE 1 |
---|
449 | |
---|
450 | |
---|
451 | #define HAVE_USE_DEFAULT_COLORS 1 |
---|
452 | |
---|
453 | |
---|
454 | #define HAVE_USLEEP 1 |
---|
455 | |
---|
456 | |
---|
457 | #define HAVE_UTIMENSAT 1 |
---|
458 | |
---|
459 | |
---|
460 | #define HAVE_UTMPX_H 1 |
---|
461 | |
---|
462 | |
---|
463 | #define HAVE_UTMP_H 1 |
---|
464 | |
---|
465 | |
---|
466 | |
---|
467 | |
---|
468 | |
---|
469 | #define HAVE_VWARNX 1 |
---|
470 | |
---|
471 | |
---|
472 | #define HAVE_WARN 1 |
---|
473 | |
---|
474 | |
---|
475 | #define HAVE_WARNX 1 |
---|
476 | |
---|
477 | |
---|
478 | #define HAVE_WIDECHAR 1 |
---|
479 | # 727 "./config.h" |
---|
480 | #define HAVE___PROGNAME 1 |
---|
481 | |
---|
482 | |
---|
483 | |
---|
484 | |
---|
485 | |
---|
486 | #define LIBBLKID_DATE "28-Mar-2022" |
---|
487 | |
---|
488 | |
---|
489 | #define LIBBLKID_VERSION "2.38.0" |
---|
490 | |
---|
491 | |
---|
492 | #define LIBFDISK_VERSION "2.38.0" |
---|
493 | |
---|
494 | |
---|
495 | #define LIBMOUNT_VERSION "2.38.0" |
---|
496 | |
---|
497 | |
---|
498 | #define LIBSMARTCOLS_VERSION "2.38.0" |
---|
499 | # 754 "./config.h" |
---|
500 | #define LT_OBJDIR ".libs/" |
---|
501 | # 763 "./config.h" |
---|
502 | #define ONLY_LISTED_SHELLS 1 |
---|
503 | |
---|
504 | |
---|
505 | #define PACKAGE "util-linux" |
---|
506 | |
---|
507 | |
---|
508 | #define PACKAGE_BUGREPORT "kzak@redhat.com" |
---|
509 | |
---|
510 | |
---|
511 | #define PACKAGE_NAME "util-linux" |
---|
512 | |
---|
513 | |
---|
514 | #define PACKAGE_STRING "util-linux 2.38" |
---|
515 | |
---|
516 | |
---|
517 | #define PACKAGE_TARNAME "util-linux" |
---|
518 | |
---|
519 | |
---|
520 | #define PACKAGE_URL "http://www.kernel.org/pub/linux/utils/util-linux/" |
---|
521 | |
---|
522 | |
---|
523 | #define PACKAGE_VERSION "2.38" |
---|
524 | |
---|
525 | |
---|
526 | |
---|
527 | |
---|
528 | |
---|
529 | #define STDC_HEADERS 1 |
---|
530 | # 838 "./config.h" |
---|
531 | #define USE_COLORS_BY_DEFAULT 1 |
---|
532 | |
---|
533 | |
---|
534 | |
---|
535 | |
---|
536 | |
---|
537 | #define USE_HWCLOCK_GPLv3_DATETIME 1 |
---|
538 | # 863 "./config.h" |
---|
539 | #define _ALL_SOURCE 1 |
---|
540 | |
---|
541 | |
---|
542 | |
---|
543 | #define _GNU_SOURCE 1 |
---|
544 | |
---|
545 | |
---|
546 | |
---|
547 | #define _POSIX_PTHREAD_SEMANTICS 1 |
---|
548 | |
---|
549 | |
---|
550 | |
---|
551 | #define _TANDEM_SOURCE 1 |
---|
552 | |
---|
553 | |
---|
554 | |
---|
555 | #define __EXTENSIONS__ 1 |
---|
556 | |
---|
557 | |
---|
558 | |
---|
559 | |
---|
560 | #define USE_TTY_GROUP 1 |
---|
561 | # 893 "./config.h" |
---|
562 | #define VERSION "2.38" |
---|
563 | # 903 "./config.h" |
---|
564 | #define WORDS_BIGENDIAN 1 |
---|
565 | |
---|
566 | |
---|
567 | |
---|
568 | |
---|
569 | #define _DARWIN_C_SOURCE 1 |
---|
570 | |
---|
571 | |
---|
572 | |
---|
573 | #define _DARWIN_USE_64_BIT_INODE 1 |
---|
574 | # 1 "<command-line>" 2 |
---|
575 | # 1 "misc-utils/hardlink.c" |
---|
576 | # 26 "misc-utils/hardlink.c" |
---|
577 | #define _POSIX_C_SOURCE 200112L |
---|
578 | #define _XOPEN_SOURCE 600 |
---|
579 | |
---|
580 | # 1 "/usr/include/sys/types.h" 1 3 4 |
---|
581 | # 70 "/usr/include/sys/types.h" 3 4 |
---|
582 | #define _SYS_TYPES_H_ |
---|
583 | |
---|
584 | # 1 "/usr/include/sys/appleapiopts.h" 1 3 4 |
---|
585 | # 30 "/usr/include/sys/appleapiopts.h" 3 4 |
---|
586 | #define __SYS_APPLEAPIOPTS_H__ |
---|
587 | |
---|
588 | |
---|
589 | |
---|
590 | #define __APPLE_API_STANDARD |
---|
591 | |
---|
592 | |
---|
593 | |
---|
594 | #define __APPLE_API_STABLE |
---|
595 | |
---|
596 | |
---|
597 | |
---|
598 | |
---|
599 | |
---|
600 | #define __APPLE_API_EVOLVING |
---|
601 | |
---|
602 | |
---|
603 | |
---|
604 | #define __APPLE_API_UNSTABLE |
---|
605 | |
---|
606 | |
---|
607 | |
---|
608 | #define __APPLE_API_PRIVATE |
---|
609 | |
---|
610 | |
---|
611 | |
---|
612 | #define __APPLE_API_OBSOLETE |
---|
613 | # 73 "/usr/include/sys/types.h" 2 3 4 |
---|
614 | |
---|
615 | |
---|
616 | # 1 "/usr/include/sys/cdefs.h" 1 3 4 |
---|
617 | # 68 "/usr/include/sys/cdefs.h" 3 4 |
---|
618 | #define _CDEFS_H_ |
---|
619 | |
---|
620 | |
---|
621 | |
---|
622 | |
---|
623 | |
---|
624 | #define __BEGIN_DECLS |
---|
625 | #define __END_DECLS |
---|
626 | # 86 "/usr/include/sys/cdefs.h" 3 4 |
---|
627 | #define __P(protos) protos |
---|
628 | #define __CONCAT(x,y) x ## y |
---|
629 | #define __STRING(x) #x |
---|
630 | |
---|
631 | #define __const const |
---|
632 | #define __signed signed |
---|
633 | #define __volatile volatile |
---|
634 | # 140 "/usr/include/sys/cdefs.h" 3 4 |
---|
635 | #define __dead2 __attribute__((__noreturn__)) |
---|
636 | #define __pure2 __attribute__((__const__)) |
---|
637 | |
---|
638 | |
---|
639 | |
---|
640 | #define __unused __attribute__((__unused__)) |
---|
641 | # 158 "/usr/include/sys/cdefs.h" 3 4 |
---|
642 | #define __dead |
---|
643 | #define __pure |
---|
644 | # 175 "/usr/include/sys/cdefs.h" 3 4 |
---|
645 | #define __restrict |
---|
646 | # 190 "/usr/include/sys/cdefs.h" 3 4 |
---|
647 | #define __printflike(fmtarg,firstvararg) __attribute__((__format__ (__printf__, fmtarg, firstvararg))) |
---|
648 | |
---|
649 | #define __scanflike(fmtarg,firstvararg) __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) |
---|
650 | |
---|
651 | |
---|
652 | |
---|
653 | |
---|
654 | |
---|
655 | |
---|
656 | #define __IDSTRING(name,string) static const char name[] __unused = string |
---|
657 | |
---|
658 | |
---|
659 | #define __COPYRIGHT(s) __IDSTRING(copyright,s) |
---|
660 | |
---|
661 | |
---|
662 | |
---|
663 | #define __RCSID(s) __IDSTRING(rcsid,s) |
---|
664 | |
---|
665 | |
---|
666 | |
---|
667 | #define __SCCSID(s) __IDSTRING(sccsid,s) |
---|
668 | |
---|
669 | |
---|
670 | |
---|
671 | #define __PROJECT_VERSION(s) __IDSTRING(project_version,s) |
---|
672 | # 277 "/usr/include/sys/cdefs.h" 3 4 |
---|
673 | #define __DARWIN_UNIX03 1 |
---|
674 | # 291 "/usr/include/sys/cdefs.h" 3 4 |
---|
675 | #define __DARWIN_64_BIT_INO_T 1 |
---|
676 | # 300 "/usr/include/sys/cdefs.h" 3 4 |
---|
677 | #define __DARWIN_NON_CANCELABLE 0 |
---|
678 | |
---|
679 | |
---|
680 | |
---|
681 | |
---|
682 | #define __DARWIN_VERS_1050 1 |
---|
683 | # 316 "/usr/include/sys/cdefs.h" 3 4 |
---|
684 | #define __DARWIN_SUF_UNIX03 "$UNIX2003" |
---|
685 | #define __DARWIN_SUF_UNIX03_SET 1 |
---|
686 | |
---|
687 | |
---|
688 | |
---|
689 | |
---|
690 | |
---|
691 | |
---|
692 | #define __DARWIN_SUF_64_BIT_INO_T "$INODE64" |
---|
693 | |
---|
694 | |
---|
695 | |
---|
696 | |
---|
697 | |
---|
698 | |
---|
699 | |
---|
700 | #define __DARWIN_SUF_NON_CANCELABLE |
---|
701 | |
---|
702 | |
---|
703 | |
---|
704 | #define __DARWIN_SUF_1050 "$1050" |
---|
705 | # 349 "/usr/include/sys/cdefs.h" 3 4 |
---|
706 | #define __DARWIN_SUF_EXTSN "$DARWIN_EXTSN" |
---|
707 | |
---|
708 | |
---|
709 | |
---|
710 | |
---|
711 | #define __DARWIN_ALIAS(sym) __asm("_" __STRING(sym) __DARWIN_SUF_UNIX03) |
---|
712 | #define __DARWIN_ALIAS_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) |
---|
713 | #define __DARWIN_ALIAS_I(sym) __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03) |
---|
714 | #define __DARWIN_INODE64(sym) __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T) |
---|
715 | |
---|
716 | #define __DARWIN_1050(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050) |
---|
717 | #define __DARWIN_1050ALIAS(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_UNIX03) |
---|
718 | #define __DARWIN_1050ALIAS_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_NON_CANCELABLE __DARWIN_SUF_UNIX03) |
---|
719 | #define __DARWIN_1050ALIAS_I(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T __DARWIN_SUF_UNIX03) |
---|
720 | #define __DARWIN_1050INODE64(sym) __asm("_" __STRING(sym) __DARWIN_SUF_1050 __DARWIN_SUF_64_BIT_INO_T) |
---|
721 | |
---|
722 | #define __DARWIN_EXTSN(sym) __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN) |
---|
723 | #define __DARWIN_EXTSN_C(sym) __asm("_" __STRING(sym) __DARWIN_SUF_EXTSN __DARWIN_SUF_NON_CANCELABLE) |
---|
724 | # 403 "/usr/include/sys/cdefs.h" 3 4 |
---|
725 | #undef _POSIX_C_SOURCE |
---|
726 | #define _POSIX_C_SOURCE 200112L |
---|
727 | # 424 "/usr/include/sys/cdefs.h" 3 4 |
---|
728 | #define __DARWIN_NO_LONG_LONG (defined(__STRICT_ANSI__) && (__STDC_VERSION__-0 < 199901L) && !defined(__GNUG__)) |
---|
729 | # 440 "/usr/include/sys/cdefs.h" 3 4 |
---|
730 | #define __DARWIN_LDBL_COMPAT(x) __asm("_" __STRING(x) "$LDBL128") |
---|
731 | |
---|
732 | #define __DARWIN_LDBL_COMPAT2(x) __asm("_" __STRING(x) "$LDBL128") |
---|
733 | #define __DARWIN_LONG_DOUBLE_IS_DOUBLE 0 |
---|
734 | # 461 "/usr/include/sys/cdefs.h" 3 4 |
---|
735 | #define __deprecated __attribute__((deprecated)) |
---|
736 | # 483 "/usr/include/sys/cdefs.h" 3 4 |
---|
737 | #define _DARWIN_FEATURE_UNIX_CONFORMANCE 3 |
---|
738 | |
---|
739 | |
---|
740 | |
---|
741 | |
---|
742 | |
---|
743 | |
---|
744 | |
---|
745 | #define _DARWIN_FEATURE_64_BIT_INODE 1 |
---|
746 | # 76 "/usr/include/sys/types.h" 2 3 4 |
---|
747 | |
---|
748 | |
---|
749 | # 1 "/usr/include/machine/types.h" 1 3 4 |
---|
750 | # 32 "/usr/include/machine/types.h" 3 4 |
---|
751 | #define _BSD_MACHINE_TYPES_H_ |
---|
752 | |
---|
753 | |
---|
754 | # 1 "/usr/include/ppc/types.h" 1 3 4 |
---|
755 | # 67 "/usr/include/ppc/types.h" 3 4 |
---|
756 | #define _MACHTYPES_H_ |
---|
757 | |
---|
758 | |
---|
759 | # 1 "/usr/include/ppc/_types.h" 1 3 4 |
---|
760 | # 29 "/usr/include/ppc/_types.h" 3 4 |
---|
761 | #define _BSD_PPC__TYPES_H_ |
---|
762 | |
---|
763 | |
---|
764 | |
---|
765 | |
---|
766 | |
---|
767 | |
---|
768 | |
---|
769 | typedef signed char __int8_t; |
---|
770 | |
---|
771 | |
---|
772 | |
---|
773 | typedef unsigned char __uint8_t; |
---|
774 | typedef short __int16_t; |
---|
775 | typedef unsigned short __uint16_t; |
---|
776 | typedef int __int32_t; |
---|
777 | typedef unsigned int __uint32_t; |
---|
778 | typedef long long __int64_t; |
---|
779 | typedef unsigned long long __uint64_t; |
---|
780 | |
---|
781 | typedef long __darwin_intptr_t; |
---|
782 | typedef unsigned int __darwin_natural_t; |
---|
783 | # 70 "/usr/include/ppc/_types.h" 3 4 |
---|
784 | typedef int __darwin_ct_rune_t; |
---|
785 | |
---|
786 | |
---|
787 | |
---|
788 | |
---|
789 | |
---|
790 | typedef union { |
---|
791 | char __mbstate8[128]; |
---|
792 | long long _mbstateL; |
---|
793 | } __mbstate_t; |
---|
794 | |
---|
795 | typedef __mbstate_t __darwin_mbstate_t; |
---|
796 | |
---|
797 | |
---|
798 | typedef int __darwin_ptrdiff_t; |
---|
799 | |
---|
800 | |
---|
801 | |
---|
802 | |
---|
803 | |
---|
804 | typedef long unsigned int __darwin_size_t; |
---|
805 | |
---|
806 | |
---|
807 | |
---|
808 | |
---|
809 | |
---|
810 | typedef __builtin_va_list __darwin_va_list; |
---|
811 | |
---|
812 | |
---|
813 | |
---|
814 | |
---|
815 | |
---|
816 | typedef int __darwin_wchar_t; |
---|
817 | |
---|
818 | |
---|
819 | |
---|
820 | |
---|
821 | typedef __darwin_wchar_t __darwin_rune_t; |
---|
822 | |
---|
823 | |
---|
824 | typedef int __darwin_wint_t; |
---|
825 | |
---|
826 | |
---|
827 | |
---|
828 | |
---|
829 | typedef unsigned long __darwin_clock_t; |
---|
830 | typedef __uint32_t __darwin_socklen_t; |
---|
831 | typedef long __darwin_ssize_t; |
---|
832 | typedef long __darwin_time_t; |
---|
833 | # 71 "/usr/include/ppc/types.h" 2 3 4 |
---|
834 | |
---|
835 | |
---|
836 | |
---|
837 | |
---|
838 | |
---|
839 | |
---|
840 | #define _INT8_T |
---|
841 | typedef signed char int8_t; |
---|
842 | |
---|
843 | typedef unsigned char u_int8_t; |
---|
844 | |
---|
845 | #define _INT16_T |
---|
846 | typedef short int16_t; |
---|
847 | |
---|
848 | typedef unsigned short u_int16_t; |
---|
849 | |
---|
850 | #define _INT32_T |
---|
851 | typedef int int32_t; |
---|
852 | |
---|
853 | typedef unsigned int u_int32_t; |
---|
854 | |
---|
855 | #define _INT64_T |
---|
856 | typedef long long int64_t; |
---|
857 | |
---|
858 | typedef unsigned long long u_int64_t; |
---|
859 | |
---|
860 | |
---|
861 | |
---|
862 | |
---|
863 | typedef int32_t register_t; |
---|
864 | |
---|
865 | |
---|
866 | |
---|
867 | #define _INTPTR_T |
---|
868 | typedef __darwin_intptr_t intptr_t; |
---|
869 | |
---|
870 | |
---|
871 | #define _UINTPTR_T |
---|
872 | typedef unsigned long uintptr_t; |
---|
873 | |
---|
874 | |
---|
875 | |
---|
876 | |
---|
877 | |
---|
878 | |
---|
879 | |
---|
880 | typedef u_int64_t user_addr_t; |
---|
881 | typedef u_int64_t user_size_t; |
---|
882 | typedef int64_t user_ssize_t; |
---|
883 | typedef int64_t user_long_t; |
---|
884 | typedef u_int64_t user_ulong_t; |
---|
885 | typedef int64_t user_time_t; |
---|
886 | #define USER_ADDR_NULL ((user_addr_t) 0) |
---|
887 | #define CAST_USER_ADDR_T(a_ptr) ((user_addr_t)((uintptr_t)(a_ptr))) |
---|
888 | |
---|
889 | |
---|
890 | |
---|
891 | typedef u_int64_t syscall_arg_t; |
---|
892 | |
---|
893 | |
---|
894 | #define __offsetof(type,field) ((size_t)(&((type *)0)->field)) |
---|
895 | # 36 "/usr/include/machine/types.h" 2 3 4 |
---|
896 | # 79 "/usr/include/sys/types.h" 2 3 4 |
---|
897 | # 1 "/usr/include/sys/_types.h" 1 3 4 |
---|
898 | # 30 "/usr/include/sys/_types.h" 3 4 |
---|
899 | #define _SYS__TYPES_H_ |
---|
900 | |
---|
901 | |
---|
902 | # 1 "/usr/include/machine/_types.h" 1 3 4 |
---|
903 | # 29 "/usr/include/machine/_types.h" 3 4 |
---|
904 | #define _BSD_MACHINE__TYPES_H_ |
---|
905 | # 34 "/usr/include/sys/_types.h" 2 3 4 |
---|
906 | # 47 "/usr/include/sys/_types.h" 3 4 |
---|
907 | #define __PTHREAD_SIZE__ 596 |
---|
908 | #define __PTHREAD_ATTR_SIZE__ 36 |
---|
909 | #define __PTHREAD_MUTEXATTR_SIZE__ 8 |
---|
910 | #define __PTHREAD_MUTEX_SIZE__ 40 |
---|
911 | #define __PTHREAD_CONDATTR_SIZE__ 4 |
---|
912 | #define __PTHREAD_COND_SIZE__ 24 |
---|
913 | #define __PTHREAD_ONCE_SIZE__ 4 |
---|
914 | #define __PTHREAD_RWLOCK_SIZE__ 124 |
---|
915 | #define __PTHREAD_RWLOCKATTR_SIZE__ 12 |
---|
916 | |
---|
917 | |
---|
918 | struct __darwin_pthread_handler_rec |
---|
919 | { |
---|
920 | void (*__routine)(void *); |
---|
921 | void *__arg; |
---|
922 | struct __darwin_pthread_handler_rec *__next; |
---|
923 | }; |
---|
924 | struct _opaque_pthread_attr_t { long __sig; char __opaque[36]; }; |
---|
925 | struct _opaque_pthread_cond_t { long __sig; char __opaque[24]; }; |
---|
926 | struct _opaque_pthread_condattr_t { long __sig; char __opaque[4]; }; |
---|
927 | struct _opaque_pthread_mutex_t { long __sig; char __opaque[40]; }; |
---|
928 | struct _opaque_pthread_mutexattr_t { long __sig; char __opaque[8]; }; |
---|
929 | struct _opaque_pthread_once_t { long __sig; char __opaque[4]; }; |
---|
930 | struct _opaque_pthread_rwlock_t { long __sig; char __opaque[124]; }; |
---|
931 | struct _opaque_pthread_rwlockattr_t { long __sig; char __opaque[12]; }; |
---|
932 | struct _opaque_pthread_t { long __sig; struct __darwin_pthread_handler_rec *__cleanup_stack; char __opaque[596]; }; |
---|
933 | # 91 "/usr/include/sys/_types.h" 3 4 |
---|
934 | #define __DARWIN_NULL ((void *)0) |
---|
935 | |
---|
936 | |
---|
937 | typedef __int64_t __darwin_blkcnt_t; |
---|
938 | typedef __int32_t __darwin_blksize_t; |
---|
939 | typedef __int32_t __darwin_dev_t; |
---|
940 | typedef unsigned int __darwin_fsblkcnt_t; |
---|
941 | typedef unsigned int __darwin_fsfilcnt_t; |
---|
942 | typedef __uint32_t __darwin_gid_t; |
---|
943 | typedef __uint32_t __darwin_id_t; |
---|
944 | typedef __uint64_t __darwin_ino64_t; |
---|
945 | |
---|
946 | typedef __darwin_ino64_t __darwin_ino_t; |
---|
947 | |
---|
948 | |
---|
949 | |
---|
950 | typedef __darwin_natural_t __darwin_mach_port_name_t; |
---|
951 | typedef __darwin_mach_port_name_t __darwin_mach_port_t; |
---|
952 | typedef __uint16_t __darwin_mode_t; |
---|
953 | typedef __int64_t __darwin_off_t; |
---|
954 | typedef __int32_t __darwin_pid_t; |
---|
955 | typedef struct _opaque_pthread_attr_t |
---|
956 | __darwin_pthread_attr_t; |
---|
957 | typedef struct _opaque_pthread_cond_t |
---|
958 | __darwin_pthread_cond_t; |
---|
959 | typedef struct _opaque_pthread_condattr_t |
---|
960 | __darwin_pthread_condattr_t; |
---|
961 | typedef unsigned long __darwin_pthread_key_t; |
---|
962 | typedef struct _opaque_pthread_mutex_t |
---|
963 | __darwin_pthread_mutex_t; |
---|
964 | typedef struct _opaque_pthread_mutexattr_t |
---|
965 | __darwin_pthread_mutexattr_t; |
---|
966 | typedef struct _opaque_pthread_once_t |
---|
967 | __darwin_pthread_once_t; |
---|
968 | typedef struct _opaque_pthread_rwlock_t |
---|
969 | __darwin_pthread_rwlock_t; |
---|
970 | typedef struct _opaque_pthread_rwlockattr_t |
---|
971 | __darwin_pthread_rwlockattr_t; |
---|
972 | typedef struct _opaque_pthread_t |
---|
973 | *__darwin_pthread_t; |
---|
974 | typedef __uint32_t __darwin_sigset_t; |
---|
975 | typedef __int32_t __darwin_suseconds_t; |
---|
976 | typedef __uint32_t __darwin_uid_t; |
---|
977 | typedef __uint32_t __darwin_useconds_t; |
---|
978 | typedef unsigned char __darwin_uuid_t[16]; |
---|
979 | # 80 "/usr/include/sys/types.h" 2 3 4 |
---|
980 | |
---|
981 | # 1 "/usr/include/machine/endian.h" 1 3 4 |
---|
982 | # 32 "/usr/include/machine/endian.h" 3 4 |
---|
983 | #define _BSD_MACHINE_ENDIAN_H_ |
---|
984 | |
---|
985 | |
---|
986 | # 1 "/usr/include/ppc/endian.h" 1 3 4 |
---|
987 | # 93 "/usr/include/ppc/endian.h" 3 4 |
---|
988 | #define _PPC_ENDIAN_H_ |
---|
989 | |
---|
990 | |
---|
991 | |
---|
992 | |
---|
993 | |
---|
994 | |
---|
995 | #define _QUAD_HIGHWORD 0 |
---|
996 | #define _QUAD_LOWWORD 1 |
---|
997 | |
---|
998 | |
---|
999 | |
---|
1000 | |
---|
1001 | |
---|
1002 | #define __DARWIN_LITTLE_ENDIAN 1234 |
---|
1003 | #define __DARWIN_BIG_ENDIAN 4321 |
---|
1004 | #define __DARWIN_PDP_ENDIAN 3412 |
---|
1005 | |
---|
1006 | #define __DARWIN_BYTE_ORDER __DARWIN_BIG_ENDIAN |
---|
1007 | |
---|
1008 | |
---|
1009 | |
---|
1010 | #define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN |
---|
1011 | #define BIG_ENDIAN __DARWIN_BIG_ENDIAN |
---|
1012 | #define PDP_ENDIAN __DARWIN_PDP_ENDIAN |
---|
1013 | |
---|
1014 | #define BYTE_ORDER __DARWIN_BYTE_ORDER |
---|
1015 | |
---|
1016 | # 1 "/usr/include/sys/_endian.h" 1 3 4 |
---|
1017 | # 91 "/usr/include/sys/_endian.h" 3 4 |
---|
1018 | #define _SYS__ENDIAN_H_ |
---|
1019 | # 110 "/usr/include/sys/_endian.h" 3 4 |
---|
1020 | #define ntohl(x) (x) |
---|
1021 | #define ntohs(x) (x) |
---|
1022 | #define htonl(x) (x) |
---|
1023 | #define htons(x) (x) |
---|
1024 | |
---|
1025 | |
---|
1026 | #define NTOHL(x) (x) |
---|
1027 | #define NTOHS(x) (x) |
---|
1028 | #define HTONL(x) (x) |
---|
1029 | #define HTONS(x) (x) |
---|
1030 | # 122 "/usr/include/ppc/endian.h" 2 3 4 |
---|
1031 | # 36 "/usr/include/machine/endian.h" 2 3 4 |
---|
1032 | # 82 "/usr/include/sys/types.h" 2 3 4 |
---|
1033 | |
---|
1034 | |
---|
1035 | typedef unsigned char u_char; |
---|
1036 | typedef unsigned short u_short; |
---|
1037 | typedef unsigned int u_int; |
---|
1038 | |
---|
1039 | typedef unsigned long u_long; |
---|
1040 | #define _U_LONG |
---|
1041 | |
---|
1042 | typedef unsigned short ushort; |
---|
1043 | typedef unsigned int uint; |
---|
1044 | |
---|
1045 | |
---|
1046 | typedef u_int64_t u_quad_t; |
---|
1047 | typedef int64_t quad_t; |
---|
1048 | typedef quad_t * qaddr_t; |
---|
1049 | |
---|
1050 | typedef char * caddr_t; |
---|
1051 | typedef int32_t daddr_t; |
---|
1052 | |
---|
1053 | |
---|
1054 | typedef __darwin_dev_t dev_t; |
---|
1055 | #define _DEV_T |
---|
1056 | |
---|
1057 | |
---|
1058 | typedef u_int32_t fixpt_t; |
---|
1059 | |
---|
1060 | |
---|
1061 | typedef __darwin_blkcnt_t blkcnt_t; |
---|
1062 | #define _BLKCNT_T |
---|
1063 | |
---|
1064 | |
---|
1065 | |
---|
1066 | typedef __darwin_blksize_t blksize_t; |
---|
1067 | #define _BLKSIZE_T |
---|
1068 | |
---|
1069 | |
---|
1070 | |
---|
1071 | typedef __darwin_gid_t gid_t; |
---|
1072 | #define _GID_T |
---|
1073 | |
---|
1074 | |
---|
1075 | |
---|
1076 | #define _IN_ADDR_T |
---|
1077 | typedef __uint32_t in_addr_t; |
---|
1078 | |
---|
1079 | |
---|
1080 | |
---|
1081 | #define _IN_PORT_T |
---|
1082 | typedef __uint16_t in_port_t; |
---|
1083 | |
---|
1084 | |
---|
1085 | |
---|
1086 | typedef __darwin_ino_t ino_t; |
---|
1087 | #define _INO_T |
---|
1088 | |
---|
1089 | |
---|
1090 | |
---|
1091 | |
---|
1092 | typedef __darwin_ino64_t ino64_t; |
---|
1093 | #define _INO64_T |
---|
1094 | |
---|
1095 | |
---|
1096 | |
---|
1097 | |
---|
1098 | #define _KEY_T |
---|
1099 | typedef __int32_t key_t; |
---|
1100 | |
---|
1101 | |
---|
1102 | |
---|
1103 | typedef __darwin_mode_t mode_t; |
---|
1104 | #define _MODE_T |
---|
1105 | |
---|
1106 | |
---|
1107 | |
---|
1108 | typedef __uint16_t nlink_t; |
---|
1109 | #define _NLINK_T |
---|
1110 | |
---|
1111 | |
---|
1112 | |
---|
1113 | #define _ID_T |
---|
1114 | typedef __darwin_id_t id_t; |
---|
1115 | |
---|
1116 | |
---|
1117 | |
---|
1118 | typedef __darwin_pid_t pid_t; |
---|
1119 | #define _PID_T |
---|
1120 | |
---|
1121 | |
---|
1122 | |
---|
1123 | typedef __darwin_off_t off_t; |
---|
1124 | #define _OFF_T |
---|
1125 | |
---|
1126 | |
---|
1127 | typedef int32_t segsz_t; |
---|
1128 | typedef int32_t swblk_t; |
---|
1129 | |
---|
1130 | |
---|
1131 | typedef __darwin_uid_t uid_t; |
---|
1132 | #define _UID_T |
---|
1133 | # 214 "/usr/include/sys/types.h" 3 4 |
---|
1134 | #define major(x) ((int32_t)(((u_int32_t)(x) >> 24) & 0xff)) |
---|
1135 | #define minor(x) ((int32_t)((x) & 0xffffff)) |
---|
1136 | #define makedev(x,y) ((dev_t)(((x) << 24) | (y))) |
---|
1137 | |
---|
1138 | |
---|
1139 | |
---|
1140 | |
---|
1141 | |
---|
1142 | #define _CLOCK_T |
---|
1143 | typedef __darwin_clock_t clock_t; |
---|
1144 | |
---|
1145 | |
---|
1146 | |
---|
1147 | #define _SIZE_T |
---|
1148 | |
---|
1149 | |
---|
1150 | typedef __darwin_size_t size_t; |
---|
1151 | |
---|
1152 | |
---|
1153 | |
---|
1154 | #define _SSIZE_T |
---|
1155 | typedef __darwin_ssize_t ssize_t; |
---|
1156 | |
---|
1157 | |
---|
1158 | |
---|
1159 | #define _TIME_T |
---|
1160 | typedef __darwin_time_t time_t; |
---|
1161 | |
---|
1162 | |
---|
1163 | |
---|
1164 | #define _USECONDS_T |
---|
1165 | typedef __darwin_useconds_t useconds_t; |
---|
1166 | |
---|
1167 | |
---|
1168 | |
---|
1169 | #define _SUSECONDS_T |
---|
1170 | typedef __darwin_suseconds_t suseconds_t; |
---|
1171 | # 259 "/usr/include/sys/types.h" 3 4 |
---|
1172 | #define __need_fd_set |
---|
1173 | # 1 "/usr/include/sys/_structs.h" 1 3 4 |
---|
1174 | # 165 "/usr/include/sys/_structs.h" 3 4 |
---|
1175 | #undef __need_fd_set |
---|
1176 | |
---|
1177 | #define _FD_SET |
---|
1178 | # 177 "/usr/include/sys/_structs.h" 3 4 |
---|
1179 | #define __DARWIN_FD_SETSIZE 1024 |
---|
1180 | |
---|
1181 | #define __DARWIN_NBBY 8 |
---|
1182 | #define __DARWIN_NFDBITS (sizeof(__int32_t) * __DARWIN_NBBY) |
---|
1183 | #define __DARWIN_howmany(x,y) (((x) + ((y) - 1)) / (y)) |
---|
1184 | |
---|
1185 | |
---|
1186 | typedef struct fd_set { |
---|
1187 | __int32_t fds_bits[(((1024) + (((sizeof(__int32_t) * 8)) - 1)) / ((sizeof(__int32_t) * 8)))]; |
---|
1188 | } fd_set; |
---|
1189 | |
---|
1190 | |
---|
1191 | |
---|
1192 | static __inline int |
---|
1193 | __darwin_fd_isset(int _n, struct fd_set *_p) |
---|
1194 | { |
---|
1195 | return (_p->fds_bits[_n/(sizeof(__int32_t) * 8)] & (1<<(_n % (sizeof(__int32_t) * 8)))); |
---|
1196 | } |
---|
1197 | |
---|
1198 | #define __DARWIN_FD_SET(n,p) do { int __fd = (n); ((p)->fds_bits[__fd/__DARWIN_NFDBITS] |= (1<<(__fd % __DARWIN_NFDBITS))); } while(0) |
---|
1199 | #define __DARWIN_FD_CLR(n,p) do { int __fd = (n); ((p)->fds_bits[__fd/__DARWIN_NFDBITS] &= ~(1<<(__fd % __DARWIN_NFDBITS))); } while(0) |
---|
1200 | #define __DARWIN_FD_ISSET(n,p) __darwin_fd_isset((n), (p)) |
---|
1201 | |
---|
1202 | |
---|
1203 | |
---|
1204 | |
---|
1205 | |
---|
1206 | |
---|
1207 | #define __DARWIN_FD_ZERO(p) __builtin_bzero(p, sizeof(*(p))) |
---|
1208 | |
---|
1209 | |
---|
1210 | |
---|
1211 | |
---|
1212 | #define __DARWIN_FD_COPY(f,t) bcopy(f, t, sizeof(*(f))) |
---|
1213 | # 261 "/usr/include/sys/types.h" 2 3 4 |
---|
1214 | |
---|
1215 | #define NBBY __DARWIN_NBBY |
---|
1216 | #define NFDBITS __DARWIN_NFDBITS |
---|
1217 | #define howmany(x,y) __DARWIN_howmany(x, y) |
---|
1218 | typedef __int32_t fd_mask; |
---|
1219 | # 274 "/usr/include/sys/types.h" 3 4 |
---|
1220 | #define FD_SETSIZE __DARWIN_FD_SETSIZE |
---|
1221 | |
---|
1222 | |
---|
1223 | #define FD_SET(n,p) __DARWIN_FD_SET(n, p) |
---|
1224 | |
---|
1225 | |
---|
1226 | #define FD_CLR(n,p) __DARWIN_FD_CLR(n, p) |
---|
1227 | |
---|
1228 | |
---|
1229 | #define FD_ISSET(n,p) __DARWIN_FD_ISSET(n, p) |
---|
1230 | |
---|
1231 | |
---|
1232 | #define FD_ZERO(p) __DARWIN_FD_ZERO(p) |
---|
1233 | |
---|
1234 | |
---|
1235 | |
---|
1236 | #define FD_COPY(f,t) __DARWIN_FD_COPY(f, t) |
---|
1237 | # 317 "/usr/include/sys/types.h" 3 4 |
---|
1238 | #define _PTHREAD_ATTR_T |
---|
1239 | typedef __darwin_pthread_attr_t pthread_attr_t; |
---|
1240 | |
---|
1241 | |
---|
1242 | #define _PTHREAD_COND_T |
---|
1243 | typedef __darwin_pthread_cond_t pthread_cond_t; |
---|
1244 | |
---|
1245 | |
---|
1246 | #define _PTHREAD_CONDATTR_T |
---|
1247 | typedef __darwin_pthread_condattr_t pthread_condattr_t; |
---|
1248 | |
---|
1249 | |
---|
1250 | #define _PTHREAD_MUTEX_T |
---|
1251 | typedef __darwin_pthread_mutex_t pthread_mutex_t; |
---|
1252 | |
---|
1253 | |
---|
1254 | #define _PTHREAD_MUTEXATTR_T |
---|
1255 | typedef __darwin_pthread_mutexattr_t pthread_mutexattr_t; |
---|
1256 | |
---|
1257 | |
---|
1258 | #define _PTHREAD_ONCE_T |
---|
1259 | typedef __darwin_pthread_once_t pthread_once_t; |
---|
1260 | |
---|
1261 | |
---|
1262 | #define _PTHREAD_RWLOCK_T |
---|
1263 | typedef __darwin_pthread_rwlock_t pthread_rwlock_t; |
---|
1264 | |
---|
1265 | |
---|
1266 | #define _PTHREAD_RWLOCKATTR_T |
---|
1267 | typedef __darwin_pthread_rwlockattr_t pthread_rwlockattr_t; |
---|
1268 | |
---|
1269 | |
---|
1270 | #define _PTHREAD_T |
---|
1271 | typedef __darwin_pthread_t pthread_t; |
---|
1272 | |
---|
1273 | |
---|
1274 | |
---|
1275 | |
---|
1276 | |
---|
1277 | #define _PTHREAD_KEY_T |
---|
1278 | typedef __darwin_pthread_key_t pthread_key_t; |
---|
1279 | |
---|
1280 | |
---|
1281 | |
---|
1282 | |
---|
1283 | #define _FSBLKCNT_T |
---|
1284 | typedef __darwin_fsblkcnt_t fsblkcnt_t; |
---|
1285 | |
---|
1286 | |
---|
1287 | |
---|
1288 | #define _FSFILCNT_T |
---|
1289 | typedef __darwin_fsfilcnt_t fsfilcnt_t; |
---|
1290 | # 30 "misc-utils/hardlink.c" 2 |
---|
1291 | # 1 "/opt/local/include/LegacySupport/sys/stat.h" 1 |
---|
1292 | # 19 "/opt/local/include/LegacySupport/sys/stat.h" |
---|
1293 | #define _MACPORTS_SYSSTAT_H_ |
---|
1294 | |
---|
1295 | |
---|
1296 | # 1 "/opt/local/include/LegacySupport/MacportsLegacySupport.h" 1 |
---|
1297 | # 20 "/opt/local/include/LegacySupport/MacportsLegacySupport.h" |
---|
1298 | #define _MACPORTS_LEGACYSUPPORTDEFS_H_ |
---|
1299 | # 29 "/opt/local/include/LegacySupport/MacportsLegacySupport.h" |
---|
1300 | #define __MP__BEGIN_DECLS |
---|
1301 | #define __MP__END_DECLS |
---|
1302 | |
---|
1303 | |
---|
1304 | |
---|
1305 | |
---|
1306 | |
---|
1307 | #define __MP_LEGACY_SUPPORT_FSGETPATH__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) |
---|
1308 | |
---|
1309 | |
---|
1310 | #define __MP_LEGACY_SUPPORT_SETATTRLISTAT__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) |
---|
1311 | |
---|
1312 | |
---|
1313 | #define __MP_LEGACY_SUPPORT_UTIMENSAT__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) |
---|
1314 | |
---|
1315 | |
---|
1316 | #define __MP_LEGACY_SUPPORT_GETTIME__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) |
---|
1317 | |
---|
1318 | |
---|
1319 | #define __MP_LEGACY_SUPPORT_ATCALLS__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000) |
---|
1320 | |
---|
1321 | |
---|
1322 | #define __MP_LEGACY_SUPPORT_FDOPENDIR__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000) |
---|
1323 | |
---|
1324 | |
---|
1325 | |
---|
1326 | |
---|
1327 | #define __MP_LEGACY_SUPPORT_NETIF_SOCKET_FIX__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) |
---|
1328 | |
---|
1329 | |
---|
1330 | #define __MP_LEGACY_SUPPORT_STRNLEN__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1331 | |
---|
1332 | |
---|
1333 | #define __MP_LEGACY_SUPPORT_STRNDUP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1334 | |
---|
1335 | |
---|
1336 | #define __MP_LEGACY_SUPPORT_DPRINTF__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1337 | |
---|
1338 | |
---|
1339 | #define __MP_LEGACY_SUPPORT_GETLINE__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1340 | |
---|
1341 | |
---|
1342 | #define __MP_LEGACY_SUPPORT_MEMMEM__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1343 | |
---|
1344 | |
---|
1345 | #define __MP_LEGACY_SUPPORT_WCSDUP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1346 | |
---|
1347 | |
---|
1348 | #define __MP_LEGACY_SUPPORT_WCSNLEN__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1349 | |
---|
1350 | |
---|
1351 | #define __MP_LEGACY_SUPPORT_WCPCPY__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1352 | |
---|
1353 | |
---|
1354 | #define __MP_LEGACY_SUPPORT_WCSCASECMP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1355 | |
---|
1356 | |
---|
1357 | #define __MP_LEGACY_SUPPORT_LLROUND__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1358 | |
---|
1359 | |
---|
1360 | #define __MP_LEGACY_SUPPORT_ARC4RANDOM__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1361 | |
---|
1362 | |
---|
1363 | #define __MP_LEGACY_SUPPORT_GETENTROPY__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) |
---|
1364 | |
---|
1365 | |
---|
1366 | #define __MP_LEGACY_SUPPORT_POSIX_MEMALIGN__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1367 | |
---|
1368 | |
---|
1369 | #define __MP_LEGACY_SUPPORT_AI_NUMERICSERV__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1370 | |
---|
1371 | |
---|
1372 | #define __MP_LEGACY_SUPPORT_REALPATH_WRAP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1373 | |
---|
1374 | |
---|
1375 | #define __MP_LEGACY_SUPPORT_FSETATTRLIST__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1376 | |
---|
1377 | |
---|
1378 | #define __MP_LEGACY_SUPPORT_TIME_THREAD_SAFE_FUNCTIONS__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1379 | |
---|
1380 | |
---|
1381 | #define __MP_LEGACY_SUPPORT_LSMOD__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1382 | |
---|
1383 | |
---|
1384 | #define __MP_LEGACY_SUPPORT_LUTIMES__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1385 | |
---|
1386 | |
---|
1387 | #define __MP_LEGACY_SUPPORT_SYSAIOTIGERFIX__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1388 | |
---|
1389 | |
---|
1390 | #define __MP_LEGACY_SUPPORT_SYSCONF_WRAP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101100) |
---|
1391 | |
---|
1392 | |
---|
1393 | #define __MP_LEGACY_SUPPORT_PTHREAD_RWLOCK__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1394 | |
---|
1395 | |
---|
1396 | #define __MP_LEGACY_SUPPORT_STAILQ_FOREACH__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1397 | |
---|
1398 | |
---|
1399 | |
---|
1400 | |
---|
1401 | |
---|
1402 | |
---|
1403 | |
---|
1404 | #define __MP_LEGACY_SUPPORT_CXX11_CMATH__ 0 |
---|
1405 | |
---|
1406 | |
---|
1407 | |
---|
1408 | #define __MP_LEGACY_SUPPORT_COSSIN__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) |
---|
1409 | |
---|
1410 | |
---|
1411 | #define __MP_LEGACY_SUPPORT_FFSL__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1412 | |
---|
1413 | #define __MP_LEGACY_SUPPORT_FFSLL__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) |
---|
1414 | |
---|
1415 | |
---|
1416 | #define __MP_LEGACY_SUPPORT_FLS__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1417 | |
---|
1418 | #define __MP_LEGACY_SUPPORT_FLSL__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1419 | |
---|
1420 | #define __MP_LEGACY_SUPPORT_FLSLL__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) |
---|
1421 | |
---|
1422 | |
---|
1423 | #define __MP_LEGACY_SUPPORT_PTHREAD_SETNAME_NP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1424 | |
---|
1425 | |
---|
1426 | #define __MP_LEGACY_SUPPORT_NEED_ATCALL_MACROS__ (__MP_LEGACY_SUPPORT_ATCALLS__ || __MP_LEGACY_SUPPORT_SETATTRLISTAT__) |
---|
1427 | |
---|
1428 | #define __MP_LEGACY_SUPPORT_NEED_BEST_FCHDIR__ (__MP_LEGACY_SUPPORT_FDOPENDIR__ || __MP_LEGACY_SUPPORT_ATCALLS__ || __MP_LEGACY_SUPPORT_SETATTRLISTAT__) |
---|
1429 | |
---|
1430 | |
---|
1431 | #define __MP_LEGACY_SUPPORT_UUID__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1432 | |
---|
1433 | |
---|
1434 | #define __MP_LEGACY_SUPPORT_CoreFoundation__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1435 | |
---|
1436 | |
---|
1437 | #define __MP_LEGACY_SUPPORT_COPYFILE_WRAP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1438 | |
---|
1439 | |
---|
1440 | #define __MP_LEGACY_SUPPORT_ATEXIT_WRAP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1441 | # 23 "/opt/local/include/LegacySupport/sys/stat.h" 2 |
---|
1442 | |
---|
1443 | |
---|
1444 | # 1 "/usr/include/sys/stat.h" 1 3 4 |
---|
1445 | # 71 "/usr/include/sys/stat.h" 3 4 |
---|
1446 | #define _SYS_STAT_H_ |
---|
1447 | |
---|
1448 | |
---|
1449 | |
---|
1450 | |
---|
1451 | |
---|
1452 | #define __need_struct_timespec |
---|
1453 | # 1 "/usr/include/sys/_structs.h" 1 3 4 |
---|
1454 | # 85 "/usr/include/sys/_structs.h" 3 4 |
---|
1455 | #undef __need_struct_timespec |
---|
1456 | |
---|
1457 | #define _STRUCT_TIMESPEC struct timespec |
---|
1458 | struct timespec |
---|
1459 | { |
---|
1460 | __darwin_time_t tv_sec; |
---|
1461 | long tv_nsec; |
---|
1462 | }; |
---|
1463 | # 79 "/usr/include/sys/stat.h" 2 3 4 |
---|
1464 | # 152 "/usr/include/sys/stat.h" 3 4 |
---|
1465 | struct ostat { |
---|
1466 | __uint16_t st_dev; |
---|
1467 | ino_t st_ino; |
---|
1468 | mode_t st_mode; |
---|
1469 | nlink_t st_nlink; |
---|
1470 | __uint16_t st_uid; |
---|
1471 | __uint16_t st_gid; |
---|
1472 | __uint16_t st_rdev; |
---|
1473 | __int32_t st_size; |
---|
1474 | struct timespec st_atimespec; |
---|
1475 | struct timespec st_mtimespec; |
---|
1476 | struct timespec st_ctimespec; |
---|
1477 | __int32_t st_blksize; |
---|
1478 | __int32_t st_blocks; |
---|
1479 | __uint32_t st_flags; |
---|
1480 | __uint32_t st_gen; |
---|
1481 | }; |
---|
1482 | |
---|
1483 | #define __DARWIN_STRUCT_STAT64_TIMES struct timespec st_atimespec; struct timespec st_mtimespec; struct timespec st_ctimespec; struct timespec st_birthtimespec; |
---|
1484 | # 200 "/usr/include/sys/stat.h" 3 4 |
---|
1485 | #define __DARWIN_STRUCT_STAT64 { dev_t st_dev; mode_t st_mode; nlink_t st_nlink; __darwin_ino64_t st_ino; uid_t st_uid; gid_t st_gid; dev_t st_rdev; __DARWIN_STRUCT_STAT64_TIMES off_t st_size; blkcnt_t st_blocks; blksize_t st_blksize; __uint32_t st_flags; __uint32_t st_gen; __int32_t st_lspare; __int64_t st_qspare[2]; } |
---|
1486 | # 224 "/usr/include/sys/stat.h" 3 4 |
---|
1487 | struct stat { dev_t st_dev; mode_t st_mode; nlink_t st_nlink; __darwin_ino64_t st_ino; uid_t st_uid; gid_t st_gid; dev_t st_rdev; struct timespec st_atimespec; struct timespec st_mtimespec; struct timespec st_ctimespec; struct timespec st_birthtimespec; off_t st_size; blkcnt_t st_blocks; blksize_t st_blksize; __uint32_t st_flags; __uint32_t st_gen; __int32_t st_lspare; __int64_t st_qspare[2]; }; |
---|
1488 | # 261 "/usr/include/sys/stat.h" 3 4 |
---|
1489 | struct stat64 { dev_t st_dev; mode_t st_mode; nlink_t st_nlink; __darwin_ino64_t st_ino; uid_t st_uid; gid_t st_gid; dev_t st_rdev; struct timespec st_atimespec; struct timespec st_mtimespec; struct timespec st_ctimespec; struct timespec st_birthtimespec; off_t st_size; blkcnt_t st_blocks; blksize_t st_blksize; __uint32_t st_flags; __uint32_t st_gen; __int32_t st_lspare; __int64_t st_qspare[2]; }; |
---|
1490 | |
---|
1491 | |
---|
1492 | |
---|
1493 | |
---|
1494 | |
---|
1495 | |
---|
1496 | |
---|
1497 | #define st_atime st_atimespec.tv_sec |
---|
1498 | #define st_mtime st_mtimespec.tv_sec |
---|
1499 | #define st_ctime st_ctimespec.tv_sec |
---|
1500 | #define st_birthtime st_birthtimespec.tv_sec |
---|
1501 | # 281 "/usr/include/sys/stat.h" 3 4 |
---|
1502 | #define S_IFMT 0170000 |
---|
1503 | #define S_IFIFO 0010000 |
---|
1504 | #define S_IFCHR 0020000 |
---|
1505 | #define S_IFDIR 0040000 |
---|
1506 | #define S_IFBLK 0060000 |
---|
1507 | #define S_IFREG 0100000 |
---|
1508 | #define S_IFLNK 0120000 |
---|
1509 | #define S_IFSOCK 0140000 |
---|
1510 | |
---|
1511 | #define S_IFWHT 0160000 |
---|
1512 | #define S_IFXATTR 0200000 |
---|
1513 | |
---|
1514 | |
---|
1515 | |
---|
1516 | |
---|
1517 | #define S_IRWXU 0000700 |
---|
1518 | #define S_IRUSR 0000400 |
---|
1519 | #define S_IWUSR 0000200 |
---|
1520 | #define S_IXUSR 0000100 |
---|
1521 | |
---|
1522 | #define S_IRWXG 0000070 |
---|
1523 | #define S_IRGRP 0000040 |
---|
1524 | #define S_IWGRP 0000020 |
---|
1525 | #define S_IXGRP 0000010 |
---|
1526 | |
---|
1527 | #define S_IRWXO 0000007 |
---|
1528 | #define S_IROTH 0000004 |
---|
1529 | #define S_IWOTH 0000002 |
---|
1530 | #define S_IXOTH 0000001 |
---|
1531 | |
---|
1532 | #define S_ISUID 0004000 |
---|
1533 | #define S_ISGID 0002000 |
---|
1534 | #define S_ISVTX 0001000 |
---|
1535 | |
---|
1536 | |
---|
1537 | #define S_ISTXT S_ISVTX |
---|
1538 | #define S_IREAD S_IRUSR |
---|
1539 | #define S_IWRITE S_IWUSR |
---|
1540 | #define S_IEXEC S_IXUSR |
---|
1541 | # 329 "/usr/include/sys/stat.h" 3 4 |
---|
1542 | #define S_ISBLK(m) (((m) & 0170000) == 0060000) |
---|
1543 | #define S_ISCHR(m) (((m) & 0170000) == 0020000) |
---|
1544 | #define S_ISDIR(m) (((m) & 0170000) == 0040000) |
---|
1545 | #define S_ISFIFO(m) (((m) & 0170000) == 0010000) |
---|
1546 | #define S_ISREG(m) (((m) & 0170000) == 0100000) |
---|
1547 | #define S_ISLNK(m) (((m) & 0170000) == 0120000) |
---|
1548 | #define S_ISSOCK(m) (((m) & 0170000) == 0140000) |
---|
1549 | |
---|
1550 | #define S_ISWHT(m) (((m) & 0170000) == 0160000) |
---|
1551 | #define S_ISXATTR(m) (((m) & 0200000) == 0200000) |
---|
1552 | # 356 "/usr/include/sys/stat.h" 3 4 |
---|
1553 | #define S_TYPEISMQ(buf) (0) |
---|
1554 | #define S_TYPEISSEM(buf) (0) |
---|
1555 | #define S_TYPEISSHM(buf) (0) |
---|
1556 | # 374 "/usr/include/sys/stat.h" 3 4 |
---|
1557 | #define S_TYPEISTMO(buf) (0) |
---|
1558 | |
---|
1559 | |
---|
1560 | |
---|
1561 | #define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) |
---|
1562 | |
---|
1563 | #define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO) |
---|
1564 | |
---|
1565 | #define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) |
---|
1566 | |
---|
1567 | #define S_BLKSIZE 512 |
---|
1568 | |
---|
1569 | |
---|
1570 | |
---|
1571 | |
---|
1572 | |
---|
1573 | |
---|
1574 | #define UF_SETTABLE 0x0000ffff |
---|
1575 | #define UF_NODUMP 0x00000001 |
---|
1576 | #define UF_IMMUTABLE 0x00000002 |
---|
1577 | #define UF_APPEND 0x00000004 |
---|
1578 | #define UF_OPAQUE 0x00000008 |
---|
1579 | |
---|
1580 | |
---|
1581 | |
---|
1582 | |
---|
1583 | |
---|
1584 | |
---|
1585 | #define UF_HIDDEN 0x00008000 |
---|
1586 | |
---|
1587 | |
---|
1588 | |
---|
1589 | |
---|
1590 | #define SF_SETTABLE 0xffff0000 |
---|
1591 | #define SF_ARCHIVED 0x00010000 |
---|
1592 | #define SF_IMMUTABLE 0x00020000 |
---|
1593 | #define SF_APPEND 0x00040000 |
---|
1594 | # 422 "/usr/include/sys/stat.h" 3 4 |
---|
1595 | |
---|
1596 | |
---|
1597 | int chmod(const char *, mode_t) __asm("_" "chmod" "$UNIX2003"); |
---|
1598 | int fchmod(int, mode_t) __asm("_" "fchmod" "$UNIX2003"); |
---|
1599 | int fstat(int, struct stat *) __asm("_" "fstat" "$INODE64"); |
---|
1600 | int lstat(const char *, struct stat *) __asm("_" "lstat" "$INODE64"); |
---|
1601 | int mkdir(const char *, mode_t); |
---|
1602 | int mkfifo(const char *, mode_t); |
---|
1603 | int stat(const char *, struct stat *) __asm("_" "stat" "$INODE64"); |
---|
1604 | int mknod(const char *, mode_t, dev_t); |
---|
1605 | mode_t umask(mode_t); |
---|
1606 | |
---|
1607 | |
---|
1608 | |
---|
1609 | struct _filesec; |
---|
1610 | typedef struct _filesec *filesec_t; |
---|
1611 | #define _FILESEC_T |
---|
1612 | |
---|
1613 | int chflags(const char *, __uint32_t); |
---|
1614 | int chmodx_np(const char *, filesec_t); |
---|
1615 | int fchflags(int, __uint32_t); |
---|
1616 | int fchmodx_np(int, filesec_t); |
---|
1617 | int fstatx_np(int, struct stat *, filesec_t) __asm("_" "fstatx_np" "$INODE64"); |
---|
1618 | int lchflags(const char *, __uint32_t); |
---|
1619 | int lchmod(const char *, mode_t); |
---|
1620 | int lstatx_np(const char *, struct stat *, filesec_t) __asm("_" "lstatx_np" "$INODE64"); |
---|
1621 | int mkdirx_np(const char *, filesec_t); |
---|
1622 | int mkfifox_np(const char *, filesec_t); |
---|
1623 | int statx_np(const char *, struct stat *, filesec_t) __asm("_" "statx_np" "$INODE64"); |
---|
1624 | int umaskx_np(filesec_t); |
---|
1625 | |
---|
1626 | int fstatx64_np(int, struct stat64 *, filesec_t); |
---|
1627 | int lstatx64_np(const char *, struct stat64 *, filesec_t); |
---|
1628 | int statx64_np(const char *, struct stat64 *, filesec_t); |
---|
1629 | int fstat64(int, struct stat64 *); |
---|
1630 | int lstat64(const char *, struct stat64 *); |
---|
1631 | int stat64(const char *, struct stat64 *); |
---|
1632 | |
---|
1633 | |
---|
1634 | |
---|
1635 | # 26 "/opt/local/include/LegacySupport/sys/stat.h" 2 |
---|
1636 | |
---|
1637 | |
---|
1638 | |
---|
1639 | |
---|
1640 | #define UTIME_NOW -1 |
---|
1641 | |
---|
1642 | |
---|
1643 | |
---|
1644 | #define UTIME_OMIT -2 |
---|
1645 | |
---|
1646 | |
---|
1647 | |
---|
1648 | |
---|
1649 | extern int futimens(int fd, const struct timespec _times_in[2]); |
---|
1650 | extern int utimensat(int fd, const char *path, const struct timespec _times_in[2], int flags); |
---|
1651 | |
---|
1652 | |
---|
1653 | |
---|
1654 | |
---|
1655 | |
---|
1656 | |
---|
1657 | |
---|
1658 | |
---|
1659 | |
---|
1660 | |
---|
1661 | extern int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags); |
---|
1662 | extern int fstatat(int dirfd, const char *pathname, struct stat *buf, int flags); |
---|
1663 | |
---|
1664 | |
---|
1665 | |
---|
1666 | |
---|
1667 | extern int fstatat64(int dirfd, const char *pathname, struct stat64 *buf, int flags); |
---|
1668 | |
---|
1669 | |
---|
1670 | extern int mkdirat(int dirfd, const char *pathname, mode_t mode); |
---|
1671 | |
---|
1672 | |
---|
1673 | # 31 "misc-utils/hardlink.c" 2 |
---|
1674 | # 1 "/opt/local/include/LegacySupport/sys/time.h" 1 |
---|
1675 | # 19 "/opt/local/include/LegacySupport/sys/time.h" |
---|
1676 | #define _MACPORTS_SYSTIME_H_ |
---|
1677 | |
---|
1678 | |
---|
1679 | |
---|
1680 | |
---|
1681 | |
---|
1682 | # 1 "/usr/include/sys/time.h" 1 3 4 |
---|
1683 | # 65 "/usr/include/sys/time.h" 3 4 |
---|
1684 | #define _SYS_TIME_H_ |
---|
1685 | # 74 "/usr/include/sys/time.h" 3 4 |
---|
1686 | #define __need_fd_set |
---|
1687 | #define __need_struct_timespec |
---|
1688 | #define __need_struct_timeval |
---|
1689 | # 1 "/usr/include/sys/_structs.h" 1 3 4 |
---|
1690 | # 85 "/usr/include/sys/_structs.h" 3 4 |
---|
1691 | #undef __need_struct_timespec |
---|
1692 | # 97 "/usr/include/sys/_structs.h" 3 4 |
---|
1693 | #undef __need_struct_timeval |
---|
1694 | |
---|
1695 | #define _STRUCT_TIMEVAL struct timeval |
---|
1696 | struct timeval |
---|
1697 | { |
---|
1698 | __darwin_time_t tv_sec; |
---|
1699 | __darwin_suseconds_t tv_usec; |
---|
1700 | }; |
---|
1701 | # 165 "/usr/include/sys/_structs.h" 3 4 |
---|
1702 | #undef __need_fd_set |
---|
1703 | # 78 "/usr/include/sys/time.h" 2 3 4 |
---|
1704 | # 93 "/usr/include/sys/time.h" 3 4 |
---|
1705 | struct itimerval { |
---|
1706 | struct timeval it_interval; |
---|
1707 | struct timeval it_value; |
---|
1708 | }; |
---|
1709 | |
---|
1710 | |
---|
1711 | |
---|
1712 | |
---|
1713 | |
---|
1714 | #define ITIMER_REAL 0 |
---|
1715 | #define ITIMER_VIRTUAL 1 |
---|
1716 | #define ITIMER_PROF 2 |
---|
1717 | # 135 "/usr/include/sys/time.h" 3 4 |
---|
1718 | #define TIMEVAL_TO_TIMESPEC(tv,ts) { (ts)->tv_sec = (tv)->tv_sec; (ts)->tv_nsec = (tv)->tv_usec * 1000; } |
---|
1719 | |
---|
1720 | |
---|
1721 | |
---|
1722 | #define TIMESPEC_TO_TIMEVAL(tv,ts) { (tv)->tv_sec = (ts)->tv_sec; (tv)->tv_usec = (ts)->tv_nsec / 1000; } |
---|
1723 | |
---|
1724 | |
---|
1725 | |
---|
1726 | |
---|
1727 | struct timezone { |
---|
1728 | int tz_minuteswest; |
---|
1729 | int tz_dsttime; |
---|
1730 | }; |
---|
1731 | #define DST_NONE 0 |
---|
1732 | #define DST_USA 1 |
---|
1733 | #define DST_AUST 2 |
---|
1734 | #define DST_WET 3 |
---|
1735 | #define DST_MET 4 |
---|
1736 | #define DST_EET 5 |
---|
1737 | #define DST_CAN 6 |
---|
1738 | |
---|
1739 | |
---|
1740 | #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 |
---|
1741 | #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) |
---|
1742 | #define timercmp(tvp,uvp,cmp) (((tvp)->tv_sec == (uvp)->tv_sec) ? ((tvp)->tv_usec cmp (uvp)->tv_usec) : ((tvp)->tv_sec cmp (uvp)->tv_sec)) |
---|
1743 | |
---|
1744 | |
---|
1745 | |
---|
1746 | #define timeradd(tvp,uvp,vvp) do { (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; if ((vvp)->tv_usec >= 1000000) { (vvp)->tv_sec++; (vvp)->tv_usec -= 1000000; } } while (0) |
---|
1747 | # 172 "/usr/include/sys/time.h" 3 4 |
---|
1748 | #define timersub(tvp,uvp,vvp) do { (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; if ((vvp)->tv_usec < 0) { (vvp)->tv_sec--; (vvp)->tv_usec += 1000000; } } while (0) |
---|
1749 | # 182 "/usr/include/sys/time.h" 3 4 |
---|
1750 | #define timevalcmp(l,r,cmp) timercmp(l, r, cmp) |
---|
1751 | |
---|
1752 | |
---|
1753 | |
---|
1754 | |
---|
1755 | struct clockinfo { |
---|
1756 | int hz; |
---|
1757 | int tick; |
---|
1758 | int tickadj; |
---|
1759 | int stathz; |
---|
1760 | int profhz; |
---|
1761 | }; |
---|
1762 | |
---|
1763 | |
---|
1764 | |
---|
1765 | |
---|
1766 | # 1 "/opt/local/include/LegacySupport/time.h" 1 3 4 |
---|
1767 | # 19 "/opt/local/include/LegacySupport/time.h" 3 4 |
---|
1768 | #define _MACPORTS_TIME_H_ |
---|
1769 | |
---|
1770 | |
---|
1771 | # 1 "/opt/local/include/LegacySupport/MacportsLegacySupport.h" 1 3 4 |
---|
1772 | # 23 "/opt/local/include/LegacySupport/time.h" 2 3 4 |
---|
1773 | |
---|
1774 | |
---|
1775 | # 1 "/usr/include/time.h" 1 3 4 |
---|
1776 | # 64 "/usr/include/time.h" 3 4 |
---|
1777 | #define _TIME_H_ |
---|
1778 | |
---|
1779 | # 1 "/usr/include/_types.h" 1 3 4 |
---|
1780 | # 25 "/usr/include/_types.h" 3 4 |
---|
1781 | #define __TYPES_H_ |
---|
1782 | |
---|
1783 | |
---|
1784 | |
---|
1785 | typedef int __darwin_nl_item; |
---|
1786 | typedef int __darwin_wctrans_t; |
---|
1787 | |
---|
1788 | |
---|
1789 | |
---|
1790 | typedef unsigned long __darwin_wctype_t; |
---|
1791 | |
---|
1792 | |
---|
1793 | |
---|
1794 | #define __DARWIN_WCHAR_MAX __WCHAR_MAX__ |
---|
1795 | |
---|
1796 | |
---|
1797 | |
---|
1798 | |
---|
1799 | |
---|
1800 | #define __DARWIN_WCHAR_MIN (-0x7fffffff - 1) |
---|
1801 | |
---|
1802 | |
---|
1803 | |
---|
1804 | #define __DARWIN_WEOF ((__darwin_wint_t)-1) |
---|
1805 | # 67 "/usr/include/time.h" 2 3 4 |
---|
1806 | |
---|
1807 | #define __need_struct_timespec |
---|
1808 | # 1 "/usr/include/_structs.h" 1 3 4 |
---|
1809 | # 24 "/usr/include/_structs.h" 3 4 |
---|
1810 | # 1 "/usr/include/sys/_structs.h" 1 3 4 |
---|
1811 | # 85 "/usr/include/sys/_structs.h" 3 4 |
---|
1812 | #undef __need_struct_timespec |
---|
1813 | # 25 "/usr/include/_structs.h" 2 3 4 |
---|
1814 | # 70 "/usr/include/time.h" 2 3 4 |
---|
1815 | |
---|
1816 | |
---|
1817 | #define NULL __DARWIN_NULL |
---|
1818 | # 90 "/usr/include/time.h" 3 4 |
---|
1819 | struct tm { |
---|
1820 | int tm_sec; |
---|
1821 | int tm_min; |
---|
1822 | int tm_hour; |
---|
1823 | int tm_mday; |
---|
1824 | int tm_mon; |
---|
1825 | int tm_year; |
---|
1826 | int tm_wday; |
---|
1827 | int tm_yday; |
---|
1828 | int tm_isdst; |
---|
1829 | long tm_gmtoff; |
---|
1830 | char *tm_zone; |
---|
1831 | }; |
---|
1832 | |
---|
1833 | |
---|
1834 | #define CLOCKS_PER_SEC 1000000 |
---|
1835 | |
---|
1836 | |
---|
1837 | |
---|
1838 | |
---|
1839 | |
---|
1840 | |
---|
1841 | |
---|
1842 | extern char *tzname[]; |
---|
1843 | |
---|
1844 | |
---|
1845 | extern int getdate_err; |
---|
1846 | |
---|
1847 | extern long timezone __asm("_" "timezone" "$UNIX2003"); |
---|
1848 | |
---|
1849 | extern int daylight; |
---|
1850 | |
---|
1851 | |
---|
1852 | char *asctime(const struct tm *); |
---|
1853 | clock_t clock(void) __asm("_" "clock" "$UNIX2003"); |
---|
1854 | char *ctime(const time_t *); |
---|
1855 | double difftime(time_t, time_t); |
---|
1856 | struct tm *getdate(const char *); |
---|
1857 | struct tm *gmtime(const time_t *); |
---|
1858 | struct tm *localtime(const time_t *); |
---|
1859 | time_t mktime(struct tm *) __asm("_" "mktime" "$UNIX2003"); |
---|
1860 | size_t strftime(char * , size_t, const char * , const struct tm * ) __asm("_" "strftime" "$UNIX2003"); |
---|
1861 | char *strptime(const char * , const char * , struct tm * ) __asm("_" "strptime" "$UNIX2003"); |
---|
1862 | time_t time(time_t *); |
---|
1863 | |
---|
1864 | |
---|
1865 | void tzset(void); |
---|
1866 | |
---|
1867 | |
---|
1868 | |
---|
1869 | char *asctime_r(const struct tm * , char * ); |
---|
1870 | char *ctime_r(const time_t *, char *); |
---|
1871 | struct tm *gmtime_r(const time_t * , struct tm * ); |
---|
1872 | struct tm *localtime_r(const time_t * , struct tm * ); |
---|
1873 | |
---|
1874 | |
---|
1875 | time_t posix2time(time_t); |
---|
1876 | |
---|
1877 | |
---|
1878 | |
---|
1879 | void tzsetwall(void); |
---|
1880 | time_t time2posix(time_t); |
---|
1881 | time_t timelocal(struct tm * const); |
---|
1882 | time_t timegm(struct tm * const); |
---|
1883 | |
---|
1884 | |
---|
1885 | |
---|
1886 | int nanosleep(const struct timespec *, struct timespec *) __asm("_" "nanosleep" "$UNIX2003"); |
---|
1887 | |
---|
1888 | |
---|
1889 | # 26 "/opt/local/include/LegacySupport/time.h" 2 3 4 |
---|
1890 | # 49 "/opt/local/include/LegacySupport/time.h" 3 4 |
---|
1891 | #define CLOCK_REALTIME 0 |
---|
1892 | #define CLOCK_MONOTONIC 6 |
---|
1893 | typedef int clockid_t; |
---|
1894 | |
---|
1895 | |
---|
1896 | |
---|
1897 | extern int clock_gettime( clockid_t clk_id, struct timespec *ts ); |
---|
1898 | extern int clock_getres ( clockid_t clk_id, struct timespec *ts ); |
---|
1899 | |
---|
1900 | |
---|
1901 | # 199 "/usr/include/sys/time.h" 2 3 4 |
---|
1902 | |
---|
1903 | |
---|
1904 | |
---|
1905 | |
---|
1906 | |
---|
1907 | int adjtime(const struct timeval *, struct timeval *); |
---|
1908 | int futimes(int, const struct timeval *); |
---|
1909 | int lutimes(const char *, const struct timeval *); |
---|
1910 | int settimeofday(const struct timeval *, const struct timezone *); |
---|
1911 | |
---|
1912 | |
---|
1913 | int getitimer(int, struct itimerval *); |
---|
1914 | int gettimeofday(struct timeval * , void * ); |
---|
1915 | |
---|
1916 | # 1 "/usr/include/sys/_select.h" 1 3 4 |
---|
1917 | # 37 "/usr/include/sys/_select.h" 3 4 |
---|
1918 | #define _SYS__SELECT_H_ |
---|
1919 | |
---|
1920 | int select(int, fd_set * , fd_set * , |
---|
1921 | fd_set * , struct timeval * ) |
---|
1922 | |
---|
1923 | __asm("_" "select" "$DARWIN_EXTSN" ) |
---|
1924 | |
---|
1925 | |
---|
1926 | |
---|
1927 | |
---|
1928 | |
---|
1929 | |
---|
1930 | |
---|
1931 | ; |
---|
1932 | # 214 "/usr/include/sys/time.h" 2 3 4 |
---|
1933 | |
---|
1934 | int setitimer(int, const struct itimerval * , |
---|
1935 | struct itimerval * ); |
---|
1936 | int utimes(const char *, const struct timeval *); |
---|
1937 | |
---|
1938 | |
---|
1939 | # 26 "/opt/local/include/LegacySupport/sys/time.h" 2 |
---|
1940 | # 32 "misc-utils/hardlink.c" 2 |
---|
1941 | # 1 "/usr/include/sys/resource.h" 1 3 4 |
---|
1942 | # 65 "/usr/include/sys/resource.h" 3 4 |
---|
1943 | #define _SYS_RESOURCE_H_ |
---|
1944 | # 75 "/usr/include/sys/resource.h" 3 4 |
---|
1945 | #define __need_struct_timeval |
---|
1946 | # 1 "/usr/include/sys/_structs.h" 1 3 4 |
---|
1947 | # 97 "/usr/include/sys/_structs.h" 3 4 |
---|
1948 | #undef __need_struct_timeval |
---|
1949 | # 77 "/usr/include/sys/resource.h" 2 3 4 |
---|
1950 | # 88 "/usr/include/sys/resource.h" 3 4 |
---|
1951 | typedef __uint64_t rlim_t; |
---|
1952 | # 99 "/usr/include/sys/resource.h" 3 4 |
---|
1953 | #define PRIO_PROCESS 0 |
---|
1954 | #define PRIO_PGRP 1 |
---|
1955 | #define PRIO_USER 2 |
---|
1956 | |
---|
1957 | |
---|
1958 | #define PRIO_DARWIN_THREAD 3 |
---|
1959 | |
---|
1960 | |
---|
1961 | |
---|
1962 | |
---|
1963 | #define PRIO_MIN -20 |
---|
1964 | #define PRIO_MAX 20 |
---|
1965 | |
---|
1966 | |
---|
1967 | |
---|
1968 | |
---|
1969 | |
---|
1970 | #define PRIO_DARWIN_BG 0x1000 |
---|
1971 | # 130 "/usr/include/sys/resource.h" 3 4 |
---|
1972 | #define RUSAGE_SELF 0 |
---|
1973 | #define RUSAGE_CHILDREN -1 |
---|
1974 | # 142 "/usr/include/sys/resource.h" 3 4 |
---|
1975 | struct rusage { |
---|
1976 | struct timeval ru_utime; |
---|
1977 | struct timeval ru_stime; |
---|
1978 | # 153 "/usr/include/sys/resource.h" 3 4 |
---|
1979 | long ru_maxrss; |
---|
1980 | #define ru_first ru_ixrss |
---|
1981 | long ru_ixrss; |
---|
1982 | long ru_idrss; |
---|
1983 | long ru_isrss; |
---|
1984 | long ru_minflt; |
---|
1985 | long ru_majflt; |
---|
1986 | long ru_nswap; |
---|
1987 | long ru_inblock; |
---|
1988 | long ru_oublock; |
---|
1989 | long ru_msgsnd; |
---|
1990 | long ru_msgrcv; |
---|
1991 | long ru_nsignals; |
---|
1992 | long ru_nvcsw; |
---|
1993 | long ru_nivcsw; |
---|
1994 | #define ru_last ru_nivcsw |
---|
1995 | |
---|
1996 | }; |
---|
1997 | # 184 "/usr/include/sys/resource.h" 3 4 |
---|
1998 | #define RLIM_INFINITY (((__uint64_t)1 << 63) - 1) |
---|
1999 | #define RLIM_SAVED_MAX RLIM_INFINITY |
---|
2000 | #define RLIM_SAVED_CUR RLIM_INFINITY |
---|
2001 | |
---|
2002 | |
---|
2003 | |
---|
2004 | |
---|
2005 | |
---|
2006 | #define RLIMIT_CPU 0 |
---|
2007 | #define RLIMIT_FSIZE 1 |
---|
2008 | #define RLIMIT_DATA 2 |
---|
2009 | #define RLIMIT_STACK 3 |
---|
2010 | #define RLIMIT_CORE 4 |
---|
2011 | #define RLIMIT_AS 5 |
---|
2012 | |
---|
2013 | #define RLIMIT_RSS RLIMIT_AS |
---|
2014 | #define RLIMIT_MEMLOCK 6 |
---|
2015 | #define RLIMIT_NPROC 7 |
---|
2016 | |
---|
2017 | #define RLIMIT_NOFILE 8 |
---|
2018 | |
---|
2019 | #define RLIM_NLIMITS 9 |
---|
2020 | |
---|
2021 | #define _RLIMIT_POSIX_FLAG 0x1000 |
---|
2022 | |
---|
2023 | |
---|
2024 | |
---|
2025 | |
---|
2026 | |
---|
2027 | struct rlimit { |
---|
2028 | rlim_t rlim_cur; |
---|
2029 | rlim_t rlim_max; |
---|
2030 | }; |
---|
2031 | |
---|
2032 | |
---|
2033 | |
---|
2034 | #define IOPOL_TYPE_DISK 0 |
---|
2035 | |
---|
2036 | |
---|
2037 | #define IOPOL_SCOPE_PROCESS 0 |
---|
2038 | #define IOPOL_SCOPE_THREAD 1 |
---|
2039 | |
---|
2040 | |
---|
2041 | #define IOPOL_DEFAULT 0 |
---|
2042 | #define IOPOL_NORMAL 1 |
---|
2043 | #define IOPOL_PASSIVE 2 |
---|
2044 | #define IOPOL_THROTTLE 3 |
---|
2045 | |
---|
2046 | |
---|
2047 | |
---|
2048 | |
---|
2049 | |
---|
2050 | int getpriority(int, id_t); |
---|
2051 | |
---|
2052 | int getiopolicy_np(int, int); |
---|
2053 | |
---|
2054 | int getrlimit(int, struct rlimit *) __asm("_" "getrlimit" "$UNIX2003"); |
---|
2055 | int getrusage(int, struct rusage *); |
---|
2056 | int setpriority(int, id_t, int); |
---|
2057 | |
---|
2058 | int setiopolicy_np(int, int, int); |
---|
2059 | |
---|
2060 | int setrlimit(int, const struct rlimit *) __asm("_" "setrlimit" "$UNIX2003"); |
---|
2061 | |
---|
2062 | # 33 "misc-utils/hardlink.c" 2 |
---|
2063 | # 1 "/usr/include/fcntl.h" 1 3 4 |
---|
2064 | # 23 "/usr/include/fcntl.h" 3 4 |
---|
2065 | # 1 "/opt/local/include/LegacySupport/sys/fcntl.h" 1 3 4 |
---|
2066 | # 19 "/opt/local/include/LegacySupport/sys/fcntl.h" 3 4 |
---|
2067 | #define _MACPORTS_SYSFCNTL_H_ |
---|
2068 | |
---|
2069 | |
---|
2070 | |
---|
2071 | |
---|
2072 | |
---|
2073 | # 1 "/usr/include/sys/fcntl.h" 1 3 4 |
---|
2074 | # 71 "/usr/include/sys/fcntl.h" 3 4 |
---|
2075 | #define _SYS_FCNTL_H_ |
---|
2076 | # 110 "/usr/include/sys/fcntl.h" 3 4 |
---|
2077 | #define O_RDONLY 0x0000 |
---|
2078 | #define O_WRONLY 0x0001 |
---|
2079 | #define O_RDWR 0x0002 |
---|
2080 | #define O_ACCMODE 0x0003 |
---|
2081 | # 124 "/usr/include/sys/fcntl.h" 3 4 |
---|
2082 | #define FREAD 0x0001 |
---|
2083 | #define FWRITE 0x0002 |
---|
2084 | |
---|
2085 | #define O_NONBLOCK 0x0004 |
---|
2086 | #define O_APPEND 0x0008 |
---|
2087 | #define O_SYNC 0x0080 |
---|
2088 | |
---|
2089 | #define O_SHLOCK 0x0010 |
---|
2090 | #define O_EXLOCK 0x0020 |
---|
2091 | #define O_ASYNC 0x0040 |
---|
2092 | #define O_FSYNC O_SYNC |
---|
2093 | #define O_NOFOLLOW 0x0100 |
---|
2094 | |
---|
2095 | #define O_CREAT 0x0200 |
---|
2096 | #define O_TRUNC 0x0400 |
---|
2097 | #define O_EXCL 0x0800 |
---|
2098 | |
---|
2099 | #define O_EVTONLY 0x8000 |
---|
2100 | |
---|
2101 | |
---|
2102 | |
---|
2103 | #define O_NOCTTY 0x20000 |
---|
2104 | |
---|
2105 | |
---|
2106 | |
---|
2107 | #define O_DIRECTORY 0x100000 |
---|
2108 | #define O_SYMLINK 0x200000 |
---|
2109 | # 162 "/usr/include/sys/fcntl.h" 3 4 |
---|
2110 | #define FAPPEND O_APPEND |
---|
2111 | #define FASYNC O_ASYNC |
---|
2112 | #define FFSYNC O_FSYNC |
---|
2113 | #define FNONBLOCK O_NONBLOCK |
---|
2114 | #define FNDELAY O_NONBLOCK |
---|
2115 | #define O_NDELAY O_NONBLOCK |
---|
2116 | |
---|
2117 | |
---|
2118 | |
---|
2119 | |
---|
2120 | |
---|
2121 | |
---|
2122 | |
---|
2123 | #define CPF_OVERWRITE 1 |
---|
2124 | #define CPF_IGNORE_MODE 2 |
---|
2125 | #define CPF_MASK (CPF_OVERWRITE|CPF_IGNORE_MODE) |
---|
2126 | |
---|
2127 | |
---|
2128 | |
---|
2129 | |
---|
2130 | |
---|
2131 | |
---|
2132 | |
---|
2133 | #define F_DUPFD 0 |
---|
2134 | #define F_GETFD 1 |
---|
2135 | #define F_SETFD 2 |
---|
2136 | #define F_GETFL 3 |
---|
2137 | #define F_SETFL 4 |
---|
2138 | #define F_GETOWN 5 |
---|
2139 | #define F_SETOWN 6 |
---|
2140 | #define F_GETLK 7 |
---|
2141 | #define F_SETLK 8 |
---|
2142 | #define F_SETLKW 9 |
---|
2143 | |
---|
2144 | #define F_CHKCLEAN 41 |
---|
2145 | #define F_PREALLOCATE 42 |
---|
2146 | #define F_SETSIZE 43 |
---|
2147 | #define F_RDADVISE 44 |
---|
2148 | #define F_RDAHEAD 45 |
---|
2149 | #define F_READBOOTSTRAP 46 |
---|
2150 | #define F_WRITEBOOTSTRAP 47 |
---|
2151 | #define F_NOCACHE 48 |
---|
2152 | #define F_LOG2PHYS 49 |
---|
2153 | #define F_GETPATH 50 |
---|
2154 | #define F_FULLFSYNC 51 |
---|
2155 | #define F_PATHPKG_CHECK 52 |
---|
2156 | #define F_FREEZE_FS 53 |
---|
2157 | #define F_THAW_FS 54 |
---|
2158 | #define F_GLOBAL_NOCACHE 55 |
---|
2159 | |
---|
2160 | |
---|
2161 | #define F_ADDSIGS 59 |
---|
2162 | |
---|
2163 | #define F_MARKDEPENDENCY 60 |
---|
2164 | |
---|
2165 | |
---|
2166 | #define FCNTL_FS_SPECIFIC_BASE 0x00010000 |
---|
2167 | |
---|
2168 | |
---|
2169 | |
---|
2170 | |
---|
2171 | #define FD_CLOEXEC 1 |
---|
2172 | |
---|
2173 | |
---|
2174 | #define F_RDLCK 1 |
---|
2175 | #define F_UNLCK 2 |
---|
2176 | #define F_WRLCK 3 |
---|
2177 | |
---|
2178 | |
---|
2179 | |
---|
2180 | |
---|
2181 | |
---|
2182 | |
---|
2183 | #define SEEK_SET 0 |
---|
2184 | #define SEEK_CUR 1 |
---|
2185 | #define SEEK_END 2 |
---|
2186 | # 291 "/usr/include/sys/fcntl.h" 3 4 |
---|
2187 | #define F_ALLOCATECONTIG 0x00000002 |
---|
2188 | #define F_ALLOCATEALL 0x00000004 |
---|
2189 | |
---|
2190 | |
---|
2191 | |
---|
2192 | #define F_PEOFPOSMODE 3 |
---|
2193 | |
---|
2194 | #define F_VOLPOSMODE 4 |
---|
2195 | |
---|
2196 | |
---|
2197 | |
---|
2198 | |
---|
2199 | |
---|
2200 | |
---|
2201 | struct flock { |
---|
2202 | off_t l_start; |
---|
2203 | off_t l_len; |
---|
2204 | pid_t l_pid; |
---|
2205 | short l_type; |
---|
2206 | short l_whence; |
---|
2207 | }; |
---|
2208 | |
---|
2209 | |
---|
2210 | |
---|
2211 | |
---|
2212 | |
---|
2213 | |
---|
2214 | |
---|
2215 | struct radvisory { |
---|
2216 | off_t ra_offset; |
---|
2217 | int ra_count; |
---|
2218 | }; |
---|
2219 | |
---|
2220 | |
---|
2221 | |
---|
2222 | |
---|
2223 | |
---|
2224 | |
---|
2225 | typedef struct fsignatures { |
---|
2226 | off_t fs_file_start; |
---|
2227 | void *fs_blob_start; |
---|
2228 | size_t fs_blob_size; |
---|
2229 | } fsignatures_t; |
---|
2230 | |
---|
2231 | |
---|
2232 | #define LOCK_SH 0x01 |
---|
2233 | #define LOCK_EX 0x02 |
---|
2234 | #define LOCK_NB 0x04 |
---|
2235 | #define LOCK_UN 0x08 |
---|
2236 | |
---|
2237 | |
---|
2238 | |
---|
2239 | typedef struct fstore { |
---|
2240 | unsigned int fst_flags; |
---|
2241 | int fst_posmode; |
---|
2242 | off_t fst_offset; |
---|
2243 | off_t fst_length; |
---|
2244 | off_t fst_bytesalloc; |
---|
2245 | } fstore_t; |
---|
2246 | |
---|
2247 | |
---|
2248 | |
---|
2249 | typedef struct fbootstraptransfer { |
---|
2250 | off_t fbt_offset; |
---|
2251 | size_t fbt_length; |
---|
2252 | void *fbt_buffer; |
---|
2253 | } fbootstraptransfer_t; |
---|
2254 | # 377 "/usr/include/sys/fcntl.h" 3 4 |
---|
2255 | #pragma pack(4) |
---|
2256 | |
---|
2257 | struct log2phys { |
---|
2258 | unsigned int l2p_flags; |
---|
2259 | off_t l2p_contigbytes; |
---|
2260 | off_t l2p_devoffset; |
---|
2261 | }; |
---|
2262 | |
---|
2263 | #pragma pack() |
---|
2264 | |
---|
2265 | #define O_POPUP 0x80000000 |
---|
2266 | #define O_ALERT 0x20000000 |
---|
2267 | # 400 "/usr/include/sys/fcntl.h" 3 4 |
---|
2268 | typedef enum { |
---|
2269 | FILESEC_OWNER = 1, |
---|
2270 | FILESEC_GROUP = 2, |
---|
2271 | FILESEC_UUID = 3, |
---|
2272 | FILESEC_MODE = 4, |
---|
2273 | FILESEC_ACL = 5, |
---|
2274 | FILESEC_GRPUUID = 6, |
---|
2275 | |
---|
2276 | |
---|
2277 | FILESEC_ACL_RAW = 100, |
---|
2278 | FILESEC_ACL_ALLOCSIZE = 101 |
---|
2279 | } filesec_property_t; |
---|
2280 | |
---|
2281 | |
---|
2282 | #define FILESEC_GUID FILESEC_UUID |
---|
2283 | |
---|
2284 | |
---|
2285 | |
---|
2286 | int open(const char *, int, ...) __asm("_" "open" "$UNIX2003"); |
---|
2287 | int creat(const char *, mode_t) __asm("_" "creat" "$UNIX2003"); |
---|
2288 | int fcntl(int, int, ...) __asm("_" "fcntl" "$UNIX2003"); |
---|
2289 | |
---|
2290 | int openx_np(const char *, int, filesec_t); |
---|
2291 | int flock(int, int); |
---|
2292 | filesec_t filesec_init(void); |
---|
2293 | filesec_t filesec_dup(filesec_t); |
---|
2294 | void filesec_free(filesec_t); |
---|
2295 | int filesec_get_property(filesec_t, filesec_property_t, void *); |
---|
2296 | int filesec_set_property(filesec_t, filesec_property_t, const void *); |
---|
2297 | int filesec_query_property(filesec_t, filesec_property_t, int *); |
---|
2298 | #define _FILESEC_UNSET_PROPERTY ((void *)0) |
---|
2299 | #define _FILESEC_REMOVE_ACL ((void *)1) |
---|
2300 | |
---|
2301 | |
---|
2302 | # 26 "/opt/local/include/LegacySupport/sys/fcntl.h" 2 3 4 |
---|
2303 | # 34 "/opt/local/include/LegacySupport/sys/fcntl.h" 3 4 |
---|
2304 | #define O_CLOEXEC 0 |
---|
2305 | |
---|
2306 | |
---|
2307 | |
---|
2308 | |
---|
2309 | |
---|
2310 | |
---|
2311 | #define AT_FDCWD -2 |
---|
2312 | |
---|
2313 | |
---|
2314 | #define AT_EACCESS 0x0010 |
---|
2315 | |
---|
2316 | |
---|
2317 | #define AT_SYMLINK_NOFOLLOW 0x0020 |
---|
2318 | |
---|
2319 | |
---|
2320 | #define AT_SYMLINK_FOLLOW 0x0040 |
---|
2321 | |
---|
2322 | |
---|
2323 | #define AT_REMOVEDIR 0x0080 |
---|
2324 | |
---|
2325 | |
---|
2326 | |
---|
2327 | |
---|
2328 | extern int openat(int dirfd, const char *pathname, int flags, ...); |
---|
2329 | |
---|
2330 | |
---|
2331 | # 23 "/usr/include/fcntl.h" 2 3 4 |
---|
2332 | # 34 "misc-utils/hardlink.c" 2 |
---|
2333 | # 1 "/usr/include/ftw.h" 1 3 4 |
---|
2334 | # 24 "/usr/include/ftw.h" 3 4 |
---|
2335 | #define _FTW_H |
---|
2336 | |
---|
2337 | |
---|
2338 | |
---|
2339 | |
---|
2340 | |
---|
2341 | |
---|
2342 | |
---|
2343 | #define FTW_F 0 |
---|
2344 | #define FTW_D 1 |
---|
2345 | #define FTW_DNR 2 |
---|
2346 | #define FTW_DP 3 |
---|
2347 | #define FTW_NS 4 |
---|
2348 | #define FTW_SL 5 |
---|
2349 | #define FTW_SLN 6 |
---|
2350 | |
---|
2351 | |
---|
2352 | |
---|
2353 | |
---|
2354 | #define FTW_PHYS 0x01 |
---|
2355 | #define FTW_MOUNT 0x02 |
---|
2356 | #define FTW_DEPTH 0x04 |
---|
2357 | #define FTW_CHDIR 0x08 |
---|
2358 | |
---|
2359 | struct FTW { |
---|
2360 | int base; |
---|
2361 | int level; |
---|
2362 | }; |
---|
2363 | |
---|
2364 | |
---|
2365 | int ftw(const char *, int (*)(const char *, const struct stat *, int), int) |
---|
2366 | __asm("_" "ftw" "$INODE64" "$UNIX2003"); |
---|
2367 | int nftw(const char *, int (*)(const char *, const struct stat *, int, |
---|
2368 | struct FTW *), int, int) __asm("_" "nftw" "$INODE64" "$UNIX2003"); |
---|
2369 | |
---|
2370 | # 35 "misc-utils/hardlink.c" 2 |
---|
2371 | # 1 "/usr/include/search.h" 1 3 4 |
---|
2372 | # 10 "/usr/include/search.h" 3 4 |
---|
2373 | #define _SEARCH_H_ |
---|
2374 | # 20 "/usr/include/search.h" 3 4 |
---|
2375 | typedef struct entry { |
---|
2376 | char *key; |
---|
2377 | void *data; |
---|
2378 | } ENTRY; |
---|
2379 | |
---|
2380 | typedef enum { |
---|
2381 | FIND, ENTER |
---|
2382 | } ACTION; |
---|
2383 | |
---|
2384 | typedef enum { |
---|
2385 | preorder, |
---|
2386 | postorder, |
---|
2387 | endorder, |
---|
2388 | leaf |
---|
2389 | } VISIT; |
---|
2390 | # 48 "/usr/include/search.h" 3 4 |
---|
2391 | |
---|
2392 | int hcreate(size_t); |
---|
2393 | void hdestroy(void); |
---|
2394 | ENTRY *hsearch(ENTRY, ACTION); |
---|
2395 | void insque(void *, void *); |
---|
2396 | void *lfind(const void *, const void *, size_t *, size_t, |
---|
2397 | int (*)(const void *, const void *)); |
---|
2398 | void *lsearch(const void *, void *, size_t *, size_t, |
---|
2399 | int (*)(const void *, const void *)); |
---|
2400 | void remque(void *); |
---|
2401 | void *tdelete(const void * , void ** , |
---|
2402 | int (*)(const void *, const void *)); |
---|
2403 | void *tfind(const void *, void * const *, |
---|
2404 | int (*)(const void *, const void *)); |
---|
2405 | void *tsearch(const void *, void **, int (*)(const void *, const void *)); |
---|
2406 | void twalk(const void *, void (*)(const void *, VISIT, int)); |
---|
2407 | |
---|
2408 | # 36 "misc-utils/hardlink.c" 2 |
---|
2409 | # 1 "/usr/include/signal.h" 1 3 4 |
---|
2410 | # 59 "/usr/include/signal.h" 3 4 |
---|
2411 | #define _USER_SIGNAL_H |
---|
2412 | |
---|
2413 | |
---|
2414 | |
---|
2415 | # 1 "/usr/include/sys/signal.h" 1 3 4 |
---|
2416 | # 70 "/usr/include/sys/signal.h" 3 4 |
---|
2417 | #define _SYS_SIGNAL_H_ |
---|
2418 | |
---|
2419 | |
---|
2420 | |
---|
2421 | |
---|
2422 | #define __DARWIN_NSIG 32 |
---|
2423 | |
---|
2424 | |
---|
2425 | #define NSIG __DARWIN_NSIG |
---|
2426 | |
---|
2427 | |
---|
2428 | # 1 "/usr/include/machine/signal.h" 1 3 4 |
---|
2429 | # 29 "/usr/include/machine/signal.h" 3 4 |
---|
2430 | #define _BSD_MACHINE_SIGNAL_H_ |
---|
2431 | |
---|
2432 | |
---|
2433 | # 1 "/usr/include/ppc/signal.h" 1 3 4 |
---|
2434 | # 33 "/usr/include/ppc/signal.h" 3 4 |
---|
2435 | #define _PPC_SIGNAL_H_ 1 |
---|
2436 | |
---|
2437 | |
---|
2438 | |
---|
2439 | |
---|
2440 | |
---|
2441 | typedef int sig_atomic_t; |
---|
2442 | |
---|
2443 | |
---|
2444 | |
---|
2445 | |
---|
2446 | |
---|
2447 | |
---|
2448 | |
---|
2449 | #define __need_struct_sigcontext |
---|
2450 | #define __need_struct_sigcontext32 |
---|
2451 | #define __need_struct_sigcontext64 |
---|
2452 | # 1 "/usr/include/ppc/_structs.h" 1 3 4 |
---|
2453 | # 115 "/usr/include/ppc/_structs.h" 3 4 |
---|
2454 | #define PPC_MCONTEXT_SIZE (PPC_THREAD_STATE_COUNT + PPC_FLOAT_STATE_COUNT + PPC_EXCEPTION_STATE_COUNT + PPC_VECTOR_STATE_COUNT) * sizeof(int) |
---|
2455 | |
---|
2456 | |
---|
2457 | #define PPC_MCONTEXT64_SIZE (PPC_THREAD_STATE64_COUNT + PPC_FLOAT_STATE_COUNT + PPC_EXCEPTION_STATE_COUNT + PPC_VECTOR_STATE_COUNT) * sizeof(int) |
---|
2458 | # 127 "/usr/include/ppc/_structs.h" 3 4 |
---|
2459 | #undef __need_struct_sigcontext |
---|
2460 | |
---|
2461 | |
---|
2462 | #define _STRUCT_SIGCONTEXT struct __darwin_sigcontext |
---|
2463 | struct __darwin_sigcontext |
---|
2464 | { |
---|
2465 | int __sc_onstack; |
---|
2466 | int __sc_mask; |
---|
2467 | int __sc_ir; |
---|
2468 | int __sc_psw; |
---|
2469 | int __sc_sp; |
---|
2470 | void *__sc_regs; |
---|
2471 | }; |
---|
2472 | # 163 "/usr/include/ppc/_structs.h" 3 4 |
---|
2473 | #undef __need_struct_sigcontext32 |
---|
2474 | |
---|
2475 | |
---|
2476 | #define _STRUCT_SIGCONTEXT32 struct __darwin_sigcontext32 |
---|
2477 | struct __darwin_sigcontext32 |
---|
2478 | { |
---|
2479 | int __sc_onstack; |
---|
2480 | int __sc_mask; |
---|
2481 | int __sc_ir; |
---|
2482 | int __sc_psw; |
---|
2483 | int __sc_sp; |
---|
2484 | void *__sc_regs; |
---|
2485 | }; |
---|
2486 | # 192 "/usr/include/ppc/_structs.h" 3 4 |
---|
2487 | #undef __need_struct_sigcontext64 |
---|
2488 | |
---|
2489 | |
---|
2490 | #define _STRUCT_SIGCONTEXT64 struct __darwin_sigcontext64 |
---|
2491 | struct __darwin_sigcontext64 |
---|
2492 | { |
---|
2493 | int __sc_onstack; |
---|
2494 | int __sc_mask; |
---|
2495 | long long __sc_ir; |
---|
2496 | long long __sc_psw; |
---|
2497 | long long __sc_sp; |
---|
2498 | void *__sc_regs; |
---|
2499 | }; |
---|
2500 | # 51 "/usr/include/ppc/signal.h" 2 3 4 |
---|
2501 | |
---|
2502 | |
---|
2503 | |
---|
2504 | |
---|
2505 | #define SV_SAVE_REGS 0x1000 |
---|
2506 | # 68 "/usr/include/ppc/signal.h" 3 4 |
---|
2507 | typedef enum { |
---|
2508 | REGS_SAVED_NONE, |
---|
2509 | REGS_SAVED_CALLER, |
---|
2510 | |
---|
2511 | |
---|
2512 | REGS_SAVED_ALL |
---|
2513 | } regs_saved_t; |
---|
2514 | # 33 "/usr/include/machine/signal.h" 2 3 4 |
---|
2515 | # 82 "/usr/include/sys/signal.h" 2 3 4 |
---|
2516 | |
---|
2517 | #define SIGHUP 1 |
---|
2518 | #define SIGINT 2 |
---|
2519 | #define SIGQUIT 3 |
---|
2520 | #define SIGILL 4 |
---|
2521 | #define SIGTRAP 5 |
---|
2522 | #define SIGABRT 6 |
---|
2523 | |
---|
2524 | |
---|
2525 | |
---|
2526 | #define SIGIOT SIGABRT |
---|
2527 | #define SIGEMT 7 |
---|
2528 | |
---|
2529 | #define SIGFPE 8 |
---|
2530 | #define SIGKILL 9 |
---|
2531 | #define SIGBUS 10 |
---|
2532 | #define SIGSEGV 11 |
---|
2533 | #define SIGSYS 12 |
---|
2534 | #define SIGPIPE 13 |
---|
2535 | #define SIGALRM 14 |
---|
2536 | #define SIGTERM 15 |
---|
2537 | #define SIGURG 16 |
---|
2538 | #define SIGSTOP 17 |
---|
2539 | #define SIGTSTP 18 |
---|
2540 | #define SIGCONT 19 |
---|
2541 | #define SIGCHLD 20 |
---|
2542 | #define SIGTTIN 21 |
---|
2543 | #define SIGTTOU 22 |
---|
2544 | |
---|
2545 | #define SIGIO 23 |
---|
2546 | |
---|
2547 | #define SIGXCPU 24 |
---|
2548 | #define SIGXFSZ 25 |
---|
2549 | #define SIGVTALRM 26 |
---|
2550 | #define SIGPROF 27 |
---|
2551 | |
---|
2552 | #define SIGWINCH 28 |
---|
2553 | #define SIGINFO 29 |
---|
2554 | |
---|
2555 | #define SIGUSR1 30 |
---|
2556 | #define SIGUSR2 31 |
---|
2557 | |
---|
2558 | |
---|
2559 | |
---|
2560 | |
---|
2561 | |
---|
2562 | |
---|
2563 | |
---|
2564 | #define SIG_DFL (void (*)(int))0 |
---|
2565 | #define SIG_IGN (void (*)(int))1 |
---|
2566 | #define SIG_HOLD (void (*)(int))5 |
---|
2567 | #define SIG_ERR ((void (*)(int))-1) |
---|
2568 | # 145 "/usr/include/sys/signal.h" 3 4 |
---|
2569 | #define __need_mcontext_t |
---|
2570 | #define __need_stack_t |
---|
2571 | #define __need_ucontext_t |
---|
2572 | |
---|
2573 | |
---|
2574 | #define __need_mcontext64_t |
---|
2575 | #define __need_ucontext64_t |
---|
2576 | |
---|
2577 | |
---|
2578 | # 1 "/usr/include/sys/_structs.h" 1 3 4 |
---|
2579 | # 34 "/usr/include/sys/_structs.h" 3 4 |
---|
2580 | #define __need_struct_ucontext |
---|
2581 | |
---|
2582 | |
---|
2583 | |
---|
2584 | |
---|
2585 | |
---|
2586 | #define __need_struct_ucontext64 |
---|
2587 | |
---|
2588 | |
---|
2589 | |
---|
2590 | |
---|
2591 | |
---|
2592 | #define __need_struct_mcontext |
---|
2593 | |
---|
2594 | |
---|
2595 | |
---|
2596 | |
---|
2597 | |
---|
2598 | #define __need_struct_mcontext64 |
---|
2599 | |
---|
2600 | |
---|
2601 | |
---|
2602 | |
---|
2603 | # 1 "/usr/include/machine/_structs.h" 1 3 4 |
---|
2604 | # 29 "/usr/include/machine/_structs.h" 3 4 |
---|
2605 | # 1 "/usr/include/ppc/_structs.h" 1 3 4 |
---|
2606 | # 44 "/usr/include/ppc/_structs.h" 3 4 |
---|
2607 | # 1 "/usr/include/mach/ppc/_structs.h" 1 3 4 |
---|
2608 | # 33 "/usr/include/mach/ppc/_structs.h" 3 4 |
---|
2609 | #define _MACH_PPC__STRUCTS_H_ |
---|
2610 | # 44 "/usr/include/mach/ppc/_structs.h" 3 4 |
---|
2611 | #define _STRUCT_PPC_THREAD_STATE struct __darwin_ppc_thread_state |
---|
2612 | struct __darwin_ppc_thread_state |
---|
2613 | { |
---|
2614 | unsigned int __srr0; |
---|
2615 | unsigned int __srr1; |
---|
2616 | unsigned int __r0; |
---|
2617 | unsigned int __r1; |
---|
2618 | unsigned int __r2; |
---|
2619 | unsigned int __r3; |
---|
2620 | unsigned int __r4; |
---|
2621 | unsigned int __r5; |
---|
2622 | unsigned int __r6; |
---|
2623 | unsigned int __r7; |
---|
2624 | unsigned int __r8; |
---|
2625 | unsigned int __r9; |
---|
2626 | unsigned int __r10; |
---|
2627 | unsigned int __r11; |
---|
2628 | unsigned int __r12; |
---|
2629 | unsigned int __r13; |
---|
2630 | unsigned int __r14; |
---|
2631 | unsigned int __r15; |
---|
2632 | unsigned int __r16; |
---|
2633 | unsigned int __r17; |
---|
2634 | unsigned int __r18; |
---|
2635 | unsigned int __r19; |
---|
2636 | unsigned int __r20; |
---|
2637 | unsigned int __r21; |
---|
2638 | unsigned int __r22; |
---|
2639 | unsigned int __r23; |
---|
2640 | unsigned int __r24; |
---|
2641 | unsigned int __r25; |
---|
2642 | unsigned int __r26; |
---|
2643 | unsigned int __r27; |
---|
2644 | unsigned int __r28; |
---|
2645 | unsigned int __r29; |
---|
2646 | unsigned int __r30; |
---|
2647 | unsigned int __r31; |
---|
2648 | |
---|
2649 | unsigned int __cr; |
---|
2650 | unsigned int __xer; |
---|
2651 | unsigned int __lr; |
---|
2652 | unsigned int __ctr; |
---|
2653 | unsigned int __mq; |
---|
2654 | |
---|
2655 | unsigned int __vrsave; |
---|
2656 | }; |
---|
2657 | # 141 "/usr/include/mach/ppc/_structs.h" 3 4 |
---|
2658 | #pragma pack(4) |
---|
2659 | |
---|
2660 | |
---|
2661 | #define _STRUCT_PPC_THREAD_STATE64 struct __darwin_ppc_thread_state64 |
---|
2662 | struct __darwin_ppc_thread_state64 |
---|
2663 | { |
---|
2664 | unsigned long long __srr0; |
---|
2665 | unsigned long long __srr1; |
---|
2666 | unsigned long long __r0; |
---|
2667 | unsigned long long __r1; |
---|
2668 | unsigned long long __r2; |
---|
2669 | unsigned long long __r3; |
---|
2670 | unsigned long long __r4; |
---|
2671 | unsigned long long __r5; |
---|
2672 | unsigned long long __r6; |
---|
2673 | unsigned long long __r7; |
---|
2674 | unsigned long long __r8; |
---|
2675 | unsigned long long __r9; |
---|
2676 | unsigned long long __r10; |
---|
2677 | unsigned long long __r11; |
---|
2678 | unsigned long long __r12; |
---|
2679 | unsigned long long __r13; |
---|
2680 | unsigned long long __r14; |
---|
2681 | unsigned long long __r15; |
---|
2682 | unsigned long long __r16; |
---|
2683 | unsigned long long __r17; |
---|
2684 | unsigned long long __r18; |
---|
2685 | unsigned long long __r19; |
---|
2686 | unsigned long long __r20; |
---|
2687 | unsigned long long __r21; |
---|
2688 | unsigned long long __r22; |
---|
2689 | unsigned long long __r23; |
---|
2690 | unsigned long long __r24; |
---|
2691 | unsigned long long __r25; |
---|
2692 | unsigned long long __r26; |
---|
2693 | unsigned long long __r27; |
---|
2694 | unsigned long long __r28; |
---|
2695 | unsigned long long __r29; |
---|
2696 | unsigned long long __r30; |
---|
2697 | unsigned long long __r31; |
---|
2698 | |
---|
2699 | unsigned int __cr; |
---|
2700 | unsigned long long __xer; |
---|
2701 | unsigned long long __lr; |
---|
2702 | unsigned long long __ctr; |
---|
2703 | |
---|
2704 | unsigned int __vrsave; |
---|
2705 | }; |
---|
2706 | # 237 "/usr/include/mach/ppc/_structs.h" 3 4 |
---|
2707 | #pragma pack() |
---|
2708 | |
---|
2709 | |
---|
2710 | |
---|
2711 | |
---|
2712 | |
---|
2713 | |
---|
2714 | #define _STRUCT_PPC_FLOAT_STATE struct __darwin_ppc_float_state |
---|
2715 | struct __darwin_ppc_float_state |
---|
2716 | { |
---|
2717 | double __fpregs[32]; |
---|
2718 | |
---|
2719 | unsigned int __fpscr_pad; |
---|
2720 | unsigned int __fpscr; |
---|
2721 | }; |
---|
2722 | # 263 "/usr/include/mach/ppc/_structs.h" 3 4 |
---|
2723 | #pragma pack(4) |
---|
2724 | |
---|
2725 | |
---|
2726 | #define _STRUCT_PPC_VECTOR_STATE struct __darwin_ppc_vector_state |
---|
2727 | struct __darwin_ppc_vector_state |
---|
2728 | { |
---|
2729 | |
---|
2730 | |
---|
2731 | |
---|
2732 | |
---|
2733 | unsigned long __save_vr[32][4]; |
---|
2734 | unsigned long __save_vscr[4]; |
---|
2735 | |
---|
2736 | unsigned int __save_pad5[4]; |
---|
2737 | unsigned int __save_vrvalid; |
---|
2738 | unsigned int __save_pad6[7]; |
---|
2739 | }; |
---|
2740 | # 297 "/usr/include/mach/ppc/_structs.h" 3 4 |
---|
2741 | #pragma pack() |
---|
2742 | # 316 "/usr/include/mach/ppc/_structs.h" 3 4 |
---|
2743 | #pragma pack(4) |
---|
2744 | |
---|
2745 | |
---|
2746 | #define _STRUCT_PPC_EXCEPTION_STATE struct __darwin_ppc_exception_state |
---|
2747 | struct __darwin_ppc_exception_state |
---|
2748 | { |
---|
2749 | |
---|
2750 | |
---|
2751 | |
---|
2752 | |
---|
2753 | |
---|
2754 | |
---|
2755 | |
---|
2756 | unsigned long __dar; |
---|
2757 | unsigned long __dsisr; |
---|
2758 | unsigned long __exception; |
---|
2759 | unsigned long __pad0; |
---|
2760 | unsigned long __pad1[4]; |
---|
2761 | |
---|
2762 | }; |
---|
2763 | # 358 "/usr/include/mach/ppc/_structs.h" 3 4 |
---|
2764 | #define _STRUCT_PPC_EXCEPTION_STATE64 struct __darwin_ppc_exception_state64 |
---|
2765 | struct __darwin_ppc_exception_state64 |
---|
2766 | { |
---|
2767 | unsigned long long __dar; |
---|
2768 | |
---|
2769 | |
---|
2770 | |
---|
2771 | |
---|
2772 | |
---|
2773 | unsigned long __dsisr; |
---|
2774 | unsigned long __exception; |
---|
2775 | unsigned long __pad1[4]; |
---|
2776 | |
---|
2777 | }; |
---|
2778 | # 390 "/usr/include/mach/ppc/_structs.h" 3 4 |
---|
2779 | #pragma pack() |
---|
2780 | # 45 "/usr/include/ppc/_structs.h" 2 3 4 |
---|
2781 | |
---|
2782 | |
---|
2783 | |
---|
2784 | #undef __need_struct_mcontext |
---|
2785 | |
---|
2786 | |
---|
2787 | #define _STRUCT_MCONTEXT struct __darwin_mcontext |
---|
2788 | struct __darwin_mcontext |
---|
2789 | { |
---|
2790 | struct __darwin_ppc_exception_state __es; |
---|
2791 | struct __darwin_ppc_thread_state __ss; |
---|
2792 | struct __darwin_ppc_float_state __fs; |
---|
2793 | struct __darwin_ppc_vector_state __vs; |
---|
2794 | }; |
---|
2795 | # 73 "/usr/include/ppc/_structs.h" 3 4 |
---|
2796 | #undef __need_struct_mcontext64 |
---|
2797 | |
---|
2798 | |
---|
2799 | #define _STRUCT_MCONTEXT64 struct __darwin_mcontext64 |
---|
2800 | struct __darwin_mcontext64 |
---|
2801 | { |
---|
2802 | struct __darwin_ppc_exception_state64 __es; |
---|
2803 | struct __darwin_ppc_thread_state64 __ss; |
---|
2804 | struct __darwin_ppc_float_state __fs; |
---|
2805 | struct __darwin_ppc_vector_state __vs; |
---|
2806 | }; |
---|
2807 | # 98 "/usr/include/ppc/_structs.h" 3 4 |
---|
2808 | #undef __need_mcontext_t |
---|
2809 | |
---|
2810 | #define _MCONTEXT_T |
---|
2811 | typedef struct __darwin_mcontext *mcontext_t; |
---|
2812 | |
---|
2813 | |
---|
2814 | |
---|
2815 | |
---|
2816 | #undef __need_mcontext64_t |
---|
2817 | |
---|
2818 | #define _MCONTEXT64_T |
---|
2819 | typedef struct __darwin_mcontext64 *mcontext64_t; |
---|
2820 | # 30 "/usr/include/machine/_structs.h" 2 3 4 |
---|
2821 | # 58 "/usr/include/sys/_structs.h" 2 3 4 |
---|
2822 | |
---|
2823 | |
---|
2824 | |
---|
2825 | |
---|
2826 | #define __need_struct_sigaltstack |
---|
2827 | |
---|
2828 | |
---|
2829 | |
---|
2830 | |
---|
2831 | #undef __need_struct_sigaltstack |
---|
2832 | |
---|
2833 | |
---|
2834 | |
---|
2835 | #define _STRUCT_SIGALTSTACK struct __darwin_sigaltstack |
---|
2836 | |
---|
2837 | |
---|
2838 | |
---|
2839 | struct __darwin_sigaltstack |
---|
2840 | { |
---|
2841 | void *ss_sp; |
---|
2842 | __darwin_size_t ss_size; |
---|
2843 | int ss_flags; |
---|
2844 | }; |
---|
2845 | # 121 "/usr/include/sys/_structs.h" 3 4 |
---|
2846 | #undef __need_struct_ucontext |
---|
2847 | |
---|
2848 | |
---|
2849 | #define _STRUCT_UCONTEXT struct __darwin_ucontext |
---|
2850 | |
---|
2851 | |
---|
2852 | |
---|
2853 | struct __darwin_ucontext |
---|
2854 | { |
---|
2855 | int uc_onstack; |
---|
2856 | __darwin_sigset_t uc_sigmask; |
---|
2857 | struct __darwin_sigaltstack uc_stack; |
---|
2858 | struct __darwin_ucontext *uc_link; |
---|
2859 | __darwin_size_t uc_mcsize; |
---|
2860 | struct __darwin_mcontext *uc_mcontext; |
---|
2861 | |
---|
2862 | struct __darwin_mcontext __mcontext_data; |
---|
2863 | |
---|
2864 | }; |
---|
2865 | |
---|
2866 | |
---|
2867 | |
---|
2868 | |
---|
2869 | #undef __need_struct_ucontext64 |
---|
2870 | |
---|
2871 | |
---|
2872 | #define _STRUCT_UCONTEXT64 struct __darwin_ucontext64 |
---|
2873 | |
---|
2874 | |
---|
2875 | |
---|
2876 | struct __darwin_ucontext64 |
---|
2877 | { |
---|
2878 | int uc_onstack; |
---|
2879 | __darwin_sigset_t uc_sigmask; |
---|
2880 | struct __darwin_sigaltstack uc_stack; |
---|
2881 | struct __darwin_ucontext64 *uc_link; |
---|
2882 | __darwin_size_t uc_mcsize; |
---|
2883 | struct __darwin_mcontext64 *uc_mcontext64; |
---|
2884 | }; |
---|
2885 | # 215 "/usr/include/sys/_structs.h" 3 4 |
---|
2886 | #undef __need_stack_t |
---|
2887 | |
---|
2888 | #define _STACK_T |
---|
2889 | typedef struct __darwin_sigaltstack stack_t; |
---|
2890 | |
---|
2891 | |
---|
2892 | |
---|
2893 | |
---|
2894 | #undef __need_ucontext_t |
---|
2895 | |
---|
2896 | |
---|
2897 | #define _UCONTEXT_T |
---|
2898 | typedef struct __darwin_ucontext ucontext_t; |
---|
2899 | |
---|
2900 | |
---|
2901 | |
---|
2902 | |
---|
2903 | #undef __need_ucontext64_t |
---|
2904 | |
---|
2905 | #define _UCONTEXT64_T |
---|
2906 | typedef struct __darwin_ucontext64 ucontext64_t; |
---|
2907 | # 155 "/usr/include/sys/signal.h" 2 3 4 |
---|
2908 | # 167 "/usr/include/sys/signal.h" 3 4 |
---|
2909 | #define _SIGSET_T |
---|
2910 | typedef __darwin_sigset_t sigset_t; |
---|
2911 | # 181 "/usr/include/sys/signal.h" 3 4 |
---|
2912 | union sigval { |
---|
2913 | |
---|
2914 | int sival_int; |
---|
2915 | void *sival_ptr; |
---|
2916 | }; |
---|
2917 | |
---|
2918 | #define SIGEV_NONE 0 |
---|
2919 | #define SIGEV_SIGNAL 1 |
---|
2920 | #define SIGEV_THREAD 3 |
---|
2921 | |
---|
2922 | struct sigevent { |
---|
2923 | int sigev_notify; |
---|
2924 | int sigev_signo; |
---|
2925 | union sigval sigev_value; |
---|
2926 | void (*sigev_notify_function)(union sigval); |
---|
2927 | pthread_attr_t *sigev_notify_attributes; |
---|
2928 | }; |
---|
2929 | |
---|
2930 | |
---|
2931 | typedef struct __siginfo { |
---|
2932 | int si_signo; |
---|
2933 | int si_errno; |
---|
2934 | int si_code; |
---|
2935 | pid_t si_pid; |
---|
2936 | uid_t si_uid; |
---|
2937 | int si_status; |
---|
2938 | void *si_addr; |
---|
2939 | union sigval si_value; |
---|
2940 | long si_band; |
---|
2941 | unsigned long __pad[7]; |
---|
2942 | } siginfo_t; |
---|
2943 | # 229 "/usr/include/sys/signal.h" 3 4 |
---|
2944 | #define ILL_NOOP 0 |
---|
2945 | |
---|
2946 | #define ILL_ILLOPC 1 |
---|
2947 | #define ILL_ILLTRP 2 |
---|
2948 | #define ILL_PRVOPC 3 |
---|
2949 | #define ILL_ILLOPN 4 |
---|
2950 | #define ILL_ILLADR 5 |
---|
2951 | #define ILL_PRVREG 6 |
---|
2952 | #define ILL_COPROC 7 |
---|
2953 | #define ILL_BADSTK 8 |
---|
2954 | |
---|
2955 | |
---|
2956 | |
---|
2957 | #define FPE_NOOP 0 |
---|
2958 | |
---|
2959 | #define FPE_FLTDIV 1 |
---|
2960 | #define FPE_FLTOVF 2 |
---|
2961 | #define FPE_FLTUND 3 |
---|
2962 | #define FPE_FLTRES 4 |
---|
2963 | #define FPE_FLTINV 5 |
---|
2964 | #define FPE_FLTSUB 6 |
---|
2965 | #define FPE_INTDIV 7 |
---|
2966 | #define FPE_INTOVF 8 |
---|
2967 | |
---|
2968 | |
---|
2969 | |
---|
2970 | #define SEGV_NOOP 0 |
---|
2971 | |
---|
2972 | #define SEGV_MAPERR 1 |
---|
2973 | #define SEGV_ACCERR 2 |
---|
2974 | |
---|
2975 | |
---|
2976 | |
---|
2977 | #define BUS_NOOP 0 |
---|
2978 | |
---|
2979 | #define BUS_ADRALN 1 |
---|
2980 | #define BUS_ADRERR 2 |
---|
2981 | #define BUS_OBJERR 3 |
---|
2982 | |
---|
2983 | |
---|
2984 | #define TRAP_BRKPT 1 |
---|
2985 | #define TRAP_TRACE 2 |
---|
2986 | |
---|
2987 | |
---|
2988 | |
---|
2989 | #define CLD_NOOP 0 |
---|
2990 | |
---|
2991 | #define CLD_EXITED 1 |
---|
2992 | #define CLD_KILLED 2 |
---|
2993 | #define CLD_DUMPED 3 |
---|
2994 | #define CLD_TRAPPED 4 |
---|
2995 | #define CLD_STOPPED 5 |
---|
2996 | #define CLD_CONTINUED 6 |
---|
2997 | |
---|
2998 | |
---|
2999 | #define POLL_IN 1 |
---|
3000 | #define POLL_OUT 2 |
---|
3001 | #define POLL_MSG 3 |
---|
3002 | #define POLL_ERR 4 |
---|
3003 | #define POLL_PRI 5 |
---|
3004 | #define POLL_HUP 6 |
---|
3005 | |
---|
3006 | |
---|
3007 | union __sigaction_u { |
---|
3008 | void (*__sa_handler)(int); |
---|
3009 | void (*__sa_sigaction)(int, struct __siginfo *, |
---|
3010 | void *); |
---|
3011 | }; |
---|
3012 | |
---|
3013 | |
---|
3014 | struct __sigaction { |
---|
3015 | union __sigaction_u __sigaction_u; |
---|
3016 | void (*sa_tramp)(void *, int, int, siginfo_t *, void *); |
---|
3017 | sigset_t sa_mask; |
---|
3018 | int sa_flags; |
---|
3019 | }; |
---|
3020 | |
---|
3021 | |
---|
3022 | |
---|
3023 | |
---|
3024 | struct sigaction { |
---|
3025 | union __sigaction_u __sigaction_u; |
---|
3026 | sigset_t sa_mask; |
---|
3027 | int sa_flags; |
---|
3028 | }; |
---|
3029 | |
---|
3030 | |
---|
3031 | |
---|
3032 | |
---|
3033 | #define sa_handler __sigaction_u.__sa_handler |
---|
3034 | #define sa_sigaction __sigaction_u.__sa_sigaction |
---|
3035 | |
---|
3036 | #define SA_ONSTACK 0x0001 |
---|
3037 | #define SA_RESTART 0x0002 |
---|
3038 | #define SA_RESETHAND 0x0004 |
---|
3039 | #define SA_NOCLDSTOP 0x0008 |
---|
3040 | #define SA_NODEFER 0x0010 |
---|
3041 | #define SA_NOCLDWAIT 0x0020 |
---|
3042 | #define SA_SIGINFO 0x0040 |
---|
3043 | |
---|
3044 | #define SA_USERTRAMP 0x0100 |
---|
3045 | |
---|
3046 | #define SA_64REGSET 0x0200 |
---|
3047 | |
---|
3048 | |
---|
3049 | |
---|
3050 | |
---|
3051 | |
---|
3052 | #define SA_USERSPACE_MASK (SA_ONSTACK | SA_RESTART | SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT | SA_SIGINFO) |
---|
3053 | |
---|
3054 | |
---|
3055 | |
---|
3056 | |
---|
3057 | #define SIG_BLOCK 1 |
---|
3058 | #define SIG_UNBLOCK 2 |
---|
3059 | #define SIG_SETMASK 3 |
---|
3060 | |
---|
3061 | |
---|
3062 | #define SI_USER 0x10001 |
---|
3063 | #define SI_QUEUE 0x10002 |
---|
3064 | #define SI_TIMER 0x10003 |
---|
3065 | #define SI_ASYNCIO 0x10004 |
---|
3066 | #define SI_MESGQ 0x10005 |
---|
3067 | |
---|
3068 | |
---|
3069 | typedef void (*sig_t)(int); |
---|
3070 | |
---|
3071 | |
---|
3072 | |
---|
3073 | |
---|
3074 | |
---|
3075 | |
---|
3076 | #define SS_ONSTACK 0x0001 |
---|
3077 | #define SS_DISABLE 0x0004 |
---|
3078 | #define MINSIGSTKSZ 32768 |
---|
3079 | #define SIGSTKSZ 131072 |
---|
3080 | |
---|
3081 | |
---|
3082 | |
---|
3083 | |
---|
3084 | |
---|
3085 | |
---|
3086 | struct sigvec { |
---|
3087 | void (*sv_handler)(int); |
---|
3088 | int sv_mask; |
---|
3089 | int sv_flags; |
---|
3090 | }; |
---|
3091 | |
---|
3092 | #define SV_ONSTACK SA_ONSTACK |
---|
3093 | #define SV_INTERRUPT SA_RESTART |
---|
3094 | #define SV_RESETHAND SA_RESETHAND |
---|
3095 | #define SV_NODEFER SA_NODEFER |
---|
3096 | #define SV_NOCLDSTOP SA_NOCLDSTOP |
---|
3097 | #define SV_SIGINFO SA_SIGINFO |
---|
3098 | |
---|
3099 | #define sv_onstack sv_flags |
---|
3100 | |
---|
3101 | |
---|
3102 | |
---|
3103 | |
---|
3104 | |
---|
3105 | struct sigstack { |
---|
3106 | char *ss_sp; |
---|
3107 | int ss_onstack; |
---|
3108 | }; |
---|
3109 | |
---|
3110 | |
---|
3111 | |
---|
3112 | |
---|
3113 | |
---|
3114 | |
---|
3115 | #define sigmask(m) (1 << ((m)-1)) |
---|
3116 | |
---|
3117 | |
---|
3118 | #define BADSIG SIG_ERR |
---|
3119 | # 412 "/usr/include/sys/signal.h" 3 4 |
---|
3120 | |
---|
3121 | void (*signal(int, void (*)(int)))(int); |
---|
3122 | |
---|
3123 | # 64 "/usr/include/signal.h" 2 3 4 |
---|
3124 | |
---|
3125 | |
---|
3126 | |
---|
3127 | |
---|
3128 | |
---|
3129 | |
---|
3130 | |
---|
3131 | extern const char *const sys_signame[32]; |
---|
3132 | extern const char *const sys_siglist[32]; |
---|
3133 | |
---|
3134 | |
---|
3135 | |
---|
3136 | int raise(int); |
---|
3137 | |
---|
3138 | |
---|
3139 | |
---|
3140 | |
---|
3141 | void (*bsd_signal(int, void (*)(int)))(int); |
---|
3142 | int kill(pid_t, int) __asm("_" "kill" "$UNIX2003"); |
---|
3143 | int killpg(pid_t, int) __asm("_" "killpg" "$UNIX2003"); |
---|
3144 | int pthread_kill(pthread_t, int); |
---|
3145 | int pthread_sigmask(int, const sigset_t *, sigset_t *) __asm("_" "pthread_sigmask" "$UNIX2003"); |
---|
3146 | int sigaction(int, const struct sigaction * , |
---|
3147 | struct sigaction * ); |
---|
3148 | int sigaddset(sigset_t *, int); |
---|
3149 | int sigaltstack(const stack_t * , stack_t * ) __asm("_" "sigaltstack" "$UNIX2003"); |
---|
3150 | int sigdelset(sigset_t *, int); |
---|
3151 | int sigemptyset(sigset_t *); |
---|
3152 | int sigfillset(sigset_t *); |
---|
3153 | int sighold(int); |
---|
3154 | int sigignore(int); |
---|
3155 | int siginterrupt(int, int); |
---|
3156 | int sigismember(const sigset_t *, int); |
---|
3157 | int sigpause(int) __asm("_" "sigpause" "$UNIX2003"); |
---|
3158 | int sigpending(sigset_t *); |
---|
3159 | int sigprocmask(int, const sigset_t * , sigset_t * ); |
---|
3160 | int sigrelse(int); |
---|
3161 | void (*sigset(int, void (*)(int)))(int); |
---|
3162 | int sigsuspend(const sigset_t *) __asm("_" "sigsuspend" "$UNIX2003"); |
---|
3163 | int sigwait(const sigset_t * , int * ) __asm("_" "sigwait" "$UNIX2003"); |
---|
3164 | |
---|
3165 | void psignal(unsigned int, const char *); |
---|
3166 | int sigblock(int); |
---|
3167 | int sigsetmask(int); |
---|
3168 | int sigvec(int, struct sigvec *, struct sigvec *); |
---|
3169 | |
---|
3170 | |
---|
3171 | # 121 "/usr/include/signal.h" 3 4 |
---|
3172 | #define __sigbits(signo) (1 << ((signo) - 1)) |
---|
3173 | |
---|
3174 | |
---|
3175 | #define sigaddset(set,signo) (*(set) |= __sigbits(signo), 0) |
---|
3176 | #define sigdelset(set,signo) (*(set) &= ~__sigbits(signo), 0) |
---|
3177 | #define sigismember(set,signo) ((*(set) & __sigbits(signo)) != 0) |
---|
3178 | #define sigemptyset(set) (*(set) = 0, 0) |
---|
3179 | #define sigfillset(set) (*(set) = ~(sigset_t)0, 0) |
---|
3180 | # 37 "misc-utils/hardlink.c" 2 |
---|
3181 | # 1 "/usr/include/getopt.h" 1 3 4 |
---|
3182 | # 41 "/usr/include/getopt.h" 3 4 |
---|
3183 | #define _GETOPT_H_ |
---|
3184 | |
---|
3185 | |
---|
3186 | # 1 "/opt/local/include/LegacySupport/unistd.h" 1 3 4 |
---|
3187 | # 78 "/opt/local/include/LegacySupport/unistd.h" 3 4 |
---|
3188 | #define _MACPORTS_UNISTD_H_ |
---|
3189 | |
---|
3190 | |
---|
3191 | |
---|
3192 | |
---|
3193 | # 1 "/usr/include/unistd.h" 1 3 4 |
---|
3194 | # 69 "/usr/include/unistd.h" 3 4 |
---|
3195 | #define _UNISTD_H_ |
---|
3196 | |
---|
3197 | |
---|
3198 | # 1 "/opt/local/include/LegacySupport/sys/unistd.h" 1 3 4 |
---|
3199 | # 19 "/opt/local/include/LegacySupport/sys/unistd.h" 3 4 |
---|
3200 | #define _MACPORTS_SYSUNISTD_H_ |
---|
3201 | |
---|
3202 | |
---|
3203 | |
---|
3204 | |
---|
3205 | |
---|
3206 | # 1 "/usr/include/sys/unistd.h" 1 3 4 |
---|
3207 | # 65 "/usr/include/sys/unistd.h" 3 4 |
---|
3208 | #define _SYS_UNISTD_H_ |
---|
3209 | # 79 "/usr/include/sys/unistd.h" 3 4 |
---|
3210 | #define _POSIX_VERSION 200112L |
---|
3211 | #define _POSIX2_VERSION 200112L |
---|
3212 | |
---|
3213 | |
---|
3214 | |
---|
3215 | |
---|
3216 | #define _POSIX_VDISABLE ((unsigned char)'\377') |
---|
3217 | |
---|
3218 | |
---|
3219 | #define _POSIX_THREAD_KEYS_MAX 128 |
---|
3220 | |
---|
3221 | |
---|
3222 | #define F_OK 0 |
---|
3223 | #define X_OK (1<<0) |
---|
3224 | #define W_OK (1<<1) |
---|
3225 | #define R_OK (1<<2) |
---|
3226 | |
---|
3227 | |
---|
3228 | |
---|
3229 | |
---|
3230 | |
---|
3231 | |
---|
3232 | |
---|
3233 | #define _READ_OK (1<<9) |
---|
3234 | #define _WRITE_OK (1<<10) |
---|
3235 | #define _EXECUTE_OK (1<<11) |
---|
3236 | #define _DELETE_OK (1<<12) |
---|
3237 | #define _APPEND_OK (1<<13) |
---|
3238 | #define _RMFILE_OK (1<<14) |
---|
3239 | #define _RATTR_OK (1<<15) |
---|
3240 | #define _WATTR_OK (1<<16) |
---|
3241 | #define _REXT_OK (1<<17) |
---|
3242 | #define _WEXT_OK (1<<18) |
---|
3243 | #define _RPERM_OK (1<<19) |
---|
3244 | #define _WPERM_OK (1<<20) |
---|
3245 | #define _CHOWN_OK (1<<21) |
---|
3246 | |
---|
3247 | #define _ACCESS_EXTENDED_MASK (_READ_OK | _WRITE_OK | _EXECUTE_OK | _DELETE_OK | _APPEND_OK | _RMFILE_OK | _REXT_OK | _WEXT_OK | _RATTR_OK | _WATTR_OK | _RPERM_OK | _WPERM_OK | _CHOWN_OK) |
---|
3248 | # 132 "/usr/include/sys/unistd.h" 3 4 |
---|
3249 | #define L_SET SEEK_SET |
---|
3250 | #define L_INCR SEEK_CUR |
---|
3251 | #define L_XTND SEEK_END |
---|
3252 | |
---|
3253 | |
---|
3254 | |
---|
3255 | struct accessx_descriptor { |
---|
3256 | unsigned int ad_name_offset; |
---|
3257 | int ad_flags; |
---|
3258 | int ad_pad[2]; |
---|
3259 | }; |
---|
3260 | #define ACCESSX_MAX_DESCRIPTORS 100 |
---|
3261 | #define ACCESSX_MAX_TABLESIZE (16 * 1024) |
---|
3262 | |
---|
3263 | |
---|
3264 | |
---|
3265 | #define _PC_LINK_MAX 1 |
---|
3266 | #define _PC_MAX_CANON 2 |
---|
3267 | #define _PC_MAX_INPUT 3 |
---|
3268 | #define _PC_NAME_MAX 4 |
---|
3269 | #define _PC_PATH_MAX 5 |
---|
3270 | #define _PC_PIPE_BUF 6 |
---|
3271 | #define _PC_CHOWN_RESTRICTED 7 |
---|
3272 | #define _PC_NO_TRUNC 8 |
---|
3273 | #define _PC_VDISABLE 9 |
---|
3274 | |
---|
3275 | |
---|
3276 | #define _PC_NAME_CHARS_MAX 10 |
---|
3277 | #define _PC_CASE_SENSITIVE 11 |
---|
3278 | #define _PC_CASE_PRESERVING 12 |
---|
3279 | #define _PC_EXTENDED_SECURITY_NP 13 |
---|
3280 | #define _PC_AUTH_OPAQUE_NP 14 |
---|
3281 | |
---|
3282 | |
---|
3283 | #define _PC_2_SYMLINKS 15 |
---|
3284 | #define _PC_ALLOC_SIZE_MIN 16 |
---|
3285 | #define _PC_ASYNC_IO 17 |
---|
3286 | #define _PC_FILESIZEBITS 18 |
---|
3287 | #define _PC_PRIO_IO 19 |
---|
3288 | #define _PC_REC_INCR_XFER_SIZE 20 |
---|
3289 | #define _PC_REC_MAX_XFER_SIZE 21 |
---|
3290 | #define _PC_REC_MIN_XFER_SIZE 22 |
---|
3291 | #define _PC_REC_XFER_ALIGN 23 |
---|
3292 | #define _PC_SYMLINK_MAX 24 |
---|
3293 | #define _PC_SYNC_IO 25 |
---|
3294 | |
---|
3295 | |
---|
3296 | #define _CS_PATH 1 |
---|
3297 | # 26 "/opt/local/include/LegacySupport/sys/unistd.h" 2 3 4 |
---|
3298 | |
---|
3299 | |
---|
3300 | # 1 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h" 1 3 4 |
---|
3301 | |
---|
3302 | |
---|
3303 | |
---|
3304 | |
---|
3305 | |
---|
3306 | |
---|
3307 | #define _STDINT_H_ |
---|
3308 | |
---|
3309 | |
---|
3310 | |
---|
3311 | |
---|
3312 | #define __WORDSIZE 32 |
---|
3313 | # 39 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h" 3 4 |
---|
3314 | #define _UINT8_T |
---|
3315 | typedef unsigned char uint8_t; |
---|
3316 | |
---|
3317 | |
---|
3318 | |
---|
3319 | #define _UINT16_T |
---|
3320 | typedef unsigned short uint16_t; |
---|
3321 | |
---|
3322 | |
---|
3323 | |
---|
3324 | #define _UINT32_T |
---|
3325 | typedef unsigned int uint32_t; |
---|
3326 | |
---|
3327 | |
---|
3328 | |
---|
3329 | #define _UINT64_T |
---|
3330 | typedef unsigned long long uint64_t; |
---|
3331 | |
---|
3332 | |
---|
3333 | |
---|
3334 | typedef int8_t int_least8_t; |
---|
3335 | typedef int16_t int_least16_t; |
---|
3336 | typedef int32_t int_least32_t; |
---|
3337 | typedef int64_t int_least64_t; |
---|
3338 | typedef uint8_t uint_least8_t; |
---|
3339 | typedef uint16_t uint_least16_t; |
---|
3340 | typedef uint32_t uint_least32_t; |
---|
3341 | typedef uint64_t uint_least64_t; |
---|
3342 | |
---|
3343 | |
---|
3344 | |
---|
3345 | typedef int8_t int_fast8_t; |
---|
3346 | typedef int16_t int_fast16_t; |
---|
3347 | typedef int32_t int_fast32_t; |
---|
3348 | typedef int64_t int_fast64_t; |
---|
3349 | typedef uint8_t uint_fast8_t; |
---|
3350 | typedef uint16_t uint_fast16_t; |
---|
3351 | typedef uint32_t uint_fast32_t; |
---|
3352 | typedef uint64_t uint_fast64_t; |
---|
3353 | # 95 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h" 3 4 |
---|
3354 | #define _INTMAX_T |
---|
3355 | |
---|
3356 | typedef long long int intmax_t; |
---|
3357 | |
---|
3358 | |
---|
3359 | |
---|
3360 | |
---|
3361 | |
---|
3362 | |
---|
3363 | #define _UINTMAX_T |
---|
3364 | |
---|
3365 | typedef long long unsigned int uintmax_t; |
---|
3366 | # 119 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h" 3 4 |
---|
3367 | #define INT8_MAX 127 |
---|
3368 | #define INT16_MAX 32767 |
---|
3369 | #define INT32_MAX 2147483647 |
---|
3370 | #define INT64_MAX 9223372036854775807LL |
---|
3371 | |
---|
3372 | #define INT8_MIN -128 |
---|
3373 | #define INT16_MIN -32768 |
---|
3374 | |
---|
3375 | |
---|
3376 | |
---|
3377 | |
---|
3378 | |
---|
3379 | |
---|
3380 | #define INT32_MIN (-INT32_MAX-1) |
---|
3381 | #define INT64_MIN (-INT64_MAX-1) |
---|
3382 | |
---|
3383 | #define UINT8_MAX 255 |
---|
3384 | #define UINT16_MAX 65535 |
---|
3385 | #define UINT32_MAX 4294967295U |
---|
3386 | #define UINT64_MAX 18446744073709551615ULL |
---|
3387 | |
---|
3388 | |
---|
3389 | #define INT_LEAST8_MIN INT8_MIN |
---|
3390 | #define INT_LEAST16_MIN INT16_MIN |
---|
3391 | #define INT_LEAST32_MIN INT32_MIN |
---|
3392 | #define INT_LEAST64_MIN INT64_MIN |
---|
3393 | |
---|
3394 | #define INT_LEAST8_MAX INT8_MAX |
---|
3395 | #define INT_LEAST16_MAX INT16_MAX |
---|
3396 | #define INT_LEAST32_MAX INT32_MAX |
---|
3397 | #define INT_LEAST64_MAX INT64_MAX |
---|
3398 | |
---|
3399 | #define UINT_LEAST8_MAX UINT8_MAX |
---|
3400 | #define UINT_LEAST16_MAX UINT16_MAX |
---|
3401 | #define UINT_LEAST32_MAX UINT32_MAX |
---|
3402 | #define UINT_LEAST64_MAX UINT64_MAX |
---|
3403 | |
---|
3404 | |
---|
3405 | #define INT_FAST8_MIN INT8_MIN |
---|
3406 | #define INT_FAST16_MIN INT16_MIN |
---|
3407 | #define INT_FAST32_MIN INT32_MIN |
---|
3408 | #define INT_FAST64_MIN INT64_MIN |
---|
3409 | |
---|
3410 | #define INT_FAST8_MAX INT8_MAX |
---|
3411 | #define INT_FAST16_MAX INT16_MAX |
---|
3412 | #define INT_FAST32_MAX INT32_MAX |
---|
3413 | #define INT_FAST64_MAX INT64_MAX |
---|
3414 | |
---|
3415 | #define UINT_FAST8_MAX UINT8_MAX |
---|
3416 | #define UINT_FAST16_MAX UINT16_MAX |
---|
3417 | #define UINT_FAST32_MAX UINT32_MAX |
---|
3418 | #define UINT_FAST64_MAX UINT64_MAX |
---|
3419 | |
---|
3420 | |
---|
3421 | |
---|
3422 | |
---|
3423 | |
---|
3424 | |
---|
3425 | |
---|
3426 | #define INTPTR_MIN INT32_MIN |
---|
3427 | #define INTPTR_MAX INT32_MAX |
---|
3428 | |
---|
3429 | |
---|
3430 | |
---|
3431 | |
---|
3432 | |
---|
3433 | #define UINTPTR_MAX UINT32_MAX |
---|
3434 | |
---|
3435 | |
---|
3436 | |
---|
3437 | #define INTMAX_MIN INT64_MIN |
---|
3438 | #define INTMAX_MAX INT64_MAX |
---|
3439 | |
---|
3440 | #define UINTMAX_MAX UINT64_MAX |
---|
3441 | |
---|
3442 | |
---|
3443 | |
---|
3444 | |
---|
3445 | |
---|
3446 | |
---|
3447 | #define PTRDIFF_MIN INT32_MIN |
---|
3448 | #define PTRDIFF_MAX INT32_MAX |
---|
3449 | # 210 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h" 3 4 |
---|
3450 | #define SIZE_MAX UINT32_MAX |
---|
3451 | |
---|
3452 | |
---|
3453 | |
---|
3454 | |
---|
3455 | #define WCHAR_MAX __WCHAR_MAX__ |
---|
3456 | # 229 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdint.h" 3 4 |
---|
3457 | #define WCHAR_MIN (-WCHAR_MAX-1) |
---|
3458 | |
---|
3459 | |
---|
3460 | |
---|
3461 | #define WINT_MIN INT32_MIN |
---|
3462 | #define WINT_MAX INT32_MAX |
---|
3463 | |
---|
3464 | #define SIG_ATOMIC_MIN INT32_MIN |
---|
3465 | #define SIG_ATOMIC_MAX INT32_MAX |
---|
3466 | |
---|
3467 | |
---|
3468 | #define INT8_C(v) (v) |
---|
3469 | #define INT16_C(v) (v) |
---|
3470 | #define INT32_C(v) (v) |
---|
3471 | #define INT64_C(v) (v ## LL) |
---|
3472 | |
---|
3473 | #define UINT8_C(v) (v ## U) |
---|
3474 | #define UINT16_C(v) (v ## U) |
---|
3475 | #define UINT32_C(v) (v ## U) |
---|
3476 | #define UINT64_C(v) (v ## ULL) |
---|
3477 | |
---|
3478 | #define INTMAX_C(v) (v ## LL) |
---|
3479 | #define UINTMAX_C(v) (v ## ULL) |
---|
3480 | # 29 "/opt/local/include/LegacySupport/sys/unistd.h" 2 3 4 |
---|
3481 | # 56 "/opt/local/include/LegacySupport/sys/unistd.h" 3 4 |
---|
3482 | |
---|
3483 | |
---|
3484 | extern int getattrlistat(int dirfd, const char *pathname, void *a, |
---|
3485 | void *buf, size_t size, unsigned long flags); |
---|
3486 | extern ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz); |
---|
3487 | extern int faccessat(int dirfd, const char *pathname, int mode, int flags); |
---|
3488 | extern int fchownat(int dirfd, const char *pathname, uid_t owner, gid_t group, int flags); |
---|
3489 | extern int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags); |
---|
3490 | extern int symlinkat(const char *oldpath, int newdirfd, const char *newpath); |
---|
3491 | extern int unlinkat(int dirfd, const char *pathname, int flags); |
---|
3492 | |
---|
3493 | |
---|
3494 | # 84 "/opt/local/include/LegacySupport/sys/unistd.h" 3 4 |
---|
3495 | |
---|
3496 | |
---|
3497 | extern int setattrlistat(int dirfd, const char *pathname, void *a, |
---|
3498 | void *buf, size_t size, uint32_t flags); |
---|
3499 | |
---|
3500 | |
---|
3501 | # 73 "/usr/include/unistd.h" 2 3 4 |
---|
3502 | # 132 "/usr/include/unistd.h" 3 4 |
---|
3503 | #define _UUID_T |
---|
3504 | typedef __darwin_uuid_t uuid_t; |
---|
3505 | |
---|
3506 | |
---|
3507 | |
---|
3508 | #define STDIN_FILENO 0 |
---|
3509 | #define STDOUT_FILENO 1 |
---|
3510 | #define STDERR_FILENO 2 |
---|
3511 | |
---|
3512 | |
---|
3513 | |
---|
3514 | |
---|
3515 | |
---|
3516 | |
---|
3517 | |
---|
3518 | #define _XOPEN_VERSION 600 |
---|
3519 | #define _XOPEN_XCU_VERSION 4 |
---|
3520 | |
---|
3521 | |
---|
3522 | |
---|
3523 | #define _POSIX_ADVISORY_INFO (-1) |
---|
3524 | #define _POSIX_ASYNCHRONOUS_IO (-1) |
---|
3525 | #define _POSIX_BARRIERS (-1) |
---|
3526 | #define _POSIX_CHOWN_RESTRICTED 200112L |
---|
3527 | #define _POSIX_CLOCK_SELECTION (-1) |
---|
3528 | #define _POSIX_CPUTIME (-1) |
---|
3529 | #define _POSIX_FSYNC 200112L |
---|
3530 | #define _POSIX_IPV6 200112L |
---|
3531 | #define _POSIX_JOB_CONTROL 200112L |
---|
3532 | #define _POSIX_MAPPED_FILES 200112L |
---|
3533 | #define _POSIX_MEMLOCK (-1) |
---|
3534 | #define _POSIX_MEMLOCK_RANGE (-1) |
---|
3535 | #define _POSIX_MEMORY_PROTECTION 200112L |
---|
3536 | #define _POSIX_MESSAGE_PASSING (-1) |
---|
3537 | #define _POSIX_MONOTONIC_CLOCK (-1) |
---|
3538 | #define _POSIX_NO_TRUNC 200112L |
---|
3539 | #define _POSIX_PRIORITIZED_IO (-1) |
---|
3540 | #define _POSIX_PRIORITY_SCHEDULING (-1) |
---|
3541 | #define _POSIX_RAW_SOCKETS (-1) |
---|
3542 | #define _POSIX_READER_WRITER_LOCKS 200112L |
---|
3543 | #define _POSIX_REALTIME_SIGNALS (-1) |
---|
3544 | #define _POSIX_REGEXP 200112L |
---|
3545 | #define _POSIX_SAVED_IDS 200112L |
---|
3546 | #define _POSIX_SEMAPHORES (-1) |
---|
3547 | #define _POSIX_SHARED_MEMORY_OBJECTS (-1) |
---|
3548 | #define _POSIX_SHELL 200112L |
---|
3549 | #define _POSIX_SPAWN (-1) |
---|
3550 | #define _POSIX_SPIN_LOCKS (-1) |
---|
3551 | #define _POSIX_SPORADIC_SERVER (-1) |
---|
3552 | #define _POSIX_SYNCHRONIZED_IO (-1) |
---|
3553 | #define _POSIX_THREAD_ATTR_STACKADDR 200112L |
---|
3554 | #define _POSIX_THREAD_ATTR_STACKSIZE 200112L |
---|
3555 | #define _POSIX_THREAD_CPUTIME (-1) |
---|
3556 | #define _POSIX_THREAD_PRIO_INHERIT (-1) |
---|
3557 | #define _POSIX_THREAD_PRIO_PROTECT (-1) |
---|
3558 | #define _POSIX_THREAD_PRIORITY_SCHEDULING (-1) |
---|
3559 | #define _POSIX_THREAD_PROCESS_SHARED 200112L |
---|
3560 | #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L |
---|
3561 | #define _POSIX_THREAD_SPORADIC_SERVER (-1) |
---|
3562 | #define _POSIX_THREADS 200112L |
---|
3563 | #define _POSIX_TIMEOUTS (-1) |
---|
3564 | #define _POSIX_TIMERS (-1) |
---|
3565 | #define _POSIX_TRACE (-1) |
---|
3566 | #define _POSIX_TRACE_EVENT_FILTER (-1) |
---|
3567 | #define _POSIX_TRACE_INHERIT (-1) |
---|
3568 | #define _POSIX_TRACE_LOG (-1) |
---|
3569 | #define _POSIX_TYPED_MEMORY_OBJECTS (-1) |
---|
3570 | |
---|
3571 | |
---|
3572 | |
---|
3573 | |
---|
3574 | #define _POSIX2_C_BIND 200112L |
---|
3575 | #define _POSIX2_C_DEV 200112L |
---|
3576 | #define _POSIX2_CHAR_TERM 200112L |
---|
3577 | #define _POSIX2_FORT_DEV (-1) |
---|
3578 | #define _POSIX2_FORT_RUN 200112L |
---|
3579 | #define _POSIX2_LOCALEDEF 200112L |
---|
3580 | #define _POSIX2_PBS (-1) |
---|
3581 | #define _POSIX2_PBS_ACCOUNTING (-1) |
---|
3582 | #define _POSIX2_PBS_CHECKPOINT (-1) |
---|
3583 | #define _POSIX2_PBS_LOCATE (-1) |
---|
3584 | #define _POSIX2_PBS_MESSAGE (-1) |
---|
3585 | #define _POSIX2_PBS_TRACK (-1) |
---|
3586 | #define _POSIX2_SW_DEV 200112L |
---|
3587 | #define _POSIX2_UPE 200112L |
---|
3588 | |
---|
3589 | #define _V6_ILP32_OFF32 (-1) |
---|
3590 | #define _V6_ILP32_OFFBIG (1) |
---|
3591 | #define _V6_LP64_OFF64 (-1) |
---|
3592 | #define _V6_LPBIG_OFFBIG (-1) |
---|
3593 | |
---|
3594 | #define _XBS5_ILP32_OFF32 _V6_ILP32_OFF32 |
---|
3595 | #define _XBS5_ILP32_OFFBIG _V6_ILP32_OFFBIG |
---|
3596 | #define _XBS5_LP64_OFF64 _V6_LP64_OFF64 |
---|
3597 | #define _XBS5_LPBIG_OFFBIG _V6_LPBIG_OFFBIG |
---|
3598 | |
---|
3599 | #define _XOPEN_CRYPT (1) |
---|
3600 | #define _XOPEN_ENH_I18N (1) |
---|
3601 | #define _XOPEN_LEGACY (-1) |
---|
3602 | #define _XOPEN_REALTIME (-1) |
---|
3603 | #define _XOPEN_REALTIME_THREADS (-1) |
---|
3604 | #define _XOPEN_SHM (1) |
---|
3605 | #define _XOPEN_STREAMS (-1) |
---|
3606 | #define _XOPEN_UNIX (1) |
---|
3607 | |
---|
3608 | |
---|
3609 | #define F_ULOCK 0 |
---|
3610 | #define F_LOCK 1 |
---|
3611 | #define F_TLOCK 2 |
---|
3612 | #define F_TEST 3 |
---|
3613 | |
---|
3614 | |
---|
3615 | #define _SC_ARG_MAX 1 |
---|
3616 | #define _SC_CHILD_MAX 2 |
---|
3617 | #define _SC_CLK_TCK 3 |
---|
3618 | #define _SC_NGROUPS_MAX 4 |
---|
3619 | #define _SC_OPEN_MAX 5 |
---|
3620 | #define _SC_JOB_CONTROL 6 |
---|
3621 | #define _SC_SAVED_IDS 7 |
---|
3622 | #define _SC_VERSION 8 |
---|
3623 | #define _SC_BC_BASE_MAX 9 |
---|
3624 | #define _SC_BC_DIM_MAX 10 |
---|
3625 | #define _SC_BC_SCALE_MAX 11 |
---|
3626 | #define _SC_BC_STRING_MAX 12 |
---|
3627 | #define _SC_COLL_WEIGHTS_MAX 13 |
---|
3628 | #define _SC_EXPR_NEST_MAX 14 |
---|
3629 | #define _SC_LINE_MAX 15 |
---|
3630 | #define _SC_RE_DUP_MAX 16 |
---|
3631 | #define _SC_2_VERSION 17 |
---|
3632 | #define _SC_2_C_BIND 18 |
---|
3633 | #define _SC_2_C_DEV 19 |
---|
3634 | #define _SC_2_CHAR_TERM 20 |
---|
3635 | #define _SC_2_FORT_DEV 21 |
---|
3636 | #define _SC_2_FORT_RUN 22 |
---|
3637 | #define _SC_2_LOCALEDEF 23 |
---|
3638 | #define _SC_2_SW_DEV 24 |
---|
3639 | #define _SC_2_UPE 25 |
---|
3640 | #define _SC_STREAM_MAX 26 |
---|
3641 | #define _SC_TZNAME_MAX 27 |
---|
3642 | #define _SC_ASYNCHRONOUS_IO 28 |
---|
3643 | #define _SC_PAGESIZE 29 |
---|
3644 | #define _SC_MEMLOCK 30 |
---|
3645 | #define _SC_MEMLOCK_RANGE 31 |
---|
3646 | #define _SC_MEMORY_PROTECTION 32 |
---|
3647 | #define _SC_MESSAGE_PASSING 33 |
---|
3648 | #define _SC_PRIORITIZED_IO 34 |
---|
3649 | #define _SC_PRIORITY_SCHEDULING 35 |
---|
3650 | #define _SC_REALTIME_SIGNALS 36 |
---|
3651 | #define _SC_SEMAPHORES 37 |
---|
3652 | #define _SC_FSYNC 38 |
---|
3653 | #define _SC_SHARED_MEMORY_OBJECTS 39 |
---|
3654 | #define _SC_SYNCHRONIZED_IO 40 |
---|
3655 | #define _SC_TIMERS 41 |
---|
3656 | #define _SC_AIO_LISTIO_MAX 42 |
---|
3657 | #define _SC_AIO_MAX 43 |
---|
3658 | #define _SC_AIO_PRIO_DELTA_MAX 44 |
---|
3659 | #define _SC_DELAYTIMER_MAX 45 |
---|
3660 | #define _SC_MQ_OPEN_MAX 46 |
---|
3661 | #define _SC_MAPPED_FILES 47 |
---|
3662 | #define _SC_RTSIG_MAX 48 |
---|
3663 | #define _SC_SEM_NSEMS_MAX 49 |
---|
3664 | #define _SC_SEM_VALUE_MAX 50 |
---|
3665 | #define _SC_SIGQUEUE_MAX 51 |
---|
3666 | #define _SC_TIMER_MAX 52 |
---|
3667 | |
---|
3668 | #define _SC_NPROCESSORS_CONF 57 |
---|
3669 | #define _SC_NPROCESSORS_ONLN 58 |
---|
3670 | |
---|
3671 | #define _SC_2_PBS 59 |
---|
3672 | #define _SC_2_PBS_ACCOUNTING 60 |
---|
3673 | #define _SC_2_PBS_CHECKPOINT 61 |
---|
3674 | #define _SC_2_PBS_LOCATE 62 |
---|
3675 | #define _SC_2_PBS_MESSAGE 63 |
---|
3676 | #define _SC_2_PBS_TRACK 64 |
---|
3677 | #define _SC_ADVISORY_INFO 65 |
---|
3678 | #define _SC_BARRIERS 66 |
---|
3679 | #define _SC_CLOCK_SELECTION 67 |
---|
3680 | #define _SC_CPUTIME 68 |
---|
3681 | #define _SC_FILE_LOCKING 69 |
---|
3682 | #define _SC_GETGR_R_SIZE_MAX 70 |
---|
3683 | #define _SC_GETPW_R_SIZE_MAX 71 |
---|
3684 | #define _SC_HOST_NAME_MAX 72 |
---|
3685 | #define _SC_LOGIN_NAME_MAX 73 |
---|
3686 | #define _SC_MONOTONIC_CLOCK 74 |
---|
3687 | #define _SC_MQ_PRIO_MAX 75 |
---|
3688 | #define _SC_READER_WRITER_LOCKS 76 |
---|
3689 | #define _SC_REGEXP 77 |
---|
3690 | #define _SC_SHELL 78 |
---|
3691 | #define _SC_SPAWN 79 |
---|
3692 | #define _SC_SPIN_LOCKS 80 |
---|
3693 | #define _SC_SPORADIC_SERVER 81 |
---|
3694 | #define _SC_THREAD_ATTR_STACKADDR 82 |
---|
3695 | #define _SC_THREAD_ATTR_STACKSIZE 83 |
---|
3696 | #define _SC_THREAD_CPUTIME 84 |
---|
3697 | #define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 |
---|
3698 | #define _SC_THREAD_KEYS_MAX 86 |
---|
3699 | #define _SC_THREAD_PRIO_INHERIT 87 |
---|
3700 | #define _SC_THREAD_PRIO_PROTECT 88 |
---|
3701 | #define _SC_THREAD_PRIORITY_SCHEDULING 89 |
---|
3702 | #define _SC_THREAD_PROCESS_SHARED 90 |
---|
3703 | #define _SC_THREAD_SAFE_FUNCTIONS 91 |
---|
3704 | #define _SC_THREAD_SPORADIC_SERVER 92 |
---|
3705 | #define _SC_THREAD_STACK_MIN 93 |
---|
3706 | #define _SC_THREAD_THREADS_MAX 94 |
---|
3707 | #define _SC_TIMEOUTS 95 |
---|
3708 | #define _SC_THREADS 96 |
---|
3709 | #define _SC_TRACE 97 |
---|
3710 | #define _SC_TRACE_EVENT_FILTER 98 |
---|
3711 | #define _SC_TRACE_INHERIT 99 |
---|
3712 | #define _SC_TRACE_LOG 100 |
---|
3713 | #define _SC_TTY_NAME_MAX 101 |
---|
3714 | #define _SC_TYPED_MEMORY_OBJECTS 102 |
---|
3715 | #define _SC_V6_ILP32_OFF32 103 |
---|
3716 | #define _SC_V6_ILP32_OFFBIG 104 |
---|
3717 | #define _SC_V6_LP64_OFF64 105 |
---|
3718 | #define _SC_V6_LPBIG_OFFBIG 106 |
---|
3719 | #define _SC_IPV6 118 |
---|
3720 | #define _SC_RAW_SOCKETS 119 |
---|
3721 | #define _SC_SYMLOOP_MAX 120 |
---|
3722 | #define _SC_ATEXIT_MAX 107 |
---|
3723 | #define _SC_IOV_MAX 56 |
---|
3724 | #define _SC_PAGE_SIZE _SC_PAGESIZE |
---|
3725 | #define _SC_XOPEN_CRYPT 108 |
---|
3726 | #define _SC_XOPEN_ENH_I18N 109 |
---|
3727 | #define _SC_XOPEN_LEGACY 110 |
---|
3728 | #define _SC_XOPEN_REALTIME 111 |
---|
3729 | #define _SC_XOPEN_REALTIME_THREADS 112 |
---|
3730 | #define _SC_XOPEN_SHM 113 |
---|
3731 | #define _SC_XOPEN_STREAMS 114 |
---|
3732 | #define _SC_XOPEN_UNIX 115 |
---|
3733 | #define _SC_XOPEN_VERSION 116 |
---|
3734 | #define _SC_XOPEN_XCU_VERSION 121 |
---|
3735 | #define _SC_XBS5_ILP32_OFF32 122 |
---|
3736 | #define _SC_XBS5_ILP32_OFFBIG 123 |
---|
3737 | #define _SC_XBS5_LP64_OFF64 124 |
---|
3738 | #define _SC_XBS5_LPBIG_OFFBIG 125 |
---|
3739 | #define _SC_SS_REPL_MAX 126 |
---|
3740 | #define _SC_TRACE_EVENT_NAME_MAX 127 |
---|
3741 | #define _SC_TRACE_NAME_MAX 128 |
---|
3742 | #define _SC_TRACE_SYS_MAX 129 |
---|
3743 | #define _SC_TRACE_USER_EVENT_MAX 130 |
---|
3744 | #define _SC_PASS_MAX 131 |
---|
3745 | |
---|
3746 | |
---|
3747 | |
---|
3748 | |
---|
3749 | #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 |
---|
3750 | #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 |
---|
3751 | #define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 |
---|
3752 | #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 |
---|
3753 | #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 |
---|
3754 | #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 |
---|
3755 | #define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 |
---|
3756 | #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 |
---|
3757 | #define _CS_POSIX_V6_LP64_OFF64_LIBS 10 |
---|
3758 | #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 |
---|
3759 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 |
---|
3760 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 |
---|
3761 | #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 |
---|
3762 | |
---|
3763 | |
---|
3764 | #define _CS_XBS5_ILP32_OFF32_CFLAGS 20 |
---|
3765 | #define _CS_XBS5_ILP32_OFF32_LDFLAGS 21 |
---|
3766 | #define _CS_XBS5_ILP32_OFF32_LIBS 22 |
---|
3767 | #define _CS_XBS5_ILP32_OFF32_LINTFLAGS 23 |
---|
3768 | #define _CS_XBS5_ILP32_OFFBIG_CFLAGS 24 |
---|
3769 | #define _CS_XBS5_ILP32_OFFBIG_LDFLAGS 25 |
---|
3770 | #define _CS_XBS5_ILP32_OFFBIG_LIBS 26 |
---|
3771 | #define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 27 |
---|
3772 | #define _CS_XBS5_LP64_OFF64_CFLAGS 28 |
---|
3773 | #define _CS_XBS5_LP64_OFF64_LDFLAGS 29 |
---|
3774 | #define _CS_XBS5_LP64_OFF64_LIBS 30 |
---|
3775 | #define _CS_XBS5_LP64_OFF64_LINTFLAGS 31 |
---|
3776 | #define _CS_XBS5_LPBIG_OFFBIG_CFLAGS 32 |
---|
3777 | #define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS 33 |
---|
3778 | #define _CS_XBS5_LPBIG_OFFBIG_LIBS 34 |
---|
3779 | #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 35 |
---|
3780 | |
---|
3781 | #define _CS_DARWIN_USER_DIR 65536 |
---|
3782 | #define _CS_DARWIN_USER_TEMP_DIR 65537 |
---|
3783 | #define _CS_DARWIN_USER_CACHE_DIR 65538 |
---|
3784 | |
---|
3785 | |
---|
3786 | |
---|
3787 | void _exit(int) __attribute__((__noreturn__)); |
---|
3788 | int access(const char *, int); |
---|
3789 | unsigned int |
---|
3790 | alarm(unsigned int); |
---|
3791 | int chdir(const char *); |
---|
3792 | int chown(const char *, uid_t, gid_t); |
---|
3793 | int close(int) __asm("_" "close" "$UNIX2003"); |
---|
3794 | size_t confstr(int, char *, size_t) __asm("_" "confstr" "$UNIX2003"); |
---|
3795 | char *crypt(const char *, const char *); |
---|
3796 | char *ctermid(char *); |
---|
3797 | int dup(int); |
---|
3798 | int dup2(int, int); |
---|
3799 | |
---|
3800 | void encrypt(char *, int) __asm("_" "encrypt" "$UNIX2003"); |
---|
3801 | |
---|
3802 | |
---|
3803 | |
---|
3804 | int execl(const char *, const char *, ...); |
---|
3805 | int execle(const char *, const char *, ...); |
---|
3806 | int execlp(const char *, const char *, ...); |
---|
3807 | int execv(const char *, char * const *); |
---|
3808 | int execve(const char *, char * const *, char * const *); |
---|
3809 | int execvp(const char *, char * const *); |
---|
3810 | int fchown(int, uid_t, gid_t); |
---|
3811 | int fchdir(int); |
---|
3812 | pid_t fork(void); |
---|
3813 | long fpathconf(int, int); |
---|
3814 | int fsync(int) __asm("_" "fsync" "$UNIX2003"); |
---|
3815 | int ftruncate(int, off_t); |
---|
3816 | char *getcwd(char *, size_t); |
---|
3817 | gid_t getegid(void); |
---|
3818 | uid_t geteuid(void); |
---|
3819 | gid_t getgid(void); |
---|
3820 | int getgroups(int, gid_t []); |
---|
3821 | long gethostid(void); |
---|
3822 | int gethostname(char *, size_t); |
---|
3823 | char *getlogin(void); |
---|
3824 | int getlogin_r(char *, size_t); |
---|
3825 | int getopt(int, char * const [], const char *) __asm("_" "getopt" "$UNIX2003"); |
---|
3826 | pid_t getpgid(pid_t); |
---|
3827 | pid_t getpgrp(void); |
---|
3828 | pid_t getpid(void); |
---|
3829 | pid_t getppid(void); |
---|
3830 | pid_t getsid(pid_t); |
---|
3831 | uid_t getuid(void); |
---|
3832 | char *getwd(char *); |
---|
3833 | int isatty(int); |
---|
3834 | int lchown(const char *, uid_t, gid_t) __asm("_" "lchown" "$UNIX2003"); |
---|
3835 | int link(const char *, const char *); |
---|
3836 | int lockf(int, int, off_t) __asm("_" "lockf" "$UNIX2003"); |
---|
3837 | off_t lseek(int, off_t, int); |
---|
3838 | int nice(int) __asm("_" "nice" "$UNIX2003"); |
---|
3839 | long pathconf(const char *, int); |
---|
3840 | int pause(void) __asm("_" "pause" "$UNIX2003"); |
---|
3841 | int pipe(int [2]); |
---|
3842 | ssize_t pread(int, void *, size_t, off_t) __asm("_" "pread" "$UNIX2003"); |
---|
3843 | ssize_t pwrite(int, const void *, size_t, off_t) __asm("_" "pwrite" "$UNIX2003"); |
---|
3844 | ssize_t read(int, void *, size_t) __asm("_" "read" "$UNIX2003"); |
---|
3845 | ssize_t readlink(const char * , char * , size_t); |
---|
3846 | int rmdir(const char *); |
---|
3847 | int setegid(gid_t); |
---|
3848 | int seteuid(uid_t); |
---|
3849 | int setgid(gid_t); |
---|
3850 | int setpgid(pid_t, pid_t); |
---|
3851 | |
---|
3852 | pid_t setpgrp(void) __asm("_" "setpgrp" "$UNIX2003"); |
---|
3853 | |
---|
3854 | |
---|
3855 | |
---|
3856 | int setregid(gid_t, gid_t) __asm("_" "setregid" "$UNIX2003"); |
---|
3857 | int setreuid(uid_t, uid_t) __asm("_" "setreuid" "$UNIX2003"); |
---|
3858 | pid_t setsid(void); |
---|
3859 | int setuid(uid_t); |
---|
3860 | unsigned int |
---|
3861 | sleep(unsigned int) __asm("_" "sleep" "$UNIX2003"); |
---|
3862 | void swab(const void * , void * , ssize_t); |
---|
3863 | int symlink(const char *, const char *); |
---|
3864 | void sync(void); |
---|
3865 | long sysconf(int); |
---|
3866 | pid_t tcgetpgrp(int); |
---|
3867 | int tcsetpgrp(int, pid_t); |
---|
3868 | int truncate(const char *, off_t); |
---|
3869 | char *ttyname(int); |
---|
3870 | |
---|
3871 | int ttyname_r(int, char *, size_t) __asm("_" "ttyname_r" "$UNIX2003"); |
---|
3872 | |
---|
3873 | |
---|
3874 | |
---|
3875 | useconds_t |
---|
3876 | ualarm(useconds_t, useconds_t); |
---|
3877 | int unlink(const char *); |
---|
3878 | int usleep(useconds_t) __asm("_" "usleep" "$UNIX2003"); |
---|
3879 | pid_t vfork(void); |
---|
3880 | ssize_t write(int, const void *, size_t) __asm("_" "write" "$UNIX2003"); |
---|
3881 | |
---|
3882 | extern char *optarg; |
---|
3883 | extern int optind, opterr, optopt; |
---|
3884 | |
---|
3885 | |
---|
3886 | # 1 "/usr/include/sys/select.h" 1 3 4 |
---|
3887 | # 64 "/usr/include/sys/select.h" 3 4 |
---|
3888 | #define _SYS_SELECT_H_ |
---|
3889 | # 75 "/usr/include/sys/select.h" 3 4 |
---|
3890 | #define __need_fd_set |
---|
3891 | #define __need_struct_timespec |
---|
3892 | #define __need_struct_timeval |
---|
3893 | # 1 "/usr/include/sys/_structs.h" 1 3 4 |
---|
3894 | # 85 "/usr/include/sys/_structs.h" 3 4 |
---|
3895 | #undef __need_struct_timespec |
---|
3896 | # 97 "/usr/include/sys/_structs.h" 3 4 |
---|
3897 | #undef __need_struct_timeval |
---|
3898 | # 165 "/usr/include/sys/_structs.h" 3 4 |
---|
3899 | #undef __need_fd_set |
---|
3900 | # 79 "/usr/include/sys/select.h" 2 3 4 |
---|
3901 | # 134 "/usr/include/sys/select.h" 3 4 |
---|
3902 | |
---|
3903 | |
---|
3904 | |
---|
3905 | int pselect(int, fd_set * , fd_set * , |
---|
3906 | fd_set * , const struct timespec * , |
---|
3907 | const sigset_t * ) |
---|
3908 | |
---|
3909 | __asm("_" "pselect" "$DARWIN_EXTSN" ) |
---|
3910 | |
---|
3911 | |
---|
3912 | |
---|
3913 | |
---|
3914 | |
---|
3915 | |
---|
3916 | |
---|
3917 | ; |
---|
3918 | |
---|
3919 | |
---|
3920 | |
---|
3921 | |
---|
3922 | |
---|
3923 | # 516 "/usr/include/unistd.h" 2 3 4 |
---|
3924 | |
---|
3925 | void _Exit(int) __attribute__((__noreturn__)); |
---|
3926 | int accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t); |
---|
3927 | int acct(const char *); |
---|
3928 | int add_profil(char *, size_t, unsigned long, unsigned int); |
---|
3929 | void *brk(const void *); |
---|
3930 | int chroot(const char *); |
---|
3931 | void endusershell(void); |
---|
3932 | int execvP(const char *, const char *, char * const *); |
---|
3933 | char *fflagstostr(unsigned long); |
---|
3934 | int getdtablesize(void); |
---|
3935 | int getdomainname(char *, int); |
---|
3936 | int getgrouplist(const char *, int, int *, int *); |
---|
3937 | mode_t getmode(const void *, mode_t); |
---|
3938 | int getpagesize(void) __attribute__((__const__)); |
---|
3939 | char *getpass(const char *); |
---|
3940 | int getpeereid(int, uid_t *, gid_t *); |
---|
3941 | int getpgid(pid_t _pid); |
---|
3942 | int getsgroups_np(int *, uuid_t); |
---|
3943 | int getsid(pid_t _pid); |
---|
3944 | char *getusershell(void); |
---|
3945 | int getwgroups_np(int *, uuid_t); |
---|
3946 | int initgroups(const char *, int); |
---|
3947 | int iruserok(unsigned long, int, const char *, const char *); |
---|
3948 | int iruserok_sa(const void *, int, int, const char *, const char *); |
---|
3949 | int issetugid(void); |
---|
3950 | char *mkdtemp(char *); |
---|
3951 | int mknod(const char *, mode_t, dev_t); |
---|
3952 | int mkstemp(char *); |
---|
3953 | int mkstemps(char *, int); |
---|
3954 | char *mktemp(char *); |
---|
3955 | int nfssvc(int, void *); |
---|
3956 | int profil(char *, size_t, unsigned long, unsigned int); |
---|
3957 | int pthread_setugid_np(uid_t, gid_t); |
---|
3958 | int pthread_getugid_np( uid_t *, gid_t *); |
---|
3959 | int rcmd(char **, int, const char *, const char *, const char *, int *); |
---|
3960 | int rcmd_af(char **, int, const char *, const char *, const char *, int *, |
---|
3961 | int); |
---|
3962 | int reboot(int); |
---|
3963 | int revoke(const char *); |
---|
3964 | int rresvport(int *); |
---|
3965 | int rresvport_af(int *, int); |
---|
3966 | int ruserok(const char *, int, const char *, const char *); |
---|
3967 | void *sbrk(int); |
---|
3968 | int setdomainname(const char *, int); |
---|
3969 | int setgroups(int, const gid_t *); |
---|
3970 | void sethostid(long); |
---|
3971 | int sethostname(const char *, int); |
---|
3972 | |
---|
3973 | void setkey(const char *) __asm("_" "setkey" "$UNIX2003"); |
---|
3974 | |
---|
3975 | |
---|
3976 | |
---|
3977 | int setlogin(const char *); |
---|
3978 | void *setmode(const char *); |
---|
3979 | int setrgid(gid_t); |
---|
3980 | int setruid(uid_t); |
---|
3981 | int setsgroups_np(int, const uuid_t); |
---|
3982 | void setusershell(void); |
---|
3983 | int setwgroups_np(int, const uuid_t); |
---|
3984 | int strtofflags(char **, unsigned long *, unsigned long *); |
---|
3985 | int swapon(const char *); |
---|
3986 | int syscall(int, ...); |
---|
3987 | int ttyslot(void); |
---|
3988 | int undelete(const char *); |
---|
3989 | int unwhiteout(const char *); |
---|
3990 | void *valloc(size_t); |
---|
3991 | |
---|
3992 | extern char *suboptarg; |
---|
3993 | int getsubopt(char **, char * const *, char **); |
---|
3994 | # 597 "/usr/include/unistd.h" 3 4 |
---|
3995 | int getattrlist(const char*,void*,void*,size_t,unsigned long) __asm("_" "getattrlist" "$UNIX2003"); |
---|
3996 | int setattrlist(const char*,void*,void*,size_t,unsigned long) __asm("_" "setattrlist" "$UNIX2003"); |
---|
3997 | int exchangedata(const char*,const char*,unsigned long); |
---|
3998 | int getdirentriesattr(int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long); |
---|
3999 | int searchfs(const char*,void*,void*,unsigned long,unsigned long,void*); |
---|
4000 | |
---|
4001 | int fsctl(const char *,unsigned long,void*,unsigned long); |
---|
4002 | |
---|
4003 | |
---|
4004 | extern int optreset; |
---|
4005 | |
---|
4006 | |
---|
4007 | |
---|
4008 | # 84 "/opt/local/include/LegacySupport/unistd.h" 2 3 4 |
---|
4009 | # 96 "/opt/local/include/LegacySupport/unistd.h" 3 4 |
---|
4010 | #define _SC_PHYS_PAGES 200 |
---|
4011 | #define __MP_LEGACY_SUPPORT_SYSCONF_WRAP_NEED_SC_PHYS_PAGES__ 1 |
---|
4012 | |
---|
4013 | |
---|
4014 | |
---|
4015 | |
---|
4016 | |
---|
4017 | |
---|
4018 | |
---|
4019 | int fsetattrlist(int,void*,void*,size_t,unsigned long); |
---|
4020 | # 45 "/usr/include/getopt.h" 2 3 4 |
---|
4021 | |
---|
4022 | |
---|
4023 | |
---|
4024 | |
---|
4025 | |
---|
4026 | #define no_argument 0 |
---|
4027 | #define required_argument 1 |
---|
4028 | #define optional_argument 2 |
---|
4029 | |
---|
4030 | struct option { |
---|
4031 | |
---|
4032 | const char *name; |
---|
4033 | |
---|
4034 | |
---|
4035 | |
---|
4036 | |
---|
4037 | int has_arg; |
---|
4038 | |
---|
4039 | int *flag; |
---|
4040 | |
---|
4041 | int val; |
---|
4042 | }; |
---|
4043 | |
---|
4044 | |
---|
4045 | int getopt_long(int, char * const *, const char *, |
---|
4046 | const struct option *, int *); |
---|
4047 | int getopt_long_only(int, char * const *, const char *, |
---|
4048 | const struct option *, int *); |
---|
4049 | |
---|
4050 | #define _GETOPT |
---|
4051 | int getopt(int, char * const [], const char *) __asm("_" "getopt" "$UNIX2003"); |
---|
4052 | |
---|
4053 | extern char *optarg; |
---|
4054 | extern int optind, opterr, optopt; |
---|
4055 | |
---|
4056 | |
---|
4057 | #define _OPTRESET |
---|
4058 | extern int optreset; |
---|
4059 | |
---|
4060 | |
---|
4061 | # 38 "misc-utils/hardlink.c" 2 |
---|
4062 | # 1 "/usr/include/ctype.h" 1 3 4 |
---|
4063 | # 67 "/usr/include/ctype.h" 3 4 |
---|
4064 | #define _CTYPE_H_ |
---|
4065 | |
---|
4066 | # 1 "/usr/include/runetype.h" 1 3 4 |
---|
4067 | # 40 "/usr/include/runetype.h" 3 4 |
---|
4068 | #define _RUNETYPE_H_ |
---|
4069 | # 52 "/usr/include/runetype.h" 3 4 |
---|
4070 | #define _CT_RUNE_T |
---|
4071 | typedef __darwin_ct_rune_t ct_rune_t; |
---|
4072 | |
---|
4073 | |
---|
4074 | |
---|
4075 | #define _RUNE_T |
---|
4076 | typedef __darwin_rune_t rune_t; |
---|
4077 | |
---|
4078 | |
---|
4079 | |
---|
4080 | |
---|
4081 | #define _WCHAR_T |
---|
4082 | typedef __darwin_wchar_t wchar_t; |
---|
4083 | |
---|
4084 | |
---|
4085 | |
---|
4086 | |
---|
4087 | #define _WINT_T |
---|
4088 | typedef __darwin_wint_t wint_t; |
---|
4089 | |
---|
4090 | |
---|
4091 | |
---|
4092 | |
---|
4093 | #define _CACHED_RUNES (1 <<8 ) |
---|
4094 | #define _CRMASK (~(_CACHED_RUNES - 1)) |
---|
4095 | |
---|
4096 | |
---|
4097 | |
---|
4098 | |
---|
4099 | typedef struct { |
---|
4100 | __darwin_rune_t __min; |
---|
4101 | __darwin_rune_t __max; |
---|
4102 | __darwin_rune_t __map; |
---|
4103 | __uint32_t *__types; |
---|
4104 | } _RuneEntry; |
---|
4105 | |
---|
4106 | typedef struct { |
---|
4107 | int __nranges; |
---|
4108 | _RuneEntry *__ranges; |
---|
4109 | } _RuneRange; |
---|
4110 | |
---|
4111 | typedef struct { |
---|
4112 | char __name[14]; |
---|
4113 | __uint32_t __mask; |
---|
4114 | } _RuneCharClass; |
---|
4115 | |
---|
4116 | typedef struct { |
---|
4117 | char __magic[8]; |
---|
4118 | char __encoding[32]; |
---|
4119 | |
---|
4120 | __darwin_rune_t (*__sgetrune)(const char *, __darwin_size_t, char const **); |
---|
4121 | int (*__sputrune)(__darwin_rune_t, char *, __darwin_size_t, char **); |
---|
4122 | __darwin_rune_t __invalid_rune; |
---|
4123 | |
---|
4124 | __uint32_t __runetype[(1 <<8 )]; |
---|
4125 | __darwin_rune_t __maplower[(1 <<8 )]; |
---|
4126 | __darwin_rune_t __mapupper[(1 <<8 )]; |
---|
4127 | |
---|
4128 | |
---|
4129 | |
---|
4130 | |
---|
4131 | |
---|
4132 | |
---|
4133 | _RuneRange __runetype_ext; |
---|
4134 | _RuneRange __maplower_ext; |
---|
4135 | _RuneRange __mapupper_ext; |
---|
4136 | |
---|
4137 | void *__variable; |
---|
4138 | int __variable_len; |
---|
4139 | |
---|
4140 | |
---|
4141 | |
---|
4142 | |
---|
4143 | int __ncharclasses; |
---|
4144 | _RuneCharClass *__charclasses; |
---|
4145 | } _RuneLocale; |
---|
4146 | |
---|
4147 | #define _RUNE_MAGIC_A "RuneMagA" |
---|
4148 | |
---|
4149 | |
---|
4150 | extern _RuneLocale _DefaultRuneLocale; |
---|
4151 | extern _RuneLocale *_CurrentRuneLocale; |
---|
4152 | |
---|
4153 | # 70 "/usr/include/ctype.h" 2 3 4 |
---|
4154 | |
---|
4155 | #define _CTYPE_A 0x00000100L |
---|
4156 | #define _CTYPE_C 0x00000200L |
---|
4157 | #define _CTYPE_D 0x00000400L |
---|
4158 | #define _CTYPE_G 0x00000800L |
---|
4159 | #define _CTYPE_L 0x00001000L |
---|
4160 | #define _CTYPE_P 0x00002000L |
---|
4161 | #define _CTYPE_S 0x00004000L |
---|
4162 | #define _CTYPE_U 0x00008000L |
---|
4163 | #define _CTYPE_X 0x00010000L |
---|
4164 | #define _CTYPE_B 0x00020000L |
---|
4165 | #define _CTYPE_R 0x00040000L |
---|
4166 | #define _CTYPE_I 0x00080000L |
---|
4167 | #define _CTYPE_T 0x00100000L |
---|
4168 | #define _CTYPE_Q 0x00200000L |
---|
4169 | #define _CTYPE_SW0 0x20000000L |
---|
4170 | #define _CTYPE_SW1 0x40000000L |
---|
4171 | #define _CTYPE_SW2 0x80000000L |
---|
4172 | #define _CTYPE_SW3 0xc0000000L |
---|
4173 | #define _CTYPE_SWM 0xe0000000L |
---|
4174 | #define _CTYPE_SWS 30 |
---|
4175 | # 124 "/usr/include/ctype.h" 3 4 |
---|
4176 | #define __DARWIN_CTYPE_static_inline static __inline |
---|
4177 | # 135 "/usr/include/ctype.h" 3 4 |
---|
4178 | #define __DARWIN_CTYPE_TOP_static_inline static __inline |
---|
4179 | # 145 "/usr/include/ctype.h" 3 4 |
---|
4180 | |
---|
4181 | unsigned long ___runetype(__darwin_ct_rune_t); |
---|
4182 | __darwin_ct_rune_t ___tolower(__darwin_ct_rune_t); |
---|
4183 | __darwin_ct_rune_t ___toupper(__darwin_ct_rune_t); |
---|
4184 | |
---|
4185 | |
---|
4186 | static __inline int |
---|
4187 | isascii(int _c) |
---|
4188 | { |
---|
4189 | return ((_c & ~0x7F) == 0); |
---|
4190 | } |
---|
4191 | # 164 "/usr/include/ctype.h" 3 4 |
---|
4192 | |
---|
4193 | int __maskrune(__darwin_ct_rune_t, unsigned long); |
---|
4194 | |
---|
4195 | |
---|
4196 | |
---|
4197 | static __inline int |
---|
4198 | __istype(__darwin_ct_rune_t _c, unsigned long _f) |
---|
4199 | { |
---|
4200 | |
---|
4201 | |
---|
4202 | |
---|
4203 | return (isascii(_c) ? !!(_DefaultRuneLocale.__runetype[_c] & _f) |
---|
4204 | : !!__maskrune(_c, _f)); |
---|
4205 | |
---|
4206 | } |
---|
4207 | |
---|
4208 | static __inline __darwin_ct_rune_t |
---|
4209 | __isctype(__darwin_ct_rune_t _c, unsigned long _f) |
---|
4210 | { |
---|
4211 | |
---|
4212 | |
---|
4213 | |
---|
4214 | return (_c < 0 || _c >= (1 <<8 )) ? 0 : |
---|
4215 | !!(_DefaultRuneLocale.__runetype[_c] & _f); |
---|
4216 | |
---|
4217 | } |
---|
4218 | # 204 "/usr/include/ctype.h" 3 4 |
---|
4219 | |
---|
4220 | __darwin_ct_rune_t __toupper(__darwin_ct_rune_t); |
---|
4221 | __darwin_ct_rune_t __tolower(__darwin_ct_rune_t); |
---|
4222 | |
---|
4223 | |
---|
4224 | |
---|
4225 | static __inline int |
---|
4226 | __wcwidth(__darwin_ct_rune_t _c) |
---|
4227 | { |
---|
4228 | unsigned int _x; |
---|
4229 | |
---|
4230 | if (_c == 0) |
---|
4231 | return (0); |
---|
4232 | _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); |
---|
4233 | if ((_x & 0xe0000000L) != 0) |
---|
4234 | return ((_x & 0xe0000000L) >> 30); |
---|
4235 | return ((_x & 0x00040000L) != 0 ? 1 : -1); |
---|
4236 | } |
---|
4237 | |
---|
4238 | |
---|
4239 | |
---|
4240 | #define _tolower(c) __tolower(c) |
---|
4241 | #define _toupper(c) __toupper(c) |
---|
4242 | |
---|
4243 | static __inline int |
---|
4244 | isalnum(int _c) |
---|
4245 | { |
---|
4246 | return (__istype(_c, 0x00000100L|0x00000400L)); |
---|
4247 | } |
---|
4248 | |
---|
4249 | static __inline int |
---|
4250 | isalpha(int _c) |
---|
4251 | { |
---|
4252 | return (__istype(_c, 0x00000100L)); |
---|
4253 | } |
---|
4254 | |
---|
4255 | static __inline int |
---|
4256 | isblank(int _c) |
---|
4257 | { |
---|
4258 | return (__istype(_c, 0x00020000L)); |
---|
4259 | } |
---|
4260 | |
---|
4261 | static __inline int |
---|
4262 | iscntrl(int _c) |
---|
4263 | { |
---|
4264 | return (__istype(_c, 0x00000200L)); |
---|
4265 | } |
---|
4266 | |
---|
4267 | |
---|
4268 | static __inline int |
---|
4269 | isdigit(int _c) |
---|
4270 | { |
---|
4271 | return (__isctype(_c, 0x00000400L)); |
---|
4272 | } |
---|
4273 | |
---|
4274 | static __inline int |
---|
4275 | isgraph(int _c) |
---|
4276 | { |
---|
4277 | return (__istype(_c, 0x00000800L)); |
---|
4278 | } |
---|
4279 | |
---|
4280 | static __inline int |
---|
4281 | islower(int _c) |
---|
4282 | { |
---|
4283 | return (__istype(_c, 0x00001000L)); |
---|
4284 | } |
---|
4285 | |
---|
4286 | static __inline int |
---|
4287 | isprint(int _c) |
---|
4288 | { |
---|
4289 | return (__istype(_c, 0x00040000L)); |
---|
4290 | } |
---|
4291 | |
---|
4292 | static __inline int |
---|
4293 | ispunct(int _c) |
---|
4294 | { |
---|
4295 | return (__istype(_c, 0x00002000L)); |
---|
4296 | } |
---|
4297 | |
---|
4298 | static __inline int |
---|
4299 | isspace(int _c) |
---|
4300 | { |
---|
4301 | return (__istype(_c, 0x00004000L)); |
---|
4302 | } |
---|
4303 | |
---|
4304 | static __inline int |
---|
4305 | isupper(int _c) |
---|
4306 | { |
---|
4307 | return (__istype(_c, 0x00008000L)); |
---|
4308 | } |
---|
4309 | |
---|
4310 | |
---|
4311 | static __inline int |
---|
4312 | isxdigit(int _c) |
---|
4313 | { |
---|
4314 | return (__isctype(_c, 0x00010000L)); |
---|
4315 | } |
---|
4316 | |
---|
4317 | static __inline int |
---|
4318 | toascii(int _c) |
---|
4319 | { |
---|
4320 | return (_c & 0x7F); |
---|
4321 | } |
---|
4322 | |
---|
4323 | static __inline int |
---|
4324 | tolower(int _c) |
---|
4325 | { |
---|
4326 | return (__tolower(_c)); |
---|
4327 | } |
---|
4328 | |
---|
4329 | static __inline int |
---|
4330 | toupper(int _c) |
---|
4331 | { |
---|
4332 | return (__toupper(_c)); |
---|
4333 | } |
---|
4334 | |
---|
4335 | |
---|
4336 | static __inline int |
---|
4337 | digittoint(int _c) |
---|
4338 | { |
---|
4339 | return (__maskrune(_c, 0x0F)); |
---|
4340 | } |
---|
4341 | |
---|
4342 | static __inline int |
---|
4343 | ishexnumber(int _c) |
---|
4344 | { |
---|
4345 | return (__istype(_c, 0x00010000L)); |
---|
4346 | } |
---|
4347 | |
---|
4348 | static __inline int |
---|
4349 | isideogram(int _c) |
---|
4350 | { |
---|
4351 | return (__istype(_c, 0x00080000L)); |
---|
4352 | } |
---|
4353 | |
---|
4354 | static __inline int |
---|
4355 | isnumber(int _c) |
---|
4356 | { |
---|
4357 | return (__istype(_c, 0x00000400L)); |
---|
4358 | } |
---|
4359 | |
---|
4360 | static __inline int |
---|
4361 | isphonogram(int _c) |
---|
4362 | { |
---|
4363 | return (__istype(_c, 0x00200000L)); |
---|
4364 | } |
---|
4365 | |
---|
4366 | static __inline int |
---|
4367 | isrune(int _c) |
---|
4368 | { |
---|
4369 | return (__istype(_c, 0xFFFFFFF0L)); |
---|
4370 | } |
---|
4371 | |
---|
4372 | static __inline int |
---|
4373 | isspecial(int _c) |
---|
4374 | { |
---|
4375 | return (__istype(_c, 0x00100000L)); |
---|
4376 | } |
---|
4377 | # 39 "misc-utils/hardlink.c" 2 |
---|
4378 | # 1 "/usr/include/sys/ioctl.h" 1 3 4 |
---|
4379 | # 70 "/usr/include/sys/ioctl.h" 3 4 |
---|
4380 | #define _SYS_IOCTL_H_ |
---|
4381 | |
---|
4382 | # 1 "/usr/include/sys/ttycom.h" 1 3 4 |
---|
4383 | # 70 "/usr/include/sys/ttycom.h" 3 4 |
---|
4384 | #define _SYS_TTYCOM_H_ |
---|
4385 | |
---|
4386 | # 1 "/usr/include/sys/ioccom.h" 1 3 4 |
---|
4387 | # 65 "/usr/include/sys/ioccom.h" 3 4 |
---|
4388 | #define _SYS_IOCCOM_H_ |
---|
4389 | |
---|
4390 | |
---|
4391 | |
---|
4392 | |
---|
4393 | |
---|
4394 | |
---|
4395 | #define IOCPARM_MASK 0x1fff |
---|
4396 | #define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK) |
---|
4397 | #define IOCBASECMD(x) ((x) & ~(IOCPARM_MASK << 16)) |
---|
4398 | #define IOCGROUP(x) (((x) >> 8) & 0xff) |
---|
4399 | |
---|
4400 | #define IOCPARM_MAX (IOCPARM_MASK + 1) |
---|
4401 | |
---|
4402 | #define IOC_VOID (unsigned long)0x20000000 |
---|
4403 | |
---|
4404 | #define IOC_OUT (unsigned long)0x40000000 |
---|
4405 | |
---|
4406 | #define IOC_IN (unsigned long)0x80000000 |
---|
4407 | |
---|
4408 | #define IOC_INOUT (IOC_IN|IOC_OUT) |
---|
4409 | |
---|
4410 | #define IOC_DIRMASK (unsigned long)0xe0000000 |
---|
4411 | |
---|
4412 | #define _IOC(inout,group,num,len) (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)) |
---|
4413 | |
---|
4414 | #define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0) |
---|
4415 | #define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) |
---|
4416 | #define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) |
---|
4417 | |
---|
4418 | #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) |
---|
4419 | # 73 "/usr/include/sys/ttycom.h" 2 3 4 |
---|
4420 | # 83 "/usr/include/sys/ttycom.h" 3 4 |
---|
4421 | struct winsize { |
---|
4422 | unsigned short ws_row; |
---|
4423 | unsigned short ws_col; |
---|
4424 | unsigned short ws_xpixel; |
---|
4425 | unsigned short ws_ypixel; |
---|
4426 | }; |
---|
4427 | |
---|
4428 | #define TIOCMODG _IOR('t', 3, int) |
---|
4429 | #define TIOCMODS _IOW('t', 4, int) |
---|
4430 | #define TIOCM_LE 0001 |
---|
4431 | #define TIOCM_DTR 0002 |
---|
4432 | #define TIOCM_RTS 0004 |
---|
4433 | #define TIOCM_ST 0010 |
---|
4434 | #define TIOCM_SR 0020 |
---|
4435 | #define TIOCM_CTS 0040 |
---|
4436 | #define TIOCM_CAR 0100 |
---|
4437 | #define TIOCM_CD TIOCM_CAR |
---|
4438 | #define TIOCM_RNG 0200 |
---|
4439 | #define TIOCM_RI TIOCM_RNG |
---|
4440 | #define TIOCM_DSR 0400 |
---|
4441 | |
---|
4442 | #define TIOCEXCL _IO('t', 13) |
---|
4443 | #define TIOCNXCL _IO('t', 14) |
---|
4444 | |
---|
4445 | #define TIOCFLUSH _IOW('t', 16, int) |
---|
4446 | |
---|
4447 | #define TIOCGETA _IOR('t', 19, struct termios) |
---|
4448 | #define TIOCSETA _IOW('t', 20, struct termios) |
---|
4449 | #define TIOCSETAW _IOW('t', 21, struct termios) |
---|
4450 | #define TIOCSETAF _IOW('t', 22, struct termios) |
---|
4451 | #define TIOCGETD _IOR('t', 26, int) |
---|
4452 | #define TIOCSETD _IOW('t', 27, int) |
---|
4453 | #define TIOCIXON _IO('t', 129) |
---|
4454 | #define TIOCIXOFF _IO('t', 128) |
---|
4455 | |
---|
4456 | #define TIOCSBRK _IO('t', 123) |
---|
4457 | #define TIOCCBRK _IO('t', 122) |
---|
4458 | #define TIOCSDTR _IO('t', 121) |
---|
4459 | #define TIOCCDTR _IO('t', 120) |
---|
4460 | #define TIOCGPGRP _IOR('t', 119, int) |
---|
4461 | #define TIOCSPGRP _IOW('t', 118, int) |
---|
4462 | |
---|
4463 | #define TIOCOUTQ _IOR('t', 115, int) |
---|
4464 | #define TIOCSTI _IOW('t', 114, char) |
---|
4465 | #define TIOCNOTTY _IO('t', 113) |
---|
4466 | #define TIOCPKT _IOW('t', 112, int) |
---|
4467 | #define TIOCPKT_DATA 0x00 |
---|
4468 | #define TIOCPKT_FLUSHREAD 0x01 |
---|
4469 | #define TIOCPKT_FLUSHWRITE 0x02 |
---|
4470 | #define TIOCPKT_STOP 0x04 |
---|
4471 | #define TIOCPKT_START 0x08 |
---|
4472 | #define TIOCPKT_NOSTOP 0x10 |
---|
4473 | #define TIOCPKT_DOSTOP 0x20 |
---|
4474 | #define TIOCPKT_IOCTL 0x40 |
---|
4475 | #define TIOCSTOP _IO('t', 111) |
---|
4476 | #define TIOCSTART _IO('t', 110) |
---|
4477 | #define TIOCMSET _IOW('t', 109, int) |
---|
4478 | #define TIOCMBIS _IOW('t', 108, int) |
---|
4479 | #define TIOCMBIC _IOW('t', 107, int) |
---|
4480 | #define TIOCMGET _IOR('t', 106, int) |
---|
4481 | #define TIOCREMOTE _IOW('t', 105, int) |
---|
4482 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) |
---|
4483 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) |
---|
4484 | #define TIOCUCNTL _IOW('t', 102, int) |
---|
4485 | #define TIOCSTAT _IO('t', 101) |
---|
4486 | #define UIOCCMD(n) _IO('u', n) |
---|
4487 | #define TIOCSCONS _IO('t', 99) |
---|
4488 | #define TIOCCONS _IOW('t', 98, int) |
---|
4489 | #define TIOCSCTTY _IO('t', 97) |
---|
4490 | #define TIOCEXT _IOW('t', 96, int) |
---|
4491 | #define TIOCSIG _IO('t', 95) |
---|
4492 | #define TIOCDRAIN _IO('t', 94) |
---|
4493 | #define TIOCMSDTRWAIT _IOW('t', 91, int) |
---|
4494 | #define TIOCMGDTRWAIT _IOR('t', 90, int) |
---|
4495 | #define TIOCTIMESTAMP _IOR('t', 89, struct timeval) |
---|
4496 | |
---|
4497 | #define TIOCDCDTIMESTAMP _IOR('t', 88, struct timeval) |
---|
4498 | |
---|
4499 | #define TIOCSDRAINWAIT _IOW('t', 87, int) |
---|
4500 | #define TIOCGDRAINWAIT _IOR('t', 86, int) |
---|
4501 | #define TIOCDSIMICROCODE _IO('t', 85) |
---|
4502 | |
---|
4503 | #define TIOCPTYGRANT _IO('t', 84) |
---|
4504 | #define TIOCPTYGNAME _IOC(IOC_OUT, 't', 83, 128) |
---|
4505 | #define TIOCPTYUNLK _IO('t', 82) |
---|
4506 | |
---|
4507 | #define TTYDISC 0 |
---|
4508 | #define TABLDISC 3 |
---|
4509 | #define SLIPDISC 4 |
---|
4510 | #define PPPDISC 5 |
---|
4511 | # 73 "/usr/include/sys/ioctl.h" 2 3 4 |
---|
4512 | |
---|
4513 | |
---|
4514 | |
---|
4515 | |
---|
4516 | |
---|
4517 | |
---|
4518 | struct ttysize { |
---|
4519 | unsigned short ts_lines; |
---|
4520 | unsigned short ts_cols; |
---|
4521 | unsigned short ts_xxx; |
---|
4522 | unsigned short ts_yyy; |
---|
4523 | }; |
---|
4524 | #define TIOCGSIZE TIOCGWINSZ |
---|
4525 | #define TIOCSSIZE TIOCSWINSZ |
---|
4526 | |
---|
4527 | |
---|
4528 | |
---|
4529 | # 1 "/usr/include/sys/filio.h" 1 3 4 |
---|
4530 | # 70 "/usr/include/sys/filio.h" 3 4 |
---|
4531 | #define _SYS_FILIO_H_ |
---|
4532 | |
---|
4533 | |
---|
4534 | |
---|
4535 | |
---|
4536 | #define FIOCLEX _IO('f', 1) |
---|
4537 | #define FIONCLEX _IO('f', 2) |
---|
4538 | #define FIONREAD _IOR('f', 127, int) |
---|
4539 | #define FIONBIO _IOW('f', 126, int) |
---|
4540 | #define FIOASYNC _IOW('f', 125, int) |
---|
4541 | #define FIOSETOWN _IOW('f', 124, int) |
---|
4542 | #define FIOGETOWN _IOR('f', 123, int) |
---|
4543 | #define FIODTYPE _IOR('f', 122, int) |
---|
4544 | # 91 "/usr/include/sys/ioctl.h" 2 3 4 |
---|
4545 | # 1 "/usr/include/sys/sockio.h" 1 3 4 |
---|
4546 | # 65 "/usr/include/sys/sockio.h" 3 4 |
---|
4547 | #define _SYS_SOCKIO_H_ |
---|
4548 | |
---|
4549 | |
---|
4550 | |
---|
4551 | |
---|
4552 | |
---|
4553 | |
---|
4554 | #define SIOCSHIWAT _IOW('s', 0, int) |
---|
4555 | #define SIOCGHIWAT _IOR('s', 1, int) |
---|
4556 | #define SIOCSLOWAT _IOW('s', 2, int) |
---|
4557 | #define SIOCGLOWAT _IOR('s', 3, int) |
---|
4558 | #define SIOCATMARK _IOR('s', 7, int) |
---|
4559 | #define SIOCSPGRP _IOW('s', 8, int) |
---|
4560 | #define SIOCGPGRP _IOR('s', 9, int) |
---|
4561 | # 88 "/usr/include/sys/sockio.h" 3 4 |
---|
4562 | #define SIOCSIFADDR _IOW('i', 12, struct ifreq) |
---|
4563 | #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) |
---|
4564 | #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) |
---|
4565 | #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) |
---|
4566 | #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) |
---|
4567 | #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) |
---|
4568 | #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) |
---|
4569 | #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) |
---|
4570 | #define SIOCDIFADDR _IOW('i', 25, struct ifreq) |
---|
4571 | #define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq) |
---|
4572 | #define SIOCGETVIFCNT _IOWR('r', 27, struct sioc_vif_req) |
---|
4573 | #define SIOCGETSGCNT _IOWR('r', 28, struct sioc_sg_req) |
---|
4574 | #define SIOCALIFADDR _IOW('i', 29, struct if_laddrreq) |
---|
4575 | #define SIOCGLIFADDR _IOWR('i', 30, struct if_laddrreq) |
---|
4576 | #define SIOCDLIFADDR _IOW('i', 31, struct if_laddrreq) |
---|
4577 | |
---|
4578 | |
---|
4579 | #define SIOCGIFADDR _IOWR('i', 33, struct ifreq) |
---|
4580 | #define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) |
---|
4581 | #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) |
---|
4582 | #define SIOCGIFCONF _IOWR('i', 36, struct ifconf) |
---|
4583 | #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) |
---|
4584 | #define SIOCAUTOADDR _IOWR('i', 38, struct ifreq) |
---|
4585 | #define SIOCAUTONETMASK _IOW('i', 39, struct ifreq) |
---|
4586 | #define SIOCARPIPLL _IOWR('i', 40, struct ifreq) |
---|
4587 | |
---|
4588 | |
---|
4589 | #define SIOCADDMULTI _IOW('i', 49, struct ifreq) |
---|
4590 | #define SIOCDELMULTI _IOW('i', 50, struct ifreq) |
---|
4591 | #define SIOCGIFMTU _IOWR('i', 51, struct ifreq) |
---|
4592 | #define SIOCSIFMTU _IOW('i', 52, struct ifreq) |
---|
4593 | #define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) |
---|
4594 | #define SIOCSIFPHYS _IOW('i', 54, struct ifreq) |
---|
4595 | #define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) |
---|
4596 | #define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) |
---|
4597 | #define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) |
---|
4598 | #define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) |
---|
4599 | #define SIOCRSLVMULTI _IOWR('i', 59, struct rslvmulti_req) |
---|
4600 | |
---|
4601 | #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) |
---|
4602 | #define SIOCGIFSTATUS _IOWR('i', 61, struct ifstat) |
---|
4603 | #define SIOCSIFPHYADDR _IOW('i', 62, struct ifaliasreq) |
---|
4604 | #define SIOCGIFPSRCADDR _IOWR('i', 63, struct ifreq) |
---|
4605 | #define SIOCGIFPDSTADDR _IOWR('i', 64, struct ifreq) |
---|
4606 | #define SIOCDIFPHYADDR _IOW('i', 65, struct ifreq) |
---|
4607 | #define SIOCSLIFPHYADDR _IOW('i', 66, struct if_laddrreq) |
---|
4608 | #define SIOCGLIFPHYADDR _IOWR('i', 67, struct if_laddrreq) |
---|
4609 | |
---|
4610 | #define SIOCGIFDEVMTU _IOWR('i', 68, struct ifreq) |
---|
4611 | #define SIOCSIFALTMTU _IOW('i', 69, struct ifreq) |
---|
4612 | #define SIOCGIFALTMTU _IOWR('i', 72, struct ifreq) |
---|
4613 | #define SIOCSIFBOND _IOW('i', 70, struct ifreq) |
---|
4614 | #define SIOCGIFBOND _IOWR('i', 71, struct ifreq) |
---|
4615 | #define SIOCIFCREATE _IOWR('i', 120, struct ifreq) |
---|
4616 | #define SIOCIFDESTROY _IOW('i', 121, struct ifreq) |
---|
4617 | #define SIOCSIFVLAN _IOW('i', 126, struct ifreq) |
---|
4618 | #define SIOCGIFVLAN _IOWR('i', 127, struct ifreq) |
---|
4619 | #define SIOCSETVLAN SIOCSIFVLAN |
---|
4620 | #define SIOCGETVLAN SIOCGIFVLAN |
---|
4621 | |
---|
4622 | |
---|
4623 | #define SIOCGIFASYNCMAP _IOWR('i', 124, struct ifreq) |
---|
4624 | #define SIOCSIFASYNCMAP _IOW('i', 125, struct ifreq) |
---|
4625 | |
---|
4626 | |
---|
4627 | |
---|
4628 | #define SIOCGIFMAC _IOWR('i', 130, struct ifreq) |
---|
4629 | #define SIOCSIFMAC _IOW('i', 131, struct ifreq) |
---|
4630 | #define SIOCSIFKPI _IOW('i', 134, struct ifreq) |
---|
4631 | #define SIOCGIFKPI _IOWR('i', 135, struct ifreq) |
---|
4632 | # 92 "/usr/include/sys/ioctl.h" 2 3 4 |
---|
4633 | |
---|
4634 | |
---|
4635 | |
---|
4636 | |
---|
4637 | |
---|
4638 | int ioctl(int, unsigned long, ...); |
---|
4639 | |
---|
4640 | # 40 "misc-utils/hardlink.c" 2 |
---|
4641 | # 49 "misc-utils/hardlink.c" |
---|
4642 | # 1 "./include/nls.h" 1 |
---|
4643 | |
---|
4644 | #define UTIL_LINUX_NLS_H |
---|
4645 | |
---|
4646 | |
---|
4647 | |
---|
4648 | |
---|
4649 | |
---|
4650 | |
---|
4651 | # 1 "/usr/include/locale.h" 1 3 4 |
---|
4652 | # 38 "/usr/include/locale.h" 3 4 |
---|
4653 | #define _LOCALE_H_ |
---|
4654 | |
---|
4655 | # 1 "/usr/include/_locale.h" 1 3 4 |
---|
4656 | # 38 "/usr/include/_locale.h" 3 4 |
---|
4657 | #define __LOCALE_H_ |
---|
4658 | |
---|
4659 | |
---|
4660 | |
---|
4661 | |
---|
4662 | struct lconv { |
---|
4663 | char *decimal_point; |
---|
4664 | char *thousands_sep; |
---|
4665 | char *grouping; |
---|
4666 | char *int_curr_symbol; |
---|
4667 | char *currency_symbol; |
---|
4668 | char *mon_decimal_point; |
---|
4669 | char *mon_thousands_sep; |
---|
4670 | char *mon_grouping; |
---|
4671 | char *positive_sign; |
---|
4672 | char *negative_sign; |
---|
4673 | char int_frac_digits; |
---|
4674 | char frac_digits; |
---|
4675 | char p_cs_precedes; |
---|
4676 | char p_sep_by_space; |
---|
4677 | char n_cs_precedes; |
---|
4678 | char n_sep_by_space; |
---|
4679 | char p_sign_posn; |
---|
4680 | char n_sign_posn; |
---|
4681 | char int_p_cs_precedes; |
---|
4682 | char int_n_cs_precedes; |
---|
4683 | char int_p_sep_by_space; |
---|
4684 | char int_n_sep_by_space; |
---|
4685 | char int_p_sign_posn; |
---|
4686 | char int_n_sign_posn; |
---|
4687 | }; |
---|
4688 | |
---|
4689 | |
---|
4690 | |
---|
4691 | |
---|
4692 | |
---|
4693 | |
---|
4694 | struct lconv *localeconv(void); |
---|
4695 | |
---|
4696 | # 41 "/usr/include/locale.h" 2 3 4 |
---|
4697 | |
---|
4698 | #define LC_ALL 0 |
---|
4699 | #define LC_COLLATE 1 |
---|
4700 | #define LC_CTYPE 2 |
---|
4701 | #define LC_MONETARY 3 |
---|
4702 | #define LC_NUMERIC 4 |
---|
4703 | #define LC_TIME 5 |
---|
4704 | #define LC_MESSAGES 6 |
---|
4705 | |
---|
4706 | #define _LC_LAST 7 |
---|
4707 | |
---|
4708 | |
---|
4709 | char *setlocale(int, const char *); |
---|
4710 | |
---|
4711 | # 10 "./include/nls.h" 2 |
---|
4712 | # 23 "./include/nls.h" |
---|
4713 | # 1 "/opt/local/include/libintl.h" 1 |
---|
4714 | # 18 "/opt/local/include/libintl.h" |
---|
4715 | #define _LIBINTL_H 1 |
---|
4716 | |
---|
4717 | |
---|
4718 | |
---|
4719 | # 1 "/usr/include/xlocale.h" 1 3 4 |
---|
4720 | # 25 "/usr/include/xlocale.h" 3 4 |
---|
4721 | #define _XLOCALE_H_ |
---|
4722 | |
---|
4723 | |
---|
4724 | |
---|
4725 | |
---|
4726 | #define _USE_EXTENDED_LOCALES_ |
---|
4727 | |
---|
4728 | |
---|
4729 | struct _xlocale; |
---|
4730 | typedef struct _xlocale * locale_t; |
---|
4731 | |
---|
4732 | |
---|
4733 | # 1 "/usr/include/_xlocale.h" 1 3 4 |
---|
4734 | # 25 "/usr/include/_xlocale.h" 3 4 |
---|
4735 | #define __XLOCALE_H_ |
---|
4736 | |
---|
4737 | |
---|
4738 | |
---|
4739 | |
---|
4740 | int ___mb_cur_max(void); |
---|
4741 | int ___mb_cur_max_l(locale_t); |
---|
4742 | |
---|
4743 | # 38 "/usr/include/xlocale.h" 2 3 4 |
---|
4744 | |
---|
4745 | #define LC_ALL_MASK ( LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK ) |
---|
4746 | |
---|
4747 | |
---|
4748 | |
---|
4749 | |
---|
4750 | |
---|
4751 | #define LC_COLLATE_MASK (1 << 0) |
---|
4752 | #define LC_CTYPE_MASK (1 << 1) |
---|
4753 | #define LC_MESSAGES_MASK (1 << 2) |
---|
4754 | #define LC_MONETARY_MASK (1 << 3) |
---|
4755 | #define LC_NUMERIC_MASK (1 << 4) |
---|
4756 | #define LC_TIME_MASK (1 << 5) |
---|
4757 | |
---|
4758 | #define _LC_LAST_MASK (1 << (6 - 1)) |
---|
4759 | |
---|
4760 | #define LC_GLOBAL_LOCALE ((locale_t)-1) |
---|
4761 | # 64 "/usr/include/xlocale.h" 3 4 |
---|
4762 | |
---|
4763 | extern const locale_t _c_locale; |
---|
4764 | |
---|
4765 | locale_t duplocale(locale_t); |
---|
4766 | int freelocale(locale_t); |
---|
4767 | struct lconv * localeconv_l(locale_t); |
---|
4768 | locale_t newlocale(int, const char *, locale_t); |
---|
4769 | const char * querylocale(int, locale_t); |
---|
4770 | locale_t uselocale(locale_t); |
---|
4771 | |
---|
4772 | |
---|
4773 | |
---|
4774 | # 1 "/usr/include/xlocale/_ctype.h" 1 3 4 |
---|
4775 | # 25 "/usr/include/xlocale/_ctype.h" 3 4 |
---|
4776 | #define _XLOCALE__CTYPE_H_ |
---|
4777 | # 34 "/usr/include/xlocale/_ctype.h" 3 4 |
---|
4778 | |
---|
4779 | unsigned long ___runetype_l(__darwin_ct_rune_t, locale_t); |
---|
4780 | __darwin_ct_rune_t ___tolower_l(__darwin_ct_rune_t, locale_t); |
---|
4781 | __darwin_ct_rune_t ___toupper_l(__darwin_ct_rune_t, locale_t); |
---|
4782 | |
---|
4783 | |
---|
4784 | |
---|
4785 | int __maskrune_l(__darwin_ct_rune_t, unsigned long, locale_t); |
---|
4786 | |
---|
4787 | |
---|
4788 | static __inline int |
---|
4789 | __istype_l(__darwin_ct_rune_t _c, unsigned long _f, locale_t _l) |
---|
4790 | { |
---|
4791 | return !!(isascii(_c) ? (_DefaultRuneLocale.__runetype[_c] & _f) |
---|
4792 | : __maskrune_l(_c, _f, _l)); |
---|
4793 | } |
---|
4794 | |
---|
4795 | static __inline __darwin_ct_rune_t |
---|
4796 | __toupper_l(__darwin_ct_rune_t _c, locale_t _l) |
---|
4797 | { |
---|
4798 | return isascii(_c) ? _DefaultRuneLocale.__mapupper[_c] |
---|
4799 | : ___toupper_l(_c, _l); |
---|
4800 | } |
---|
4801 | |
---|
4802 | static __inline __darwin_ct_rune_t |
---|
4803 | __tolower_l(__darwin_ct_rune_t _c, locale_t _l) |
---|
4804 | { |
---|
4805 | return isascii(_c) ? _DefaultRuneLocale.__maplower[_c] |
---|
4806 | : ___tolower_l(_c, _l); |
---|
4807 | } |
---|
4808 | |
---|
4809 | static __inline int |
---|
4810 | __wcwidth_l(__darwin_ct_rune_t _c, locale_t _l) |
---|
4811 | { |
---|
4812 | unsigned int _x; |
---|
4813 | |
---|
4814 | if (_c == 0) |
---|
4815 | return (0); |
---|
4816 | _x = (unsigned int)__maskrune_l(_c, 0xe0000000L|0x00040000L, _l); |
---|
4817 | if ((_x & 0xe0000000L) != 0) |
---|
4818 | return ((_x & 0xe0000000L) >> 30); |
---|
4819 | return ((_x & 0x00040000L) != 0 ? 1 : -1); |
---|
4820 | } |
---|
4821 | |
---|
4822 | |
---|
4823 | |
---|
4824 | static __inline int |
---|
4825 | digittoint_l(int c, locale_t l) |
---|
4826 | { |
---|
4827 | return (__maskrune_l(c, 0x0F, l)); |
---|
4828 | } |
---|
4829 | |
---|
4830 | static __inline int |
---|
4831 | isalnum_l(int c, locale_t l) |
---|
4832 | { |
---|
4833 | return (__istype_l(c, 0x00000100L|0x00000400L, l)); |
---|
4834 | } |
---|
4835 | |
---|
4836 | static __inline int |
---|
4837 | isalpha_l(int c, locale_t l) |
---|
4838 | { |
---|
4839 | return (__istype_l(c, 0x00000100L, l)); |
---|
4840 | } |
---|
4841 | |
---|
4842 | static __inline int |
---|
4843 | isblank_l(int c, locale_t l) |
---|
4844 | { |
---|
4845 | return (__istype_l(c, 0x00020000L, l)); |
---|
4846 | } |
---|
4847 | |
---|
4848 | static __inline int |
---|
4849 | iscntrl_l(int c, locale_t l) |
---|
4850 | { |
---|
4851 | return (__istype_l(c, 0x00000200L, l)); |
---|
4852 | } |
---|
4853 | |
---|
4854 | static __inline int |
---|
4855 | isdigit_l(int c, locale_t l) |
---|
4856 | { |
---|
4857 | return (__istype_l(c, 0x00000400L, l)); |
---|
4858 | } |
---|
4859 | |
---|
4860 | static __inline int |
---|
4861 | isgraph_l(int c, locale_t l) |
---|
4862 | { |
---|
4863 | return (__istype_l(c, 0x00000800L, l)); |
---|
4864 | } |
---|
4865 | |
---|
4866 | static __inline int |
---|
4867 | ishexnumber_l(int c, locale_t l) |
---|
4868 | { |
---|
4869 | return (__istype_l(c, 0x00010000L, l)); |
---|
4870 | } |
---|
4871 | |
---|
4872 | static __inline int |
---|
4873 | isideogram_l(int c, locale_t l) |
---|
4874 | { |
---|
4875 | return (__istype_l(c, 0x00080000L, l)); |
---|
4876 | } |
---|
4877 | |
---|
4878 | static __inline int |
---|
4879 | islower_l(int c, locale_t l) |
---|
4880 | { |
---|
4881 | return (__istype_l(c, 0x00001000L, l)); |
---|
4882 | } |
---|
4883 | |
---|
4884 | static __inline int |
---|
4885 | isnumber_l(int c, locale_t l) |
---|
4886 | { |
---|
4887 | return (__istype_l(c, 0x00000400L, l)); |
---|
4888 | } |
---|
4889 | |
---|
4890 | static __inline int |
---|
4891 | isphonogram_l(int c, locale_t l) |
---|
4892 | { |
---|
4893 | return (__istype_l(c, 0x00200000L, l)); |
---|
4894 | } |
---|
4895 | |
---|
4896 | static __inline int |
---|
4897 | isprint_l(int c, locale_t l) |
---|
4898 | { |
---|
4899 | return (__istype_l(c, 0x00040000L, l)); |
---|
4900 | } |
---|
4901 | |
---|
4902 | static __inline int |
---|
4903 | ispunct_l(int c, locale_t l) |
---|
4904 | { |
---|
4905 | return (__istype_l(c, 0x00002000L, l)); |
---|
4906 | } |
---|
4907 | |
---|
4908 | static __inline int |
---|
4909 | isrune_l(int c, locale_t l) |
---|
4910 | { |
---|
4911 | return (__istype_l(c, 0xFFFFFFF0L, l)); |
---|
4912 | } |
---|
4913 | |
---|
4914 | static __inline int |
---|
4915 | isspace_l(int c, locale_t l) |
---|
4916 | { |
---|
4917 | return (__istype_l(c, 0x00004000L, l)); |
---|
4918 | } |
---|
4919 | |
---|
4920 | static __inline int |
---|
4921 | isspecial_l(int c, locale_t l) |
---|
4922 | { |
---|
4923 | return (__istype_l(c, 0x00100000L, l)); |
---|
4924 | } |
---|
4925 | |
---|
4926 | static __inline int |
---|
4927 | isupper_l(int c, locale_t l) |
---|
4928 | { |
---|
4929 | return (__istype_l(c, 0x00008000L, l)); |
---|
4930 | } |
---|
4931 | |
---|
4932 | static __inline int |
---|
4933 | isxdigit_l(int c, locale_t l) |
---|
4934 | { |
---|
4935 | return (__istype_l(c, 0x00010000L, l)); |
---|
4936 | } |
---|
4937 | |
---|
4938 | static __inline int |
---|
4939 | tolower_l(int c, locale_t l) |
---|
4940 | { |
---|
4941 | return (__tolower_l(c, l)); |
---|
4942 | } |
---|
4943 | |
---|
4944 | static __inline int |
---|
4945 | toupper_l(int c, locale_t l) |
---|
4946 | { |
---|
4947 | return (__toupper_l(c, l)); |
---|
4948 | } |
---|
4949 | # 77 "/usr/include/xlocale.h" 2 3 4 |
---|
4950 | # 100 "/usr/include/xlocale.h" 3 4 |
---|
4951 | # 1 "/usr/include/xlocale/_time.h" 1 3 4 |
---|
4952 | # 25 "/usr/include/xlocale/_time.h" 3 4 |
---|
4953 | #define _XLOCALE__TIME_H_ |
---|
4954 | |
---|
4955 | |
---|
4956 | size_t strftime_l(char * , size_t, const char * , |
---|
4957 | const struct tm * , locale_t) |
---|
4958 | __asm("_" "strftime_l" "$UNIX2003"); |
---|
4959 | char *strptime_l(const char * , const char * , |
---|
4960 | struct tm * , locale_t) __asm("_" "strptime_l" "$UNIX2003"); |
---|
4961 | |
---|
4962 | # 101 "/usr/include/xlocale.h" 2 3 4 |
---|
4963 | # 23 "/opt/local/include/libintl.h" 2 |
---|
4964 | # 38 "/opt/local/include/libintl.h" |
---|
4965 | #define __USE_GNU_GETTEXT 1 |
---|
4966 | |
---|
4967 | |
---|
4968 | |
---|
4969 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 || (major) == 1 ? 1 : -1) |
---|
4970 | # 57 "/opt/local/include/libintl.h" |
---|
4971 | #define LIBINTL_VERSION 0x001500 |
---|
4972 | extern int libintl_version; |
---|
4973 | # 98 "/opt/local/include/libintl.h" |
---|
4974 | #define _INTL_REDIRECT_MACROS |
---|
4975 | # 108 "/opt/local/include/libintl.h" |
---|
4976 | #define _INTL_ASM(cname) |
---|
4977 | |
---|
4978 | |
---|
4979 | |
---|
4980 | |
---|
4981 | |
---|
4982 | |
---|
4983 | #define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) |
---|
4984 | # 134 "/opt/local/include/libintl.h" |
---|
4985 | #define gettext libintl_gettext |
---|
4986 | |
---|
4987 | extern char *libintl_gettext (const char *__msgid) |
---|
4988 | |
---|
4989 | __attribute__ ((__format_arg__ (1))); |
---|
4990 | # 154 "/opt/local/include/libintl.h" |
---|
4991 | #define dgettext libintl_dgettext |
---|
4992 | |
---|
4993 | extern char *libintl_dgettext (const char *__domainname, const char *__msgid) |
---|
4994 | |
---|
4995 | __attribute__ ((__format_arg__ (2))); |
---|
4996 | # 175 "/opt/local/include/libintl.h" |
---|
4997 | #define dcgettext libintl_dcgettext |
---|
4998 | |
---|
4999 | extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, |
---|
5000 | int __category) |
---|
5001 | |
---|
5002 | __attribute__ ((__format_arg__ (2))); |
---|
5003 | # 199 "/opt/local/include/libintl.h" |
---|
5004 | #define ngettext libintl_ngettext |
---|
5005 | |
---|
5006 | extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, |
---|
5007 | unsigned long int __n) |
---|
5008 | |
---|
5009 | __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); |
---|
5010 | # 222 "/opt/local/include/libintl.h" |
---|
5011 | #define dngettext libintl_dngettext |
---|
5012 | |
---|
5013 | extern char *libintl_dngettext (const char *__domainname, |
---|
5014 | const char *__msgid1, const char *__msgid2, |
---|
5015 | unsigned long int __n) |
---|
5016 | |
---|
5017 | __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); |
---|
5018 | # 248 "/opt/local/include/libintl.h" |
---|
5019 | #define dcngettext libintl_dcngettext |
---|
5020 | |
---|
5021 | extern char *libintl_dcngettext (const char *__domainname, |
---|
5022 | const char *__msgid1, const char *__msgid2, |
---|
5023 | unsigned long int __n, int __category) |
---|
5024 | |
---|
5025 | __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); |
---|
5026 | # 270 "/opt/local/include/libintl.h" |
---|
5027 | #define textdomain libintl_textdomain |
---|
5028 | |
---|
5029 | extern char *libintl_textdomain (const char *__domainname) |
---|
5030 | ; |
---|
5031 | # 288 "/opt/local/include/libintl.h" |
---|
5032 | #define bindtextdomain libintl_bindtextdomain |
---|
5033 | |
---|
5034 | extern char *libintl_bindtextdomain (const char *__domainname, const char *__dirname) |
---|
5035 | ; |
---|
5036 | # 327 "/opt/local/include/libintl.h" |
---|
5037 | #define bind_textdomain_codeset libintl_bind_textdomain_codeset |
---|
5038 | |
---|
5039 | extern char *libintl_bind_textdomain_codeset (const char *__domainname, |
---|
5040 | const char *__codeset) |
---|
5041 | ; |
---|
5042 | # 487 "/opt/local/include/libintl.h" |
---|
5043 | #undef setlocale |
---|
5044 | #define setlocale libintl_setlocale |
---|
5045 | extern char *libintl_setlocale (int, const char *); |
---|
5046 | |
---|
5047 | |
---|
5048 | |
---|
5049 | |
---|
5050 | #undef newlocale |
---|
5051 | #define newlocale libintl_newlocale |
---|
5052 | |
---|
5053 | |
---|
5054 | extern locale_t libintl_newlocale (int, const char *, locale_t); |
---|
5055 | # 513 "/opt/local/include/libintl.h" |
---|
5056 | #define libintl_set_relocation_prefix libintl_set_relocation_prefix |
---|
5057 | extern void |
---|
5058 | libintl_set_relocation_prefix (const char *orig_prefix, |
---|
5059 | const char *curr_prefix); |
---|
5060 | # 24 "./include/nls.h" 2 |
---|
5061 | # 32 "./include/nls.h" |
---|
5062 | #define _(Text) gettext (Text) |
---|
5063 | |
---|
5064 | |
---|
5065 | |
---|
5066 | |
---|
5067 | #define N_(String) (String) |
---|
5068 | |
---|
5069 | #define P_(Singular,Plural,n) ngettext (Singular, Plural, n) |
---|
5070 | # 51 "./include/nls.h" |
---|
5071 | # 1 "/usr/include/langinfo.h" 1 3 4 |
---|
5072 | # 30 "/usr/include/langinfo.h" 3 4 |
---|
5073 | #define _LANGINFO_H_ |
---|
5074 | |
---|
5075 | |
---|
5076 | |
---|
5077 | |
---|
5078 | typedef __darwin_nl_item nl_item; |
---|
5079 | #define _NL_ITEM |
---|
5080 | |
---|
5081 | |
---|
5082 | #define CODESET 0 |
---|
5083 | #define D_T_FMT 1 |
---|
5084 | #define D_FMT 2 |
---|
5085 | #define T_FMT 3 |
---|
5086 | #define T_FMT_AMPM 4 |
---|
5087 | #define AM_STR 5 |
---|
5088 | #define PM_STR 6 |
---|
5089 | |
---|
5090 | |
---|
5091 | #define DAY_1 7 |
---|
5092 | #define DAY_2 8 |
---|
5093 | #define DAY_3 9 |
---|
5094 | #define DAY_4 10 |
---|
5095 | #define DAY_5 11 |
---|
5096 | #define DAY_6 12 |
---|
5097 | #define DAY_7 13 |
---|
5098 | |
---|
5099 | |
---|
5100 | #define ABDAY_1 14 |
---|
5101 | #define ABDAY_2 15 |
---|
5102 | #define ABDAY_3 16 |
---|
5103 | #define ABDAY_4 17 |
---|
5104 | #define ABDAY_5 18 |
---|
5105 | #define ABDAY_6 19 |
---|
5106 | #define ABDAY_7 20 |
---|
5107 | |
---|
5108 | |
---|
5109 | #define MON_1 21 |
---|
5110 | #define MON_2 22 |
---|
5111 | #define MON_3 23 |
---|
5112 | #define MON_4 24 |
---|
5113 | #define MON_5 25 |
---|
5114 | #define MON_6 26 |
---|
5115 | #define MON_7 27 |
---|
5116 | #define MON_8 28 |
---|
5117 | #define MON_9 29 |
---|
5118 | #define MON_10 30 |
---|
5119 | #define MON_11 31 |
---|
5120 | #define MON_12 32 |
---|
5121 | |
---|
5122 | |
---|
5123 | #define ABMON_1 33 |
---|
5124 | #define ABMON_2 34 |
---|
5125 | #define ABMON_3 35 |
---|
5126 | #define ABMON_4 36 |
---|
5127 | #define ABMON_5 37 |
---|
5128 | #define ABMON_6 38 |
---|
5129 | #define ABMON_7 39 |
---|
5130 | #define ABMON_8 40 |
---|
5131 | #define ABMON_9 41 |
---|
5132 | #define ABMON_10 42 |
---|
5133 | #define ABMON_11 43 |
---|
5134 | #define ABMON_12 44 |
---|
5135 | |
---|
5136 | #define ERA 45 |
---|
5137 | #define ERA_D_FMT 46 |
---|
5138 | #define ERA_D_T_FMT 47 |
---|
5139 | #define ERA_T_FMT 48 |
---|
5140 | #define ALT_DIGITS 49 |
---|
5141 | |
---|
5142 | #define RADIXCHAR 50 |
---|
5143 | #define THOUSEP 51 |
---|
5144 | |
---|
5145 | #define YESEXPR 52 |
---|
5146 | #define NOEXPR 53 |
---|
5147 | |
---|
5148 | |
---|
5149 | #define YESSTR 54 |
---|
5150 | #define NOSTR 55 |
---|
5151 | |
---|
5152 | |
---|
5153 | #define CRNCYSTR 56 |
---|
5154 | |
---|
5155 | |
---|
5156 | #define D_MD_ORDER 57 |
---|
5157 | |
---|
5158 | |
---|
5159 | |
---|
5160 | char *nl_langinfo(nl_item); |
---|
5161 | |
---|
5162 | |
---|
5163 | |
---|
5164 | # 1 "/usr/include/xlocale/_langinfo.h" 1 3 4 |
---|
5165 | # 25 "/usr/include/xlocale/_langinfo.h" 3 4 |
---|
5166 | #define _XLOCALE__LANGINFO_H_ |
---|
5167 | |
---|
5168 | |
---|
5169 | char *nl_langinfo_l(nl_item, locale_t); |
---|
5170 | |
---|
5171 | # 122 "/usr/include/langinfo.h" 2 3 4 |
---|
5172 | # 52 "./include/nls.h" 2 |
---|
5173 | # 124 "./include/nls.h" |
---|
5174 | #define ALTMON_1 MON_1 |
---|
5175 | #define ALTMON_2 MON_2 |
---|
5176 | #define ALTMON_3 MON_3 |
---|
5177 | #define ALTMON_4 MON_4 |
---|
5178 | #define ALTMON_5 MON_5 |
---|
5179 | #define ALTMON_6 MON_6 |
---|
5180 | #define ALTMON_7 MON_7 |
---|
5181 | #define ALTMON_8 MON_8 |
---|
5182 | #define ALTMON_9 MON_9 |
---|
5183 | #define ALTMON_10 MON_10 |
---|
5184 | #define ALTMON_11 MON_11 |
---|
5185 | #define ALTMON_12 MON_12 |
---|
5186 | |
---|
5187 | |
---|
5188 | |
---|
5189 | #define _NL_ABALTMON_1 ABMON_1 |
---|
5190 | #define _NL_ABALTMON_2 ABMON_2 |
---|
5191 | #define _NL_ABALTMON_3 ABMON_3 |
---|
5192 | #define _NL_ABALTMON_4 ABMON_4 |
---|
5193 | #define _NL_ABALTMON_5 ABMON_5 |
---|
5194 | #define _NL_ABALTMON_6 ABMON_6 |
---|
5195 | #define _NL_ABALTMON_7 ABMON_7 |
---|
5196 | #define _NL_ABALTMON_8 ABMON_8 |
---|
5197 | #define _NL_ABALTMON_9 ABMON_9 |
---|
5198 | #define _NL_ABALTMON_10 ABMON_10 |
---|
5199 | #define _NL_ABALTMON_11 ABMON_11 |
---|
5200 | #define _NL_ABALTMON_12 ABMON_12 |
---|
5201 | # 50 "misc-utils/hardlink.c" 2 |
---|
5202 | # 1 "./include/c.h" 1 |
---|
5203 | |
---|
5204 | |
---|
5205 | |
---|
5206 | |
---|
5207 | |
---|
5208 | |
---|
5209 | |
---|
5210 | #define UTIL_LINUX_C_H |
---|
5211 | |
---|
5212 | # 1 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/limits.h" 1 3 4 |
---|
5213 | |
---|
5214 | |
---|
5215 | |
---|
5216 | |
---|
5217 | |
---|
5218 | |
---|
5219 | # 1 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/syslimits.h" 1 3 4 |
---|
5220 | |
---|
5221 | |
---|
5222 | |
---|
5223 | |
---|
5224 | |
---|
5225 | #define _GCC_NEXT_LIMITS_H |
---|
5226 | # 8 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/limits.h" 2 3 4 |
---|
5227 | |
---|
5228 | |
---|
5229 | # 1 "/usr/include/limits.h" 1 3 4 |
---|
5230 | # 61 "/usr/include/limits.h" 3 4 |
---|
5231 | #define _LIMITS_H_ |
---|
5232 | |
---|
5233 | |
---|
5234 | # 1 "/usr/include/machine/limits.h" 1 3 4 |
---|
5235 | |
---|
5236 | |
---|
5237 | |
---|
5238 | |
---|
5239 | |
---|
5240 | # 1 "/usr/include/ppc/limits.h" 1 3 4 |
---|
5241 | # 37 "/usr/include/ppc/limits.h" 3 4 |
---|
5242 | #define _PPC_LIMITS_H_ |
---|
5243 | |
---|
5244 | |
---|
5245 | # 1 "/usr/include/ppc/_limits.h" 1 3 4 |
---|
5246 | # 23 "/usr/include/ppc/_limits.h" 3 4 |
---|
5247 | #define _PPC__LIMITS_H_ |
---|
5248 | |
---|
5249 | #define __DARWIN_CLK_TCK 100 |
---|
5250 | # 41 "/usr/include/ppc/limits.h" 2 3 4 |
---|
5251 | |
---|
5252 | #define CHAR_BIT 8 |
---|
5253 | #define MB_LEN_MAX 6 |
---|
5254 | |
---|
5255 | |
---|
5256 | #define CLK_TCK __DARWIN_CLK_TCK |
---|
5257 | # 59 "/usr/include/ppc/limits.h" 3 4 |
---|
5258 | #define SCHAR_MAX 127 |
---|
5259 | #define SCHAR_MIN (-128) |
---|
5260 | |
---|
5261 | #define UCHAR_MAX 255 |
---|
5262 | #define CHAR_MAX 127 |
---|
5263 | #define CHAR_MIN (-128) |
---|
5264 | |
---|
5265 | #define USHRT_MAX 65535 |
---|
5266 | #define SHRT_MAX 32767 |
---|
5267 | #define SHRT_MIN (-32768) |
---|
5268 | |
---|
5269 | #define UINT_MAX 0xffffffff |
---|
5270 | #define INT_MAX 2147483647 |
---|
5271 | #define INT_MIN (-2147483647-1) |
---|
5272 | |
---|
5273 | |
---|
5274 | |
---|
5275 | |
---|
5276 | |
---|
5277 | |
---|
5278 | #define ULONG_MAX 0xffffffffUL |
---|
5279 | #define LONG_MAX 2147483647L |
---|
5280 | #define LONG_MIN (-2147483647L-1) |
---|
5281 | |
---|
5282 | |
---|
5283 | #define ULLONG_MAX 0xffffffffffffffffULL |
---|
5284 | #define LLONG_MAX 0x7fffffffffffffffLL |
---|
5285 | #define LLONG_MIN (-0x7fffffffffffffffLL-1) |
---|
5286 | |
---|
5287 | |
---|
5288 | |
---|
5289 | |
---|
5290 | |
---|
5291 | #define LONG_BIT 32 |
---|
5292 | |
---|
5293 | #define SSIZE_MAX LONG_MAX |
---|
5294 | #define WORD_BIT 32 |
---|
5295 | |
---|
5296 | |
---|
5297 | #define SIZE_T_MAX ULONG_MAX |
---|
5298 | |
---|
5299 | #define UQUAD_MAX ULLONG_MAX |
---|
5300 | #define QUAD_MAX LLONG_MAX |
---|
5301 | #define QUAD_MIN LLONG_MIN |
---|
5302 | # 7 "/usr/include/machine/limits.h" 2 3 4 |
---|
5303 | # 65 "/usr/include/limits.h" 2 3 4 |
---|
5304 | # 1 "/usr/include/sys/syslimits.h" 1 3 4 |
---|
5305 | # 66 "/usr/include/sys/syslimits.h" 3 4 |
---|
5306 | #define _SYS_SYSLIMITS_H_ |
---|
5307 | # 75 "/usr/include/sys/syslimits.h" 3 4 |
---|
5308 | #define ARG_MAX (256 * 1024) |
---|
5309 | #define CHILD_MAX 266 |
---|
5310 | |
---|
5311 | #define GID_MAX 2147483647U |
---|
5312 | |
---|
5313 | #define LINK_MAX 32767 |
---|
5314 | #define MAX_CANON 1024 |
---|
5315 | #define MAX_INPUT 1024 |
---|
5316 | #define NAME_MAX 255 |
---|
5317 | #define NGROUPS_MAX 16 |
---|
5318 | |
---|
5319 | #define UID_MAX 2147483647U |
---|
5320 | |
---|
5321 | #define OPEN_MAX 10240 |
---|
5322 | |
---|
5323 | |
---|
5324 | #define PATH_MAX 1024 |
---|
5325 | #define PIPE_BUF 512 |
---|
5326 | |
---|
5327 | #define BC_BASE_MAX 99 |
---|
5328 | #define BC_DIM_MAX 2048 |
---|
5329 | #define BC_SCALE_MAX 99 |
---|
5330 | #define BC_STRING_MAX 1000 |
---|
5331 | #define CHARCLASS_NAME_MAX 14 |
---|
5332 | #define COLL_WEIGHTS_MAX 2 |
---|
5333 | #define EQUIV_CLASS_MAX 2 |
---|
5334 | #define EXPR_NEST_MAX 32 |
---|
5335 | #define LINE_MAX 2048 |
---|
5336 | #define RE_DUP_MAX 255 |
---|
5337 | |
---|
5338 | |
---|
5339 | #define NZERO 20 |
---|
5340 | # 66 "/usr/include/limits.h" 2 3 4 |
---|
5341 | |
---|
5342 | |
---|
5343 | #define _POSIX_AIO_LISTIO_MAX 2 |
---|
5344 | #define _POSIX_AIO_MAX 1 |
---|
5345 | #define _POSIX_DELAYTIMER_MAX 32 |
---|
5346 | #define _POSIX_HOST_NAME_MAX 255 |
---|
5347 | #define _POSIX_LOGIN_NAME_MAX 9 |
---|
5348 | #define _POSIX_MQ_OPEN_MAX 8 |
---|
5349 | #define _POSIX_MQ_PRIO_MAX 32 |
---|
5350 | |
---|
5351 | #define _POSIX_ARG_MAX 4096 |
---|
5352 | #define _POSIX_CHILD_MAX 25 |
---|
5353 | #define _POSIX_LINK_MAX 8 |
---|
5354 | #define _POSIX_MAX_CANON 255 |
---|
5355 | #define _POSIX_MAX_INPUT 255 |
---|
5356 | #define _POSIX_NAME_MAX 14 |
---|
5357 | #define _POSIX_NGROUPS_MAX 8 |
---|
5358 | #define _POSIX_OPEN_MAX 20 |
---|
5359 | #define _POSIX_PATH_MAX 256 |
---|
5360 | #define _POSIX_PIPE_BUF 512 |
---|
5361 | #define _POSIX_SSIZE_MAX 32767 |
---|
5362 | #define _POSIX_STREAM_MAX 8 |
---|
5363 | #define _POSIX_TZNAME_MAX 6 |
---|
5364 | |
---|
5365 | #define _POSIX_RE_DUP_MAX 255 |
---|
5366 | #define _POSIX_RTSIG_MAX 8 |
---|
5367 | #define _POSIX_SEM_NSEMS_MAX 256 |
---|
5368 | #define _POSIX_SEM_VALUE_MAX 32767 |
---|
5369 | #define _POSIX_SIGQUEUE_MAX 32 |
---|
5370 | #define _POSIX_SS_REPL_MAX 4 |
---|
5371 | #define _POSIX_SYMLINK_MAX 255 |
---|
5372 | #define _POSIX_SYMLOOP_MAX 8 |
---|
5373 | #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 |
---|
5374 | #define _POSIX_THREAD_KEYS_MAX 128 |
---|
5375 | #define _POSIX_THREAD_THREADS_MAX 64 |
---|
5376 | #define _POSIX_TIMER_MAX 32 |
---|
5377 | #define _POSIX_TRACE_EVENT_NAME_MAX 30 |
---|
5378 | #define _POSIX_TRACE_NAME_MAX 8 |
---|
5379 | #define _POSIX_TRACE_SYS_MAX 8 |
---|
5380 | #define _POSIX_TRACE_USER_EVENT_MAX 32 |
---|
5381 | #define _POSIX_TTY_NAME_MAX 9 |
---|
5382 | |
---|
5383 | #define _POSIX2_BC_BASE_MAX 99 |
---|
5384 | #define _POSIX2_BC_DIM_MAX 2048 |
---|
5385 | #define _POSIX2_BC_SCALE_MAX 99 |
---|
5386 | #define _POSIX2_BC_STRING_MAX 1000 |
---|
5387 | #define _POSIX2_CHARCLASS_NAME_MAX 14 |
---|
5388 | #define _POSIX2_COLL_WEIGHTS_MAX 2 |
---|
5389 | #define _POSIX2_EQUIV_CLASS_MAX 2 |
---|
5390 | #define _POSIX2_EXPR_NEST_MAX 32 |
---|
5391 | #define _POSIX2_LINE_MAX 2048 |
---|
5392 | #define _POSIX2_RE_DUP_MAX 255 |
---|
5393 | |
---|
5394 | #define PTHREAD_STACK_MIN 8192 |
---|
5395 | #define PTHREAD_DESTRUCTOR_ITERATIONS 4 |
---|
5396 | #define PTHREAD_KEYS_MAX 512 |
---|
5397 | |
---|
5398 | |
---|
5399 | #define PASS_MAX 128 |
---|
5400 | |
---|
5401 | |
---|
5402 | #define NL_ARGMAX 9 |
---|
5403 | #define NL_LANGMAX 14 |
---|
5404 | #define NL_MSGMAX 32767 |
---|
5405 | #define NL_NMAX 1 |
---|
5406 | #define NL_SETMAX 255 |
---|
5407 | #define NL_TEXTMAX 2048 |
---|
5408 | |
---|
5409 | #define _XOPEN_IOV_MAX 16 |
---|
5410 | #define IOV_MAX 1024 |
---|
5411 | #define _XOPEN_NAME_MAX 255 |
---|
5412 | #define _XOPEN_PATH_MAX 1024 |
---|
5413 | # 11 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/limits.h" 2 3 4 |
---|
5414 | #undef _GCC_NEXT_LIMITS_H |
---|
5415 | |
---|
5416 | |
---|
5417 | |
---|
5418 | #define _LIMITS_H___ |
---|
5419 | |
---|
5420 | |
---|
5421 | #undef CHAR_BIT |
---|
5422 | #define CHAR_BIT __CHAR_BIT__ |
---|
5423 | |
---|
5424 | |
---|
5425 | |
---|
5426 | |
---|
5427 | |
---|
5428 | |
---|
5429 | |
---|
5430 | #undef SCHAR_MIN |
---|
5431 | #define SCHAR_MIN (-SCHAR_MAX - 1) |
---|
5432 | #undef SCHAR_MAX |
---|
5433 | #define SCHAR_MAX __SCHAR_MAX__ |
---|
5434 | |
---|
5435 | |
---|
5436 | #undef UCHAR_MAX |
---|
5437 | |
---|
5438 | |
---|
5439 | |
---|
5440 | #define UCHAR_MAX (SCHAR_MAX * 2 + 1) |
---|
5441 | # 51 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/limits.h" 3 4 |
---|
5442 | #undef CHAR_MIN |
---|
5443 | #define CHAR_MIN SCHAR_MIN |
---|
5444 | #undef CHAR_MAX |
---|
5445 | #define CHAR_MAX SCHAR_MAX |
---|
5446 | |
---|
5447 | |
---|
5448 | |
---|
5449 | #undef SHRT_MIN |
---|
5450 | #define SHRT_MIN (-SHRT_MAX - 1) |
---|
5451 | #undef SHRT_MAX |
---|
5452 | #define SHRT_MAX __SHRT_MAX__ |
---|
5453 | |
---|
5454 | |
---|
5455 | #undef USHRT_MAX |
---|
5456 | |
---|
5457 | |
---|
5458 | |
---|
5459 | #define USHRT_MAX (SHRT_MAX * 2 + 1) |
---|
5460 | |
---|
5461 | |
---|
5462 | |
---|
5463 | #undef INT_MIN |
---|
5464 | #define INT_MIN (-INT_MAX - 1) |
---|
5465 | #undef INT_MAX |
---|
5466 | #define INT_MAX __INT_MAX__ |
---|
5467 | |
---|
5468 | |
---|
5469 | #undef UINT_MAX |
---|
5470 | #define UINT_MAX (INT_MAX * 2U + 1U) |
---|
5471 | |
---|
5472 | |
---|
5473 | |
---|
5474 | #undef LONG_MIN |
---|
5475 | #define LONG_MIN (-LONG_MAX - 1L) |
---|
5476 | #undef LONG_MAX |
---|
5477 | #define LONG_MAX __LONG_MAX__ |
---|
5478 | |
---|
5479 | |
---|
5480 | #undef ULONG_MAX |
---|
5481 | #define ULONG_MAX (LONG_MAX * 2UL + 1UL) |
---|
5482 | # 106 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/limits.h" 3 4 |
---|
5483 | #undef LONG_LONG_MIN |
---|
5484 | #define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) |
---|
5485 | #undef LONG_LONG_MAX |
---|
5486 | #define LONG_LONG_MAX __LONG_LONG_MAX__ |
---|
5487 | |
---|
5488 | |
---|
5489 | #undef ULONG_LONG_MAX |
---|
5490 | #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) |
---|
5491 | # 11 "./include/c.h" 2 |
---|
5492 | # 1 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stddef.h" 1 3 4 |
---|
5493 | # 43 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stddef.h" 3 4 |
---|
5494 | #define _STDDEF_H |
---|
5495 | #define _STDDEF_H_ |
---|
5496 | |
---|
5497 | #define _ANSI_STDDEF_H |
---|
5498 | |
---|
5499 | #define __STDDEF_H__ |
---|
5500 | # 141 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stddef.h" 3 4 |
---|
5501 | #define _PTRDIFF_T |
---|
5502 | #define _T_PTRDIFF_ |
---|
5503 | #define _T_PTRDIFF |
---|
5504 | #define __PTRDIFF_T |
---|
5505 | #define _PTRDIFF_T_ |
---|
5506 | #define _BSD_PTRDIFF_T_ |
---|
5507 | #define ___int_ptrdiff_t_h |
---|
5508 | #define _GCC_PTRDIFF_T |
---|
5509 | |
---|
5510 | |
---|
5511 | |
---|
5512 | typedef int ptrdiff_t; |
---|
5513 | # 163 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stddef.h" 3 4 |
---|
5514 | #undef __need_ptrdiff_t |
---|
5515 | # 236 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stddef.h" 3 4 |
---|
5516 | #undef __need_size_t |
---|
5517 | # 345 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stddef.h" 3 4 |
---|
5518 | #undef __need_wchar_t |
---|
5519 | # 398 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stddef.h" 3 4 |
---|
5520 | #undef NULL |
---|
5521 | |
---|
5522 | |
---|
5523 | |
---|
5524 | |
---|
5525 | #define NULL ((void *)0) |
---|
5526 | |
---|
5527 | |
---|
5528 | |
---|
5529 | |
---|
5530 | |
---|
5531 | #undef __need_NULL |
---|
5532 | |
---|
5533 | |
---|
5534 | |
---|
5535 | |
---|
5536 | #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) |
---|
5537 | # 12 "./include/c.h" 2 |
---|
5538 | |
---|
5539 | # 1 "/opt/local/include/LegacySupport/stdio.h" 1 |
---|
5540 | # 20 "/opt/local/include/LegacySupport/stdio.h" |
---|
5541 | #define _MACPORTS_STDIO_H_ |
---|
5542 | |
---|
5543 | |
---|
5544 | |
---|
5545 | |
---|
5546 | |
---|
5547 | # 1 "/usr/include/stdio.h" 1 3 4 |
---|
5548 | # 62 "/usr/include/stdio.h" 3 4 |
---|
5549 | #define _STDIO_H_ |
---|
5550 | |
---|
5551 | |
---|
5552 | |
---|
5553 | |
---|
5554 | #define _VA_LIST |
---|
5555 | |
---|
5556 | |
---|
5557 | typedef __darwin_va_list va_list; |
---|
5558 | # 87 "/usr/include/stdio.h" 3 4 |
---|
5559 | typedef __darwin_off_t fpos_t; |
---|
5560 | |
---|
5561 | #define _FSTDIO |
---|
5562 | # 98 "/usr/include/stdio.h" 3 4 |
---|
5563 | struct __sbuf { |
---|
5564 | unsigned char *_base; |
---|
5565 | int _size; |
---|
5566 | }; |
---|
5567 | |
---|
5568 | |
---|
5569 | struct __sFILEX; |
---|
5570 | # 132 "/usr/include/stdio.h" 3 4 |
---|
5571 | typedef struct __sFILE { |
---|
5572 | unsigned char *_p; |
---|
5573 | int _r; |
---|
5574 | int _w; |
---|
5575 | short _flags; |
---|
5576 | short _file; |
---|
5577 | struct __sbuf _bf; |
---|
5578 | int _lbfsize; |
---|
5579 | |
---|
5580 | |
---|
5581 | void *_cookie; |
---|
5582 | int (*_close)(void *); |
---|
5583 | int (*_read) (void *, char *, int); |
---|
5584 | fpos_t (*_seek) (void *, fpos_t, int); |
---|
5585 | int (*_write)(void *, const char *, int); |
---|
5586 | |
---|
5587 | |
---|
5588 | struct __sbuf _ub; |
---|
5589 | struct __sFILEX *_extra; |
---|
5590 | int _ur; |
---|
5591 | |
---|
5592 | |
---|
5593 | unsigned char _ubuf[3]; |
---|
5594 | unsigned char _nbuf[1]; |
---|
5595 | |
---|
5596 | |
---|
5597 | struct __sbuf _lb; |
---|
5598 | |
---|
5599 | |
---|
5600 | int _blksize; |
---|
5601 | fpos_t _offset; |
---|
5602 | } FILE; |
---|
5603 | |
---|
5604 | |
---|
5605 | |
---|
5606 | extern FILE *__stdinp; |
---|
5607 | extern FILE *__stdoutp; |
---|
5608 | extern FILE *__stderrp; |
---|
5609 | |
---|
5610 | |
---|
5611 | |
---|
5612 | |
---|
5613 | |
---|
5614 | #define __SLBF 0x0001 |
---|
5615 | #define __SNBF 0x0002 |
---|
5616 | #define __SRD 0x0004 |
---|
5617 | #define __SWR 0x0008 |
---|
5618 | |
---|
5619 | #define __SRW 0x0010 |
---|
5620 | #define __SEOF 0x0020 |
---|
5621 | #define __SERR 0x0040 |
---|
5622 | #define __SMBF 0x0080 |
---|
5623 | #define __SAPP 0x0100 |
---|
5624 | #define __SSTR 0x0200 |
---|
5625 | #define __SOPT 0x0400 |
---|
5626 | #define __SNPT 0x0800 |
---|
5627 | #define __SOFF 0x1000 |
---|
5628 | #define __SMOD 0x2000 |
---|
5629 | #define __SALC 0x4000 |
---|
5630 | #define __SIGN 0x8000 |
---|
5631 | # 202 "/usr/include/stdio.h" 3 4 |
---|
5632 | #define _IOFBF 0 |
---|
5633 | #define _IOLBF 1 |
---|
5634 | #define _IONBF 2 |
---|
5635 | |
---|
5636 | #define BUFSIZ 1024 |
---|
5637 | #define EOF (-1) |
---|
5638 | |
---|
5639 | |
---|
5640 | |
---|
5641 | |
---|
5642 | |
---|
5643 | |
---|
5644 | |
---|
5645 | #define FOPEN_MAX 20 |
---|
5646 | #define FILENAME_MAX 1024 |
---|
5647 | |
---|
5648 | |
---|
5649 | |
---|
5650 | #define P_tmpdir "/var/tmp/" |
---|
5651 | |
---|
5652 | #define L_tmpnam 1024 |
---|
5653 | #define TMP_MAX 308915776 |
---|
5654 | # 236 "/usr/include/stdio.h" 3 4 |
---|
5655 | #define stdin __stdinp |
---|
5656 | #define stdout __stdoutp |
---|
5657 | #define stderr __stderrp |
---|
5658 | # 248 "/usr/include/stdio.h" 3 4 |
---|
5659 | |
---|
5660 | void clearerr(FILE *); |
---|
5661 | int fclose(FILE *); |
---|
5662 | int feof(FILE *); |
---|
5663 | int ferror(FILE *); |
---|
5664 | int fflush(FILE *); |
---|
5665 | int fgetc(FILE *); |
---|
5666 | int fgetpos(FILE * , fpos_t *); |
---|
5667 | char *fgets(char * , int, FILE *); |
---|
5668 | FILE *fopen(const char * , const char * ); |
---|
5669 | int fprintf(FILE * , const char * , ...) __asm("_" "fprintf" "$LDBL128"); |
---|
5670 | int fputc(int, FILE *); |
---|
5671 | int fputs(const char * , FILE * ) __asm("_" "fputs" "$UNIX2003"); |
---|
5672 | size_t fread(void * , size_t, size_t, FILE * ); |
---|
5673 | FILE *freopen(const char * , const char * , |
---|
5674 | FILE * ) __asm("_" "freopen" "$UNIX2003"); |
---|
5675 | int fscanf(FILE * , const char * , ...) __asm("_" "fscanf" "$LDBL128"); |
---|
5676 | int fseek(FILE *, long, int); |
---|
5677 | int fsetpos(FILE *, const fpos_t *); |
---|
5678 | long ftell(FILE *); |
---|
5679 | size_t fwrite(const void * , size_t, size_t, FILE * ) __asm("_" "fwrite" "$UNIX2003"); |
---|
5680 | int getc(FILE *); |
---|
5681 | int getchar(void); |
---|
5682 | char *gets(char *); |
---|
5683 | |
---|
5684 | extern const int sys_nerr; |
---|
5685 | extern const char *const sys_errlist[]; |
---|
5686 | |
---|
5687 | void perror(const char *); |
---|
5688 | int printf(const char * , ...) __asm("_" "printf" "$LDBL128"); |
---|
5689 | int putc(int, FILE *); |
---|
5690 | int putchar(int); |
---|
5691 | int puts(const char *); |
---|
5692 | int remove(const char *); |
---|
5693 | int rename (const char *, const char *); |
---|
5694 | void rewind(FILE *); |
---|
5695 | int scanf(const char * , ...) __asm("_" "scanf" "$LDBL128"); |
---|
5696 | void setbuf(FILE * , char * ); |
---|
5697 | int setvbuf(FILE * , char * , int, size_t); |
---|
5698 | int sprintf(char * , const char * , ...) __asm("_" "sprintf" "$LDBL128"); |
---|
5699 | int sscanf(const char * , const char * , ...) __asm("_" "sscanf" "$LDBL128"); |
---|
5700 | FILE *tmpfile(void); |
---|
5701 | char *tmpnam(char *); |
---|
5702 | int ungetc(int, FILE *); |
---|
5703 | int vfprintf(FILE * , const char * , va_list) __asm("_" "vfprintf" "$LDBL128"); |
---|
5704 | int vprintf(const char * , va_list) __asm("_" "vprintf" "$LDBL128"); |
---|
5705 | int vsprintf(char * , const char * , va_list) __asm("_" "vsprintf" "$LDBL128"); |
---|
5706 | |
---|
5707 | int asprintf(char **, const char *, ...) __asm("_" "asprintf" "$LDBL128"); |
---|
5708 | int vasprintf(char **, const char *, va_list) __asm("_" "vasprintf" "$LDBL128"); |
---|
5709 | |
---|
5710 | |
---|
5711 | |
---|
5712 | |
---|
5713 | |
---|
5714 | |
---|
5715 | |
---|
5716 | #define L_ctermid 1024 |
---|
5717 | |
---|
5718 | |
---|
5719 | char *ctermid(char *); |
---|
5720 | |
---|
5721 | char *ctermid_r(char *); |
---|
5722 | |
---|
5723 | FILE *fdopen(int, const char *); |
---|
5724 | |
---|
5725 | char *fgetln(FILE *, size_t *); |
---|
5726 | |
---|
5727 | int fileno(FILE *); |
---|
5728 | void flockfile(FILE *); |
---|
5729 | |
---|
5730 | const char |
---|
5731 | *fmtcheck(const char *, const char *); |
---|
5732 | int fpurge(FILE *); |
---|
5733 | |
---|
5734 | int fseeko(FILE *, off_t, int); |
---|
5735 | off_t ftello(FILE *); |
---|
5736 | int ftrylockfile(FILE *); |
---|
5737 | void funlockfile(FILE *); |
---|
5738 | int getc_unlocked(FILE *); |
---|
5739 | int getchar_unlocked(void); |
---|
5740 | |
---|
5741 | int getw(FILE *); |
---|
5742 | |
---|
5743 | int pclose(FILE *); |
---|
5744 | FILE *popen(const char *, const char *); |
---|
5745 | int putc_unlocked(int, FILE *); |
---|
5746 | int putchar_unlocked(int); |
---|
5747 | |
---|
5748 | int putw(int, FILE *); |
---|
5749 | void setbuffer(FILE *, char *, int); |
---|
5750 | int setlinebuf(FILE *); |
---|
5751 | |
---|
5752 | int snprintf(char * , size_t, const char * , ...) __asm("_" "snprintf" "$LDBL128"); |
---|
5753 | char *tempnam(const char *, const char *) __asm("_" "tempnam" "$UNIX2003"); |
---|
5754 | int vfscanf(FILE * , const char * , va_list) __asm("_" "vfscanf" "$LDBL128"); |
---|
5755 | int vscanf(const char * , va_list) __asm("_" "vscanf" "$LDBL128"); |
---|
5756 | int vsnprintf(char * , size_t, const char * , va_list) __asm("_" "vsnprintf" "$LDBL128"); |
---|
5757 | int vsscanf(const char * , const char * , va_list) __asm("_" "vsscanf" "$LDBL128"); |
---|
5758 | |
---|
5759 | FILE *zopen(const char *, const char *, int); |
---|
5760 | |
---|
5761 | |
---|
5762 | |
---|
5763 | |
---|
5764 | |
---|
5765 | |
---|
5766 | |
---|
5767 | |
---|
5768 | FILE *funopen(const void *, |
---|
5769 | int (*)(void *, char *, int), |
---|
5770 | int (*)(void *, const char *, int), |
---|
5771 | fpos_t (*)(void *, fpos_t, int), |
---|
5772 | int (*)(void *)); |
---|
5773 | |
---|
5774 | #define fropen(cookie,fn) funopen(cookie, fn, 0, 0, 0) |
---|
5775 | #define fwopen(cookie,fn) funopen(cookie, 0, fn, 0, 0) |
---|
5776 | |
---|
5777 | |
---|
5778 | |
---|
5779 | |
---|
5780 | |
---|
5781 | |
---|
5782 | |
---|
5783 | int __srget(FILE *); |
---|
5784 | int __svfscanf(FILE *, const char *, va_list) __asm("_" "__svfscanf" "$LDBL128"); |
---|
5785 | int __swbuf(int, FILE *); |
---|
5786 | |
---|
5787 | |
---|
5788 | |
---|
5789 | |
---|
5790 | |
---|
5791 | |
---|
5792 | #define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) |
---|
5793 | |
---|
5794 | static __inline int __sputc(int _c, FILE *_p) { |
---|
5795 | if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) |
---|
5796 | return (*_p->_p++ = _c); |
---|
5797 | else |
---|
5798 | return (__swbuf(_c, _p)); |
---|
5799 | } |
---|
5800 | # 403 "/usr/include/stdio.h" 3 4 |
---|
5801 | #define __sfeof(p) (((p)->_flags & __SEOF) != 0) |
---|
5802 | #define __sferror(p) (((p)->_flags & __SERR) != 0) |
---|
5803 | #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) |
---|
5804 | #define __sfileno(p) ((p)->_file) |
---|
5805 | |
---|
5806 | |
---|
5807 | |
---|
5808 | #define feof_unlocked(p) __sfeof(p) |
---|
5809 | #define ferror_unlocked(p) __sferror(p) |
---|
5810 | #define clearerr_unlocked(p) __sclearerr(p) |
---|
5811 | #define fileno_unlocked(p) __sfileno(p) |
---|
5812 | |
---|
5813 | |
---|
5814 | |
---|
5815 | #define getc_unlocked(fp) __sgetc(fp) |
---|
5816 | #define putc_unlocked(x,fp) __sputc(x, fp) |
---|
5817 | |
---|
5818 | |
---|
5819 | #define getchar_unlocked() getc_unlocked(stdin) |
---|
5820 | #define putchar_unlocked(x) putc_unlocked(x, stdout) |
---|
5821 | |
---|
5822 | |
---|
5823 | |
---|
5824 | # 1 "/usr/include/xlocale/_stdio.h" 1 3 4 |
---|
5825 | # 25 "/usr/include/xlocale/_stdio.h" 3 4 |
---|
5826 | #define _XLOCALE__STDIO_H_ |
---|
5827 | |
---|
5828 | |
---|
5829 | int asprintf_l(char **, locale_t, const char *, ...) |
---|
5830 | __asm("_" "asprintf_l" "$LDBL128"); |
---|
5831 | int fprintf_l(FILE * , locale_t, const char * , ...) |
---|
5832 | __asm("_" "fprintf_l" "$LDBL128"); |
---|
5833 | int fscanf_l(FILE * , locale_t, const char * , ...) |
---|
5834 | __asm("_" "fscanf_l" "$LDBL128"); |
---|
5835 | int printf_l(locale_t, const char * , ...) |
---|
5836 | __asm("_" "printf_l" "$LDBL128"); |
---|
5837 | int scanf_l(locale_t, const char * , ...) |
---|
5838 | __asm("_" "scanf_l" "$LDBL128"); |
---|
5839 | int snprintf_l(char * , size_t, locale_t, |
---|
5840 | const char * , ...) __asm("_" "snprintf_l" "$LDBL128"); |
---|
5841 | int sprintf_l(char * , locale_t, const char * , ...) |
---|
5842 | __asm("_" "sprintf_l" "$LDBL128"); |
---|
5843 | int sscanf_l(const char * , locale_t, const char * , |
---|
5844 | ...) __asm("_" "sscanf_l" "$LDBL128"); |
---|
5845 | int vasprintf_l(char **, locale_t, const char *, va_list) |
---|
5846 | __asm("_" "vasprintf_l" "$LDBL128"); |
---|
5847 | int vfprintf_l(FILE * , locale_t, const char * , |
---|
5848 | va_list) __asm("_" "vfprintf_l" "$LDBL128"); |
---|
5849 | int vfscanf_l(FILE * , locale_t, const char * , |
---|
5850 | va_list) __asm("_" "vfscanf_l" "$LDBL128"); |
---|
5851 | int vprintf_l(locale_t, const char * , va_list) |
---|
5852 | __asm("_" "vprintf_l" "$LDBL128"); |
---|
5853 | int vscanf_l(locale_t, const char * , va_list) |
---|
5854 | __asm("_" "vscanf_l" "$LDBL128"); |
---|
5855 | int vsnprintf_l(char * , size_t, locale_t, |
---|
5856 | const char * , va_list) |
---|
5857 | __asm("_" "vsnprintf_l" "$LDBL128"); |
---|
5858 | int vsprintf_l(char * , locale_t, const char * , |
---|
5859 | va_list) __asm("_" "vsprintf_l" "$LDBL128"); |
---|
5860 | int vsscanf_l(const char * , locale_t, const char * , |
---|
5861 | va_list) __asm("_" "vsscanf_l" "$LDBL128"); |
---|
5862 | |
---|
5863 | # 427 "/usr/include/stdio.h" 2 3 4 |
---|
5864 | # 27 "/opt/local/include/LegacySupport/stdio.h" 2 |
---|
5865 | |
---|
5866 | |
---|
5867 | |
---|
5868 | |
---|
5869 | |
---|
5870 | extern int dprintf(int fd, const char * format, ...); |
---|
5871 | |
---|
5872 | # 54 "/opt/local/include/LegacySupport/stdio.h" |
---|
5873 | |
---|
5874 | extern ssize_t getdelim(char **lineptr, size_t *n, int delimiter, FILE *fp); |
---|
5875 | extern ssize_t getline (char **lineptr, size_t *n, FILE *stream); |
---|
5876 | |
---|
5877 | # 78 "/opt/local/include/LegacySupport/stdio.h" |
---|
5878 | |
---|
5879 | extern int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); |
---|
5880 | |
---|
5881 | # 14 "./include/c.h" 2 |
---|
5882 | |
---|
5883 | # 1 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdarg.h" 1 3 4 |
---|
5884 | # 34 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdarg.h" 3 4 |
---|
5885 | #define _STDARG_H |
---|
5886 | #define _ANSI_STDARG_H_ |
---|
5887 | |
---|
5888 | #undef __need___va_list |
---|
5889 | |
---|
5890 | |
---|
5891 | |
---|
5892 | |
---|
5893 | #define __GNUC_VA_LIST |
---|
5894 | typedef __builtin_va_list __gnuc_va_list; |
---|
5895 | |
---|
5896 | |
---|
5897 | |
---|
5898 | |
---|
5899 | |
---|
5900 | |
---|
5901 | #define va_start(v,l) __builtin_va_start(v,l) |
---|
5902 | #define va_end(v) __builtin_va_end(v) |
---|
5903 | #define va_arg(v,l) __builtin_va_arg(v,l) |
---|
5904 | |
---|
5905 | #define va_copy(d,s) __builtin_va_copy(d,s) |
---|
5906 | |
---|
5907 | #define __va_copy(d,s) __builtin_va_copy(d,s) |
---|
5908 | # 111 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdarg.h" 3 4 |
---|
5909 | #define _VA_LIST_ |
---|
5910 | |
---|
5911 | |
---|
5912 | |
---|
5913 | |
---|
5914 | |
---|
5915 | #define _VA_LIST_DEFINED |
---|
5916 | |
---|
5917 | |
---|
5918 | #define _VA_LIST_T_H |
---|
5919 | |
---|
5920 | |
---|
5921 | #define __va_list__ |
---|
5922 | # 16 "./include/c.h" 2 |
---|
5923 | # 1 "/opt/local/include/LegacySupport/stdlib.h" 1 |
---|
5924 | # 19 "/opt/local/include/LegacySupport/stdlib.h" |
---|
5925 | #define _MACPORTS_STDLIB_H_ |
---|
5926 | |
---|
5927 | |
---|
5928 | |
---|
5929 | |
---|
5930 | |
---|
5931 | # 1 "/usr/include/stdlib.h" 1 3 4 |
---|
5932 | # 59 "/usr/include/stdlib.h" 3 4 |
---|
5933 | #define _STDLIB_H_ |
---|
5934 | |
---|
5935 | # 1 "/usr/include/available.h" 1 3 4 |
---|
5936 | # 66 "/usr/include/available.h" 3 4 |
---|
5937 | #define _AVAILABLE_H_ |
---|
5938 | |
---|
5939 | |
---|
5940 | |
---|
5941 | |
---|
5942 | |
---|
5943 | #define __MAC_OS_X_VERSION_10_0 1000 |
---|
5944 | #define __MAC_OS_X_VERSION_10_1 1010 |
---|
5945 | #define __MAC_OS_X_VERSION_10_2 1020 |
---|
5946 | #define __MAC_OS_X_VERSION_10_3 1030 |
---|
5947 | #define __MAC_OS_X_VERSION_10_4 1040 |
---|
5948 | #define __MAC_OS_X_VERSION_10_5 1050 |
---|
5949 | # 86 "/usr/include/available.h" 3 4 |
---|
5950 | #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ |
---|
5951 | # 101 "/usr/include/available.h" 3 4 |
---|
5952 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_OS_X_VERSION_MIN_REQUIRED |
---|
5953 | # 121 "/usr/include/available.h" 3 4 |
---|
5954 | #define __DARWIN_WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import)) |
---|
5955 | # 132 "/usr/include/available.h" 3 4 |
---|
5956 | #define __DARWIN_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) |
---|
5957 | # 141 "/usr/include/available.h" 3 4 |
---|
5958 | #define __DARWIN_UNAVAILABLE_ATTRIBUTE __attribute__((unavailable)) |
---|
5959 | # 153 "/usr/include/available.h" 3 4 |
---|
5960 | #define __AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER |
---|
5961 | |
---|
5962 | |
---|
5963 | |
---|
5964 | |
---|
5965 | |
---|
5966 | |
---|
5967 | |
---|
5968 | #define __AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5969 | |
---|
5970 | |
---|
5971 | |
---|
5972 | |
---|
5973 | |
---|
5974 | |
---|
5975 | #define __DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5976 | # 185 "/usr/include/available.h" 3 4 |
---|
5977 | #define __AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER |
---|
5978 | # 195 "/usr/include/available.h" 3 4 |
---|
5979 | #define __AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5980 | # 207 "/usr/include/available.h" 3 4 |
---|
5981 | #define __AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5982 | # 218 "/usr/include/available.h" 3 4 |
---|
5983 | #define __DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5984 | # 239 "/usr/include/available.h" 3 4 |
---|
5985 | #define __AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER |
---|
5986 | # 249 "/usr/include/available.h" 3 4 |
---|
5987 | #define __AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5988 | # 261 "/usr/include/available.h" 3 4 |
---|
5989 | #define __AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5990 | # 273 "/usr/include/available.h" 3 4 |
---|
5991 | #define __AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5992 | # 284 "/usr/include/available.h" 3 4 |
---|
5993 | #define __DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5994 | # 303 "/usr/include/available.h" 3 4 |
---|
5995 | #define __AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER |
---|
5996 | # 313 "/usr/include/available.h" 3 4 |
---|
5997 | #define __AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED __DARWIN_DEPRECATED_ATTRIBUTE |
---|
5998 | # 325 "/usr/include/available.h" 3 4 |
---|
5999 | #define __AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6000 | # 337 "/usr/include/available.h" 3 4 |
---|
6001 | #define __AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6002 | # 349 "/usr/include/available.h" 3 4 |
---|
6003 | #define __AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6004 | # 360 "/usr/include/available.h" 3 4 |
---|
6005 | #define __DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6006 | # 380 "/usr/include/available.h" 3 4 |
---|
6007 | #define __AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER |
---|
6008 | # 390 "/usr/include/available.h" 3 4 |
---|
6009 | #define __AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6010 | # 402 "/usr/include/available.h" 3 4 |
---|
6011 | #define __AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6012 | # 414 "/usr/include/available.h" 3 4 |
---|
6013 | #define __AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6014 | # 426 "/usr/include/available.h" 3 4 |
---|
6015 | #define __AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6016 | # 438 "/usr/include/available.h" 3 4 |
---|
6017 | #define __AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6018 | # 449 "/usr/include/available.h" 3 4 |
---|
6019 | #define __DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6020 | # 468 "/usr/include/available.h" 3 4 |
---|
6021 | #define __AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER |
---|
6022 | # 478 "/usr/include/available.h" 3 4 |
---|
6023 | #define __AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6024 | # 490 "/usr/include/available.h" 3 4 |
---|
6025 | #define __AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6026 | # 502 "/usr/include/available.h" 3 4 |
---|
6027 | #define __AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6028 | # 514 "/usr/include/available.h" 3 4 |
---|
6029 | #define __AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6030 | # 526 "/usr/include/available.h" 3 4 |
---|
6031 | #define __AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6032 | # 538 "/usr/include/available.h" 3 4 |
---|
6033 | #define __AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6034 | # 549 "/usr/include/available.h" 3 4 |
---|
6035 | #define __DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER __DARWIN_DEPRECATED_ATTRIBUTE |
---|
6036 | # 62 "/usr/include/stdlib.h" 2 3 4 |
---|
6037 | |
---|
6038 | |
---|
6039 | |
---|
6040 | # 1 "/usr/include/sys/wait.h" 1 3 4 |
---|
6041 | # 65 "/usr/include/sys/wait.h" 3 4 |
---|
6042 | #define _SYS_WAIT_H_ |
---|
6043 | # 79 "/usr/include/sys/wait.h" 3 4 |
---|
6044 | typedef enum { |
---|
6045 | P_ALL, |
---|
6046 | P_PID, |
---|
6047 | P_PGID |
---|
6048 | } idtype_t; |
---|
6049 | # 128 "/usr/include/sys/wait.h" 3 4 |
---|
6050 | #define WNOHANG 0x00000001 |
---|
6051 | #define WUNTRACED 0x00000002 |
---|
6052 | # 138 "/usr/include/sys/wait.h" 3 4 |
---|
6053 | #define _W_INT(w) (*(int *)&(w)) |
---|
6054 | #define WCOREFLAG 0200 |
---|
6055 | |
---|
6056 | |
---|
6057 | |
---|
6058 | #define _WSTATUS(x) (_W_INT(x) & 0177) |
---|
6059 | #define _WSTOPPED 0177 |
---|
6060 | |
---|
6061 | |
---|
6062 | |
---|
6063 | |
---|
6064 | |
---|
6065 | |
---|
6066 | #define WEXITSTATUS(x) ((_W_INT(x) >> 8) & 0x000000ff) |
---|
6067 | |
---|
6068 | |
---|
6069 | |
---|
6070 | |
---|
6071 | #define WSTOPSIG(x) (_W_INT(x) >> 8) |
---|
6072 | #define WIFCONTINUED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) == 0x13) |
---|
6073 | #define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED && WSTOPSIG(x) != 0x13) |
---|
6074 | #define WIFEXITED(x) (_WSTATUS(x) == 0) |
---|
6075 | #define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0) |
---|
6076 | #define WTERMSIG(x) (_WSTATUS(x)) |
---|
6077 | |
---|
6078 | #define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG) |
---|
6079 | |
---|
6080 | #define W_EXITCODE(ret,sig) ((ret) << 8 | (sig)) |
---|
6081 | #define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED) |
---|
6082 | # 175 "/usr/include/sys/wait.h" 3 4 |
---|
6083 | #define WEXITED 0x00000004 |
---|
6084 | |
---|
6085 | |
---|
6086 | #define WSTOPPED 0x00000008 |
---|
6087 | |
---|
6088 | #define WCONTINUED 0x00000010 |
---|
6089 | #define WNOWAIT 0x00000020 |
---|
6090 | # 190 "/usr/include/sys/wait.h" 3 4 |
---|
6091 | #define WAIT_ANY (-1) |
---|
6092 | #define WAIT_MYPGRP 0 |
---|
6093 | # 201 "/usr/include/sys/wait.h" 3 4 |
---|
6094 | union wait { |
---|
6095 | int w_status; |
---|
6096 | |
---|
6097 | |
---|
6098 | |
---|
6099 | struct { |
---|
6100 | |
---|
6101 | |
---|
6102 | |
---|
6103 | |
---|
6104 | |
---|
6105 | |
---|
6106 | |
---|
6107 | unsigned int w_Filler:16, |
---|
6108 | w_Retcode:8, |
---|
6109 | w_Coredump:1, |
---|
6110 | w_Termsig:7; |
---|
6111 | |
---|
6112 | } w_T; |
---|
6113 | |
---|
6114 | |
---|
6115 | |
---|
6116 | |
---|
6117 | |
---|
6118 | struct { |
---|
6119 | |
---|
6120 | |
---|
6121 | |
---|
6122 | |
---|
6123 | |
---|
6124 | |
---|
6125 | unsigned int w_Filler:16, |
---|
6126 | w_Stopsig:8, |
---|
6127 | w_Stopval:8; |
---|
6128 | |
---|
6129 | } w_S; |
---|
6130 | }; |
---|
6131 | #define w_termsig w_T.w_Termsig |
---|
6132 | #define w_coredump w_T.w_Coredump |
---|
6133 | #define w_retcode w_T.w_Retcode |
---|
6134 | #define w_stopval w_S.w_Stopval |
---|
6135 | #define w_stopsig w_S.w_Stopsig |
---|
6136 | # 254 "/usr/include/sys/wait.h" 3 4 |
---|
6137 | |
---|
6138 | pid_t wait(int *) __asm("_" "wait" "$UNIX2003"); |
---|
6139 | pid_t waitpid(pid_t, int *, int) __asm("_" "waitpid" "$UNIX2003"); |
---|
6140 | |
---|
6141 | int waitid(idtype_t, id_t, siginfo_t *, int) __asm("_" "waitid" "$UNIX2003"); |
---|
6142 | |
---|
6143 | |
---|
6144 | pid_t wait3(int *, int, struct rusage *); |
---|
6145 | pid_t wait4(pid_t, int *, int, struct rusage *); |
---|
6146 | |
---|
6147 | |
---|
6148 | # 66 "/usr/include/stdlib.h" 2 3 4 |
---|
6149 | |
---|
6150 | # 1 "/usr/include/alloca.h" 1 3 4 |
---|
6151 | # 25 "/usr/include/alloca.h" 3 4 |
---|
6152 | #define _ALLOCA_H_ |
---|
6153 | # 35 "/usr/include/alloca.h" 3 4 |
---|
6154 | |
---|
6155 | void *alloca(size_t); |
---|
6156 | |
---|
6157 | |
---|
6158 | |
---|
6159 | |
---|
6160 | #undef alloca |
---|
6161 | #undef __alloca |
---|
6162 | #define alloca(size) __alloca(size) |
---|
6163 | #define __alloca(size) __builtin_alloca(size) |
---|
6164 | # 68 "/usr/include/stdlib.h" 2 3 4 |
---|
6165 | # 97 "/usr/include/stdlib.h" 3 4 |
---|
6166 | typedef struct { |
---|
6167 | int quot; |
---|
6168 | int rem; |
---|
6169 | } div_t; |
---|
6170 | |
---|
6171 | typedef struct { |
---|
6172 | long quot; |
---|
6173 | long rem; |
---|
6174 | } ldiv_t; |
---|
6175 | |
---|
6176 | |
---|
6177 | typedef struct { |
---|
6178 | long long quot; |
---|
6179 | long long rem; |
---|
6180 | } lldiv_t; |
---|
6181 | |
---|
6182 | |
---|
6183 | |
---|
6184 | |
---|
6185 | |
---|
6186 | |
---|
6187 | #define EXIT_FAILURE 1 |
---|
6188 | #define EXIT_SUCCESS 0 |
---|
6189 | |
---|
6190 | #define RAND_MAX 0x7fffffff |
---|
6191 | |
---|
6192 | |
---|
6193 | |
---|
6194 | |
---|
6195 | |
---|
6196 | |
---|
6197 | |
---|
6198 | #define MB_CUR_MAX (___mb_cur_max()) |
---|
6199 | |
---|
6200 | #define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) |
---|
6201 | # 144 "/usr/include/stdlib.h" 3 4 |
---|
6202 | |
---|
6203 | void abort(void) __attribute__((__noreturn__)); |
---|
6204 | int abs(int) __attribute__((__const__)); |
---|
6205 | int atexit(void (*)(void)); |
---|
6206 | double atof(const char *); |
---|
6207 | int atoi(const char *); |
---|
6208 | long atol(const char *); |
---|
6209 | |
---|
6210 | long long |
---|
6211 | atoll(const char *); |
---|
6212 | |
---|
6213 | void *bsearch(const void *, const void *, size_t, |
---|
6214 | size_t, int (*)(const void *, const void *)); |
---|
6215 | void *calloc(size_t, size_t); |
---|
6216 | div_t div(int, int) __attribute__((__const__)); |
---|
6217 | void exit(int) __attribute__((__noreturn__)); |
---|
6218 | void free(void *); |
---|
6219 | char *getenv(const char *); |
---|
6220 | long labs(long) __attribute__((__const__)); |
---|
6221 | ldiv_t ldiv(long, long) __attribute__((__const__)); |
---|
6222 | |
---|
6223 | long long |
---|
6224 | llabs(long long); |
---|
6225 | lldiv_t lldiv(long long, long long); |
---|
6226 | |
---|
6227 | void *malloc(size_t); |
---|
6228 | int mblen(const char *, size_t); |
---|
6229 | size_t mbstowcs(wchar_t * , const char * , size_t); |
---|
6230 | int mbtowc(wchar_t * , const char * , size_t); |
---|
6231 | void qsort(void *, size_t, size_t, |
---|
6232 | int (*)(const void *, const void *)); |
---|
6233 | int rand(void); |
---|
6234 | void *realloc(void *, size_t); |
---|
6235 | void srand(unsigned); |
---|
6236 | double strtod(const char *, char **) __asm("_" "strtod" "$UNIX2003"); |
---|
6237 | float strtof(const char *, char **) __asm("_" "strtof" "$UNIX2003"); |
---|
6238 | long strtol(const char *, char **, int); |
---|
6239 | long double |
---|
6240 | strtold(const char *, char **) __asm("_" "strtold" "$LDBL128"); |
---|
6241 | |
---|
6242 | long long |
---|
6243 | strtoll(const char *, char **, int); |
---|
6244 | |
---|
6245 | unsigned long |
---|
6246 | strtoul(const char *, char **, int); |
---|
6247 | |
---|
6248 | unsigned long long |
---|
6249 | strtoull(const char *, char **, int); |
---|
6250 | |
---|
6251 | int system(const char *) __asm("_" "system" "$UNIX2003"); |
---|
6252 | size_t wcstombs(char * , const wchar_t * , size_t); |
---|
6253 | int wctomb(char *, wchar_t); |
---|
6254 | |
---|
6255 | |
---|
6256 | void _Exit(int) __attribute__((__noreturn__)); |
---|
6257 | long a64l(const char *); |
---|
6258 | double drand48(void); |
---|
6259 | char *ecvt(double, int, int *, int *); |
---|
6260 | double erand48(unsigned short[3]); |
---|
6261 | char *fcvt(double, int, int *, int *); |
---|
6262 | char *gcvt(double, int, char *); |
---|
6263 | int getsubopt(char **, char * const *, char **); |
---|
6264 | int grantpt(int); |
---|
6265 | |
---|
6266 | char *initstate(unsigned, char *, size_t); |
---|
6267 | |
---|
6268 | |
---|
6269 | |
---|
6270 | long jrand48(unsigned short[3]); |
---|
6271 | char *l64a(long); |
---|
6272 | void lcong48(unsigned short[7]); |
---|
6273 | long lrand48(void); |
---|
6274 | char *mktemp(char *); |
---|
6275 | int mkstemp(char *); |
---|
6276 | long mrand48(void); |
---|
6277 | long nrand48(unsigned short[3]); |
---|
6278 | int posix_openpt(int); |
---|
6279 | char *ptsname(int); |
---|
6280 | int putenv(char *) __asm("_" "putenv" "$UNIX2003"); |
---|
6281 | long random(void); |
---|
6282 | int rand_r(unsigned *); |
---|
6283 | |
---|
6284 | char *realpath(const char * , char * ) __asm("_" "realpath" "$DARWIN_EXTSN"); |
---|
6285 | |
---|
6286 | |
---|
6287 | |
---|
6288 | unsigned short |
---|
6289 | *seed48(unsigned short[3]); |
---|
6290 | int setenv(const char *, const char *, int) __asm("_" "setenv" "$UNIX2003"); |
---|
6291 | |
---|
6292 | void setkey(const char *) __asm("_" "setkey" "$UNIX2003"); |
---|
6293 | |
---|
6294 | |
---|
6295 | |
---|
6296 | char *setstate(const char *); |
---|
6297 | void srand48(long); |
---|
6298 | |
---|
6299 | void srandom(unsigned); |
---|
6300 | |
---|
6301 | |
---|
6302 | |
---|
6303 | int unlockpt(int); |
---|
6304 | |
---|
6305 | int unsetenv(const char *) __asm("_" "unsetenv" "$UNIX2003"); |
---|
6306 | # 266 "/usr/include/stdlib.h" 3 4 |
---|
6307 | u_int32_t |
---|
6308 | arc4random(void); |
---|
6309 | void arc4random_addrandom(unsigned char *dat, int datlen); |
---|
6310 | void arc4random_stir(void); |
---|
6311 | |
---|
6312 | |
---|
6313 | char *cgetcap(char *, const char *, int); |
---|
6314 | int cgetclose(void); |
---|
6315 | int cgetent(char **, char **, const char *); |
---|
6316 | int cgetfirst(char **, char **); |
---|
6317 | int cgetmatch(const char *, const char *); |
---|
6318 | int cgetnext(char **, char **); |
---|
6319 | int cgetnum(char *, const char *, long *); |
---|
6320 | int cgetset(const char *); |
---|
6321 | int cgetstr(char *, const char *, char **); |
---|
6322 | int cgetustr(char *, const char *, char **); |
---|
6323 | |
---|
6324 | int daemon(int, int) __asm("_" "daemon" "$1050") __attribute__((deprecated)); |
---|
6325 | char *devname(dev_t, mode_t); |
---|
6326 | char *devname_r(dev_t, mode_t, char *buf, int len); |
---|
6327 | char *getbsize(int *, long *); |
---|
6328 | int getloadavg(double [], int); |
---|
6329 | const char |
---|
6330 | *getprogname(void); |
---|
6331 | |
---|
6332 | int heapsort(void *, size_t, size_t, |
---|
6333 | int (*)(const void *, const void *)); |
---|
6334 | int mergesort(void *, size_t, size_t, |
---|
6335 | int (*)(const void *, const void *)); |
---|
6336 | void qsort_r(void *, size_t, size_t, void *, |
---|
6337 | int (*)(void *, const void *, const void *)); |
---|
6338 | int radixsort(const unsigned char **, int, const unsigned char *, |
---|
6339 | unsigned); |
---|
6340 | void setprogname(const char *); |
---|
6341 | int sradixsort(const unsigned char **, int, const unsigned char *, |
---|
6342 | unsigned); |
---|
6343 | void sranddev(void); |
---|
6344 | void srandomdev(void); |
---|
6345 | void *reallocf(void *, size_t); |
---|
6346 | |
---|
6347 | long long |
---|
6348 | strtoq(const char *, char **, int); |
---|
6349 | unsigned long long |
---|
6350 | strtouq(const char *, char **, int); |
---|
6351 | |
---|
6352 | extern char *suboptarg; |
---|
6353 | void *valloc(size_t); |
---|
6354 | |
---|
6355 | |
---|
6356 | |
---|
6357 | |
---|
6358 | |
---|
6359 | |
---|
6360 | |
---|
6361 | |
---|
6362 | |
---|
6363 | # 1 "/usr/include/xlocale/_stdlib.h" 1 3 4 |
---|
6364 | # 25 "/usr/include/xlocale/_stdlib.h" 3 4 |
---|
6365 | #define _XLOCALE__STDLIB_H_ |
---|
6366 | |
---|
6367 | |
---|
6368 | double atof_l(const char *, locale_t); |
---|
6369 | int atoi_l(const char *, locale_t); |
---|
6370 | long atol_l(const char *, locale_t); |
---|
6371 | |
---|
6372 | long long |
---|
6373 | atoll_l(const char *, locale_t); |
---|
6374 | |
---|
6375 | int mblen_l(const char *, size_t, locale_t); |
---|
6376 | size_t mbstowcs_l(wchar_t * , const char * , size_t, |
---|
6377 | locale_t); |
---|
6378 | int mbtowc_l(wchar_t * , const char * , size_t, |
---|
6379 | locale_t); |
---|
6380 | double strtod_l(const char *, char **, locale_t) __asm("_" "strtod_l" "$UNIX2003"); |
---|
6381 | float strtof_l(const char *, char **, locale_t) __asm("_" "strtof_l" "$UNIX2003"); |
---|
6382 | long strtol_l(const char *, char **, int, locale_t); |
---|
6383 | long double |
---|
6384 | strtold_l(const char *, char **, locale_t) |
---|
6385 | __asm("_" "strtold_l" "$LDBL128"); |
---|
6386 | long long |
---|
6387 | strtoll_l(const char *, char **, int, locale_t); |
---|
6388 | |
---|
6389 | long long |
---|
6390 | strtoq_l(const char *, char **, int, locale_t); |
---|
6391 | |
---|
6392 | unsigned long |
---|
6393 | strtoul_l(const char *, char **, int, locale_t); |
---|
6394 | unsigned long long |
---|
6395 | strtoull_l(const char *, char **, int, locale_t); |
---|
6396 | |
---|
6397 | unsigned long long |
---|
6398 | strtouq_l(const char *, char **, int, locale_t); |
---|
6399 | |
---|
6400 | size_t wcstombs_l(char * , const wchar_t * , size_t, |
---|
6401 | locale_t); |
---|
6402 | int wctomb_l(char *, wchar_t, locale_t); |
---|
6403 | |
---|
6404 | |
---|
6405 | |
---|
6406 | |
---|
6407 | |
---|
6408 | |
---|
6409 | # 323 "/usr/include/stdlib.h" 2 3 4 |
---|
6410 | # 26 "/opt/local/include/LegacySupport/stdlib.h" 2 |
---|
6411 | # 44 "/opt/local/include/LegacySupport/stdlib.h" |
---|
6412 | |
---|
6413 | extern int posix_memalign(void **memptr, size_t alignment, size_t size); |
---|
6414 | |
---|
6415 | # 66 "/opt/local/include/LegacySupport/stdlib.h" |
---|
6416 | |
---|
6417 | extern uint32_t arc4random_uniform( uint32_t upper_bound ); |
---|
6418 | |
---|
6419 | |
---|
6420 | |
---|
6421 | |
---|
6422 | |
---|
6423 | |
---|
6424 | extern void arc4random_buf( void* buf, size_t n ); |
---|
6425 | |
---|
6426 | # 17 "./include/c.h" 2 |
---|
6427 | # 1 "/opt/local/include/LegacySupport/string.h" 1 |
---|
6428 | # 19 "/opt/local/include/LegacySupport/string.h" |
---|
6429 | #define _MACPORTS_STRING_H_ |
---|
6430 | |
---|
6431 | |
---|
6432 | |
---|
6433 | |
---|
6434 | |
---|
6435 | # 1 "/usr/include/string.h" 1 3 4 |
---|
6436 | # 59 "/usr/include/string.h" 3 4 |
---|
6437 | #define _STRING_H_ |
---|
6438 | # 80 "/usr/include/string.h" 3 4 |
---|
6439 | |
---|
6440 | void *memchr(const void *, int, size_t); |
---|
6441 | int memcmp(const void *, const void *, size_t); |
---|
6442 | void *memcpy(void *, const void *, size_t); |
---|
6443 | void *memmove(void *, const void *, size_t); |
---|
6444 | void *memset(void *, int, size_t); |
---|
6445 | |
---|
6446 | char *stpcpy(char *, const char *); |
---|
6447 | char *strcasestr(const char *, const char *); |
---|
6448 | |
---|
6449 | char *strcat(char *, const char *); |
---|
6450 | char *strchr(const char *, int); |
---|
6451 | int strcmp(const char *, const char *); |
---|
6452 | int strcoll(const char *, const char *); |
---|
6453 | char *strcpy(char *, const char *); |
---|
6454 | size_t strcspn(const char *, const char *); |
---|
6455 | char *strerror(int) __asm("_" "strerror" "$UNIX2003"); |
---|
6456 | int strerror_r(int, char *, size_t); |
---|
6457 | size_t strlen(const char *); |
---|
6458 | char *strncat(char *, const char *, size_t); |
---|
6459 | int strncmp(const char *, const char *, size_t); |
---|
6460 | char *strncpy(char *, const char *, size_t); |
---|
6461 | |
---|
6462 | char *strnstr(const char *, const char *, size_t); |
---|
6463 | |
---|
6464 | char *strpbrk(const char *, const char *); |
---|
6465 | char *strrchr(const char *, int); |
---|
6466 | size_t strspn(const char *, const char *); |
---|
6467 | char *strstr(const char *, const char *); |
---|
6468 | char *strtok(char *, const char *); |
---|
6469 | size_t strxfrm(char *, const char *, size_t); |
---|
6470 | |
---|
6471 | |
---|
6472 | |
---|
6473 | void *memccpy(void *, const void *, int, size_t); |
---|
6474 | char *strtok_r(char *, const char *, char **); |
---|
6475 | char *strdup(const char *); |
---|
6476 | |
---|
6477 | int bcmp(const void *, const void *, size_t); |
---|
6478 | void bcopy(const void *, void *, size_t); |
---|
6479 | void bzero(void *, size_t); |
---|
6480 | int ffs(int); |
---|
6481 | int ffsl(long); |
---|
6482 | int fls(int); |
---|
6483 | int flsl(long); |
---|
6484 | char *index(const char *, int); |
---|
6485 | void memset_pattern4(void *, const void *, size_t); |
---|
6486 | void memset_pattern8(void *, const void *, size_t); |
---|
6487 | void memset_pattern16(void *, const void *, size_t); |
---|
6488 | char *rindex(const char *, int); |
---|
6489 | int strcasecmp(const char *, const char *); |
---|
6490 | size_t strlcat(char *, const char *, size_t); |
---|
6491 | size_t strlcpy(char *, const char *, size_t); |
---|
6492 | void strmode(int, char *); |
---|
6493 | int strncasecmp(const char *, const char *, size_t); |
---|
6494 | char *strsep(char **, const char *); |
---|
6495 | char *strsignal(int sig); |
---|
6496 | void swab(const void * , void * , ssize_t); |
---|
6497 | |
---|
6498 | |
---|
6499 | |
---|
6500 | |
---|
6501 | |
---|
6502 | # 1 "/usr/include/xlocale/_string.h" 1 3 4 |
---|
6503 | # 25 "/usr/include/xlocale/_string.h" 3 4 |
---|
6504 | #define _XLOCALE__STRING_H_ |
---|
6505 | |
---|
6506 | |
---|
6507 | int strcoll_l(const char *, const char *, locale_t); |
---|
6508 | size_t strxfrm_l(char *, const char *, size_t, locale_t); |
---|
6509 | int strcasecmp_l(const char *, const char *, locale_t); |
---|
6510 | char *strcasestr_l(const char *, const char *, locale_t); |
---|
6511 | int strncasecmp_l(const char *, const char *, size_t, locale_t); |
---|
6512 | |
---|
6513 | # 144 "/usr/include/string.h" 2 3 4 |
---|
6514 | # 26 "/opt/local/include/LegacySupport/string.h" 2 |
---|
6515 | |
---|
6516 | |
---|
6517 | |
---|
6518 | |
---|
6519 | extern size_t strnlen(const char *s, size_t maxlen); |
---|
6520 | |
---|
6521 | |
---|
6522 | |
---|
6523 | |
---|
6524 | |
---|
6525 | |
---|
6526 | extern char *strndup(const char *s, size_t n); |
---|
6527 | |
---|
6528 | |
---|
6529 | |
---|
6530 | |
---|
6531 | |
---|
6532 | |
---|
6533 | extern void * |
---|
6534 | memmem(const void *l, size_t l_len, const void *s, size_t s_len); |
---|
6535 | |
---|
6536 | # 18 "./include/c.h" 2 |
---|
6537 | # 1 "/usr/include/errno.h" 1 3 4 |
---|
6538 | # 23 "/usr/include/errno.h" 3 4 |
---|
6539 | # 1 "/usr/include/sys/errno.h" 1 3 4 |
---|
6540 | # 70 "/usr/include/sys/errno.h" 3 4 |
---|
6541 | #define _SYS_ERRNO_H_ |
---|
6542 | |
---|
6543 | |
---|
6544 | |
---|
6545 | extern int * __error(void); |
---|
6546 | #define errno (*__error()) |
---|
6547 | |
---|
6548 | |
---|
6549 | |
---|
6550 | |
---|
6551 | |
---|
6552 | |
---|
6553 | #define EPERM 1 |
---|
6554 | #define ENOENT 2 |
---|
6555 | #define ESRCH 3 |
---|
6556 | #define EINTR 4 |
---|
6557 | #define EIO 5 |
---|
6558 | #define ENXIO 6 |
---|
6559 | #define E2BIG 7 |
---|
6560 | #define ENOEXEC 8 |
---|
6561 | #define EBADF 9 |
---|
6562 | #define ECHILD 10 |
---|
6563 | #define EDEADLK 11 |
---|
6564 | |
---|
6565 | #define ENOMEM 12 |
---|
6566 | #define EACCES 13 |
---|
6567 | #define EFAULT 14 |
---|
6568 | |
---|
6569 | #define ENOTBLK 15 |
---|
6570 | |
---|
6571 | #define EBUSY 16 |
---|
6572 | #define EEXIST 17 |
---|
6573 | #define EXDEV 18 |
---|
6574 | #define ENODEV 19 |
---|
6575 | #define ENOTDIR 20 |
---|
6576 | #define EISDIR 21 |
---|
6577 | #define EINVAL 22 |
---|
6578 | #define ENFILE 23 |
---|
6579 | #define EMFILE 24 |
---|
6580 | #define ENOTTY 25 |
---|
6581 | #define ETXTBSY 26 |
---|
6582 | #define EFBIG 27 |
---|
6583 | #define ENOSPC 28 |
---|
6584 | #define ESPIPE 29 |
---|
6585 | #define EROFS 30 |
---|
6586 | #define EMLINK 31 |
---|
6587 | #define EPIPE 32 |
---|
6588 | |
---|
6589 | |
---|
6590 | #define EDOM 33 |
---|
6591 | #define ERANGE 34 |
---|
6592 | |
---|
6593 | |
---|
6594 | #define EAGAIN 35 |
---|
6595 | #define EWOULDBLOCK EAGAIN |
---|
6596 | #define EINPROGRESS 36 |
---|
6597 | #define EALREADY 37 |
---|
6598 | |
---|
6599 | |
---|
6600 | #define ENOTSOCK 38 |
---|
6601 | #define EDESTADDRREQ 39 |
---|
6602 | #define EMSGSIZE 40 |
---|
6603 | #define EPROTOTYPE 41 |
---|
6604 | #define ENOPROTOOPT 42 |
---|
6605 | #define EPROTONOSUPPORT 43 |
---|
6606 | |
---|
6607 | #define ESOCKTNOSUPPORT 44 |
---|
6608 | |
---|
6609 | #define ENOTSUP 45 |
---|
6610 | # 152 "/usr/include/sys/errno.h" 3 4 |
---|
6611 | #define EPFNOSUPPORT 46 |
---|
6612 | |
---|
6613 | #define EAFNOSUPPORT 47 |
---|
6614 | #define EADDRINUSE 48 |
---|
6615 | #define EADDRNOTAVAIL 49 |
---|
6616 | |
---|
6617 | |
---|
6618 | #define ENETDOWN 50 |
---|
6619 | #define ENETUNREACH 51 |
---|
6620 | #define ENETRESET 52 |
---|
6621 | #define ECONNABORTED 53 |
---|
6622 | #define ECONNRESET 54 |
---|
6623 | #define ENOBUFS 55 |
---|
6624 | #define EISCONN 56 |
---|
6625 | #define ENOTCONN 57 |
---|
6626 | |
---|
6627 | #define ESHUTDOWN 58 |
---|
6628 | #define ETOOMANYREFS 59 |
---|
6629 | |
---|
6630 | #define ETIMEDOUT 60 |
---|
6631 | #define ECONNREFUSED 61 |
---|
6632 | |
---|
6633 | #define ELOOP 62 |
---|
6634 | #define ENAMETOOLONG 63 |
---|
6635 | |
---|
6636 | |
---|
6637 | |
---|
6638 | #define EHOSTDOWN 64 |
---|
6639 | |
---|
6640 | #define EHOSTUNREACH 65 |
---|
6641 | #define ENOTEMPTY 66 |
---|
6642 | |
---|
6643 | |
---|
6644 | |
---|
6645 | #define EPROCLIM 67 |
---|
6646 | #define EUSERS 68 |
---|
6647 | |
---|
6648 | #define EDQUOT 69 |
---|
6649 | |
---|
6650 | |
---|
6651 | #define ESTALE 70 |
---|
6652 | |
---|
6653 | #define EREMOTE 71 |
---|
6654 | #define EBADRPC 72 |
---|
6655 | #define ERPCMISMATCH 73 |
---|
6656 | #define EPROGUNAVAIL 74 |
---|
6657 | #define EPROGMISMATCH 75 |
---|
6658 | #define EPROCUNAVAIL 76 |
---|
6659 | |
---|
6660 | |
---|
6661 | #define ENOLCK 77 |
---|
6662 | #define ENOSYS 78 |
---|
6663 | |
---|
6664 | |
---|
6665 | #define EFTYPE 79 |
---|
6666 | #define EAUTH 80 |
---|
6667 | #define ENEEDAUTH 81 |
---|
6668 | |
---|
6669 | |
---|
6670 | #define EPWROFF 82 |
---|
6671 | #define EDEVERR 83 |
---|
6672 | |
---|
6673 | |
---|
6674 | #define EOVERFLOW 84 |
---|
6675 | |
---|
6676 | |
---|
6677 | |
---|
6678 | #define EBADEXEC 85 |
---|
6679 | #define EBADARCH 86 |
---|
6680 | #define ESHLIBVERS 87 |
---|
6681 | #define EBADMACHO 88 |
---|
6682 | |
---|
6683 | |
---|
6684 | #define ECANCELED 89 |
---|
6685 | |
---|
6686 | #define EIDRM 90 |
---|
6687 | #define ENOMSG 91 |
---|
6688 | #define EILSEQ 92 |
---|
6689 | |
---|
6690 | #define ENOATTR 93 |
---|
6691 | |
---|
6692 | |
---|
6693 | #define EBADMSG 94 |
---|
6694 | #define EMULTIHOP 95 |
---|
6695 | #define ENODATA 96 |
---|
6696 | #define ENOLINK 97 |
---|
6697 | #define ENOSR 98 |
---|
6698 | #define ENOSTR 99 |
---|
6699 | #define EPROTO 100 |
---|
6700 | #define ETIME 101 |
---|
6701 | |
---|
6702 | |
---|
6703 | |
---|
6704 | #define EOPNOTSUPP 102 |
---|
6705 | |
---|
6706 | |
---|
6707 | #define ENOPOLICY 103 |
---|
6708 | |
---|
6709 | |
---|
6710 | #define ELAST 103 |
---|
6711 | # 24 "/usr/include/errno.h" 2 3 4 |
---|
6712 | # 19 "./include/c.h" 2 |
---|
6713 | |
---|
6714 | # 1 "/usr/include/grp.h" 1 3 4 |
---|
6715 | # 64 "/usr/include/grp.h" 3 4 |
---|
6716 | #define _GRP_H_ |
---|
6717 | # 84 "/usr/include/grp.h" 3 4 |
---|
6718 | #define _PATH_GROUP "/etc/group" |
---|
6719 | |
---|
6720 | |
---|
6721 | struct group { |
---|
6722 | char *gr_name; |
---|
6723 | char *gr_passwd; |
---|
6724 | gid_t gr_gid; |
---|
6725 | char **gr_mem; |
---|
6726 | }; |
---|
6727 | |
---|
6728 | |
---|
6729 | |
---|
6730 | |
---|
6731 | |
---|
6732 | struct group *getgrgid(gid_t); |
---|
6733 | struct group *getgrnam(const char *); |
---|
6734 | |
---|
6735 | int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); |
---|
6736 | int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); |
---|
6737 | |
---|
6738 | struct group *getgrent(void); |
---|
6739 | void setgrent(void); |
---|
6740 | void endgrent(void); |
---|
6741 | |
---|
6742 | |
---|
6743 | |
---|
6744 | char *group_from_gid(gid_t, int); |
---|
6745 | |
---|
6746 | void setgrfile(const char *); |
---|
6747 | int setgroupent(int); |
---|
6748 | |
---|
6749 | |
---|
6750 | # 21 "./include/c.h" 2 |
---|
6751 | |
---|
6752 | # 1 "/usr/include/assert.h" 1 3 4 |
---|
6753 | # 52 "/usr/include/assert.h" 3 4 |
---|
6754 | #undef assert |
---|
6755 | #undef __assert |
---|
6756 | # 75 "/usr/include/assert.h" 3 4 |
---|
6757 | |
---|
6758 | void __assert_rtn(const char *, const char *, int, const char *) __attribute__((__noreturn__)); |
---|
6759 | void __eprintf(const char *, const char *, unsigned, const char *) __attribute__((__noreturn__)); |
---|
6760 | |
---|
6761 | |
---|
6762 | #define __assert(e,file,line) __eprintf ("%s:%u: failed assertion `%s'\n", file, line, e) |
---|
6763 | |
---|
6764 | |
---|
6765 | |
---|
6766 | #define assert(e) (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) |
---|
6767 | # 23 "./include/c.h" 2 |
---|
6768 | |
---|
6769 | |
---|
6770 | # 1 "/usr/include/err.h" 1 3 4 |
---|
6771 | # 59 "/usr/include/err.h" 3 4 |
---|
6772 | #define _ERR_H_ |
---|
6773 | # 71 "/usr/include/err.h" 3 4 |
---|
6774 | |
---|
6775 | void err(int, const char *, ...) __asm("_" "err" "$LDBL128") __attribute__((__noreturn__)); |
---|
6776 | void verr(int, const char *, __darwin_va_list) __asm("_" "verr" "$LDBL128") __attribute__((__noreturn__)); |
---|
6777 | void errc(int, int, const char *, ...) __asm("_" "errc" "$LDBL128") __attribute__((__noreturn__)); |
---|
6778 | void verrc(int, int, const char *, __darwin_va_list) __asm("_" "verrc" "$LDBL128") __attribute__((__noreturn__)); |
---|
6779 | void errx(int, const char *, ...) __asm("_" "errx" "$LDBL128") __attribute__((__noreturn__)); |
---|
6780 | void verrx(int, const char *, __darwin_va_list) __asm("_" "verrx" "$LDBL128") __attribute__((__noreturn__)); |
---|
6781 | void warn(const char *, ...) __asm("_" "warn" "$LDBL128"); |
---|
6782 | void vwarn(const char *, __darwin_va_list) __asm("_" "vwarn" "$LDBL128"); |
---|
6783 | void warnc(int, const char *, ...) __asm("_" "warnc" "$LDBL128"); |
---|
6784 | void vwarnc(int, const char *, __darwin_va_list) __asm("_" "vwarnc" "$LDBL128"); |
---|
6785 | void warnx(const char *, ...) __asm("_" "warnx" "$LDBL128"); |
---|
6786 | void vwarnx(const char *, __darwin_va_list) __asm("_" "vwarnx" "$LDBL128"); |
---|
6787 | void err_set_file(void *); |
---|
6788 | void err_set_exit(void (*)(int)); |
---|
6789 | |
---|
6790 | |
---|
6791 | # 26 "./include/c.h" 2 |
---|
6792 | |
---|
6793 | |
---|
6794 | |
---|
6795 | |
---|
6796 | |
---|
6797 | |
---|
6798 | |
---|
6799 | #define LOGIN_NAME_MAX 256 |
---|
6800 | # 46 "./include/c.h" |
---|
6801 | #define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) |
---|
6802 | # 56 "./include/c.h" |
---|
6803 | #define __must_be_array(a) UL_BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0]))) |
---|
6804 | |
---|
6805 | |
---|
6806 | #define ignore_result(x) __extension__ ({ __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; }) |
---|
6807 | # 75 "./include/c.h" |
---|
6808 | #define restrict __restrict |
---|
6809 | # 89 "./include/c.h" |
---|
6810 | #define __has_attribute(x) 0 |
---|
6811 | |
---|
6812 | |
---|
6813 | |
---|
6814 | #define __has_feature(x) 0 |
---|
6815 | # 103 "./include/c.h" |
---|
6816 | #define __ul_alloc_size(s) |
---|
6817 | |
---|
6818 | |
---|
6819 | |
---|
6820 | |
---|
6821 | |
---|
6822 | |
---|
6823 | |
---|
6824 | #define __ul_calloc_size(n,s) |
---|
6825 | |
---|
6826 | |
---|
6827 | |
---|
6828 | |
---|
6829 | |
---|
6830 | |
---|
6831 | #define __ul_returns_nonnull |
---|
6832 | # 127 "./include/c.h" |
---|
6833 | #define UL_BUILD_BUG_ON_ZERO(e) __extension__ (sizeof(struct { int:-!!(e); })) |
---|
6834 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) |
---|
6835 | |
---|
6836 | |
---|
6837 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
---|
6838 | |
---|
6839 | |
---|
6840 | |
---|
6841 | |
---|
6842 | |
---|
6843 | |
---|
6844 | |
---|
6845 | #define TRUE 1 |
---|
6846 | |
---|
6847 | |
---|
6848 | |
---|
6849 | #define FALSE 0 |
---|
6850 | |
---|
6851 | |
---|
6852 | |
---|
6853 | #define min(x,y) __extension__ ({ __typeof__(x) _min1 = (x); __typeof__(y) _min2 = (y); (void) (&_min1 == &_min2); _min1 < _min2 ? _min1 : _min2; }) |
---|
6854 | |
---|
6855 | |
---|
6856 | |
---|
6857 | |
---|
6858 | |
---|
6859 | |
---|
6860 | |
---|
6861 | #define max(x,y) __extension__ ({ __typeof__(x) _max1 = (x); __typeof__(y) _max2 = (y); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; }) |
---|
6862 | |
---|
6863 | |
---|
6864 | |
---|
6865 | |
---|
6866 | |
---|
6867 | |
---|
6868 | |
---|
6869 | #define abs_diff(x,y) __extension__ ({ __typeof__(x) _a = (x); __typeof__(y) _b = (y); (void) (&_a == &_b); _a > _b ? _a - _b : _b - _a; }) |
---|
6870 | |
---|
6871 | |
---|
6872 | |
---|
6873 | |
---|
6874 | |
---|
6875 | |
---|
6876 | |
---|
6877 | #define cmp_numbers(x,y) __extension__ ({ __typeof__(x) _a = (x); __typeof__(y) _b = (y); (void) (&_a == &_b); _a == _b ? 0 : _a > _b ? 1 : -1; }) |
---|
6878 | # 180 "./include/c.h" |
---|
6879 | #define cmp_timespec(a,b,CMP) (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_nsec CMP (b)->tv_nsec) : ((a)->tv_sec CMP (b)->tv_sec)) |
---|
6880 | # 191 "./include/c.h" |
---|
6881 | #define cmp_stat_mtime(_a,_b,CMP) ((_a)->st_mtime CMP (_b)->st_mtime) |
---|
6882 | # 207 "./include/c.h" |
---|
6883 | #define container_of(ptr,type,member) __extension__ ({ const __typeof__( ((type *)0)->member ) *__mptr = (ptr); (type *)( (char *)__mptr - offsetof(type,member) );}) |
---|
6884 | |
---|
6885 | |
---|
6886 | |
---|
6887 | |
---|
6888 | |
---|
6889 | |
---|
6890 | extern char *__progname; |
---|
6891 | #define program_invocation_short_name __progname |
---|
6892 | # 287 "./include/c.h" |
---|
6893 | #define errtryhelp(eval) __extension__ ({ fprintf(stderr, _("Try '%s --help' for more information.\n"), program_invocation_short_name); exit(eval); }) |
---|
6894 | |
---|
6895 | |
---|
6896 | |
---|
6897 | |
---|
6898 | |
---|
6899 | |
---|
6900 | #define EX_EXEC_FAILED 126 |
---|
6901 | #define EX_EXEC_ENOENT 127 |
---|
6902 | #define errexec(name) err(errno == ENOENT ? EX_EXEC_ENOENT : EX_EXEC_FAILED, _("failed to execute %s"), name) |
---|
6903 | |
---|
6904 | |
---|
6905 | |
---|
6906 | static inline __attribute__((const)) int is_power_of_2(unsigned long num) |
---|
6907 | { |
---|
6908 | return (num != 0 && ((num & (num - 1)) == 0)); |
---|
6909 | } |
---|
6910 | |
---|
6911 | |
---|
6912 | typedef int64_t loff_t; |
---|
6913 | # 321 "./include/c.h" |
---|
6914 | # 1 "/usr/include/fcntl.h" 1 3 4 |
---|
6915 | # 322 "./include/c.h" 2 |
---|
6916 | |
---|
6917 | |
---|
6918 | #define UL_CLOEXECSTR "e" |
---|
6919 | # 341 "./include/c.h" |
---|
6920 | #define AI_ADDRCONFIG 0x0020 |
---|
6921 | |
---|
6922 | |
---|
6923 | |
---|
6924 | #define IUTF8 0040000 |
---|
6925 | |
---|
6926 | |
---|
6927 | |
---|
6928 | |
---|
6929 | |
---|
6930 | static inline size_t get_hostname_max(void) |
---|
6931 | { |
---|
6932 | long len = sysconf(72); |
---|
6933 | |
---|
6934 | if (0 < len) |
---|
6935 | return len; |
---|
6936 | |
---|
6937 | |
---|
6938 | |
---|
6939 | |
---|
6940 | |
---|
6941 | |
---|
6942 | return 64; |
---|
6943 | } |
---|
6944 | |
---|
6945 | |
---|
6946 | static inline int drop_permissions(void) |
---|
6947 | { |
---|
6948 | (*__error()) = 0; |
---|
6949 | |
---|
6950 | |
---|
6951 | if (setgid(getgid()) < 0) |
---|
6952 | goto fail; |
---|
6953 | |
---|
6954 | |
---|
6955 | if (setuid(getuid()) < 0) |
---|
6956 | goto fail; |
---|
6957 | |
---|
6958 | return 0; |
---|
6959 | fail: |
---|
6960 | return (*__error()) ? -(*__error()) : -1; |
---|
6961 | } |
---|
6962 | # 391 "./include/c.h" |
---|
6963 | static inline int xusleep(useconds_t usec) |
---|
6964 | { |
---|
6965 | |
---|
6966 | struct timespec waittime = { |
---|
6967 | .tv_sec = usec / 1000000L, |
---|
6968 | .tv_nsec = (usec % 1000000L) * 1000 |
---|
6969 | }; |
---|
6970 | return nanosleep(&waittime, ((void *)0)); |
---|
6971 | |
---|
6972 | |
---|
6973 | |
---|
6974 | |
---|
6975 | |
---|
6976 | } |
---|
6977 | |
---|
6978 | |
---|
6979 | |
---|
6980 | |
---|
6981 | |
---|
6982 | #define USAGE_HEADER _("\nUsage:\n") |
---|
6983 | #define USAGE_OPTIONS _("\nOptions:\n") |
---|
6984 | #define USAGE_FUNCTIONS _("\nFunctions:\n") |
---|
6985 | #define USAGE_COMMANDS _("\nCommands:\n") |
---|
6986 | #define USAGE_ARGUMENTS _("\nArguments:\n") |
---|
6987 | #define USAGE_COLUMNS _("\nAvailable output columns:\n") |
---|
6988 | #define USAGE_SEPARATOR "\n" |
---|
6989 | |
---|
6990 | #define USAGE_OPTSTR_HELP _("display this help") |
---|
6991 | #define USAGE_OPTSTR_VERSION _("display version") |
---|
6992 | |
---|
6993 | #define USAGE_HELP_OPTIONS(marg_dsc) "%-" #marg_dsc "s%s\n" "%-" #marg_dsc "s%s\n" , " -h, --help", USAGE_OPTSTR_HELP , " -V, --version", USAGE_OPTSTR_VERSION |
---|
6994 | |
---|
6995 | |
---|
6996 | |
---|
6997 | |
---|
6998 | |
---|
6999 | #define USAGE_ARG_SEPARATOR "\n" |
---|
7000 | #define USAGE_ARG_SIZE(_name) _(" %s arguments may be followed by the suffixes for\n" " GiB, TiB, PiB, EiB, ZiB, and YiB (the \"iB\" is optional)\n"), _name |
---|
7001 | |
---|
7002 | |
---|
7003 | |
---|
7004 | #define USAGE_MAN_TAIL(_man) _("\nFor more details see %s.\n"), _man |
---|
7005 | |
---|
7006 | #define UTIL_LINUX_VERSION _("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING |
---|
7007 | |
---|
7008 | #define print_version(eval) __extension__ ({ printf(UTIL_LINUX_VERSION); exit(eval); }) |
---|
7009 | # 445 "./include/c.h" |
---|
7010 | #define SEEK_DATA 3 |
---|
7011 | |
---|
7012 | |
---|
7013 | #define SEEK_HOLE 4 |
---|
7014 | # 457 "./include/c.h" |
---|
7015 | #define stringify_value(s) stringify(s) |
---|
7016 | #define stringify(s) #s |
---|
7017 | # 473 "./include/c.h" |
---|
7018 | #define HAS_FEATURE_ADDRESS_SANITIZER 0 |
---|
7019 | # 487 "./include/c.h" |
---|
7020 | #define UL_ASAN_BLACKLIST |
---|
7021 | |
---|
7022 | |
---|
7023 | |
---|
7024 | |
---|
7025 | |
---|
7026 | |
---|
7027 | |
---|
7028 | #define UL_GETPW_BUFSIZ (16 * 1024) |
---|
7029 | # 51 "misc-utils/hardlink.c" 2 |
---|
7030 | # 1 "./include/xalloc.h" 1 |
---|
7031 | # 11 "./include/xalloc.h" |
---|
7032 | #define UTIL_LINUX_XALLOC_H |
---|
7033 | |
---|
7034 | |
---|
7035 | |
---|
7036 | |
---|
7037 | # 1 "./include/c.h" 1 |
---|
7038 | # 17 "./include/xalloc.h" 2 |
---|
7039 | |
---|
7040 | |
---|
7041 | #define XALLOC_EXIT_CODE EXIT_FAILURE |
---|
7042 | |
---|
7043 | |
---|
7044 | static inline |
---|
7045 | __attribute__((__noreturn__)) |
---|
7046 | void __err_oom(const char *file, unsigned int line) |
---|
7047 | { |
---|
7048 | err(1, "%s: %u: cannot allocate memory", file, line); |
---|
7049 | } |
---|
7050 | |
---|
7051 | #define err_oom() __err_oom(__FILE__, __LINE__) |
---|
7052 | |
---|
7053 | static inline |
---|
7054 | |
---|
7055 | |
---|
7056 | void *xmalloc(const size_t size) |
---|
7057 | { |
---|
7058 | void *ret = malloc(size); |
---|
7059 | |
---|
7060 | if (!ret && size) |
---|
7061 | err(1, "cannot allocate %zu bytes", size); |
---|
7062 | return ret; |
---|
7063 | } |
---|
7064 | |
---|
7065 | static inline |
---|
7066 | |
---|
7067 | |
---|
7068 | void *xrealloc(void *ptr, const size_t size) |
---|
7069 | { |
---|
7070 | void *ret = realloc(ptr, size); |
---|
7071 | |
---|
7072 | if (!ret && size) |
---|
7073 | err(1, "cannot allocate %zu bytes", size); |
---|
7074 | return ret; |
---|
7075 | } |
---|
7076 | |
---|
7077 | static inline |
---|
7078 | |
---|
7079 | |
---|
7080 | void *xcalloc(const size_t nelems, const size_t size) |
---|
7081 | { |
---|
7082 | void *ret = calloc(nelems, size); |
---|
7083 | |
---|
7084 | if (!ret && size && nelems) |
---|
7085 | err(1, "cannot allocate %zu bytes", size); |
---|
7086 | return ret; |
---|
7087 | } |
---|
7088 | |
---|
7089 | static inline |
---|
7090 | __attribute__((warn_unused_result)) |
---|
7091 | |
---|
7092 | char *xstrdup(const char *str) |
---|
7093 | { |
---|
7094 | char *ret; |
---|
7095 | |
---|
7096 | (__builtin_expect(!(str), 0) ? __assert_rtn(__func__, "./include/xalloc.h", 74, "str") : (void)0); |
---|
7097 | ret = strdup(str); |
---|
7098 | if (!ret) |
---|
7099 | err(1, "cannot duplicate string"); |
---|
7100 | return ret; |
---|
7101 | } |
---|
7102 | |
---|
7103 | static inline |
---|
7104 | __attribute__((warn_unused_result)) |
---|
7105 | |
---|
7106 | char *xstrndup(const char *str, size_t size) |
---|
7107 | { |
---|
7108 | char *ret; |
---|
7109 | |
---|
7110 | (__builtin_expect(!(str), 0) ? __assert_rtn(__func__, "./include/xalloc.h", 88, "str") : (void)0); |
---|
7111 | ret = strndup(str, size); |
---|
7112 | if (!ret) |
---|
7113 | err(1, "cannot duplicate string"); |
---|
7114 | return ret; |
---|
7115 | } |
---|
7116 | |
---|
7117 | |
---|
7118 | static inline |
---|
7119 | __attribute__((__format__(printf, 2, 3))) |
---|
7120 | int xasprintf(char **strp, const char *fmt, ...) |
---|
7121 | { |
---|
7122 | int ret; |
---|
7123 | va_list args; |
---|
7124 | |
---|
7125 | __builtin_va_start(args,fmt); |
---|
7126 | ret = vasprintf(&(*strp), fmt, args); |
---|
7127 | __builtin_va_end(args); |
---|
7128 | if (ret < 0) |
---|
7129 | err(1, "cannot allocate string"); |
---|
7130 | return ret; |
---|
7131 | } |
---|
7132 | |
---|
7133 | static inline |
---|
7134 | __attribute__((__format__(printf, 2, 0))) |
---|
7135 | int xvasprintf(char **strp, const char *fmt, va_list ap) |
---|
7136 | { |
---|
7137 | int ret = vasprintf(&(*strp), fmt, ap); |
---|
7138 | |
---|
7139 | if (ret < 0) |
---|
7140 | err(1, "cannot allocate string"); |
---|
7141 | return ret; |
---|
7142 | } |
---|
7143 | |
---|
7144 | |
---|
7145 | static inline |
---|
7146 | __attribute__((warn_unused_result)) |
---|
7147 | char *xgethostname(void) |
---|
7148 | { |
---|
7149 | char *name; |
---|
7150 | size_t sz = get_hostname_max() + 1; |
---|
7151 | |
---|
7152 | name = xmalloc(sizeof(char) * sz); |
---|
7153 | if (gethostname(name, sz) != 0) { |
---|
7154 | free(name); |
---|
7155 | return ((void *)0); |
---|
7156 | } |
---|
7157 | name[sz - 1] = '\0'; |
---|
7158 | return name; |
---|
7159 | } |
---|
7160 | # 52 "misc-utils/hardlink.c" 2 |
---|
7161 | # 1 "./include/strutils.h" 1 |
---|
7162 | |
---|
7163 | #define UTIL_LINUX_STRUTILS |
---|
7164 | |
---|
7165 | |
---|
7166 | # 1 "/usr/include/inttypes.h" 1 3 4 |
---|
7167 | # 35 "/usr/include/inttypes.h" 3 4 |
---|
7168 | #define __STDC_FORMAT_MACROS_DEFINED |
---|
7169 | |
---|
7170 | #undef __PRI_8_LENGTH_MODIFIER__ |
---|
7171 | #undef __PRI_64_LENGTH_MODIFIER__ |
---|
7172 | #undef __SCN_64_LENGTH_MODIFIER__ |
---|
7173 | |
---|
7174 | |
---|
7175 | #define __PRI_8_LENGTH_MODIFIER__ "hh" |
---|
7176 | #define __PRI_64_LENGTH_MODIFIER__ "ll" |
---|
7177 | #define __SCN_64_LENGTH_MODIFIER__ "ll" |
---|
7178 | # 54 "/usr/include/inttypes.h" 3 4 |
---|
7179 | #define __PRI_MAX_LENGTH_MODIFIER__ "j" |
---|
7180 | #define __SCN_MAX_LENGTH_MODIFIER__ "j" |
---|
7181 | |
---|
7182 | #define PRId8 __PRI_8_LENGTH_MODIFIER__ "d" |
---|
7183 | #define PRIi8 __PRI_8_LENGTH_MODIFIER__ "i" |
---|
7184 | #define PRIo8 __PRI_8_LENGTH_MODIFIER__ "o" |
---|
7185 | #define PRIu8 __PRI_8_LENGTH_MODIFIER__ "u" |
---|
7186 | #define PRIx8 __PRI_8_LENGTH_MODIFIER__ "x" |
---|
7187 | #define PRIX8 __PRI_8_LENGTH_MODIFIER__ "X" |
---|
7188 | |
---|
7189 | #define PRId16 "hd" |
---|
7190 | #define PRIi16 "hi" |
---|
7191 | #define PRIo16 "ho" |
---|
7192 | #define PRIu16 "hu" |
---|
7193 | #define PRIx16 "hx" |
---|
7194 | #define PRIX16 "hX" |
---|
7195 | |
---|
7196 | #define PRId32 "d" |
---|
7197 | #define PRIi32 "i" |
---|
7198 | #define PRIo32 "o" |
---|
7199 | #define PRIu32 "u" |
---|
7200 | #define PRIx32 "x" |
---|
7201 | #define PRIX32 "X" |
---|
7202 | |
---|
7203 | #define PRId64 __PRI_64_LENGTH_MODIFIER__ "d" |
---|
7204 | #define PRIi64 __PRI_64_LENGTH_MODIFIER__ "i" |
---|
7205 | #define PRIo64 __PRI_64_LENGTH_MODIFIER__ "o" |
---|
7206 | #define PRIu64 __PRI_64_LENGTH_MODIFIER__ "u" |
---|
7207 | #define PRIx64 __PRI_64_LENGTH_MODIFIER__ "x" |
---|
7208 | #define PRIX64 __PRI_64_LENGTH_MODIFIER__ "X" |
---|
7209 | |
---|
7210 | #define PRIdLEAST8 PRId8 |
---|
7211 | #define PRIiLEAST8 PRIi8 |
---|
7212 | #define PRIoLEAST8 PRIo8 |
---|
7213 | #define PRIuLEAST8 PRIu8 |
---|
7214 | #define PRIxLEAST8 PRIx8 |
---|
7215 | #define PRIXLEAST8 PRIX8 |
---|
7216 | |
---|
7217 | #define PRIdLEAST16 PRId16 |
---|
7218 | #define PRIiLEAST16 PRIi16 |
---|
7219 | #define PRIoLEAST16 PRIo16 |
---|
7220 | #define PRIuLEAST16 PRIu16 |
---|
7221 | #define PRIxLEAST16 PRIx16 |
---|
7222 | #define PRIXLEAST16 PRIX16 |
---|
7223 | |
---|
7224 | #define PRIdLEAST32 PRId32 |
---|
7225 | #define PRIiLEAST32 PRIi32 |
---|
7226 | #define PRIoLEAST32 PRIo32 |
---|
7227 | #define PRIuLEAST32 PRIu32 |
---|
7228 | #define PRIxLEAST32 PRIx32 |
---|
7229 | #define PRIXLEAST32 PRIX32 |
---|
7230 | |
---|
7231 | #define PRIdLEAST64 PRId64 |
---|
7232 | #define PRIiLEAST64 PRIi64 |
---|
7233 | #define PRIoLEAST64 PRIo64 |
---|
7234 | #define PRIuLEAST64 PRIu64 |
---|
7235 | #define PRIxLEAST64 PRIx64 |
---|
7236 | #define PRIXLEAST64 PRIX64 |
---|
7237 | |
---|
7238 | #define PRIdFAST8 PRId8 |
---|
7239 | #define PRIiFAST8 PRIi8 |
---|
7240 | #define PRIoFAST8 PRIo8 |
---|
7241 | #define PRIuFAST8 PRIu8 |
---|
7242 | #define PRIxFAST8 PRIx8 |
---|
7243 | #define PRIXFAST8 PRIX8 |
---|
7244 | |
---|
7245 | #define PRIdFAST16 PRId16 |
---|
7246 | #define PRIiFAST16 PRIi16 |
---|
7247 | #define PRIoFAST16 PRIo16 |
---|
7248 | #define PRIuFAST16 PRIu16 |
---|
7249 | #define PRIxFAST16 PRIx16 |
---|
7250 | #define PRIXFAST16 PRIX16 |
---|
7251 | |
---|
7252 | #define PRIdFAST32 PRId32 |
---|
7253 | #define PRIiFAST32 PRIi32 |
---|
7254 | #define PRIoFAST32 PRIo32 |
---|
7255 | #define PRIuFAST32 PRIu32 |
---|
7256 | #define PRIxFAST32 PRIx32 |
---|
7257 | #define PRIXFAST32 PRIX32 |
---|
7258 | |
---|
7259 | #define PRIdFAST64 PRId64 |
---|
7260 | #define PRIiFAST64 PRIi64 |
---|
7261 | #define PRIoFAST64 PRIo64 |
---|
7262 | #define PRIuFAST64 PRIu64 |
---|
7263 | #define PRIxFAST64 PRIx64 |
---|
7264 | #define PRIXFAST64 PRIX64 |
---|
7265 | |
---|
7266 | |
---|
7267 | #define PRIdPTR "ld" |
---|
7268 | #define PRIiPTR "li" |
---|
7269 | #define PRIoPTR "lo" |
---|
7270 | #define PRIuPTR "lu" |
---|
7271 | #define PRIxPTR "lx" |
---|
7272 | #define PRIXPTR "lX" |
---|
7273 | |
---|
7274 | #define PRIdMAX __PRI_MAX_LENGTH_MODIFIER__ "d" |
---|
7275 | #define PRIiMAX __PRI_MAX_LENGTH_MODIFIER__ "i" |
---|
7276 | #define PRIoMAX __PRI_MAX_LENGTH_MODIFIER__ "o" |
---|
7277 | #define PRIuMAX __PRI_MAX_LENGTH_MODIFIER__ "u" |
---|
7278 | #define PRIxMAX __PRI_MAX_LENGTH_MODIFIER__ "x" |
---|
7279 | #define PRIXMAX __PRI_MAX_LENGTH_MODIFIER__ "X" |
---|
7280 | |
---|
7281 | |
---|
7282 | #define SCNd8 __PRI_8_LENGTH_MODIFIER__ "d" |
---|
7283 | #define SCNi8 __PRI_8_LENGTH_MODIFIER__ "i" |
---|
7284 | #define SCNo8 __PRI_8_LENGTH_MODIFIER__ "o" |
---|
7285 | #define SCNu8 __PRI_8_LENGTH_MODIFIER__ "u" |
---|
7286 | #define SCNx8 __PRI_8_LENGTH_MODIFIER__ "x" |
---|
7287 | # 170 "/usr/include/inttypes.h" 3 4 |
---|
7288 | #define SCNd16 "hd" |
---|
7289 | #define SCNi16 "hi" |
---|
7290 | #define SCNo16 "ho" |
---|
7291 | #define SCNu16 "hu" |
---|
7292 | #define SCNx16 "hx" |
---|
7293 | |
---|
7294 | #define SCNd32 "d" |
---|
7295 | #define SCNi32 "i" |
---|
7296 | #define SCNo32 "o" |
---|
7297 | #define SCNu32 "u" |
---|
7298 | #define SCNx32 "x" |
---|
7299 | |
---|
7300 | #define SCNd64 __SCN_64_LENGTH_MODIFIER__ "d" |
---|
7301 | #define SCNi64 __SCN_64_LENGTH_MODIFIER__ "i" |
---|
7302 | #define SCNo64 __SCN_64_LENGTH_MODIFIER__ "o" |
---|
7303 | #define SCNu64 __SCN_64_LENGTH_MODIFIER__ "u" |
---|
7304 | #define SCNx64 __SCN_64_LENGTH_MODIFIER__ "x" |
---|
7305 | |
---|
7306 | #define SCNdLEAST8 SCNd8 |
---|
7307 | #define SCNiLEAST8 SCNi8 |
---|
7308 | #define SCNoLEAST8 SCNo8 |
---|
7309 | #define SCNuLEAST8 SCNu8 |
---|
7310 | #define SCNxLEAST8 SCNx8 |
---|
7311 | |
---|
7312 | #define SCNdLEAST16 SCNd16 |
---|
7313 | #define SCNiLEAST16 SCNi16 |
---|
7314 | #define SCNoLEAST16 SCNo16 |
---|
7315 | #define SCNuLEAST16 SCNu16 |
---|
7316 | #define SCNxLEAST16 SCNx16 |
---|
7317 | |
---|
7318 | #define SCNdLEAST32 SCNd32 |
---|
7319 | #define SCNiLEAST32 SCNi32 |
---|
7320 | #define SCNoLEAST32 SCNo32 |
---|
7321 | #define SCNuLEAST32 SCNu32 |
---|
7322 | #define SCNxLEAST32 SCNx32 |
---|
7323 | |
---|
7324 | #define SCNdLEAST64 SCNd64 |
---|
7325 | #define SCNiLEAST64 SCNi64 |
---|
7326 | #define SCNoLEAST64 SCNo64 |
---|
7327 | #define SCNuLEAST64 SCNu64 |
---|
7328 | #define SCNxLEAST64 SCNx64 |
---|
7329 | |
---|
7330 | #define SCNdFAST8 SCNd8 |
---|
7331 | #define SCNiFAST8 SCNi8 |
---|
7332 | #define SCNoFAST8 SCNo8 |
---|
7333 | #define SCNuFAST8 SCNu8 |
---|
7334 | #define SCNxFAST8 SCNx8 |
---|
7335 | |
---|
7336 | #define SCNdFAST16 SCNd16 |
---|
7337 | #define SCNiFAST16 SCNi16 |
---|
7338 | #define SCNoFAST16 SCNo16 |
---|
7339 | #define SCNuFAST16 SCNu16 |
---|
7340 | #define SCNxFAST16 SCNx16 |
---|
7341 | |
---|
7342 | #define SCNdFAST32 SCNd32 |
---|
7343 | #define SCNiFAST32 SCNi32 |
---|
7344 | #define SCNoFAST32 SCNo32 |
---|
7345 | #define SCNuFAST32 SCNu32 |
---|
7346 | #define SCNxFAST32 SCNx32 |
---|
7347 | |
---|
7348 | #define SCNdFAST64 SCNd64 |
---|
7349 | #define SCNiFAST64 SCNi64 |
---|
7350 | #define SCNoFAST64 SCNo64 |
---|
7351 | #define SCNuFAST64 SCNu64 |
---|
7352 | #define SCNxFAST64 SCNx64 |
---|
7353 | |
---|
7354 | #define SCNdPTR "ld" |
---|
7355 | #define SCNiPTR "li" |
---|
7356 | #define SCNoPTR "lo" |
---|
7357 | #define SCNuPTR "lu" |
---|
7358 | #define SCNxPTR "lx" |
---|
7359 | |
---|
7360 | #define SCNdMAX __SCN_MAX_LENGTH_MODIFIER__ "d" |
---|
7361 | #define SCNiMAX __SCN_MAX_LENGTH_MODIFIER__ "i" |
---|
7362 | #define SCNoMAX __SCN_MAX_LENGTH_MODIFIER__ "o" |
---|
7363 | #define SCNuMAX __SCN_MAX_LENGTH_MODIFIER__ "u" |
---|
7364 | #define SCNxMAX __SCN_MAX_LENGTH_MODIFIER__ "x" |
---|
7365 | |
---|
7366 | |
---|
7367 | |
---|
7368 | |
---|
7369 | #define _INTTYPES_H_ |
---|
7370 | # 265 "/usr/include/inttypes.h" 3 4 |
---|
7371 | |
---|
7372 | |
---|
7373 | |
---|
7374 | extern intmax_t imaxabs(intmax_t j); |
---|
7375 | |
---|
7376 | |
---|
7377 | typedef struct { |
---|
7378 | intmax_t quot; |
---|
7379 | intmax_t rem; |
---|
7380 | } imaxdiv_t; |
---|
7381 | |
---|
7382 | extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); |
---|
7383 | |
---|
7384 | |
---|
7385 | extern intmax_t strtoimax(const char * nptr, char ** endptr, int base); |
---|
7386 | extern uintmax_t strtoumax(const char * nptr, char ** endptr, int base); |
---|
7387 | # 290 "/usr/include/inttypes.h" 3 4 |
---|
7388 | extern intmax_t wcstoimax(const wchar_t * nptr, wchar_t ** endptr, int base); |
---|
7389 | extern uintmax_t wcstoumax(const wchar_t * nptr, wchar_t ** endptr, int base); |
---|
7390 | |
---|
7391 | |
---|
7392 | |
---|
7393 | |
---|
7394 | |
---|
7395 | |
---|
7396 | |
---|
7397 | |
---|
7398 | |
---|
7399 | # 1 "/usr/include/xlocale/_inttypes.h" 1 3 4 |
---|
7400 | # 25 "/usr/include/xlocale/_inttypes.h" 3 4 |
---|
7401 | #define _XLOCALE__INTTYPES_H_ |
---|
7402 | |
---|
7403 | |
---|
7404 | intmax_t strtoimax_l(const char * nptr, char ** endptr, |
---|
7405 | int base, locale_t); |
---|
7406 | uintmax_t strtoumax_l(const char * nptr, char ** endptr, |
---|
7407 | int base, locale_t); |
---|
7408 | intmax_t wcstoimax_l(const wchar_t * nptr, |
---|
7409 | wchar_t ** endptr, int base, locale_t); |
---|
7410 | uintmax_t wcstoumax_l(const wchar_t * nptr, |
---|
7411 | wchar_t ** endptr, int base, locale_t); |
---|
7412 | |
---|
7413 | |
---|
7414 | |
---|
7415 | |
---|
7416 | |
---|
7417 | |
---|
7418 | # 302 "/usr/include/inttypes.h" 2 3 4 |
---|
7419 | # 6 "./include/strutils.h" 2 |
---|
7420 | |
---|
7421 | |
---|
7422 | |
---|
7423 | |
---|
7424 | # 1 "/usr/include/errno.h" 1 3 4 |
---|
7425 | # 11 "./include/strutils.h" 2 |
---|
7426 | |
---|
7427 | |
---|
7428 | |
---|
7429 | |
---|
7430 | |
---|
7431 | extern void strutils_set_exitcode(int exit_code); |
---|
7432 | |
---|
7433 | extern int parse_size(const char *str, uintmax_t *res, int *power); |
---|
7434 | extern int strtosize(const char *str, uintmax_t *res); |
---|
7435 | extern uintmax_t strtosize_or_err(const char *str, const char *errmesg); |
---|
7436 | |
---|
7437 | extern int ul_strtos64(const char *str, int64_t *num, int base); |
---|
7438 | extern int ul_strtou64(const char *str, uint64_t *num, int base); |
---|
7439 | extern int ul_strtos32(const char *str, int32_t *num, int base); |
---|
7440 | extern int ul_strtou32(const char *str, uint32_t *num, int base); |
---|
7441 | |
---|
7442 | extern int64_t str2num_or_err(const char *str, int base, const char *errmesg, int64_t low, int64_t up); |
---|
7443 | extern uint64_t str2unum_or_err(const char *str, int base, const char *errmesg, uint64_t up); |
---|
7444 | |
---|
7445 | #define strtos64_or_err(_s,_e) str2num_or_err(_s, 10, _e, 0, 0) |
---|
7446 | #define strtou64_or_err(_s,_e) str2unum_or_err(_s, 10, _e, 0) |
---|
7447 | #define strtox64_or_err(_s,_e) str2unum_or_err(_s, 16, _e, 0) |
---|
7448 | |
---|
7449 | #define strtos32_or_err(_s,_e) (int32_t) str2num_or_err(_s, 10, _e, INT32_MIN, INT32_MAX) |
---|
7450 | #define strtou32_or_err(_s,_e) (uint32_t) str2unum_or_err(_s, 10, _e, UINT32_MAX) |
---|
7451 | #define strtox32_or_err(_s,_e) (uint32_t) str2unum_or_err(_s, 16, _e, UINT32_MAX) |
---|
7452 | |
---|
7453 | #define strtos16_or_err(_s,_e) (int16_t) str2num_or_err(_s, 10, _e, INT16_MIN, INT16_MAX) |
---|
7454 | #define strtou16_or_err(_s,_e) (uint16_t) str2unum_or_err(_s, 10, _e, UINT16_MAX) |
---|
7455 | #define strtox16_or_err(_s,_e) (uint16_t) str2unum_or_err(_s, 16, _e, UINT16_MAX) |
---|
7456 | |
---|
7457 | extern double strtod_or_err(const char *str, const char *errmesg); |
---|
7458 | extern long double strtold_or_err(const char *str, const char *errmesg); |
---|
7459 | |
---|
7460 | extern long strtol_or_err(const char *str, const char *errmesg); |
---|
7461 | extern unsigned long strtoul_or_err(const char *str, const char *errmesg); |
---|
7462 | |
---|
7463 | extern void strtotimeval_or_err(const char *str, struct timeval *tv, |
---|
7464 | const char *errmesg); |
---|
7465 | extern time_t strtotime_or_err(const char *str, const char *errmesg); |
---|
7466 | |
---|
7467 | extern int isdigit_strend(const char *str, const char **end); |
---|
7468 | #define isdigit_string(_s) isdigit_strend(_s, NULL) |
---|
7469 | |
---|
7470 | extern int isxdigit_strend(const char *str, const char **end); |
---|
7471 | #define isxdigit_string(_s) isxdigit_strend(_s, NULL) |
---|
7472 | |
---|
7473 | |
---|
7474 | extern int parse_switch(const char *arg, const char *errmesg, ...); |
---|
7475 | |
---|
7476 | |
---|
7477 | extern void *mempcpy(void * dest, const void * src, size_t n); |
---|
7478 | # 71 "./include/strutils.h" |
---|
7479 | extern char *strnchr(const char *s, size_t maxlen, int c); |
---|
7480 | |
---|
7481 | |
---|
7482 | |
---|
7483 | static inline void xstrncpy(char *dest, const char *src, size_t n) |
---|
7484 | { |
---|
7485 | size_t len = src ? strlen(src) : 0; |
---|
7486 | |
---|
7487 | if (!len) |
---|
7488 | return; |
---|
7489 | len = __extension__ ({ __typeof__(len) _min1 = (len); __typeof__(n - 1) _min2 = (n - 1); (void) (&_min1 == &_min2); _min1 < _min2 ? _min1 : _min2; }); |
---|
7490 | memcpy(dest, src, len); |
---|
7491 | dest[len] = 0; |
---|
7492 | } |
---|
7493 | # 93 "./include/strutils.h" |
---|
7494 | static inline void * __attribute__((nonnull (1))) |
---|
7495 | str2memcpy(void *dest, const char *src, size_t n) |
---|
7496 | { |
---|
7497 | size_t bytes = strlen(src) + 1; |
---|
7498 | |
---|
7499 | if (bytes > n) |
---|
7500 | bytes = n; |
---|
7501 | |
---|
7502 | memcpy(dest, src, bytes); |
---|
7503 | return dest; |
---|
7504 | } |
---|
7505 | |
---|
7506 | static inline char * __attribute__((nonnull (1))) |
---|
7507 | mem2strcpy(char *dest, const void *src, size_t n, size_t nmax) |
---|
7508 | { |
---|
7509 | if (n + 1 > nmax) |
---|
7510 | n = nmax - 1; |
---|
7511 | |
---|
7512 | memset(dest, '\0', nmax); |
---|
7513 | memcpy(dest, src, n); |
---|
7514 | return dest; |
---|
7515 | } |
---|
7516 | |
---|
7517 | |
---|
7518 | |
---|
7519 | |
---|
7520 | static inline char * __attribute__((warn_unused_result)) |
---|
7521 | strrealloc(char *str, const char *newstr) |
---|
7522 | { |
---|
7523 | size_t nsz, osz; |
---|
7524 | |
---|
7525 | if (!str) |
---|
7526 | return newstr ? strdup(newstr) : ((void *)0); |
---|
7527 | if (!newstr) |
---|
7528 | return ((void *)0); |
---|
7529 | |
---|
7530 | osz = strlen(str); |
---|
7531 | nsz = strlen(newstr); |
---|
7532 | |
---|
7533 | if (nsz > osz) |
---|
7534 | str = realloc(str, nsz + 1); |
---|
7535 | if (str) |
---|
7536 | memcpy(str, newstr, nsz + 1); |
---|
7537 | return str; |
---|
7538 | } |
---|
7539 | |
---|
7540 | |
---|
7541 | static inline int strdup_to_offset(void *stru, size_t offset, const char *str) |
---|
7542 | { |
---|
7543 | char **o; |
---|
7544 | char *p = ((void *)0); |
---|
7545 | |
---|
7546 | if (!stru) |
---|
7547 | return -22; |
---|
7548 | |
---|
7549 | o = (char **) ((char *) stru + offset); |
---|
7550 | if (str) { |
---|
7551 | p = strdup(str); |
---|
7552 | if (!p) |
---|
7553 | return -12; |
---|
7554 | } |
---|
7555 | |
---|
7556 | free(*o); |
---|
7557 | *o = p; |
---|
7558 | return 0; |
---|
7559 | } |
---|
7560 | |
---|
7561 | |
---|
7562 | #define strdup_to_struct_member(_s,_m,_str) strdup_to_offset((void *) _s, offsetof(__typeof__(*(_s)), _m), _str) |
---|
7563 | |
---|
7564 | |
---|
7565 | |
---|
7566 | static inline int strdup_between_offsets(void *stru_dst, void *stru_src, size_t offset) |
---|
7567 | { |
---|
7568 | char **src; |
---|
7569 | char **dst; |
---|
7570 | char *p = ((void *)0); |
---|
7571 | |
---|
7572 | if (!stru_src || !stru_dst) |
---|
7573 | return -22; |
---|
7574 | |
---|
7575 | src = (char **) ((char *) stru_src + offset); |
---|
7576 | dst = (char **) ((char *) stru_dst + offset); |
---|
7577 | |
---|
7578 | if (*src) { |
---|
7579 | p = strdup(*src); |
---|
7580 | if (!p) |
---|
7581 | return -12; |
---|
7582 | } |
---|
7583 | |
---|
7584 | free(*dst); |
---|
7585 | *dst = p; |
---|
7586 | return 0; |
---|
7587 | } |
---|
7588 | |
---|
7589 | |
---|
7590 | |
---|
7591 | #define strdup_between_structs(_dst,_src,_m) strdup_between_offsets((void *)_dst, (void *)_src, offsetof(__typeof__(*(_src)), _m)) |
---|
7592 | |
---|
7593 | |
---|
7594 | |
---|
7595 | extern char *xstrmode(mode_t mode, char *str); |
---|
7596 | |
---|
7597 | |
---|
7598 | enum |
---|
7599 | { |
---|
7600 | SIZE_SUFFIX_1LETTER = 0, |
---|
7601 | SIZE_SUFFIX_3LETTER = (1 << 0), |
---|
7602 | SIZE_SUFFIX_SPACE = (1 << 1), |
---|
7603 | SIZE_DECIMAL_2DIGITS = (1 << 2) |
---|
7604 | }; |
---|
7605 | |
---|
7606 | extern char *size_to_human_string(int options, uint64_t bytes); |
---|
7607 | |
---|
7608 | extern int string_to_idarray(const char *list, int ary[], size_t arysz, |
---|
7609 | int (name2id)(const char *, size_t)); |
---|
7610 | extern int string_add_to_idarray(const char *list, int ary[], |
---|
7611 | size_t arysz, size_t *ary_pos, |
---|
7612 | int (name2id)(const char *, size_t)); |
---|
7613 | |
---|
7614 | extern int string_to_bitarray(const char *list, char *ary, |
---|
7615 | int (*name2bit)(const char *, size_t)); |
---|
7616 | |
---|
7617 | extern int string_to_bitmask(const char *list, |
---|
7618 | unsigned long *mask, |
---|
7619 | long (*name2flag)(const char *, size_t)); |
---|
7620 | extern int parse_range(const char *str, int *lower, int *upper, int def); |
---|
7621 | |
---|
7622 | extern int streq_paths(const char *a, const char *b); |
---|
7623 | |
---|
7624 | |
---|
7625 | |
---|
7626 | |
---|
7627 | static inline const char *startswith(const char *s, const char *prefix) |
---|
7628 | { |
---|
7629 | size_t sz = prefix ? strlen(prefix) : 0; |
---|
7630 | |
---|
7631 | if (s && sz && strncmp(s, prefix, sz) == 0) |
---|
7632 | return s + sz; |
---|
7633 | return ((void *)0); |
---|
7634 | } |
---|
7635 | |
---|
7636 | |
---|
7637 | |
---|
7638 | |
---|
7639 | static inline const char *startswith_no_case(const char *s, const char *prefix) |
---|
7640 | { |
---|
7641 | size_t sz = prefix ? strlen(prefix) : 0; |
---|
7642 | |
---|
7643 | if (s && sz && strncasecmp(s, prefix, sz) == 0) |
---|
7644 | return s + sz; |
---|
7645 | return ((void *)0); |
---|
7646 | } |
---|
7647 | |
---|
7648 | |
---|
7649 | |
---|
7650 | |
---|
7651 | static inline const char *endswith(const char *s, const char *postfix) |
---|
7652 | { |
---|
7653 | size_t sl = s ? strlen(s) : 0; |
---|
7654 | size_t pl = postfix ? strlen(postfix) : 0; |
---|
7655 | |
---|
7656 | if (pl == 0) |
---|
7657 | return s + sl; |
---|
7658 | if (sl < pl) |
---|
7659 | return ((void *)0); |
---|
7660 | if (memcmp(s + sl - pl, postfix, pl) != 0) |
---|
7661 | return ((void *)0); |
---|
7662 | return s + sl - pl; |
---|
7663 | } |
---|
7664 | |
---|
7665 | |
---|
7666 | |
---|
7667 | |
---|
7668 | static inline const char *skip_space(const char *p) |
---|
7669 | { |
---|
7670 | while (isspace(*p)) |
---|
7671 | ++p; |
---|
7672 | return p; |
---|
7673 | } |
---|
7674 | |
---|
7675 | static inline const char *skip_blank(const char *p) |
---|
7676 | { |
---|
7677 | while (isblank(*p)) |
---|
7678 | ++p; |
---|
7679 | return p; |
---|
7680 | } |
---|
7681 | |
---|
7682 | |
---|
7683 | |
---|
7684 | |
---|
7685 | |
---|
7686 | |
---|
7687 | |
---|
7688 | static inline size_t rtrim_whitespace(unsigned char *str) |
---|
7689 | { |
---|
7690 | size_t i; |
---|
7691 | |
---|
7692 | if (!str) |
---|
7693 | return 0; |
---|
7694 | i = strlen((char *) str); |
---|
7695 | while (i) { |
---|
7696 | i--; |
---|
7697 | if (!isspace(str[i])) { |
---|
7698 | i++; |
---|
7699 | break; |
---|
7700 | } |
---|
7701 | } |
---|
7702 | str[i] = '\0'; |
---|
7703 | return i; |
---|
7704 | } |
---|
7705 | |
---|
7706 | |
---|
7707 | |
---|
7708 | |
---|
7709 | |
---|
7710 | static inline size_t ltrim_whitespace(unsigned char *str) |
---|
7711 | { |
---|
7712 | size_t len; |
---|
7713 | unsigned char *p; |
---|
7714 | |
---|
7715 | if (!str) |
---|
7716 | return 0; |
---|
7717 | for (p = str; *p && isspace(*p); p++); |
---|
7718 | |
---|
7719 | len = strlen((char *) p); |
---|
7720 | |
---|
7721 | if (p > str) |
---|
7722 | memmove(str, p, len + 1); |
---|
7723 | |
---|
7724 | return len; |
---|
7725 | } |
---|
7726 | |
---|
7727 | |
---|
7728 | |
---|
7729 | static inline size_t __normalize_whitespace( |
---|
7730 | const unsigned char *src, |
---|
7731 | size_t sz, |
---|
7732 | unsigned char *dst, |
---|
7733 | size_t len) |
---|
7734 | { |
---|
7735 | size_t i, x = 0; |
---|
7736 | int nsp = 0, intext = 0; |
---|
7737 | |
---|
7738 | if (!sz) |
---|
7739 | goto done; |
---|
7740 | |
---|
7741 | for (i = 0, x = 0; i < sz && x < len - 1; ) { |
---|
7742 | if (isspace(src[i])) |
---|
7743 | nsp++; |
---|
7744 | else |
---|
7745 | nsp = 0, intext = 1; |
---|
7746 | |
---|
7747 | if (nsp > 1 || (nsp && !intext)) |
---|
7748 | i++; |
---|
7749 | else |
---|
7750 | dst[x++] = src[i++]; |
---|
7751 | } |
---|
7752 | if (nsp && x > 0) |
---|
7753 | x--; |
---|
7754 | done: |
---|
7755 | dst[x] = '\0'; |
---|
7756 | return x; |
---|
7757 | } |
---|
7758 | |
---|
7759 | static inline size_t normalize_whitespace(unsigned char *str) |
---|
7760 | { |
---|
7761 | size_t sz = strlen((char *) str); |
---|
7762 | return __normalize_whitespace(str, sz, str, sz + 1); |
---|
7763 | } |
---|
7764 | |
---|
7765 | static inline void strrep(char *s, int find, int replace) |
---|
7766 | { |
---|
7767 | while (s && *s && (s = strchr(s, find)) != ((void *)0)) |
---|
7768 | *s++ = replace; |
---|
7769 | } |
---|
7770 | |
---|
7771 | static inline void strrem(char *s, int rem) |
---|
7772 | { |
---|
7773 | char *p; |
---|
7774 | |
---|
7775 | if (!s) |
---|
7776 | return; |
---|
7777 | for (p = s; *s; s++) { |
---|
7778 | if (*s != rem) |
---|
7779 | *p++ = *s; |
---|
7780 | } |
---|
7781 | *p = '\0'; |
---|
7782 | } |
---|
7783 | |
---|
7784 | extern char *strnconcat(const char *s, const char *suffix, size_t b); |
---|
7785 | extern char *strconcat(const char *s, const char *suffix); |
---|
7786 | extern char *strfconcat(const char *s, const char *format, ...) |
---|
7787 | __attribute__ ((__format__ (__printf__, 2, 3))); |
---|
7788 | |
---|
7789 | extern int strappend(char **a, const char *b); |
---|
7790 | |
---|
7791 | extern const char *split(const char **state, size_t *l, const char *separator, int quoted); |
---|
7792 | |
---|
7793 | extern int skip_fline(FILE *fp); |
---|
7794 | extern int ul_stralnumcmp(const char *p1, const char *p2); |
---|
7795 | # 53 "misc-utils/hardlink.c" 2 |
---|
7796 | # 1 "./include/monotonic.h" 1 |
---|
7797 | |
---|
7798 | |
---|
7799 | |
---|
7800 | |
---|
7801 | |
---|
7802 | #define UTIL_LINUX_MONOTONIC_H |
---|
7803 | |
---|
7804 | |
---|
7805 | |
---|
7806 | |
---|
7807 | #define UL_CLOCK_MONOTONIC CLOCK_MONOTONIC |
---|
7808 | |
---|
7809 | |
---|
7810 | |
---|
7811 | |
---|
7812 | extern int get_boot_time(struct timeval *boot_time); |
---|
7813 | |
---|
7814 | extern time_t get_suspended_time(void); |
---|
7815 | |
---|
7816 | extern int gettime_monotonic(struct timeval *tv); |
---|
7817 | # 54 "misc-utils/hardlink.c" 2 |
---|
7818 | # 1 "./include/optutils.h" 1 |
---|
7819 | |
---|
7820 | #define UTIL_LINUX_OPTUTILS_H |
---|
7821 | |
---|
7822 | # 1 "/usr/include/assert.h" 1 3 4 |
---|
7823 | # 52 "/usr/include/assert.h" 3 4 |
---|
7824 | #undef assert |
---|
7825 | #undef __assert |
---|
7826 | # 75 "/usr/include/assert.h" 3 4 |
---|
7827 | |
---|
7828 | void __assert_rtn(const char *, const char *, int, const char *) __attribute__((__noreturn__)); |
---|
7829 | void __eprintf(const char *, const char *, unsigned, const char *) __attribute__((__noreturn__)); |
---|
7830 | |
---|
7831 | |
---|
7832 | #define __assert(e,file,line) __eprintf ("%s:%u: failed assertion `%s'\n", file, line, e) |
---|
7833 | |
---|
7834 | |
---|
7835 | |
---|
7836 | #define assert(e) (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) |
---|
7837 | # 5 "./include/optutils.h" 2 |
---|
7838 | |
---|
7839 | |
---|
7840 | # 1 "./include/nls.h" 1 |
---|
7841 | # 8 "./include/optutils.h" 2 |
---|
7842 | # 1 "./include/cctype.h" 1 |
---|
7843 | # 29 "./include/cctype.h" |
---|
7844 | #define UTIL_LINUX_CCTYPE_H |
---|
7845 | # 68 "./include/cctype.h" |
---|
7846 | #define C_CTYPE_ASCII 1 |
---|
7847 | # 80 "./include/cctype.h" |
---|
7848 | #define _C_CTYPE_CNTRL case '\a': case '\b': case '\f': case '\n': case '\r': case '\t': case '\v': _C_CTYPE_OTHER_CNTRL |
---|
7849 | |
---|
7850 | |
---|
7851 | |
---|
7852 | |
---|
7853 | |
---|
7854 | |
---|
7855 | #define _C_CTYPE_OTHER_CNTRL case '\x00': case '\x01': case '\x02': case '\x03': case '\x04': case '\x05': case '\x06': case '\x0e': case '\x0f': case '\x10': case '\x11': case '\x12': case '\x13': case '\x14': case '\x15': case '\x16': case '\x17': case '\x18': case '\x19': case '\x1a': case '\x1b': case '\x1c': case '\x1d': case '\x1e': case '\x1f': case '\x7f' |
---|
7856 | # 112 "./include/cctype.h" |
---|
7857 | #define _C_CTYPE_LOWER_A_THRU_F_N(N) case 'a' + (N): case 'b' + (N): case 'c' + (N): case 'd' + (N): case 'e' + (N): case 'f' + (N) |
---|
7858 | |
---|
7859 | |
---|
7860 | #define _C_CTYPE_LOWER_N(N) _C_CTYPE_LOWER_A_THRU_F_N(N): case 'g' + (N): case 'h' + (N): case 'i' + (N): case 'j' + (N): case 'k' + (N): case 'l' + (N): case 'm' + (N): case 'n' + (N): case 'o' + (N): case 'p' + (N): case 'q' + (N): case 'r' + (N): case 's' + (N): case 't' + (N): case 'u' + (N): case 'v' + (N): case 'w' + (N): case 'x' + (N): case 'y' + (N): case 'z' + (N) |
---|
7861 | # 124 "./include/cctype.h" |
---|
7862 | #define _C_CTYPE_A_THRU_F _C_CTYPE_LOWER_A_THRU_F_N (0): _C_CTYPE_LOWER_A_THRU_F_N ('A' - 'a') |
---|
7863 | |
---|
7864 | |
---|
7865 | #define _C_CTYPE_DIGIT case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9' |
---|
7866 | |
---|
7867 | |
---|
7868 | |
---|
7869 | #define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0) |
---|
7870 | #define _C_CTYPE_PUNCT case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~' |
---|
7871 | # 141 "./include/cctype.h" |
---|
7872 | #define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a') |
---|
7873 | # 161 "./include/cctype.h" |
---|
7874 | static inline int c_isalnum (int c) |
---|
7875 | { |
---|
7876 | switch (c) { |
---|
7877 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
7878 | case 'a' + (0): case 'b' + (0): case 'c' + (0): case 'd' + (0): case 'e' + (0): case 'f' + (0): case 'g' + (0): case 'h' + (0): case 'i' + (0): case 'j' + (0): case 'k' + (0): case 'l' + (0): case 'm' + (0): case 'n' + (0): case 'o' + (0): case 'p' + (0): case 'q' + (0): case 'r' + (0): case 's' + (0): case 't' + (0): case 'u' + (0): case 'v' + (0): case 'w' + (0): case 'x' + (0): case 'y' + (0): case 'z' + (0): |
---|
7879 | case 'a' + ('A' - 'a'): case 'b' + ('A' - 'a'): case 'c' + ('A' - 'a'): case 'd' + ('A' - 'a'): case 'e' + ('A' - 'a'): case 'f' + ('A' - 'a'): case 'g' + ('A' - 'a'): case 'h' + ('A' - 'a'): case 'i' + ('A' - 'a'): case 'j' + ('A' - 'a'): case 'k' + ('A' - 'a'): case 'l' + ('A' - 'a'): case 'm' + ('A' - 'a'): case 'n' + ('A' - 'a'): case 'o' + ('A' - 'a'): case 'p' + ('A' - 'a'): case 'q' + ('A' - 'a'): case 'r' + ('A' - 'a'): case 's' + ('A' - 'a'): case 't' + ('A' - 'a'): case 'u' + ('A' - 'a'): case 'v' + ('A' - 'a'): case 'w' + ('A' - 'a'): case 'x' + ('A' - 'a'): case 'y' + ('A' - 'a'): case 'z' + ('A' - 'a'): |
---|
7880 | return 1; |
---|
7881 | default: |
---|
7882 | return 0; |
---|
7883 | } |
---|
7884 | } |
---|
7885 | |
---|
7886 | static inline int c_isalpha (int c) |
---|
7887 | { |
---|
7888 | switch (c) { |
---|
7889 | case 'a' + (0): case 'b' + (0): case 'c' + (0): case 'd' + (0): case 'e' + (0): case 'f' + (0): case 'g' + (0): case 'h' + (0): case 'i' + (0): case 'j' + (0): case 'k' + (0): case 'l' + (0): case 'm' + (0): case 'n' + (0): case 'o' + (0): case 'p' + (0): case 'q' + (0): case 'r' + (0): case 's' + (0): case 't' + (0): case 'u' + (0): case 'v' + (0): case 'w' + (0): case 'x' + (0): case 'y' + (0): case 'z' + (0): |
---|
7890 | case 'a' + ('A' - 'a'): case 'b' + ('A' - 'a'): case 'c' + ('A' - 'a'): case 'd' + ('A' - 'a'): case 'e' + ('A' - 'a'): case 'f' + ('A' - 'a'): case 'g' + ('A' - 'a'): case 'h' + ('A' - 'a'): case 'i' + ('A' - 'a'): case 'j' + ('A' - 'a'): case 'k' + ('A' - 'a'): case 'l' + ('A' - 'a'): case 'm' + ('A' - 'a'): case 'n' + ('A' - 'a'): case 'o' + ('A' - 'a'): case 'p' + ('A' - 'a'): case 'q' + ('A' - 'a'): case 'r' + ('A' - 'a'): case 's' + ('A' - 'a'): case 't' + ('A' - 'a'): case 'u' + ('A' - 'a'): case 'v' + ('A' - 'a'): case 'w' + ('A' - 'a'): case 'x' + ('A' - 'a'): case 'y' + ('A' - 'a'): case 'z' + ('A' - 'a'): |
---|
7891 | return 1; |
---|
7892 | default: |
---|
7893 | return 0; |
---|
7894 | } |
---|
7895 | } |
---|
7896 | |
---|
7897 | |
---|
7898 | |
---|
7899 | |
---|
7900 | static inline int c_isascii (int c) |
---|
7901 | { |
---|
7902 | switch (c) { |
---|
7903 | case ' ': |
---|
7904 | case '\a': case '\b': case '\f': case '\n': case '\r': case '\t': case '\v': case '\x00': case '\x01': case '\x02': case '\x03': case '\x04': case '\x05': case '\x06': case '\x0e': case '\x0f': case '\x10': case '\x11': case '\x12': case '\x13': case '\x14': case '\x15': case '\x16': case '\x17': case '\x18': case '\x19': case '\x1a': case '\x1b': case '\x1c': case '\x1d': case '\x1e': case '\x1f': case '\x7f': |
---|
7905 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
7906 | case 'a' + (0): case 'b' + (0): case 'c' + (0): case 'd' + (0): case 'e' + (0): case 'f' + (0): case 'g' + (0): case 'h' + (0): case 'i' + (0): case 'j' + (0): case 'k' + (0): case 'l' + (0): case 'm' + (0): case 'n' + (0): case 'o' + (0): case 'p' + (0): case 'q' + (0): case 'r' + (0): case 's' + (0): case 't' + (0): case 'u' + (0): case 'v' + (0): case 'w' + (0): case 'x' + (0): case 'y' + (0): case 'z' + (0): |
---|
7907 | case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': |
---|
7908 | case 'a' + ('A' - 'a'): case 'b' + ('A' - 'a'): case 'c' + ('A' - 'a'): case 'd' + ('A' - 'a'): case 'e' + ('A' - 'a'): case 'f' + ('A' - 'a'): case 'g' + ('A' - 'a'): case 'h' + ('A' - 'a'): case 'i' + ('A' - 'a'): case 'j' + ('A' - 'a'): case 'k' + ('A' - 'a'): case 'l' + ('A' - 'a'): case 'm' + ('A' - 'a'): case 'n' + ('A' - 'a'): case 'o' + ('A' - 'a'): case 'p' + ('A' - 'a'): case 'q' + ('A' - 'a'): case 'r' + ('A' - 'a'): case 's' + ('A' - 'a'): case 't' + ('A' - 'a'): case 'u' + ('A' - 'a'): case 'v' + ('A' - 'a'): case 'w' + ('A' - 'a'): case 'x' + ('A' - 'a'): case 'y' + ('A' - 'a'): case 'z' + ('A' - 'a'): |
---|
7909 | return 1; |
---|
7910 | default: |
---|
7911 | return 0; |
---|
7912 | } |
---|
7913 | } |
---|
7914 | |
---|
7915 | static inline int c_isblank (int c) |
---|
7916 | { |
---|
7917 | return c == ' ' || c == '\t'; |
---|
7918 | } |
---|
7919 | |
---|
7920 | static inline int c_iscntrl (int c) |
---|
7921 | { |
---|
7922 | switch (c) { |
---|
7923 | case '\a': case '\b': case '\f': case '\n': case '\r': case '\t': case '\v': case '\x00': case '\x01': case '\x02': case '\x03': case '\x04': case '\x05': case '\x06': case '\x0e': case '\x0f': case '\x10': case '\x11': case '\x12': case '\x13': case '\x14': case '\x15': case '\x16': case '\x17': case '\x18': case '\x19': case '\x1a': case '\x1b': case '\x1c': case '\x1d': case '\x1e': case '\x1f': case '\x7f': |
---|
7924 | return 1; |
---|
7925 | default: |
---|
7926 | return 0; |
---|
7927 | } |
---|
7928 | } |
---|
7929 | |
---|
7930 | static inline int c_isdigit (int c) |
---|
7931 | { |
---|
7932 | switch (c) { |
---|
7933 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
7934 | return 1; |
---|
7935 | default: |
---|
7936 | return 0; |
---|
7937 | } |
---|
7938 | } |
---|
7939 | |
---|
7940 | static inline int c_isgraph (int c) |
---|
7941 | { |
---|
7942 | switch (c) { |
---|
7943 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
7944 | case 'a' + (0): case 'b' + (0): case 'c' + (0): case 'd' + (0): case 'e' + (0): case 'f' + (0): case 'g' + (0): case 'h' + (0): case 'i' + (0): case 'j' + (0): case 'k' + (0): case 'l' + (0): case 'm' + (0): case 'n' + (0): case 'o' + (0): case 'p' + (0): case 'q' + (0): case 'r' + (0): case 's' + (0): case 't' + (0): case 'u' + (0): case 'v' + (0): case 'w' + (0): case 'x' + (0): case 'y' + (0): case 'z' + (0): |
---|
7945 | case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': |
---|
7946 | case 'a' + ('A' - 'a'): case 'b' + ('A' - 'a'): case 'c' + ('A' - 'a'): case 'd' + ('A' - 'a'): case 'e' + ('A' - 'a'): case 'f' + ('A' - 'a'): case 'g' + ('A' - 'a'): case 'h' + ('A' - 'a'): case 'i' + ('A' - 'a'): case 'j' + ('A' - 'a'): case 'k' + ('A' - 'a'): case 'l' + ('A' - 'a'): case 'm' + ('A' - 'a'): case 'n' + ('A' - 'a'): case 'o' + ('A' - 'a'): case 'p' + ('A' - 'a'): case 'q' + ('A' - 'a'): case 'r' + ('A' - 'a'): case 's' + ('A' - 'a'): case 't' + ('A' - 'a'): case 'u' + ('A' - 'a'): case 'v' + ('A' - 'a'): case 'w' + ('A' - 'a'): case 'x' + ('A' - 'a'): case 'y' + ('A' - 'a'): case 'z' + ('A' - 'a'): |
---|
7947 | return 1; |
---|
7948 | default: |
---|
7949 | return 0; |
---|
7950 | } |
---|
7951 | } |
---|
7952 | |
---|
7953 | static inline int c_islower (int c) |
---|
7954 | { |
---|
7955 | switch (c) { |
---|
7956 | case 'a' + (0): case 'b' + (0): case 'c' + (0): case 'd' + (0): case 'e' + (0): case 'f' + (0): case 'g' + (0): case 'h' + (0): case 'i' + (0): case 'j' + (0): case 'k' + (0): case 'l' + (0): case 'm' + (0): case 'n' + (0): case 'o' + (0): case 'p' + (0): case 'q' + (0): case 'r' + (0): case 's' + (0): case 't' + (0): case 'u' + (0): case 'v' + (0): case 'w' + (0): case 'x' + (0): case 'y' + (0): case 'z' + (0): |
---|
7957 | return 1; |
---|
7958 | default: |
---|
7959 | return 0; |
---|
7960 | } |
---|
7961 | } |
---|
7962 | |
---|
7963 | static inline int c_isprint (int c) |
---|
7964 | { |
---|
7965 | switch (c) { |
---|
7966 | case ' ': |
---|
7967 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
7968 | case 'a' + (0): case 'b' + (0): case 'c' + (0): case 'd' + (0): case 'e' + (0): case 'f' + (0): case 'g' + (0): case 'h' + (0): case 'i' + (0): case 'j' + (0): case 'k' + (0): case 'l' + (0): case 'm' + (0): case 'n' + (0): case 'o' + (0): case 'p' + (0): case 'q' + (0): case 'r' + (0): case 's' + (0): case 't' + (0): case 'u' + (0): case 'v' + (0): case 'w' + (0): case 'x' + (0): case 'y' + (0): case 'z' + (0): |
---|
7969 | case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': |
---|
7970 | case 'a' + ('A' - 'a'): case 'b' + ('A' - 'a'): case 'c' + ('A' - 'a'): case 'd' + ('A' - 'a'): case 'e' + ('A' - 'a'): case 'f' + ('A' - 'a'): case 'g' + ('A' - 'a'): case 'h' + ('A' - 'a'): case 'i' + ('A' - 'a'): case 'j' + ('A' - 'a'): case 'k' + ('A' - 'a'): case 'l' + ('A' - 'a'): case 'm' + ('A' - 'a'): case 'n' + ('A' - 'a'): case 'o' + ('A' - 'a'): case 'p' + ('A' - 'a'): case 'q' + ('A' - 'a'): case 'r' + ('A' - 'a'): case 's' + ('A' - 'a'): case 't' + ('A' - 'a'): case 'u' + ('A' - 'a'): case 'v' + ('A' - 'a'): case 'w' + ('A' - 'a'): case 'x' + ('A' - 'a'): case 'y' + ('A' - 'a'): case 'z' + ('A' - 'a'): |
---|
7971 | return 1; |
---|
7972 | default: |
---|
7973 | return 0; |
---|
7974 | } |
---|
7975 | } |
---|
7976 | |
---|
7977 | static inline int c_ispunct (int c) |
---|
7978 | { |
---|
7979 | switch (c) { |
---|
7980 | case '!': case '"': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case ',': case '-': case '.': case '/': case ':': case ';': case '<': case '=': case '>': case '?': case '@': case '[': case '\\': case ']': case '^': case '_': case '`': case '{': case '|': case '}': case '~': |
---|
7981 | return 1; |
---|
7982 | default: |
---|
7983 | return 0; |
---|
7984 | } |
---|
7985 | } |
---|
7986 | |
---|
7987 | static inline int c_isspace (int c) |
---|
7988 | { |
---|
7989 | switch (c) { |
---|
7990 | case ' ': case '\t': case '\n': case '\v': case '\f': case '\r': |
---|
7991 | return 1; |
---|
7992 | default: |
---|
7993 | return 0; |
---|
7994 | } |
---|
7995 | } |
---|
7996 | |
---|
7997 | static inline int c_isupper (int c) |
---|
7998 | { |
---|
7999 | switch (c) { |
---|
8000 | case 'a' + ('A' - 'a'): case 'b' + ('A' - 'a'): case 'c' + ('A' - 'a'): case 'd' + ('A' - 'a'): case 'e' + ('A' - 'a'): case 'f' + ('A' - 'a'): case 'g' + ('A' - 'a'): case 'h' + ('A' - 'a'): case 'i' + ('A' - 'a'): case 'j' + ('A' - 'a'): case 'k' + ('A' - 'a'): case 'l' + ('A' - 'a'): case 'm' + ('A' - 'a'): case 'n' + ('A' - 'a'): case 'o' + ('A' - 'a'): case 'p' + ('A' - 'a'): case 'q' + ('A' - 'a'): case 'r' + ('A' - 'a'): case 's' + ('A' - 'a'): case 't' + ('A' - 'a'): case 'u' + ('A' - 'a'): case 'v' + ('A' - 'a'): case 'w' + ('A' - 'a'): case 'x' + ('A' - 'a'): case 'y' + ('A' - 'a'): case 'z' + ('A' - 'a'): |
---|
8001 | return 1; |
---|
8002 | default: |
---|
8003 | return 0; |
---|
8004 | } |
---|
8005 | } |
---|
8006 | |
---|
8007 | static inline int c_isxdigit (int c) |
---|
8008 | { |
---|
8009 | switch (c) { |
---|
8010 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
8011 | case 'a' + (0): case 'b' + (0): case 'c' + (0): case 'd' + (0): case 'e' + (0): case 'f' + (0): case 'a' + ('A' - 'a'): case 'b' + ('A' - 'a'): case 'c' + ('A' - 'a'): case 'd' + ('A' - 'a'): case 'e' + ('A' - 'a'): case 'f' + ('A' - 'a'): |
---|
8012 | return 1; |
---|
8013 | default: |
---|
8014 | return 0; |
---|
8015 | } |
---|
8016 | } |
---|
8017 | |
---|
8018 | static inline int c_tolower (int c) |
---|
8019 | { |
---|
8020 | switch (c) { |
---|
8021 | case 'a' + ('A' - 'a'): case 'b' + ('A' - 'a'): case 'c' + ('A' - 'a'): case 'd' + ('A' - 'a'): case 'e' + ('A' - 'a'): case 'f' + ('A' - 'a'): case 'g' + ('A' - 'a'): case 'h' + ('A' - 'a'): case 'i' + ('A' - 'a'): case 'j' + ('A' - 'a'): case 'k' + ('A' - 'a'): case 'l' + ('A' - 'a'): case 'm' + ('A' - 'a'): case 'n' + ('A' - 'a'): case 'o' + ('A' - 'a'): case 'p' + ('A' - 'a'): case 'q' + ('A' - 'a'): case 'r' + ('A' - 'a'): case 's' + ('A' - 'a'): case 't' + ('A' - 'a'): case 'u' + ('A' - 'a'): case 'v' + ('A' - 'a'): case 'w' + ('A' - 'a'): case 'x' + ('A' - 'a'): case 'y' + ('A' - 'a'): case 'z' + ('A' - 'a'): |
---|
8022 | return c - 'A' + 'a'; |
---|
8023 | default: |
---|
8024 | return c; |
---|
8025 | } |
---|
8026 | } |
---|
8027 | |
---|
8028 | static inline int c_toupper (int c) |
---|
8029 | { |
---|
8030 | switch (c) { |
---|
8031 | case 'a' + (0): case 'b' + (0): case 'c' + (0): case 'd' + (0): case 'e' + (0): case 'f' + (0): case 'g' + (0): case 'h' + (0): case 'i' + (0): case 'j' + (0): case 'k' + (0): case 'l' + (0): case 'm' + (0): case 'n' + (0): case 'o' + (0): case 'p' + (0): case 'q' + (0): case 'r' + (0): case 's' + (0): case 't' + (0): case 'u' + (0): case 'v' + (0): case 'w' + (0): case 'x' + (0): case 'y' + (0): case 'z' + (0): |
---|
8032 | return c - 'a' + 'A'; |
---|
8033 | default: |
---|
8034 | return c; |
---|
8035 | } |
---|
8036 | } |
---|
8037 | # 9 "./include/optutils.h" 2 |
---|
8038 | |
---|
8039 | static inline const char *option_to_longopt(int c, const struct option *opts) |
---|
8040 | { |
---|
8041 | const struct option *o; |
---|
8042 | |
---|
8043 | (__builtin_expect(!(!(opts == ((void *)0))), 0) ? __assert_rtn(__func__, "./include/optutils.h", 14, "!(opts == NULL)") : (void)0); |
---|
8044 | for (o = opts; o->name; o++) |
---|
8045 | if (o->val == c) |
---|
8046 | return o->name; |
---|
8047 | return ((void *)0); |
---|
8048 | } |
---|
8049 | |
---|
8050 | |
---|
8051 | #define OPTUTILS_EXIT_CODE EXIT_FAILURE |
---|
8052 | # 63 "./include/optutils.h" |
---|
8053 | #define UL_EXCL_STATUS_INIT { 0 } |
---|
8054 | typedef int ul_excl_t[16]; |
---|
8055 | |
---|
8056 | static inline void err_exclusive_options( |
---|
8057 | int c, |
---|
8058 | const struct option *opts, |
---|
8059 | const ul_excl_t *excl, |
---|
8060 | int *status) |
---|
8061 | { |
---|
8062 | int e; |
---|
8063 | |
---|
8064 | for (e = 0; excl[e][0] && excl[e][0] <= c; e++) { |
---|
8065 | const int *op = excl[e]; |
---|
8066 | |
---|
8067 | for (; *op && *op <= c; op++) { |
---|
8068 | if (*op != c) |
---|
8069 | continue; |
---|
8070 | if (status[e] == 0) |
---|
8071 | status[e] = c; |
---|
8072 | else if (status[e] != c) { |
---|
8073 | size_t ct = 0; |
---|
8074 | |
---|
8075 | fprintf(__stderrp, libintl_gettext ("%s: mutually exclusive " "arguments:"), |
---|
8076 | |
---|
8077 | __progname); |
---|
8078 | |
---|
8079 | for (op = excl[e]; |
---|
8080 | ct + 1 < (sizeof(excl[0]) / sizeof((excl[0])[0]) + __extension__ (sizeof(struct { int:-!!(__builtin_types_compatible_p(__typeof__(excl[0]), __typeof__(&excl[0][0]))); }))) && *op; |
---|
8081 | op++, ct++) { |
---|
8082 | const char *n = option_to_longopt(*op, opts); |
---|
8083 | if (n) |
---|
8084 | fprintf(__stderrp, " --%s", n); |
---|
8085 | else if (c_isgraph(*op)) |
---|
8086 | fprintf(__stderrp, " -%c", *op); |
---|
8087 | } |
---|
8088 | fputc('\n', __stderrp); |
---|
8089 | exit(1); |
---|
8090 | } |
---|
8091 | break; |
---|
8092 | } |
---|
8093 | } |
---|
8094 | } |
---|
8095 | # 55 "misc-utils/hardlink.c" 2 |
---|
8096 | # 1 "./include/fileeq.h" 1 |
---|
8097 | |
---|
8098 | #define UTIL_LINUX_FILEEQ |
---|
8099 | |
---|
8100 | |
---|
8101 | |
---|
8102 | # 1 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdbool.h" 1 3 4 |
---|
8103 | # 32 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdbool.h" 3 4 |
---|
8104 | #define _STDBOOL_H |
---|
8105 | |
---|
8106 | |
---|
8107 | |
---|
8108 | #define bool _Bool |
---|
8109 | #define true 1 |
---|
8110 | #define false 0 |
---|
8111 | # 51 "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include/stdbool.h" 3 4 |
---|
8112 | #define __bool_true_false_are_defined 1 |
---|
8113 | # 7 "./include/fileeq.h" 2 |
---|
8114 | |
---|
8115 | |
---|
8116 | |
---|
8117 | #define UL_FILEEQ_INTROSIZ 32 |
---|
8118 | |
---|
8119 | struct ul_fileeq_data { |
---|
8120 | unsigned char intro[32]; |
---|
8121 | unsigned char *blocks; |
---|
8122 | size_t nblocks; |
---|
8123 | size_t maxblocks; |
---|
8124 | int fd; |
---|
8125 | const char *name; |
---|
8126 | _Bool is_eof; |
---|
8127 | }; |
---|
8128 | |
---|
8129 | struct ul_fileeq { |
---|
8130 | int fd_api; |
---|
8131 | int fd_cip; |
---|
8132 | |
---|
8133 | size_t readsiz; |
---|
8134 | uint64_t filesiz; |
---|
8135 | uint64_t blocksmax; |
---|
8136 | const struct ul_fileeq_method *method; |
---|
8137 | |
---|
8138 | |
---|
8139 | unsigned char *buf_a; |
---|
8140 | unsigned char *buf_b; |
---|
8141 | unsigned char *buf_last; |
---|
8142 | }; |
---|
8143 | |
---|
8144 | extern int ul_fileeq_init(struct ul_fileeq *eq, const char *method); |
---|
8145 | extern void ul_fileeq_deinit(struct ul_fileeq *eq); |
---|
8146 | |
---|
8147 | |
---|
8148 | extern int ul_fileeq_data_associated(struct ul_fileeq_data *data); |
---|
8149 | extern void ul_fileeq_data_close_file(struct ul_fileeq_data *data); |
---|
8150 | extern void ul_fileeq_data_init(struct ul_fileeq_data *data); |
---|
8151 | extern void ul_fileeq_data_deinit(struct ul_fileeq_data *data); |
---|
8152 | extern void ul_fileeq_data_set_file(struct ul_fileeq_data *data, |
---|
8153 | const char *name); |
---|
8154 | extern size_t ul_fileeq_set_size(struct ul_fileeq *eq, uint64_t filesiz, |
---|
8155 | size_t readsiz, size_t memsiz); |
---|
8156 | |
---|
8157 | extern int ul_fileeq(struct ul_fileeq *eq, |
---|
8158 | struct ul_fileeq_data *a, struct ul_fileeq_data *b); |
---|
8159 | # 56 "misc-utils/hardlink.c" 2 |
---|
8160 | # 1 "./include/statfs_magic.h" 1 |
---|
8161 | |
---|
8162 | #define UTIL_LINUX_STATFS_MAGIC_H |
---|
8163 | |
---|
8164 | |
---|
8165 | |
---|
8166 | |
---|
8167 | |
---|
8168 | |
---|
8169 | |
---|
8170 | #define F_TYPE_EQUAL(a,b) (a == (__typeof__(a)) b) |
---|
8171 | # 22 "./include/statfs_magic.h" |
---|
8172 | #define STATFS_ADFS_MAGIC 0xadf5 |
---|
8173 | #define STATFS_AFFS_MAGIC 0xadff |
---|
8174 | #define STATFS_AFS_MAGIC 0x5346414F |
---|
8175 | #define STATFS_AUTOFS_MAGIC 0x0187 |
---|
8176 | #define STATFS_BDEVFS_MAGIC 0x62646576 |
---|
8177 | #define STATFS_BEFS_MAGIC 0x42465331 |
---|
8178 | #define STATFS_BFS_MAGIC 0x1BADFACE |
---|
8179 | #define STATFS_BINFMTFS_MAGIC 0x42494e4d |
---|
8180 | #define STATFS_BTRFS_MAGIC 0x9123683E |
---|
8181 | #define STATFS_CEPH_MAGIC 0x00c36400 |
---|
8182 | #define STATFS_CGROUP_MAGIC 0x27e0eb |
---|
8183 | #define STATFS_CGROUP2_MAGIC 0x63677270 |
---|
8184 | #define STATFS_CIFS_MAGIC 0xff534d42 |
---|
8185 | #define STATFS_CODA_MAGIC 0x73757245 |
---|
8186 | #define STATFS_CONFIGFS_MAGIC 0x62656570 |
---|
8187 | #define STATFS_CRAMFS_MAGIC 0x28cd3d45 |
---|
8188 | #define STATFS_DEBUGFS_MAGIC 0x64626720 |
---|
8189 | #define STATFS_DEVPTS_MAGIC 0x1cd1 |
---|
8190 | #define STATFS_ECRYPTFS_MAGIC 0xf15f |
---|
8191 | #define STATFS_EFIVARFS_MAGIC 0xde5e81e4 |
---|
8192 | #define STATFS_EFS_MAGIC 0x414A53 |
---|
8193 | #define STATFS_EXOFS_MAGIC 0x5DF5 |
---|
8194 | #define STATFS_EXT2_MAGIC 0xEF53 |
---|
8195 | #define STATFS_EXT3_MAGIC 0xEF53 |
---|
8196 | #define STATFS_EXT4_MAGIC 0xEF53 |
---|
8197 | #define STATFS_F2FS_MAGIC 0xF2F52010 |
---|
8198 | #define STATFS_FUSE_MAGIC 0x65735546 |
---|
8199 | #define STATFS_FUTEXFS_MAGIC 0xBAD1DEA |
---|
8200 | #define STATFS_GFS2_MAGIC 0x01161970 |
---|
8201 | #define STATFS_HFSPLUS_MAGIC 0x482b |
---|
8202 | #define STATFS_HOSTFS_MAGIC 0x00c0ffee |
---|
8203 | #define STATFS_HPFS_MAGIC 0xf995e849 |
---|
8204 | #define STATFS_HPPFS_MAGIC 0xb00000ee |
---|
8205 | #define STATFS_HUGETLBFS_MAGIC 0x958458f6 |
---|
8206 | #define STATFS_ISOFS_MAGIC 0x9660 |
---|
8207 | #define STATFS_JFFS2_MAGIC 0x72b6 |
---|
8208 | #define STATFS_JFS_MAGIC 0x3153464a |
---|
8209 | #define STATFS_LOGFS_MAGIC 0xc97e8168 |
---|
8210 | #define STATFS_MINIX2_MAGIC 0x2468 |
---|
8211 | #define STATFS_MINIX2_MAGIC2 0x2478 |
---|
8212 | #define STATFS_MINIX3_MAGIC 0x4d5a |
---|
8213 | #define STATFS_MINIX_MAGIC 0x137F |
---|
8214 | #define STATFS_MINIX_MAGIC2 0x138F |
---|
8215 | #define STATFS_MQUEUE_MAGIC 0x19800202 |
---|
8216 | #define STATFS_MSDOS_MAGIC 0x4d44 |
---|
8217 | #define STATFS_NCP_MAGIC 0x564c |
---|
8218 | #define STATFS_NFS_MAGIC 0x6969 |
---|
8219 | #define STATFS_NILFS_MAGIC 0x3434 |
---|
8220 | #define STATFS_NTFS_MAGIC 0x5346544e |
---|
8221 | #define STATFS_OCFS2_MAGIC 0x7461636f |
---|
8222 | #define STATFS_OMFS_MAGIC 0xC2993D87 |
---|
8223 | #define STATFS_OPENPROMFS_MAGIC 0x9fa1 |
---|
8224 | #define STATFS_PIPEFS_MAGIC 0x50495045 |
---|
8225 | #define STATFS_PROC_MAGIC 0x9fa0 |
---|
8226 | #define STATFS_PSTOREFS_MAGIC 0x6165676C |
---|
8227 | #define STATFS_QNX4_MAGIC 0x002f |
---|
8228 | #define STATFS_QNX6_MAGIC 0x68191122 |
---|
8229 | #define STATFS_RAMFS_MAGIC 0x858458f6 |
---|
8230 | #define STATFS_REISERFS_MAGIC 0x52654973 |
---|
8231 | #define STATFS_ROMFS_MAGIC 0x7275 |
---|
8232 | #define STATFS_SECURITYFS_MAGIC 0x73636673 |
---|
8233 | #define STATFS_SELINUXFS_MAGIC 0xf97cff8c |
---|
8234 | #define STATFS_SMACKFS_MAGIC 0x43415d53 |
---|
8235 | #define STATFS_SMB_MAGIC 0x517B |
---|
8236 | #define STATFS_SOCKFS_MAGIC 0x534F434B |
---|
8237 | #define STATFS_SQUASHFS_MAGIC 0x73717368 |
---|
8238 | #define STATFS_SYSFS_MAGIC 0x62656572 |
---|
8239 | #define STATFS_TMPFS_MAGIC 0x01021994 |
---|
8240 | #define STATFS_UBIFS_MAGIC 0x24051905 |
---|
8241 | #define STATFS_UDF_MAGIC 0x15013346 |
---|
8242 | #define STATFS_UFS2_MAGIC 0x19540119 |
---|
8243 | #define STATFS_UFS_MAGIC 0x00011954 |
---|
8244 | #define STATFS_V9FS_MAGIC 0x01021997 |
---|
8245 | #define STATFS_VXFS_MAGIC 0xa501FCF5 |
---|
8246 | #define STATFS_XENFS_MAGIC 0xabba1974 |
---|
8247 | #define STATFS_XFS_MAGIC 0x58465342 |
---|
8248 | # 57 "misc-utils/hardlink.c" 2 |
---|
8249 | |
---|
8250 | # 1 "/usr/include/regex.h" 1 3 4 |
---|
8251 | # 63 "/usr/include/regex.h" 3 4 |
---|
8252 | #define _REGEX_H_ |
---|
8253 | |
---|
8254 | |
---|
8255 | |
---|
8256 | |
---|
8257 | typedef __darwin_off_t regoff_t; |
---|
8258 | |
---|
8259 | |
---|
8260 | |
---|
8261 | |
---|
8262 | |
---|
8263 | |
---|
8264 | typedef struct { |
---|
8265 | int re_magic; |
---|
8266 | size_t re_nsub; |
---|
8267 | const char *re_endp; |
---|
8268 | struct re_guts *re_g; |
---|
8269 | } regex_t; |
---|
8270 | |
---|
8271 | typedef struct { |
---|
8272 | regoff_t rm_so; |
---|
8273 | regoff_t rm_eo; |
---|
8274 | } regmatch_t; |
---|
8275 | |
---|
8276 | |
---|
8277 | |
---|
8278 | #define REG_BASIC 0000 |
---|
8279 | |
---|
8280 | #define REG_EXTENDED 0001 |
---|
8281 | #define REG_ICASE 0002 |
---|
8282 | #define REG_NOSUB 0004 |
---|
8283 | #define REG_NEWLINE 0010 |
---|
8284 | |
---|
8285 | #define REG_NOSPEC 0020 |
---|
8286 | #define REG_PEND 0040 |
---|
8287 | #define REG_DUMP 0200 |
---|
8288 | |
---|
8289 | |
---|
8290 | |
---|
8291 | #define REG_ENOSYS (-1) |
---|
8292 | #define REG_NOMATCH 1 |
---|
8293 | #define REG_BADPAT 2 |
---|
8294 | #define REG_ECOLLATE 3 |
---|
8295 | #define REG_ECTYPE 4 |
---|
8296 | #define REG_EESCAPE 5 |
---|
8297 | #define REG_ESUBREG 6 |
---|
8298 | #define REG_EBRACK 7 |
---|
8299 | #define REG_EPAREN 8 |
---|
8300 | #define REG_EBRACE 9 |
---|
8301 | #define REG_BADBR 10 |
---|
8302 | #define REG_ERANGE 11 |
---|
8303 | #define REG_ESPACE 12 |
---|
8304 | #define REG_BADRPT 13 |
---|
8305 | |
---|
8306 | #define REG_EMPTY 14 |
---|
8307 | #define REG_ASSERT 15 |
---|
8308 | #define REG_INVARG 16 |
---|
8309 | #define REG_ILLSEQ 17 |
---|
8310 | #define REG_ATOI 255 |
---|
8311 | #define REG_ITOA 0400 |
---|
8312 | |
---|
8313 | |
---|
8314 | |
---|
8315 | #define REG_NOTBOL 00001 |
---|
8316 | #define REG_NOTEOL 00002 |
---|
8317 | |
---|
8318 | #define REG_STARTEND 00004 |
---|
8319 | #define REG_TRACE 00400 |
---|
8320 | #define REG_LARGE 01000 |
---|
8321 | #define REG_BACKR 02000 |
---|
8322 | |
---|
8323 | |
---|
8324 | |
---|
8325 | int regcomp(regex_t * , const char * , int) __asm("_" "regcomp" "$UNIX2003"); |
---|
8326 | size_t regerror(int, const regex_t * , char * , size_t); |
---|
8327 | |
---|
8328 | |
---|
8329 | |
---|
8330 | |
---|
8331 | int regexec(const regex_t * , const char * , size_t, |
---|
8332 | regmatch_t __pmatch[ ], int); |
---|
8333 | void regfree(regex_t *); |
---|
8334 | |
---|
8335 | # 59 "misc-utils/hardlink.c" 2 |
---|
8336 | |
---|
8337 | |
---|
8338 | |
---|
8339 | |
---|
8340 | |
---|
8341 | |
---|
8342 | static int quiet; |
---|
8343 | # 77 "misc-utils/hardlink.c" |
---|
8344 | static struct ul_fileeq fileeq; |
---|
8345 | # 88 "misc-utils/hardlink.c" |
---|
8346 | struct file { |
---|
8347 | struct stat st; |
---|
8348 | struct ul_fileeq_data data; |
---|
8349 | |
---|
8350 | struct file *next; |
---|
8351 | struct link { |
---|
8352 | struct link *next; |
---|
8353 | int basename; |
---|
8354 | |
---|
8355 | |
---|
8356 | |
---|
8357 | char path[0]; |
---|
8358 | |
---|
8359 | |
---|
8360 | |
---|
8361 | } *links; |
---|
8362 | }; |
---|
8363 | # 113 "misc-utils/hardlink.c" |
---|
8364 | enum log_level { |
---|
8365 | JLOG_SUMMARY, |
---|
8366 | JLOG_INFO, |
---|
8367 | JLOG_VERBOSE1, |
---|
8368 | JLOG_VERBOSE2 |
---|
8369 | }; |
---|
8370 | # 130 "misc-utils/hardlink.c" |
---|
8371 | static struct statistics { |
---|
8372 | int started; |
---|
8373 | size_t files; |
---|
8374 | size_t linked; |
---|
8375 | size_t xattr_comparisons; |
---|
8376 | size_t comparisons; |
---|
8377 | size_t ignored_reflinks; |
---|
8378 | double saved; |
---|
8379 | struct timeval start_time; |
---|
8380 | } stats; |
---|
8381 | |
---|
8382 | |
---|
8383 | struct hdl_regex { |
---|
8384 | regex_t re; |
---|
8385 | |
---|
8386 | struct hdl_regex *next; |
---|
8387 | }; |
---|
8388 | # 165 "misc-utils/hardlink.c" |
---|
8389 | static struct options { |
---|
8390 | struct hdl_regex *include; |
---|
8391 | struct hdl_regex *exclude; |
---|
8392 | |
---|
8393 | const char *method; |
---|
8394 | signed int verbosity; |
---|
8395 | unsigned int respect_mode:1; |
---|
8396 | unsigned int respect_owner:1; |
---|
8397 | unsigned int respect_name:1; |
---|
8398 | unsigned int respect_time:1; |
---|
8399 | unsigned int respect_xattrs:1; |
---|
8400 | unsigned int maximise:1; |
---|
8401 | unsigned int minimise:1; |
---|
8402 | unsigned int keep_oldest:1; |
---|
8403 | unsigned int dry_run:1; |
---|
8404 | uintmax_t min_size; |
---|
8405 | uintmax_t max_size; |
---|
8406 | size_t io_size; |
---|
8407 | size_t cache_size; |
---|
8408 | } opts = { |
---|
8409 | |
---|
8410 | .method = "sha256", |
---|
8411 | .respect_mode = 1, |
---|
8412 | .respect_owner = 1, |
---|
8413 | .respect_time = 1, |
---|
8414 | .respect_xattrs = 0, |
---|
8415 | .keep_oldest = 0, |
---|
8416 | .min_size = 1, |
---|
8417 | .cache_size = 10*1024*1024 |
---|
8418 | }; |
---|
8419 | |
---|
8420 | |
---|
8421 | |
---|
8422 | |
---|
8423 | |
---|
8424 | |
---|
8425 | |
---|
8426 | static void *files; |
---|
8427 | static void *files_by_ino; |
---|
8428 | |
---|
8429 | |
---|
8430 | |
---|
8431 | |
---|
8432 | |
---|
8433 | |
---|
8434 | |
---|
8435 | static int last_signal; |
---|
8436 | |
---|
8437 | |
---|
8438 | #define is_log_enabled(_level) (quiet == 0 && (_level) <= (unsigned int)opts.verbosity) |
---|
8439 | |
---|
8440 | |
---|
8441 | |
---|
8442 | |
---|
8443 | |
---|
8444 | |
---|
8445 | __attribute__((format(printf, 2, 3))) |
---|
8446 | static void jlog(enum log_level level, const char *format, ...) |
---|
8447 | { |
---|
8448 | va_list args; |
---|
8449 | |
---|
8450 | if (!(quiet == 0 && (level) <= (unsigned int)opts.verbosity)) |
---|
8451 | return; |
---|
8452 | |
---|
8453 | __builtin_va_start(args,format); |
---|
8454 | vfprintf(__stdoutp, format, args); |
---|
8455 | __builtin_va_end(args); |
---|
8456 | fputc('\n', __stdoutp); |
---|
8457 | } |
---|
8458 | # 242 "misc-utils/hardlink.c" |
---|
8459 | #define CMP(a,b) ((a) > (b) ? 1 : ((a) < (b) ? -1 : 0)) |
---|
8460 | |
---|
8461 | |
---|
8462 | |
---|
8463 | |
---|
8464 | |
---|
8465 | |
---|
8466 | static void register_regex(struct hdl_regex **pregs, const char *regex) |
---|
8467 | { |
---|
8468 | struct hdl_regex *link; |
---|
8469 | int err; |
---|
8470 | |
---|
8471 | link = xmalloc(sizeof(*link)); |
---|
8472 | |
---|
8473 | if ((err = regcomp(&link->re, regex, 0004 | 0001)) != 0) { |
---|
8474 | size_t size = regerror(err, &link->re, ((void *)0), 0); |
---|
8475 | char *buf = xmalloc(size + 1); |
---|
8476 | |
---|
8477 | regerror(err, &link->re, buf, size); |
---|
8478 | |
---|
8479 | errx(1, libintl_gettext ("could not compile regular expression %s: %s"), |
---|
8480 | regex, buf); |
---|
8481 | } |
---|
8482 | link->next = *pregs; *pregs = link; |
---|
8483 | } |
---|
8484 | # 276 "misc-utils/hardlink.c" |
---|
8485 | static int match_any_regex(struct hdl_regex *pregs, const char *what) |
---|
8486 | { |
---|
8487 | for (; pregs != ((void *)0); pregs = pregs->next) { |
---|
8488 | if (regexec(&pregs->re, what, 0, ((void *)0), 0) == 0) |
---|
8489 | return 1; |
---|
8490 | } |
---|
8491 | return 0; |
---|
8492 | } |
---|
8493 | # 292 "misc-utils/hardlink.c" |
---|
8494 | static int compare_nodes(const void *_a, const void *_b) |
---|
8495 | { |
---|
8496 | const struct file *a = _a; |
---|
8497 | const struct file *b = _b; |
---|
8498 | int diff = 0; |
---|
8499 | |
---|
8500 | if (diff == 0) |
---|
8501 | diff = ((a->st.st_dev) > (b->st.st_dev) ? 1 : ((a->st.st_dev) < (b->st.st_dev) ? -1 : 0)); |
---|
8502 | if (diff == 0) |
---|
8503 | diff = ((a->st.st_size) > (b->st.st_size) ? 1 : ((a->st.st_size) < (b->st.st_size) ? -1 : 0)); |
---|
8504 | |
---|
8505 | return diff; |
---|
8506 | } |
---|
8507 | # 313 "misc-utils/hardlink.c" |
---|
8508 | static int compare_nodes_ino(const void *_a, const void *_b) |
---|
8509 | { |
---|
8510 | const struct file *a = _a; |
---|
8511 | const struct file *b = _b; |
---|
8512 | int diff = 0; |
---|
8513 | |
---|
8514 | if (diff == 0) |
---|
8515 | diff = ((a->st.st_dev) > (b->st.st_dev) ? 1 : ((a->st.st_dev) < (b->st.st_dev) ? -1 : 0)); |
---|
8516 | if (diff == 0) |
---|
8517 | diff = ((a->st.st_ino) > (b->st.st_ino) ? 1 : ((a->st.st_ino) < (b->st.st_ino) ? -1 : 0)); |
---|
8518 | |
---|
8519 | |
---|
8520 | |
---|
8521 | |
---|
8522 | if (diff == 0 && opts.respect_name) |
---|
8523 | diff = strcmp(a->links->path + a->links->basename, |
---|
8524 | b->links->path + b->links->basename); |
---|
8525 | |
---|
8526 | return diff; |
---|
8527 | } |
---|
8528 | |
---|
8529 | |
---|
8530 | |
---|
8531 | |
---|
8532 | static void print_stats(void) |
---|
8533 | { |
---|
8534 | struct timeval end = { 0, 0 }, delta = { 0, 0 }; |
---|
8535 | char *ssz; |
---|
8536 | |
---|
8537 | gettime_monotonic(&end); |
---|
8538 | do { (&delta)->tv_sec = (&end)->tv_sec - (&stats.start_time)->tv_sec; (&delta)->tv_usec = (&end)->tv_usec - (&stats.start_time)->tv_usec; if ((&delta)->tv_usec < 0) { (&delta)->tv_sec--; (&delta)->tv_usec += 1000000; } } while (0); |
---|
8539 | |
---|
8540 | jlog(JLOG_SUMMARY, "%-25s %s", libintl_gettext ("Mode:"), |
---|
8541 | opts.dry_run ? libintl_gettext ("dry-run") : libintl_gettext ("real")); |
---|
8542 | jlog(JLOG_SUMMARY, "%-25s %s", libintl_gettext ("Method:"), opts.method); |
---|
8543 | jlog(JLOG_SUMMARY, "%-25s %zu", libintl_gettext ("Files:"), stats.files); |
---|
8544 | jlog(JLOG_SUMMARY, libintl_gettext ("%-25s %zu files"), libintl_gettext ("Linked:"), stats.linked); |
---|
8545 | |
---|
8546 | |
---|
8547 | |
---|
8548 | |
---|
8549 | |
---|
8550 | jlog(JLOG_SUMMARY, libintl_gettext ("%-25s %zu files"), libintl_gettext ("Compared:"), |
---|
8551 | stats.comparisons); |
---|
8552 | |
---|
8553 | |
---|
8554 | |
---|
8555 | |
---|
8556 | |
---|
8557 | ssz = size_to_human_string(SIZE_SUFFIX_3LETTER | |
---|
8558 | SIZE_SUFFIX_SPACE | |
---|
8559 | SIZE_DECIMAL_2DIGITS, stats.saved); |
---|
8560 | |
---|
8561 | jlog(JLOG_SUMMARY, "%-25s %s", libintl_gettext ("Saved:"), ssz); |
---|
8562 | free(ssz); |
---|
8563 | |
---|
8564 | jlog(JLOG_SUMMARY, libintl_gettext ("%-25s %""ll" "d"".%06""ll" "d"" seconds"), libintl_gettext ("Duration:"), |
---|
8565 | (int64_t)delta.tv_sec, (int64_t)delta.tv_usec); |
---|
8566 | } |
---|
8567 | |
---|
8568 | |
---|
8569 | |
---|
8570 | |
---|
8571 | |
---|
8572 | |
---|
8573 | static int handle_interrupt(void) |
---|
8574 | { |
---|
8575 | switch (last_signal) { |
---|
8576 | case 2: |
---|
8577 | case 15: |
---|
8578 | return 1; |
---|
8579 | case 30: |
---|
8580 | print_stats(); |
---|
8581 | putchar('\n'); |
---|
8582 | break; |
---|
8583 | } |
---|
8584 | |
---|
8585 | last_signal = 0; |
---|
8586 | return 0; |
---|
8587 | } |
---|
8588 | # 580 "misc-utils/hardlink.c" |
---|
8589 | static int file_xattrs_equal(const struct file *a, const struct file *b) |
---|
8590 | { |
---|
8591 | return 1; |
---|
8592 | } |
---|
8593 | # 594 "misc-utils/hardlink.c" |
---|
8594 | static int file_may_link_to(const struct file *a, const struct file *b) |
---|
8595 | { |
---|
8596 | return (a->st.st_size != 0 && |
---|
8597 | a->st.st_size == b->st.st_size && |
---|
8598 | a->links != ((void *)0) && b->links != ((void *)0) && |
---|
8599 | a->st.st_dev == b->st.st_dev && |
---|
8600 | a->st.st_ino != b->st.st_ino && |
---|
8601 | (!opts.respect_mode || a->st.st_mode == b->st.st_mode) && |
---|
8602 | (!opts.respect_owner || a->st.st_uid == b->st.st_uid) && |
---|
8603 | (!opts.respect_owner || a->st.st_gid == b->st.st_gid) && |
---|
8604 | (!opts.respect_time || a->st.st_mtimespec.tv_sec == b->st.st_mtimespec.tv_sec) && |
---|
8605 | (!opts.respect_name |
---|
8606 | || strcmp(a->links->path + a->links->basename, |
---|
8607 | b->links->path + b->links->basename) == 0) && |
---|
8608 | (!opts.respect_xattrs || file_xattrs_equal(a, b))); |
---|
8609 | } |
---|
8610 | # 620 "misc-utils/hardlink.c" |
---|
8611 | static int file_compare(const struct file *a, const struct file *b) |
---|
8612 | { |
---|
8613 | int res = 0; |
---|
8614 | if (a->st.st_dev == b->st.st_dev && a->st.st_ino == b->st.st_ino) |
---|
8615 | return 0; |
---|
8616 | |
---|
8617 | if (res == 0 && opts.maximise) |
---|
8618 | res = ((a->st.st_nlink) > (b->st.st_nlink) ? 1 : ((a->st.st_nlink) < (b->st.st_nlink) ? -1 : 0)); |
---|
8619 | if (res == 0 && opts.minimise) |
---|
8620 | res = ((b->st.st_nlink) > (a->st.st_nlink) ? 1 : ((b->st.st_nlink) < (a->st.st_nlink) ? -1 : 0)); |
---|
8621 | if (res == 0) |
---|
8622 | res = opts.keep_oldest ? ((b->st.st_mtimespec.tv_sec) > (a->st.st_mtimespec.tv_sec) ? 1 : ((b->st.st_mtimespec.tv_sec) < (a->st.st_mtimespec.tv_sec) ? -1 : 0)) |
---|
8623 | : ((a->st.st_mtimespec.tv_sec) > (b->st.st_mtimespec.tv_sec) ? 1 : ((a->st.st_mtimespec.tv_sec) < (b->st.st_mtimespec.tv_sec) ? -1 : 0)); |
---|
8624 | if (res == 0) |
---|
8625 | res = ((b->st.st_ino) > (a->st.st_ino) ? 1 : ((b->st.st_ino) < (a->st.st_ino) ? -1 : 0)); |
---|
8626 | |
---|
8627 | return res; |
---|
8628 | } |
---|
8629 | # 677 "misc-utils/hardlink.c" |
---|
8630 | static inline int do_link(struct file *a, |
---|
8631 | struct file *b __attribute__((__unused__)), |
---|
8632 | const char *new_name, |
---|
8633 | int reflink __attribute__((__unused__))) |
---|
8634 | { |
---|
8635 | return link(a->links->path, new_name); |
---|
8636 | } |
---|
8637 | # 695 "misc-utils/hardlink.c" |
---|
8638 | static int file_link(struct file *a, struct file *b, int reflink) |
---|
8639 | { |
---|
8640 | |
---|
8641 | file_link: |
---|
8642 | (__builtin_expect(!(a->links != ((void *)0)), 0) ? __assert_rtn(__func__, "misc-utils/hardlink.c", 699, "a->links != NULL") : (void)0); |
---|
8643 | (__builtin_expect(!(b->links != ((void *)0)), 0) ? __assert_rtn(__func__, "misc-utils/hardlink.c", 700, "b->links != NULL") : (void)0); |
---|
8644 | |
---|
8645 | if ((quiet == 0 && (JLOG_INFO) <= (unsigned int)opts.verbosity)) { |
---|
8646 | char *ssz = size_to_human_string(SIZE_SUFFIX_3LETTER | |
---|
8647 | SIZE_SUFFIX_SPACE | |
---|
8648 | SIZE_DECIMAL_2DIGITS, a->st.st_size); |
---|
8649 | jlog(JLOG_INFO, libintl_gettext ("%s%sLinking %s to %s (-%s)"), |
---|
8650 | opts.dry_run ? libintl_gettext ("[DryRun] ") : "", |
---|
8651 | reflink ? "Ref" : "", |
---|
8652 | a->links->path, b->links->path, |
---|
8653 | ssz); |
---|
8654 | free(ssz); |
---|
8655 | } |
---|
8656 | |
---|
8657 | if (!opts.dry_run) { |
---|
8658 | char *new_path; |
---|
8659 | int failed = 1; |
---|
8660 | |
---|
8661 | xasprintf(&new_path, "%s.hardlink-temporary", b->links->path); |
---|
8662 | |
---|
8663 | if (do_link(a, b, new_path, reflink) != 0) |
---|
8664 | warn(libintl_gettext ("cannot link %s to %s"), a->links->path, new_path); |
---|
8665 | |
---|
8666 | else if (rename(new_path, b->links->path) != 0) { |
---|
8667 | warn(libintl_gettext ("cannot rename %s to %s"), a->links->path, new_path); |
---|
8668 | unlink(new_path); |
---|
8669 | } else |
---|
8670 | failed = 0; |
---|
8671 | |
---|
8672 | free(new_path); |
---|
8673 | if (failed) |
---|
8674 | return 0; |
---|
8675 | } |
---|
8676 | |
---|
8677 | |
---|
8678 | stats.linked++; |
---|
8679 | |
---|
8680 | |
---|
8681 | a->st.st_nlink++; |
---|
8682 | b->st.st_nlink--; |
---|
8683 | |
---|
8684 | if (b->st.st_nlink == 0) |
---|
8685 | stats.saved += a->st.st_size; |
---|
8686 | |
---|
8687 | |
---|
8688 | { |
---|
8689 | struct link *new_link = b->links; |
---|
8690 | |
---|
8691 | b->links = b->links->next; |
---|
8692 | new_link->next = a->links->next; |
---|
8693 | a->links->next = new_link; |
---|
8694 | } |
---|
8695 | |
---|
8696 | |
---|
8697 | if (b->links) |
---|
8698 | goto file_link; |
---|
8699 | |
---|
8700 | return 1; |
---|
8701 | } |
---|
8702 | |
---|
8703 | static int has_fpath(struct file *node, const char *path) |
---|
8704 | { |
---|
8705 | struct link *l; |
---|
8706 | |
---|
8707 | for (l = node->links; l; l = l->next) { |
---|
8708 | if (strcmp(l->path, path) == 0) |
---|
8709 | return 1; |
---|
8710 | } |
---|
8711 | |
---|
8712 | return 0; |
---|
8713 | } |
---|
8714 | # 783 "misc-utils/hardlink.c" |
---|
8715 | static int inserter(const char *fpath, const struct stat *sb, |
---|
8716 | int typeflag, struct FTW *ftwbuf) |
---|
8717 | { |
---|
8718 | struct file *fil; |
---|
8719 | struct file **node; |
---|
8720 | size_t pathlen; |
---|
8721 | int included; |
---|
8722 | int excluded; |
---|
8723 | |
---|
8724 | if (handle_interrupt()) |
---|
8725 | return 1; |
---|
8726 | if (typeflag == 2 || typeflag == 4) |
---|
8727 | warn(libintl_gettext ("cannot read %s"), fpath); |
---|
8728 | if (typeflag != 0 || !(((sb->st_mode) & 0170000) == 0100000)) |
---|
8729 | return 0; |
---|
8730 | |
---|
8731 | included = match_any_regex(opts.include, fpath); |
---|
8732 | excluded = match_any_regex(opts.exclude, fpath); |
---|
8733 | |
---|
8734 | if ((opts.exclude && excluded && !included) || |
---|
8735 | (!opts.exclude && opts.include && !included)) |
---|
8736 | return 0; |
---|
8737 | |
---|
8738 | stats.files++; |
---|
8739 | |
---|
8740 | if ((uintmax_t) sb->st_size < opts.min_size) { |
---|
8741 | jlog(JLOG_VERBOSE1, |
---|
8742 | libintl_gettext ("Skipped %s (smaller than configured size)"), fpath); |
---|
8743 | return 0; |
---|
8744 | } |
---|
8745 | |
---|
8746 | jlog(JLOG_VERBOSE2, " %5zu: [%ld/%ld/%zu] %s", |
---|
8747 | stats.files, sb->st_dev, sb->st_ino, |
---|
8748 | (size_t) sb->st_nlink, fpath); |
---|
8749 | |
---|
8750 | if ((opts.max_size > 0) && ((uintmax_t) sb->st_size > opts.max_size)) { |
---|
8751 | jlog(JLOG_VERBOSE1, |
---|
8752 | libintl_gettext ("Skipped %s (greater than configured size)"), fpath); |
---|
8753 | return 0; |
---|
8754 | } |
---|
8755 | |
---|
8756 | pathlen = strlen(fpath) + 1; |
---|
8757 | |
---|
8758 | fil = xcalloc(1, sizeof(*fil)); |
---|
8759 | fil->links = xcalloc(1, sizeof(struct link) + pathlen); |
---|
8760 | |
---|
8761 | fil->st = *sb; |
---|
8762 | fil->links->basename = ftwbuf->base; |
---|
8763 | fil->links->next = ((void *)0); |
---|
8764 | |
---|
8765 | memcpy(fil->links->path, fpath, pathlen); |
---|
8766 | |
---|
8767 | node = tsearch(fil, &files_by_ino, compare_nodes_ino); |
---|
8768 | |
---|
8769 | if (node == ((void *)0)) |
---|
8770 | goto fail; |
---|
8771 | |
---|
8772 | if (*node != fil) { |
---|
8773 | |
---|
8774 | (__builtin_expect(!((*node)->st.st_dev == sb->st_dev), 0) ? __assert_rtn(__func__, "misc-utils/hardlink.c", 842, "(*node)->st.st_dev == sb->st_dev") : (void)0); |
---|
8775 | (__builtin_expect(!((*node)->st.st_ino == sb->st_ino), 0) ? __assert_rtn(__func__, "misc-utils/hardlink.c", 843, "(*node)->st.st_ino == sb->st_ino") : (void)0); |
---|
8776 | |
---|
8777 | if (has_fpath(*node, fpath)) { |
---|
8778 | jlog(JLOG_VERBOSE1, |
---|
8779 | libintl_gettext ("Skipped %s (specified more than once)"), fpath); |
---|
8780 | free(fil->links); |
---|
8781 | } else { |
---|
8782 | fil->links->next = (*node)->links; |
---|
8783 | (*node)->links = fil->links; |
---|
8784 | } |
---|
8785 | |
---|
8786 | free(fil); |
---|
8787 | } else { |
---|
8788 | |
---|
8789 | node = tsearch(fil, &files, compare_nodes); |
---|
8790 | |
---|
8791 | if (node == ((void *)0)) |
---|
8792 | goto fail; |
---|
8793 | |
---|
8794 | if (*node != fil) { |
---|
8795 | struct file *l; |
---|
8796 | |
---|
8797 | if (file_compare(fil, *node) >= 0) { |
---|
8798 | fil->next = *node; |
---|
8799 | *node = fil; |
---|
8800 | } else { |
---|
8801 | for (l = *node; l != ((void *)0); l = l->next) { |
---|
8802 | if (l->next != ((void *)0) |
---|
8803 | && file_compare(fil, l->next) < 0) |
---|
8804 | continue; |
---|
8805 | |
---|
8806 | fil->next = l->next; |
---|
8807 | l->next = fil; |
---|
8808 | |
---|
8809 | break; |
---|
8810 | } |
---|
8811 | } |
---|
8812 | } |
---|
8813 | } |
---|
8814 | |
---|
8815 | return 0; |
---|
8816 | |
---|
8817 | fail: |
---|
8818 | warn(libintl_gettext ("cannot continue")); |
---|
8819 | return 0; |
---|
8820 | } |
---|
8821 | # 981 "misc-utils/hardlink.c" |
---|
8822 | static inline size_t count_nodes(struct file *x) |
---|
8823 | { |
---|
8824 | size_t ct = 0; |
---|
8825 | |
---|
8826 | for ( ; x != ((void *)0); x = x->next) |
---|
8827 | ct++; |
---|
8828 | |
---|
8829 | return ct; |
---|
8830 | } |
---|
8831 | # 1001 "misc-utils/hardlink.c" |
---|
8832 | static void visitor(const void *nodep, const VISIT which, const int depth) |
---|
8833 | { |
---|
8834 | struct file *master = *(struct file **)nodep; |
---|
8835 | struct file *begin = master; |
---|
8836 | struct file *other; |
---|
8837 | |
---|
8838 | (void)depth; |
---|
8839 | |
---|
8840 | if (which != leaf && which != endorder) |
---|
8841 | return; |
---|
8842 | |
---|
8843 | for (; master != ((void *)0); master = master->next) { |
---|
8844 | size_t nnodes, memsiz; |
---|
8845 | int may_reflink = 0; |
---|
8846 | |
---|
8847 | if (handle_interrupt()) |
---|
8848 | exit(1); |
---|
8849 | if (master->links == ((void *)0)) |
---|
8850 | continue; |
---|
8851 | |
---|
8852 | |
---|
8853 | nnodes = count_nodes(master); |
---|
8854 | if (!nnodes) |
---|
8855 | continue; |
---|
8856 | |
---|
8857 | |
---|
8858 | memsiz = opts.cache_size / nnodes; |
---|
8859 | |
---|
8860 | ul_fileeq_set_size(&fileeq, master->st.st_size, opts.io_size, memsiz); |
---|
8861 | # 1039 "misc-utils/hardlink.c" |
---|
8862 | for (other = master->next; other != ((void *)0); other = other->next) { |
---|
8863 | int eq; |
---|
8864 | |
---|
8865 | if (handle_interrupt()) |
---|
8866 | exit(1); |
---|
8867 | |
---|
8868 | (__builtin_expect(!(other != other->next), 0) ? __assert_rtn(__func__, "misc-utils/hardlink.c", 1045, "other != other->next") : (void)0); |
---|
8869 | (__builtin_expect(!(other->st.st_size == master->st.st_size), 0) ? __assert_rtn(__func__, "misc-utils/hardlink.c", 1046, "other->st.st_size == master->st.st_size") : (void)0); |
---|
8870 | |
---|
8871 | if (!other->links) |
---|
8872 | continue; |
---|
8873 | |
---|
8874 | |
---|
8875 | if (!file_may_link_to(master, other)) { |
---|
8876 | jlog(JLOG_VERBOSE2, |
---|
8877 | libintl_gettext ("Skipped (attributes mismatch) %s"), other->links->path); |
---|
8878 | continue; |
---|
8879 | } |
---|
8880 | # 1066 "misc-utils/hardlink.c" |
---|
8881 | if (!ul_fileeq_data_associated(&master->data)) |
---|
8882 | ul_fileeq_data_set_file(&master->data, master->links->path); |
---|
8883 | if (!ul_fileeq_data_associated(&other->data)) |
---|
8884 | ul_fileeq_data_set_file(&other->data, other->links->path); |
---|
8885 | |
---|
8886 | |
---|
8887 | eq = ul_fileeq(&fileeq, &master->data, &other->data); |
---|
8888 | |
---|
8889 | |
---|
8890 | ul_fileeq_data_close_file(&other->data); |
---|
8891 | |
---|
8892 | stats.comparisons++; |
---|
8893 | |
---|
8894 | if (!eq) { |
---|
8895 | jlog(JLOG_VERBOSE2, |
---|
8896 | libintl_gettext ("Skipped (content mismatch) %s"), other->links->path); |
---|
8897 | continue; |
---|
8898 | } |
---|
8899 | |
---|
8900 | |
---|
8901 | if (!file_link(master, other, may_reflink) && (*__error()) == 31) { |
---|
8902 | ul_fileeq_data_deinit(&master->data); |
---|
8903 | master = other; |
---|
8904 | } |
---|
8905 | } |
---|
8906 | |
---|
8907 | |
---|
8908 | ul_fileeq_data_deinit(&master->data); |
---|
8909 | } |
---|
8910 | |
---|
8911 | |
---|
8912 | for (other = begin; other != ((void *)0); other = other->next) { |
---|
8913 | if (ul_fileeq_data_associated(&other->data)) |
---|
8914 | ul_fileeq_data_deinit(&other->data); |
---|
8915 | } |
---|
8916 | } |
---|
8917 | |
---|
8918 | |
---|
8919 | |
---|
8920 | |
---|
8921 | static void __attribute__((__noreturn__)) usage(void) |
---|
8922 | { |
---|
8923 | FILE *out = __stdoutp; |
---|
8924 | |
---|
8925 | fputs(libintl_gettext ("\nUsage:\n"), out); |
---|
8926 | fprintf(out, libintl_gettext (" %s [options] <directory>|<file> ...\n"), |
---|
8927 | __progname); |
---|
8928 | |
---|
8929 | fputs("\n", out); |
---|
8930 | fputs(libintl_gettext ("Consolidate duplicate files using hardlinks.\n"), out); |
---|
8931 | |
---|
8932 | fputs(libintl_gettext ("\nOptions:\n"), out); |
---|
8933 | fputs(libintl_gettext (" -v, --verbose verbose output (repeat for more verbosity)\n"), out); |
---|
8934 | fputs(libintl_gettext (" -q, --quiet quiet mode - don't print anything\n"), out); |
---|
8935 | fputs(libintl_gettext (" -n, --dry-run don't actually link anything\n"), out); |
---|
8936 | fputs(libintl_gettext (" -y, --method <name> file content comparison method\n"), out); |
---|
8937 | |
---|
8938 | fputs(libintl_gettext (" -f, --respect-name filenames have to be identical\n"), out); |
---|
8939 | fputs(libintl_gettext (" -p, --ignore-mode ignore changes of file mode\n"), out); |
---|
8940 | fputs(libintl_gettext (" -o, --ignore-owner ignore owner changes\n"), out); |
---|
8941 | fputs(libintl_gettext (" -t, --ignore-time ignore timestamps (when testing for equality)\n"), out); |
---|
8942 | |
---|
8943 | |
---|
8944 | |
---|
8945 | |
---|
8946 | |
---|
8947 | |
---|
8948 | |
---|
8949 | fputs(libintl_gettext (" -m, --maximize maximize the hardlink count, remove the file with\n" " lowest hardlink count\n"), out); |
---|
8950 | |
---|
8951 | fputs(libintl_gettext (" -M, --minimize reverse the meaning of -m\n"), out); |
---|
8952 | fputs(libintl_gettext (" -O, --keep-oldest keep the oldest file of multiple equal files\n" " (lower precedence than minimize/maximize)\n"), out); |
---|
8953 | |
---|
8954 | fputs(libintl_gettext (" -x, --exclude <regex> regular expression to exclude files\n"), out); |
---|
8955 | fputs(libintl_gettext (" -i, --include <regex> regular expression to include files/dirs\n"), out); |
---|
8956 | fputs(libintl_gettext (" -s, --minimum-size <size> minimum size for files.\n"), out); |
---|
8957 | fputs(libintl_gettext (" -S, --maximum-size <size> maximum size for files.\n"), out); |
---|
8958 | fputs(libintl_gettext (" -b, --io-size <size> I/O buffer size for file reading (speedup, using more RAM)\n"), out); |
---|
8959 | fputs(libintl_gettext (" -r, --cache-size <size> memory limit for cached file content data\n"), out); |
---|
8960 | fputs(libintl_gettext (" -c, --content compare only file contents, same as -pot\n"), out); |
---|
8961 | |
---|
8962 | fputs("\n", out); |
---|
8963 | printf("%-" "28" "s%s\n" "%-" "28" "s%s\n" , " -h, --help", libintl_gettext ("display this help") , " -V, --version", libintl_gettext ("display version")); |
---|
8964 | printf(libintl_gettext ("\nFor more details see %s.\n"), "hardlink(1)"); |
---|
8965 | |
---|
8966 | exit(0); |
---|
8967 | } |
---|
8968 | |
---|
8969 | |
---|
8970 | |
---|
8971 | |
---|
8972 | |
---|
8973 | |
---|
8974 | static int parse_options(int argc, char *argv[]) |
---|
8975 | { |
---|
8976 | enum { |
---|
8977 | OPT_REFLINK = 127 + 1, |
---|
8978 | OPT_SKIP_RELINKS |
---|
8979 | }; |
---|
8980 | static const char optstr[] = "VhvnfpotXcmMOx:y:i:r:S:s:b:q"; |
---|
8981 | static const struct option long_options[] = { |
---|
8982 | {"version", 0, ((void *)0), 'V'}, |
---|
8983 | {"help", 0, ((void *)0), 'h'}, |
---|
8984 | {"verbose", 0, ((void *)0), 'v'}, |
---|
8985 | {"dry-run", 0, ((void *)0), 'n'}, |
---|
8986 | {"respect-name", 0, ((void *)0), 'f'}, |
---|
8987 | {"ignore-mode", 0, ((void *)0), 'p'}, |
---|
8988 | {"ignore-owner", 0, ((void *)0), 'o'}, |
---|
8989 | {"ignore-time", 0, ((void *)0), 't'}, |
---|
8990 | {"respect-xattrs", 0, ((void *)0), 'X'}, |
---|
8991 | {"maximize", 0, ((void *)0), 'm'}, |
---|
8992 | {"minimize", 0, ((void *)0), 'M'}, |
---|
8993 | {"keep-oldest", 0, ((void *)0), 'O'}, |
---|
8994 | {"exclude", 1, ((void *)0), 'x'}, |
---|
8995 | {"include", 1, ((void *)0), 'i'}, |
---|
8996 | {"method", 1, ((void *)0), 'y' }, |
---|
8997 | {"minimum-size", 1, ((void *)0), 's'}, |
---|
8998 | {"maximum-size", 1, ((void *)0), 'S'}, |
---|
8999 | |
---|
9000 | |
---|
9001 | |
---|
9002 | |
---|
9003 | {"io-size", 1, ((void *)0), 'b'}, |
---|
9004 | {"content", 0, ((void *)0), 'c'}, |
---|
9005 | {"quiet", 0, ((void *)0), 'q'}, |
---|
9006 | {"cache-size", 1, ((void *)0), 'r'}, |
---|
9007 | {((void *)0), 0, ((void *)0), 0} |
---|
9008 | }; |
---|
9009 | static const ul_excl_t excl[] = { |
---|
9010 | {'q', 'v'}, |
---|
9011 | {0} |
---|
9012 | }; |
---|
9013 | int excl_st[(sizeof(excl) / sizeof((excl)[0]) + __extension__ (sizeof(struct { int:-!!(__builtin_types_compatible_p(__typeof__(excl), __typeof__(&excl[0]))); })))] = { 0 }; |
---|
9014 | int c; |
---|
9015 | |
---|
9016 | while ((c = getopt_long(argc, argv, optstr, long_options, ((void *)0))) != -1) { |
---|
9017 | |
---|
9018 | err_exclusive_options(c, long_options, excl, excl_st); |
---|
9019 | |
---|
9020 | switch (c) { |
---|
9021 | case 'p': |
---|
9022 | opts.respect_mode = 0; |
---|
9023 | break; |
---|
9024 | case 'o': |
---|
9025 | opts.respect_owner = 0; |
---|
9026 | break; |
---|
9027 | case 't': |
---|
9028 | opts.respect_time = 0; |
---|
9029 | break; |
---|
9030 | case 'X': |
---|
9031 | opts.respect_xattrs = 1; |
---|
9032 | break; |
---|
9033 | case 'm': |
---|
9034 | opts.maximise = 1; |
---|
9035 | break; |
---|
9036 | case 'M': |
---|
9037 | opts.minimise = 1; |
---|
9038 | break; |
---|
9039 | case 'O': |
---|
9040 | opts.keep_oldest = 1; |
---|
9041 | break; |
---|
9042 | case 'f': |
---|
9043 | opts.respect_name = 1; |
---|
9044 | break; |
---|
9045 | case 'v': |
---|
9046 | opts.verbosity++; |
---|
9047 | break; |
---|
9048 | case 'q': |
---|
9049 | quiet = 1; |
---|
9050 | break; |
---|
9051 | case 'c': |
---|
9052 | opts.respect_mode = 0; |
---|
9053 | opts.respect_name = 0; |
---|
9054 | opts.respect_owner = 0; |
---|
9055 | opts.respect_time = 0; |
---|
9056 | opts.respect_xattrs = 0; |
---|
9057 | break; |
---|
9058 | case 'n': |
---|
9059 | opts.dry_run = 1; |
---|
9060 | break; |
---|
9061 | case 'x': |
---|
9062 | register_regex(&opts.exclude, optarg); |
---|
9063 | break; |
---|
9064 | case 'y': |
---|
9065 | opts.method = optarg; |
---|
9066 | break; |
---|
9067 | case 'i': |
---|
9068 | register_regex(&opts.include, optarg); |
---|
9069 | break; |
---|
9070 | case 's': |
---|
9071 | opts.min_size = strtosize_or_err(optarg, libintl_gettext ("failed to parse minimum size")); |
---|
9072 | break; |
---|
9073 | case 'S': |
---|
9074 | opts.max_size = strtosize_or_err(optarg, libintl_gettext ("failed to parse maximum size")); |
---|
9075 | break; |
---|
9076 | case 'r': |
---|
9077 | opts.cache_size = strtosize_or_err(optarg, libintl_gettext ("failed to parse cache size")); |
---|
9078 | break; |
---|
9079 | case 'b': |
---|
9080 | opts.io_size = strtosize_or_err(optarg, libintl_gettext ("failed to parse I/O size")); |
---|
9081 | break; |
---|
9082 | # 1287 "misc-utils/hardlink.c" |
---|
9083 | case 'h': |
---|
9084 | usage(); |
---|
9085 | case 'V': |
---|
9086 | __extension__ ({ printf(libintl_gettext ("%s from %s\n"), __progname, "util-linux 2.38"); exit(0); }); |
---|
9087 | default: |
---|
9088 | __extension__ ({ fprintf(__stderrp, libintl_gettext ("Try '%s --help' for more information.\n"), __progname); exit(1); });} |
---|
9089 | } |
---|
9090 | |
---|
9091 | return 0; |
---|
9092 | } |
---|
9093 | |
---|
9094 | |
---|
9095 | |
---|
9096 | |
---|
9097 | static void to_be_called_atexit(void) |
---|
9098 | { |
---|
9099 | if (stats.started) |
---|
9100 | print_stats(); |
---|
9101 | } |
---|
9102 | |
---|
9103 | |
---|
9104 | |
---|
9105 | |
---|
9106 | |
---|
9107 | static void sighandler(int i) |
---|
9108 | { |
---|
9109 | if (last_signal != 2) |
---|
9110 | last_signal = i; |
---|
9111 | if (i == 2) |
---|
9112 | putchar('\n'); |
---|
9113 | } |
---|
9114 | |
---|
9115 | int main(int argc, char *argv[]) |
---|
9116 | { |
---|
9117 | struct sigaction sa; |
---|
9118 | int rc; |
---|
9119 | |
---|
9120 | sa.__sigaction_u.__sa_handler = sighandler; |
---|
9121 | sa.sa_flags = 0x0002; |
---|
9122 | (*(&sa.sa_mask) = ~(sigset_t)0, 0); |
---|
9123 | |
---|
9124 | |
---|
9125 | sigaction(2, &sa, ((void *)0)); |
---|
9126 | sigaction(30, &sa, ((void *)0)); |
---|
9127 | |
---|
9128 | |
---|
9129 | libintl_setlocale(0, ""); |
---|
9130 | libintl_bindtextdomain("util-linux", "/opt/local/share/locale"); |
---|
9131 | libintl_textdomain("util-linux"); |
---|
9132 | |
---|
9133 | if (atexit(to_be_called_atexit) != 0) |
---|
9134 | err(1, libintl_gettext ("cannot register exit handler")); |
---|
9135 | |
---|
9136 | parse_options(argc, argv); |
---|
9137 | |
---|
9138 | if (optind == argc) |
---|
9139 | errx(1, libintl_gettext ("no directory or file specified")); |
---|
9140 | |
---|
9141 | gettime_monotonic(&stats.start_time); |
---|
9142 | |
---|
9143 | rc = ul_fileeq_init(&fileeq, opts.method); |
---|
9144 | if (rc != 0 && strcmp(opts.method, "memcmp") != 0) { |
---|
9145 | warnx(libintl_gettext ("cannot initialize %s method, use 'memcmp' fallback"), opts.method); |
---|
9146 | opts.method = "memcmp"; |
---|
9147 | rc = ul_fileeq_init(&fileeq, opts.method); |
---|
9148 | } |
---|
9149 | if (rc < 0) |
---|
9150 | err(1, libintl_gettext ("failed to initialize files comparior")); |
---|
9151 | |
---|
9152 | |
---|
9153 | if (!opts.io_size) { |
---|
9154 | if (strcmp(opts.method, "memcmp") == 0) |
---|
9155 | opts.io_size = 8*1024; |
---|
9156 | else |
---|
9157 | opts.io_size = 1024*1024; |
---|
9158 | } |
---|
9159 | |
---|
9160 | stats.started = 1; |
---|
9161 | |
---|
9162 | jlog(JLOG_VERBOSE2, libintl_gettext ("Scanning [device/inode/links]:")); |
---|
9163 | for (; optind < argc; optind++) { |
---|
9164 | char *path = realpath(argv[optind], ((void *)0)); |
---|
9165 | |
---|
9166 | if (!path) { |
---|
9167 | warn(libintl_gettext ("cannot get realpath: %s"), argv[optind]); |
---|
9168 | continue; |
---|
9169 | } |
---|
9170 | if (nftw(path, inserter, 20, 0x01) == -1) |
---|
9171 | warn(libintl_gettext ("cannot process %s"), path); |
---|
9172 | free(path); |
---|
9173 | } |
---|
9174 | |
---|
9175 | twalk(files, visitor); |
---|
9176 | |
---|
9177 | ul_fileeq_deinit(&fileeq); |
---|
9178 | return 0; |
---|
9179 | } |
---|