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__ 4 |
---|
8 | #define __APPLE_CC__ 5666 |
---|
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.4 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42 5666.3_16+gpl3)" |
---|
91 | #define __GNUC_GNU_INLINE__ 1 |
---|
92 | #define __BLOCKS__ 1 |
---|
93 | #define __OPTIMIZE__ 1 |
---|
94 | #define __FINITE_MATH_ONLY__ 0 |
---|
95 | #define __pic__ 2 |
---|
96 | #define __PIC__ 2 |
---|
97 | #define _ARCH_PPC 1 |
---|
98 | #define _ARCH_PPCGR 1 |
---|
99 | #define __BIG_ENDIAN__ 1 |
---|
100 | #define _BIG_ENDIAN 1 |
---|
101 | #define __LONG_DOUBLE_128__ 1 |
---|
102 | #define __LONGDOUBLE128 1 |
---|
103 | #define __ppc__ 1 |
---|
104 | #define __POWERPC__ 1 |
---|
105 | #define __NATURAL_ALIGNMENT__ 1 |
---|
106 | #define __MACH__ 1 |
---|
107 | #define __APPLE__ 1 |
---|
108 | #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1040 |
---|
109 | #define __CONSTANT_CFSTRINGS__ 1 |
---|
110 | #define __strong |
---|
111 | #define __weak __attribute__((objc_gc(weak))) |
---|
112 | #define __block __attribute__((__blocks__(byref))) |
---|
113 | #define OBJC_NEW_PROPERTIES 1 |
---|
114 | # 1 "<command-line>" |
---|
115 | #define __DYNAMIC__ 1 |
---|
116 | #define HAVE_CONFIG_H 1 |
---|
117 | #define LOCALEDIR "/opt/local/share/locale" |
---|
118 | #define _PATH_RUNSTATEDIR "/opt/local/var/run" |
---|
119 | #define _PATH_SYSCONFSTATICDIR "/opt/local/lib" |
---|
120 | #define __DARWIN_UNIX03 1 |
---|
121 | # 1 "./config.h" 1 |
---|
122 | # 11 "./config.h" |
---|
123 | #define CHFN_CHSH_PASSWORD 1 |
---|
124 | |
---|
125 | |
---|
126 | #define CONFIG_ADJTIME_PATH "/etc/adjtime" |
---|
127 | |
---|
128 | |
---|
129 | |
---|
130 | |
---|
131 | |
---|
132 | |
---|
133 | #define ENABLE_NLS 1 |
---|
134 | |
---|
135 | |
---|
136 | #define FS_SEARCH_PATH "/sbin:/sbin/fs.d:/sbin/fs" |
---|
137 | # 37 "./config.h" |
---|
138 | #define HAVE_CFLOCALECOPYCURRENT 1 |
---|
139 | |
---|
140 | |
---|
141 | |
---|
142 | #define HAVE_CFPREFERENCESCOPYAPPVALUE 1 |
---|
143 | |
---|
144 | |
---|
145 | |
---|
146 | |
---|
147 | |
---|
148 | #define HAVE_CLOCK_GETTIME 1 |
---|
149 | # 66 "./config.h" |
---|
150 | #define HAVE_DCGETTEXT 1 |
---|
151 | |
---|
152 | |
---|
153 | |
---|
154 | #define HAVE_DECL_BLK_ZONE_REP_CAPACITY 0 |
---|
155 | |
---|
156 | |
---|
157 | |
---|
158 | #define HAVE_DECL_CPU_ALLOC 0 |
---|
159 | |
---|
160 | |
---|
161 | |
---|
162 | #define HAVE_DECL_DIRFD 1 |
---|
163 | |
---|
164 | |
---|
165 | |
---|
166 | |
---|
167 | |
---|
168 | |
---|
169 | |
---|
170 | #define HAVE_DECL__NL_TIME_WEEK_1STDAY 0 |
---|
171 | # 95 "./config.h" |
---|
172 | #define HAVE_DLFCN_H 1 |
---|
173 | # 107 "./config.h" |
---|
174 | #define HAVE_ERR 1 |
---|
175 | |
---|
176 | |
---|
177 | #define HAVE_ERRNO_H 1 |
---|
178 | |
---|
179 | |
---|
180 | #define HAVE_ERRX 1 |
---|
181 | |
---|
182 | |
---|
183 | #define HAVE_ERR_H 1 |
---|
184 | # 125 "./config.h" |
---|
185 | #define HAVE_FCNTL_H 1 |
---|
186 | |
---|
187 | |
---|
188 | #define HAVE_FPURGE 1 |
---|
189 | |
---|
190 | |
---|
191 | #define HAVE_FSEEKO 1 |
---|
192 | |
---|
193 | |
---|
194 | #define HAVE_FSTATAT 1 |
---|
195 | |
---|
196 | |
---|
197 | #define HAVE_FSYNC 1 |
---|
198 | |
---|
199 | |
---|
200 | #define HAVE_FUTIMENS 1 |
---|
201 | |
---|
202 | |
---|
203 | #define HAVE_GETDOMAINNAME 1 |
---|
204 | |
---|
205 | |
---|
206 | #define HAVE_GETDTABLESIZE 1 |
---|
207 | |
---|
208 | |
---|
209 | |
---|
210 | |
---|
211 | |
---|
212 | #define HAVE_GETMNTINFO 1 |
---|
213 | |
---|
214 | |
---|
215 | #define HAVE_GETOPT_H 1 |
---|
216 | |
---|
217 | |
---|
218 | |
---|
219 | |
---|
220 | |
---|
221 | #define HAVE_GETRLIMIT 1 |
---|
222 | |
---|
223 | |
---|
224 | |
---|
225 | |
---|
226 | |
---|
227 | #define HAVE_GETTEXT 1 |
---|
228 | |
---|
229 | |
---|
230 | #define HAVE_GETTTYNAM 1 |
---|
231 | |
---|
232 | |
---|
233 | #define HAVE_GETUSERSHELL 1 |
---|
234 | |
---|
235 | |
---|
236 | #define HAVE_ICONV 1 |
---|
237 | # 185 "./config.h" |
---|
238 | #define HAVE_INTTYPES_H 1 |
---|
239 | # 194 "./config.h" |
---|
240 | #define HAVE_ISNAN 1 |
---|
241 | |
---|
242 | |
---|
243 | #define HAVE_JRAND48 1 |
---|
244 | |
---|
245 | |
---|
246 | |
---|
247 | |
---|
248 | |
---|
249 | #define HAVE_LANGINFO_H 1 |
---|
250 | # 212 "./config.h" |
---|
251 | #define HAVE_LCHOWN 1 |
---|
252 | # 236 "./config.h" |
---|
253 | #define HAVE_LIBNCURSESW 1 |
---|
254 | |
---|
255 | |
---|
256 | #define HAVE_LIBREADLINE 1 |
---|
257 | # 341 "./config.h" |
---|
258 | #define HAVE_LOCALE_H 1 |
---|
259 | |
---|
260 | |
---|
261 | |
---|
262 | |
---|
263 | |
---|
264 | #define HAVE_MAGIC 1 |
---|
265 | |
---|
266 | |
---|
267 | #define HAVE_MEMORY_H 1 |
---|
268 | # 362 "./config.h" |
---|
269 | #define HAVE_NANOSLEEP 1 |
---|
270 | # 371 "./config.h" |
---|
271 | #define HAVE_NCURSES_H 1 |
---|
272 | # 380 "./config.h" |
---|
273 | #define HAVE_NETINET_IN_H 1 |
---|
274 | |
---|
275 | |
---|
276 | #define HAVE_NET_IF_DL_H 1 |
---|
277 | |
---|
278 | |
---|
279 | #define HAVE_NET_IF_H 1 |
---|
280 | |
---|
281 | |
---|
282 | #define HAVE_NEWLOCALE 1 |
---|
283 | |
---|
284 | |
---|
285 | |
---|
286 | |
---|
287 | |
---|
288 | #define HAVE_OPENAT 1 |
---|
289 | |
---|
290 | |
---|
291 | |
---|
292 | |
---|
293 | |
---|
294 | #define HAVE_PATHS_H 1 |
---|
295 | # 434 "./config.h" |
---|
296 | #define HAVE_QSORT_R 1 |
---|
297 | |
---|
298 | |
---|
299 | #define HAVE_REBOOT 1 |
---|
300 | |
---|
301 | |
---|
302 | #define HAVE_RESIZETERM 1 |
---|
303 | |
---|
304 | |
---|
305 | |
---|
306 | |
---|
307 | |
---|
308 | #define HAVE_SA_LEN 1 |
---|
309 | # 476 "./config.h" |
---|
310 | #define HAVE_SETITIMER 1 |
---|
311 | |
---|
312 | |
---|
313 | |
---|
314 | |
---|
315 | |
---|
316 | #define HAVE_SETPROGNAME 1 |
---|
317 | # 515 "./config.h" |
---|
318 | #define HAVE_SRANDOM 1 |
---|
319 | |
---|
320 | |
---|
321 | #define HAVE_STDINT_H 1 |
---|
322 | |
---|
323 | |
---|
324 | |
---|
325 | |
---|
326 | |
---|
327 | #define HAVE_STDLIB_H 1 |
---|
328 | |
---|
329 | |
---|
330 | #define HAVE_STRINGS_H 1 |
---|
331 | |
---|
332 | |
---|
333 | #define HAVE_STRING_H 1 |
---|
334 | |
---|
335 | |
---|
336 | |
---|
337 | |
---|
338 | |
---|
339 | #define HAVE_STRNDUP 1 |
---|
340 | |
---|
341 | |
---|
342 | #define HAVE_STRNLEN 1 |
---|
343 | |
---|
344 | |
---|
345 | #define HAVE_STRSIGNAL_DECL 1 |
---|
346 | |
---|
347 | |
---|
348 | #define HAVE_STRTOD_L 1 |
---|
349 | # 554 "./config.h" |
---|
350 | #define HAVE_STRUCT_TM_TM_ZONE 1 |
---|
351 | |
---|
352 | |
---|
353 | |
---|
354 | |
---|
355 | |
---|
356 | #define HAVE_SWAPON 1 |
---|
357 | |
---|
358 | |
---|
359 | #define HAVE_SYSCONF 1 |
---|
360 | # 572 "./config.h" |
---|
361 | #define HAVE_SYS_DISK_H 1 |
---|
362 | |
---|
363 | |
---|
364 | |
---|
365 | |
---|
366 | |
---|
367 | #define HAVE_SYS_FILE_H 1 |
---|
368 | |
---|
369 | |
---|
370 | #define HAVE_SYS_IOCCOM_H 1 |
---|
371 | |
---|
372 | |
---|
373 | #define HAVE_SYS_IOCTL_H 1 |
---|
374 | # 593 "./config.h" |
---|
375 | #define HAVE_SYS_MOUNT_H 1 |
---|
376 | |
---|
377 | |
---|
378 | #define HAVE_SYS_PARAM_H 1 |
---|
379 | |
---|
380 | |
---|
381 | |
---|
382 | |
---|
383 | |
---|
384 | #define HAVE_SYS_RESOURCE_H 1 |
---|
385 | # 611 "./config.h" |
---|
386 | #define HAVE_SYS_SOCKET_H 1 |
---|
387 | |
---|
388 | |
---|
389 | #define HAVE_SYS_SOCKIO_H 1 |
---|
390 | |
---|
391 | |
---|
392 | #define HAVE_SYS_STAT_H 1 |
---|
393 | |
---|
394 | |
---|
395 | |
---|
396 | |
---|
397 | |
---|
398 | #define HAVE_SYS_SYSCALL_H 1 |
---|
399 | # 632 "./config.h" |
---|
400 | #define HAVE_SYS_TIME_H 1 |
---|
401 | |
---|
402 | |
---|
403 | #define HAVE_SYS_TTYDEFAULTS_H 1 |
---|
404 | |
---|
405 | |
---|
406 | #define HAVE_SYS_TYPES_H 1 |
---|
407 | |
---|
408 | |
---|
409 | #define HAVE_SYS_UCRED_H 1 |
---|
410 | |
---|
411 | |
---|
412 | #define HAVE_SYS_UN_H 1 |
---|
413 | |
---|
414 | |
---|
415 | #define HAVE_SYS_XATTR_H 1 |
---|
416 | |
---|
417 | |
---|
418 | #define HAVE_TERM_H 1 |
---|
419 | |
---|
420 | |
---|
421 | #define HAVE_TIMEGM 1 |
---|
422 | # 662 "./config.h" |
---|
423 | #define HAVE_TM_GMTOFF 1 |
---|
424 | |
---|
425 | |
---|
426 | |
---|
427 | #define HAVE_TM_ZONE 1 |
---|
428 | |
---|
429 | |
---|
430 | |
---|
431 | |
---|
432 | |
---|
433 | |
---|
434 | #define HAVE_UNION_SEMUN 1 |
---|
435 | |
---|
436 | |
---|
437 | #define HAVE_UNISTD_H 1 |
---|
438 | |
---|
439 | |
---|
440 | #define HAVE_UNLINKAT 1 |
---|
441 | # 688 "./config.h" |
---|
442 | #define HAVE_USELOCALE 1 |
---|
443 | |
---|
444 | |
---|
445 | #define HAVE_USE_DEFAULT_COLORS 1 |
---|
446 | |
---|
447 | |
---|
448 | #define HAVE_USLEEP 1 |
---|
449 | |
---|
450 | |
---|
451 | #define HAVE_UTIMENSAT 1 |
---|
452 | |
---|
453 | |
---|
454 | #define HAVE_UTMPX_H 1 |
---|
455 | |
---|
456 | |
---|
457 | #define HAVE_UTMP_H 1 |
---|
458 | |
---|
459 | |
---|
460 | |
---|
461 | |
---|
462 | |
---|
463 | #define HAVE_VWARNX 1 |
---|
464 | |
---|
465 | |
---|
466 | #define HAVE_WARN 1 |
---|
467 | |
---|
468 | |
---|
469 | #define HAVE_WARNX 1 |
---|
470 | |
---|
471 | |
---|
472 | #define HAVE_WIDECHAR 1 |
---|
473 | # 727 "./config.h" |
---|
474 | #define HAVE___PROGNAME 1 |
---|
475 | |
---|
476 | |
---|
477 | |
---|
478 | |
---|
479 | |
---|
480 | #define LIBBLKID_DATE "28-Mar-2022" |
---|
481 | |
---|
482 | |
---|
483 | #define LIBBLKID_VERSION "2.38.0" |
---|
484 | |
---|
485 | |
---|
486 | #define LIBFDISK_VERSION "2.38.0" |
---|
487 | |
---|
488 | |
---|
489 | #define LIBMOUNT_VERSION "2.38.0" |
---|
490 | |
---|
491 | |
---|
492 | #define LIBSMARTCOLS_VERSION "2.38.0" |
---|
493 | # 754 "./config.h" |
---|
494 | #define LT_OBJDIR ".libs/" |
---|
495 | # 763 "./config.h" |
---|
496 | #define ONLY_LISTED_SHELLS 1 |
---|
497 | |
---|
498 | |
---|
499 | #define PACKAGE "util-linux" |
---|
500 | |
---|
501 | |
---|
502 | #define PACKAGE_BUGREPORT "kzak@redhat.com" |
---|
503 | |
---|
504 | |
---|
505 | #define PACKAGE_NAME "util-linux" |
---|
506 | |
---|
507 | |
---|
508 | #define PACKAGE_STRING "util-linux 2.38" |
---|
509 | |
---|
510 | |
---|
511 | #define PACKAGE_TARNAME "util-linux" |
---|
512 | |
---|
513 | |
---|
514 | #define PACKAGE_URL "http://www.kernel.org/pub/linux/utils/util-linux/" |
---|
515 | |
---|
516 | |
---|
517 | #define PACKAGE_VERSION "2.38" |
---|
518 | |
---|
519 | |
---|
520 | |
---|
521 | |
---|
522 | |
---|
523 | #define STDC_HEADERS 1 |
---|
524 | # 838 "./config.h" |
---|
525 | #define USE_COLORS_BY_DEFAULT 1 |
---|
526 | |
---|
527 | |
---|
528 | |
---|
529 | |
---|
530 | |
---|
531 | #define USE_HWCLOCK_GPLv3_DATETIME 1 |
---|
532 | # 863 "./config.h" |
---|
533 | #define _ALL_SOURCE 1 |
---|
534 | |
---|
535 | |
---|
536 | |
---|
537 | #define _GNU_SOURCE 1 |
---|
538 | |
---|
539 | |
---|
540 | |
---|
541 | #define _POSIX_PTHREAD_SEMANTICS 1 |
---|
542 | |
---|
543 | |
---|
544 | |
---|
545 | #define _TANDEM_SOURCE 1 |
---|
546 | |
---|
547 | |
---|
548 | |
---|
549 | #define __EXTENSIONS__ 1 |
---|
550 | |
---|
551 | |
---|
552 | |
---|
553 | |
---|
554 | #define USE_TTY_GROUP 1 |
---|
555 | # 893 "./config.h" |
---|
556 | #define VERSION "2.38" |
---|
557 | # 903 "./config.h" |
---|
558 | #define WORDS_BIGENDIAN 1 |
---|
559 | |
---|
560 | |
---|
561 | |
---|
562 | |
---|
563 | #define _DARWIN_C_SOURCE 1 |
---|
564 | |
---|
565 | |
---|
566 | |
---|
567 | #define _DARWIN_USE_64_BIT_INODE 1 |
---|
568 | # 1 "<command-line>" 2 |
---|
569 | # 1 "misc-utils/hardlink.c" |
---|
570 | # 26 "misc-utils/hardlink.c" |
---|
571 | #define _POSIX_C_SOURCE 200112L |
---|
572 | #define _XOPEN_SOURCE 600 |
---|
573 | |
---|
574 | # 1 "/opt/local/include/LegacySupport/sys/types.h" 1 |
---|
575 | # 67 "/opt/local/include/LegacySupport/sys/types.h" |
---|
576 | # 1 "/usr/include/sys/types.h" 1 3 4 |
---|
577 | # 64 "/usr/include/sys/types.h" 3 4 |
---|
578 | #define _SYS_TYPES_H_ |
---|
579 | |
---|
580 | # 1 "/usr/include/sys/appleapiopts.h" 1 3 4 |
---|
581 | # 24 "/usr/include/sys/appleapiopts.h" 3 4 |
---|
582 | #define __SYS_APPLEAPIOPTS_H__ |
---|
583 | |
---|
584 | |
---|
585 | |
---|
586 | #define __APPLE_API_STANDARD |
---|
587 | |
---|
588 | |
---|
589 | |
---|
590 | #define __APPLE_API_STABLE |
---|
591 | |
---|
592 | |
---|
593 | |
---|
594 | |
---|
595 | |
---|
596 | #define __APPLE_API_EVOLVING |
---|
597 | |
---|
598 | |
---|
599 | |
---|
600 | #define __APPLE_API_UNSTABLE |
---|
601 | |
---|
602 | |
---|
603 | |
---|
604 | #define __APPLE_API_PRIVATE |
---|
605 | |
---|
606 | |
---|
607 | |
---|
608 | #define __APPLE_API_OBSOLETE |
---|
609 | # 67 "/usr/include/sys/types.h" 2 3 4 |
---|
610 | |
---|
611 | |
---|
612 | # 1 "/usr/include/sys/cdefs.h" 1 3 4 |
---|
613 | # 62 "/usr/include/sys/cdefs.h" 3 4 |
---|
614 | #define _CDEFS_H_ |
---|
615 | |
---|
616 | |
---|
617 | |
---|
618 | |
---|
619 | |
---|
620 | #define __BEGIN_DECLS |
---|
621 | #define __END_DECLS |
---|
622 | # 80 "/usr/include/sys/cdefs.h" 3 4 |
---|
623 | #define __P(protos) protos |
---|
624 | #define __CONCAT(x,y) x ## y |
---|
625 | #define __STRING(x) #x |
---|
626 | |
---|
627 | #define __const const |
---|
628 | #define __signed signed |
---|
629 | #define __volatile volatile |
---|
630 | # 134 "/usr/include/sys/cdefs.h" 3 4 |
---|
631 | #define __dead2 __attribute__((__noreturn__)) |
---|
632 | #define __pure2 __attribute__((__const__)) |
---|
633 | |
---|
634 | |
---|
635 | |
---|
636 | #define __unused __attribute__((__unused__)) |
---|
637 | # 152 "/usr/include/sys/cdefs.h" 3 4 |
---|
638 | #define __dead |
---|
639 | #define __pure |
---|
640 | # 169 "/usr/include/sys/cdefs.h" 3 4 |
---|
641 | #define __restrict |
---|
642 | # 184 "/usr/include/sys/cdefs.h" 3 4 |
---|
643 | #define __printflike(fmtarg,firstvararg) __attribute__((__format__ (__printf__, fmtarg, firstvararg))) |
---|
644 | |
---|
645 | #define __scanflike(fmtarg,firstvararg) __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) |
---|
646 | |
---|
647 | |
---|
648 | |
---|
649 | |
---|
650 | |
---|
651 | |
---|
652 | #define __IDSTRING(name,string) static const char name[] __unused = string |
---|
653 | |
---|
654 | |
---|
655 | #define __COPYRIGHT(s) __IDSTRING(copyright,s) |
---|
656 | |
---|
657 | |
---|
658 | |
---|
659 | #define __RCSID(s) __IDSTRING(rcsid,s) |
---|
660 | |
---|
661 | |
---|
662 | |
---|
663 | #define __SCCSID(s) __IDSTRING(sccsid,s) |
---|
664 | |
---|
665 | |
---|
666 | |
---|
667 | #define __PROJECT_VERSION(s) __IDSTRING(project_version,s) |
---|
668 | # 244 "/usr/include/sys/cdefs.h" 3 4 |
---|
669 | #define __DARWIN_ALIAS(sym) __asm("_" __STRING(sym) "$UNIX2003") |
---|
670 | # 284 "/usr/include/sys/cdefs.h" 3 4 |
---|
671 | #undef _POSIX_C_SOURCE |
---|
672 | #define _POSIX_C_SOURCE 200112L |
---|
673 | # 305 "/usr/include/sys/cdefs.h" 3 4 |
---|
674 | #define __DARWIN_NO_LONG_LONG (defined(__STRICT_ANSI__) && (__STDC_VERSION__-0 < 199901L) && !defined(__GNUG__)) |
---|
675 | # 321 "/usr/include/sys/cdefs.h" 3 4 |
---|
676 | #define __DARWIN_LDBL_COMPAT(x) __asm("_" __STRING(x) "$LDBL128") |
---|
677 | |
---|
678 | #define __DARWIN_LDBL_COMPAT2(x) __asm("_" __STRING(x) "$LDBL128") |
---|
679 | #define __DARWIN_LONG_DOUBLE_IS_DOUBLE 0 |
---|
680 | # 70 "/usr/include/sys/types.h" 2 3 4 |
---|
681 | |
---|
682 | |
---|
683 | # 1 "/usr/include/machine/types.h" 1 3 4 |
---|
684 | # 26 "/usr/include/machine/types.h" 3 4 |
---|
685 | #define _BSD_MACHINE_TYPES_H_ |
---|
686 | |
---|
687 | |
---|
688 | |
---|
689 | # 1 "/usr/include/ppc/types.h" 1 3 4 |
---|
690 | # 61 "/usr/include/ppc/types.h" 3 4 |
---|
691 | #define _MACHTYPES_H_ |
---|
692 | |
---|
693 | |
---|
694 | # 1 "/usr/include/ppc/_types.h" 1 3 4 |
---|
695 | # 23 "/usr/include/ppc/_types.h" 3 4 |
---|
696 | #define _BSD_PPC__TYPES_H_ |
---|
697 | |
---|
698 | |
---|
699 | |
---|
700 | |
---|
701 | |
---|
702 | |
---|
703 | |
---|
704 | typedef signed char __int8_t; |
---|
705 | |
---|
706 | |
---|
707 | |
---|
708 | typedef unsigned char __uint8_t; |
---|
709 | typedef short __int16_t; |
---|
710 | typedef unsigned short __uint16_t; |
---|
711 | typedef int __int32_t; |
---|
712 | typedef unsigned int __uint32_t; |
---|
713 | typedef long long __int64_t; |
---|
714 | typedef unsigned long long __uint64_t; |
---|
715 | |
---|
716 | typedef long __darwin_intptr_t; |
---|
717 | typedef unsigned int __darwin_natural_t; |
---|
718 | # 64 "/usr/include/ppc/_types.h" 3 4 |
---|
719 | typedef int __darwin_ct_rune_t; |
---|
720 | |
---|
721 | |
---|
722 | |
---|
723 | |
---|
724 | |
---|
725 | typedef union { |
---|
726 | char __mbstate8[128]; |
---|
727 | long long _mbstateL; |
---|
728 | } __mbstate_t; |
---|
729 | |
---|
730 | typedef __mbstate_t __darwin_mbstate_t; |
---|
731 | |
---|
732 | |
---|
733 | typedef int __darwin_ptrdiff_t; |
---|
734 | |
---|
735 | |
---|
736 | |
---|
737 | |
---|
738 | |
---|
739 | typedef long unsigned int __darwin_size_t; |
---|
740 | |
---|
741 | |
---|
742 | |
---|
743 | |
---|
744 | |
---|
745 | typedef __builtin_va_list __darwin_va_list; |
---|
746 | |
---|
747 | |
---|
748 | |
---|
749 | |
---|
750 | |
---|
751 | typedef int __darwin_wchar_t; |
---|
752 | |
---|
753 | |
---|
754 | |
---|
755 | |
---|
756 | typedef __darwin_wchar_t __darwin_rune_t; |
---|
757 | |
---|
758 | |
---|
759 | typedef int __darwin_wint_t; |
---|
760 | |
---|
761 | |
---|
762 | |
---|
763 | |
---|
764 | typedef unsigned long __darwin_clock_t; |
---|
765 | typedef __uint32_t __darwin_socklen_t; |
---|
766 | typedef long __darwin_ssize_t; |
---|
767 | typedef long __darwin_time_t; |
---|
768 | # 65 "/usr/include/ppc/types.h" 2 3 4 |
---|
769 | |
---|
770 | |
---|
771 | |
---|
772 | |
---|
773 | |
---|
774 | |
---|
775 | #define _INT8_T |
---|
776 | typedef signed char int8_t; |
---|
777 | |
---|
778 | typedef unsigned char u_int8_t; |
---|
779 | |
---|
780 | #define _INT16_T |
---|
781 | typedef short int16_t; |
---|
782 | |
---|
783 | typedef unsigned short u_int16_t; |
---|
784 | |
---|
785 | #define _INT32_T |
---|
786 | typedef int int32_t; |
---|
787 | |
---|
788 | typedef unsigned int u_int32_t; |
---|
789 | |
---|
790 | #define _INT64_T |
---|
791 | typedef long long int64_t; |
---|
792 | |
---|
793 | typedef unsigned long long u_int64_t; |
---|
794 | |
---|
795 | |
---|
796 | |
---|
797 | |
---|
798 | typedef int32_t register_t; |
---|
799 | |
---|
800 | |
---|
801 | |
---|
802 | #define _INTPTR_T |
---|
803 | typedef __darwin_intptr_t intptr_t; |
---|
804 | |
---|
805 | |
---|
806 | #define _UINTPTR_T |
---|
807 | typedef unsigned long uintptr_t; |
---|
808 | # 112 "/usr/include/ppc/types.h" 3 4 |
---|
809 | typedef u_int64_t user_addr_t; |
---|
810 | typedef u_int64_t user_size_t; |
---|
811 | typedef int64_t user_ssize_t; |
---|
812 | typedef int64_t user_long_t; |
---|
813 | typedef u_int64_t user_ulong_t; |
---|
814 | typedef int64_t user_time_t; |
---|
815 | #define USER_ADDR_NULL ((user_addr_t) 0) |
---|
816 | #define CAST_USER_ADDR_T(a_ptr) ((user_addr_t)((uintptr_t)(a_ptr))) |
---|
817 | |
---|
818 | |
---|
819 | typedef u_int64_t syscall_arg_t; |
---|
820 | |
---|
821 | |
---|
822 | #define __offsetof(type,field) ((size_t)(&((type *)0)->field)) |
---|
823 | # 31 "/usr/include/machine/types.h" 2 3 4 |
---|
824 | # 73 "/usr/include/sys/types.h" 2 3 4 |
---|
825 | # 1 "/usr/include/sys/_types.h" 1 3 4 |
---|
826 | # 24 "/usr/include/sys/_types.h" 3 4 |
---|
827 | #define _SYS__TYPES_H_ |
---|
828 | |
---|
829 | |
---|
830 | # 1 "/usr/include/machine/_types.h" 1 3 4 |
---|
831 | # 23 "/usr/include/machine/_types.h" 3 4 |
---|
832 | #define _BSD_MACHINE__TYPES_H_ |
---|
833 | # 28 "/usr/include/sys/_types.h" 2 3 4 |
---|
834 | |
---|
835 | |
---|
836 | |
---|
837 | |
---|
838 | |
---|
839 | |
---|
840 | struct __darwin_mcontext; |
---|
841 | # 49 "/usr/include/sys/_types.h" 3 4 |
---|
842 | #define __PTHREAD_SIZE__ 596 |
---|
843 | #define __PTHREAD_ATTR_SIZE__ 36 |
---|
844 | #define __PTHREAD_MUTEXATTR_SIZE__ 8 |
---|
845 | #define __PTHREAD_MUTEX_SIZE__ 40 |
---|
846 | #define __PTHREAD_CONDATTR_SIZE__ 4 |
---|
847 | #define __PTHREAD_COND_SIZE__ 24 |
---|
848 | #define __PTHREAD_ONCE_SIZE__ 4 |
---|
849 | #define __PTHREAD_RWLOCK_SIZE__ 124 |
---|
850 | #define __PTHREAD_RWLOCKATTR_SIZE__ 12 |
---|
851 | |
---|
852 | |
---|
853 | struct __darwin_pthread_handler_rec |
---|
854 | { |
---|
855 | void (*__routine)(void *); |
---|
856 | void *__arg; |
---|
857 | struct __darwin_pthread_handler_rec *__next; |
---|
858 | }; |
---|
859 | struct _opaque_pthread_attr_t { long __sig; char __opaque[36]; }; |
---|
860 | struct _opaque_pthread_cond_t { long __sig; char __opaque[24]; }; |
---|
861 | struct _opaque_pthread_condattr_t { long __sig; char __opaque[4]; }; |
---|
862 | struct _opaque_pthread_mutex_t { long __sig; char __opaque[40]; }; |
---|
863 | struct _opaque_pthread_mutexattr_t { long __sig; char __opaque[8]; }; |
---|
864 | struct _opaque_pthread_once_t { long __sig; char __opaque[4]; }; |
---|
865 | struct _opaque_pthread_rwlock_t { long __sig; char __opaque[124]; }; |
---|
866 | struct _opaque_pthread_rwlockattr_t { long __sig; char __opaque[12]; }; |
---|
867 | struct _opaque_pthread_t { long __sig; struct __darwin_pthread_handler_rec *__cleanup_stack; char __opaque[596]; }; |
---|
868 | # 93 "/usr/include/sys/_types.h" 3 4 |
---|
869 | #define __DARWIN_NULL ((void *)0) |
---|
870 | |
---|
871 | |
---|
872 | typedef __int64_t __darwin_blkcnt_t; |
---|
873 | typedef __int32_t __darwin_blksize_t; |
---|
874 | typedef __int32_t __darwin_dev_t; |
---|
875 | typedef unsigned int __darwin_fsblkcnt_t; |
---|
876 | typedef unsigned int __darwin_fsfilcnt_t; |
---|
877 | typedef __uint32_t __darwin_gid_t; |
---|
878 | typedef __uint32_t __darwin_id_t; |
---|
879 | typedef __uint32_t __darwin_ino_t; |
---|
880 | typedef __darwin_natural_t __darwin_mach_port_name_t; |
---|
881 | typedef __darwin_mach_port_name_t __darwin_mach_port_t; |
---|
882 | |
---|
883 | |
---|
884 | |
---|
885 | |
---|
886 | typedef struct __darwin_mcontext *__darwin_mcontext_t; |
---|
887 | |
---|
888 | typedef __uint16_t __darwin_mode_t; |
---|
889 | typedef __int64_t __darwin_off_t; |
---|
890 | typedef __int32_t __darwin_pid_t; |
---|
891 | typedef struct _opaque_pthread_attr_t |
---|
892 | __darwin_pthread_attr_t; |
---|
893 | typedef struct _opaque_pthread_cond_t |
---|
894 | __darwin_pthread_cond_t; |
---|
895 | typedef struct _opaque_pthread_condattr_t |
---|
896 | __darwin_pthread_condattr_t; |
---|
897 | typedef unsigned long __darwin_pthread_key_t; |
---|
898 | typedef struct _opaque_pthread_mutex_t |
---|
899 | __darwin_pthread_mutex_t; |
---|
900 | typedef struct _opaque_pthread_mutexattr_t |
---|
901 | __darwin_pthread_mutexattr_t; |
---|
902 | typedef struct _opaque_pthread_once_t |
---|
903 | __darwin_pthread_once_t; |
---|
904 | typedef struct _opaque_pthread_rwlock_t |
---|
905 | __darwin_pthread_rwlock_t; |
---|
906 | typedef struct _opaque_pthread_rwlockattr_t |
---|
907 | __darwin_pthread_rwlockattr_t; |
---|
908 | typedef struct _opaque_pthread_t |
---|
909 | *__darwin_pthread_t; |
---|
910 | typedef __uint32_t __darwin_sigset_t; |
---|
911 | typedef __int32_t __darwin_suseconds_t; |
---|
912 | typedef __uint32_t __darwin_uid_t; |
---|
913 | typedef __uint32_t __darwin_useconds_t; |
---|
914 | typedef unsigned char __darwin_uuid_t[16]; |
---|
915 | |
---|
916 | |
---|
917 | |
---|
918 | |
---|
919 | |
---|
920 | struct __darwin_sigaltstack |
---|
921 | |
---|
922 | { |
---|
923 | void *ss_sp; |
---|
924 | __darwin_size_t ss_size; |
---|
925 | int ss_flags; |
---|
926 | }; |
---|
927 | |
---|
928 | |
---|
929 | |
---|
930 | typedef struct __darwin_sigaltstack __darwin_stack_t; |
---|
931 | |
---|
932 | |
---|
933 | |
---|
934 | |
---|
935 | |
---|
936 | |
---|
937 | struct __darwin_ucontext |
---|
938 | |
---|
939 | { |
---|
940 | int uc_onstack; |
---|
941 | __darwin_sigset_t uc_sigmask; |
---|
942 | __darwin_stack_t uc_stack; |
---|
943 | |
---|
944 | |
---|
945 | |
---|
946 | struct __darwin_ucontext *uc_link; |
---|
947 | |
---|
948 | __darwin_size_t uc_mcsize; |
---|
949 | __darwin_mcontext_t uc_mcontext; |
---|
950 | }; |
---|
951 | |
---|
952 | |
---|
953 | |
---|
954 | typedef struct __darwin_ucontext __darwin_ucontext_t; |
---|
955 | # 74 "/usr/include/sys/types.h" 2 3 4 |
---|
956 | |
---|
957 | # 1 "/usr/include/machine/endian.h" 1 3 4 |
---|
958 | # 26 "/usr/include/machine/endian.h" 3 4 |
---|
959 | #define _BSD_MACHINE_ENDIAN_H_ |
---|
960 | |
---|
961 | |
---|
962 | |
---|
963 | # 1 "/usr/include/ppc/endian.h" 1 3 4 |
---|
964 | # 81 "/usr/include/ppc/endian.h" 3 4 |
---|
965 | #define _PPC_ENDIAN_H_ |
---|
966 | |
---|
967 | |
---|
968 | |
---|
969 | |
---|
970 | #define _QUAD_HIGHWORD 0 |
---|
971 | #define _QUAD_LOWWORD 1 |
---|
972 | |
---|
973 | |
---|
974 | |
---|
975 | |
---|
976 | |
---|
977 | #define __DARWIN_LITTLE_ENDIAN 1234 |
---|
978 | #define __DARWIN_BIG_ENDIAN 4321 |
---|
979 | #define __DARWIN_PDP_ENDIAN 3412 |
---|
980 | |
---|
981 | #define __DARWIN_BYTE_ORDER __DARWIN_BIG_ENDIAN |
---|
982 | # 31 "/usr/include/machine/endian.h" 2 3 4 |
---|
983 | # 76 "/usr/include/sys/types.h" 2 3 4 |
---|
984 | # 89 "/usr/include/sys/types.h" 3 4 |
---|
985 | typedef u_int64_t u_quad_t; |
---|
986 | typedef int64_t quad_t; |
---|
987 | typedef quad_t * qaddr_t; |
---|
988 | |
---|
989 | typedef char * caddr_t; |
---|
990 | typedef int32_t daddr_t; |
---|
991 | |
---|
992 | |
---|
993 | typedef __darwin_dev_t dev_t; |
---|
994 | #define _DEV_T |
---|
995 | |
---|
996 | |
---|
997 | typedef u_int32_t fixpt_t; |
---|
998 | |
---|
999 | |
---|
1000 | typedef __darwin_blkcnt_t blkcnt_t; |
---|
1001 | #define _BLKCNT_T |
---|
1002 | |
---|
1003 | |
---|
1004 | |
---|
1005 | typedef __darwin_blksize_t blksize_t; |
---|
1006 | #define _BLKSIZE_T |
---|
1007 | |
---|
1008 | |
---|
1009 | |
---|
1010 | typedef __darwin_gid_t gid_t; |
---|
1011 | #define _GID_T |
---|
1012 | |
---|
1013 | |
---|
1014 | |
---|
1015 | #define _IN_ADDR_T |
---|
1016 | typedef __uint32_t in_addr_t; |
---|
1017 | |
---|
1018 | |
---|
1019 | |
---|
1020 | #define _IN_PORT_T |
---|
1021 | typedef __uint16_t in_port_t; |
---|
1022 | |
---|
1023 | |
---|
1024 | |
---|
1025 | typedef __darwin_ino_t ino_t; |
---|
1026 | #define _INO_T |
---|
1027 | |
---|
1028 | |
---|
1029 | |
---|
1030 | #define _KEY_T |
---|
1031 | typedef __int32_t key_t; |
---|
1032 | |
---|
1033 | |
---|
1034 | |
---|
1035 | typedef __darwin_mode_t mode_t; |
---|
1036 | #define _MODE_T |
---|
1037 | |
---|
1038 | |
---|
1039 | |
---|
1040 | typedef __uint16_t nlink_t; |
---|
1041 | #define _NLINK_T |
---|
1042 | |
---|
1043 | |
---|
1044 | |
---|
1045 | #define _ID_T |
---|
1046 | typedef __darwin_id_t id_t; |
---|
1047 | |
---|
1048 | |
---|
1049 | |
---|
1050 | typedef __darwin_pid_t pid_t; |
---|
1051 | #define _PID_T |
---|
1052 | |
---|
1053 | |
---|
1054 | |
---|
1055 | typedef __darwin_off_t off_t; |
---|
1056 | #define _OFF_T |
---|
1057 | |
---|
1058 | |
---|
1059 | typedef int32_t segsz_t; |
---|
1060 | typedef int32_t swblk_t; |
---|
1061 | |
---|
1062 | |
---|
1063 | typedef __darwin_uid_t uid_t; |
---|
1064 | #define _UID_T |
---|
1065 | # 184 "/usr/include/sys/types.h" 3 4 |
---|
1066 | #define _CLOCK_T |
---|
1067 | typedef __darwin_clock_t clock_t; |
---|
1068 | |
---|
1069 | |
---|
1070 | |
---|
1071 | #define _SIZE_T |
---|
1072 | |
---|
1073 | |
---|
1074 | typedef __darwin_size_t size_t; |
---|
1075 | |
---|
1076 | |
---|
1077 | |
---|
1078 | #define _SSIZE_T |
---|
1079 | typedef __darwin_ssize_t ssize_t; |
---|
1080 | |
---|
1081 | |
---|
1082 | |
---|
1083 | #define _TIME_T |
---|
1084 | typedef __darwin_time_t time_t; |
---|
1085 | |
---|
1086 | |
---|
1087 | |
---|
1088 | #define _USECONDS_T |
---|
1089 | typedef __darwin_useconds_t useconds_t; |
---|
1090 | |
---|
1091 | |
---|
1092 | |
---|
1093 | #define _SUSECONDS_T |
---|
1094 | typedef __darwin_suseconds_t suseconds_t; |
---|
1095 | # 295 "/usr/include/sys/types.h" 3 4 |
---|
1096 | #define _PTHREAD_ATTR_T |
---|
1097 | typedef __darwin_pthread_attr_t pthread_attr_t; |
---|
1098 | |
---|
1099 | |
---|
1100 | #define _PTHREAD_COND_T |
---|
1101 | typedef __darwin_pthread_cond_t pthread_cond_t; |
---|
1102 | |
---|
1103 | |
---|
1104 | #define _PTHREAD_CONDATTR_T |
---|
1105 | typedef __darwin_pthread_condattr_t pthread_condattr_t; |
---|
1106 | |
---|
1107 | |
---|
1108 | #define _PTHREAD_MUTEX_T |
---|
1109 | typedef __darwin_pthread_mutex_t pthread_mutex_t; |
---|
1110 | |
---|
1111 | |
---|
1112 | #define _PTHREAD_MUTEXATTR_T |
---|
1113 | typedef __darwin_pthread_mutexattr_t pthread_mutexattr_t; |
---|
1114 | |
---|
1115 | |
---|
1116 | #define _PTHREAD_ONCE_T |
---|
1117 | typedef __darwin_pthread_once_t pthread_once_t; |
---|
1118 | |
---|
1119 | |
---|
1120 | #define _PTHREAD_RWLOCK_T |
---|
1121 | typedef __darwin_pthread_rwlock_t pthread_rwlock_t; |
---|
1122 | |
---|
1123 | |
---|
1124 | #define _PTHREAD_RWLOCKATTR_T |
---|
1125 | typedef __darwin_pthread_rwlockattr_t pthread_rwlockattr_t; |
---|
1126 | |
---|
1127 | |
---|
1128 | #define _PTHREAD_T |
---|
1129 | typedef __darwin_pthread_t pthread_t; |
---|
1130 | |
---|
1131 | |
---|
1132 | |
---|
1133 | |
---|
1134 | |
---|
1135 | #define _PTHREAD_KEY_T |
---|
1136 | typedef __darwin_pthread_key_t pthread_key_t; |
---|
1137 | |
---|
1138 | |
---|
1139 | |
---|
1140 | |
---|
1141 | #define _FSBLKCNT_T |
---|
1142 | typedef __darwin_fsblkcnt_t fsblkcnt_t; |
---|
1143 | |
---|
1144 | |
---|
1145 | |
---|
1146 | #define _FSFILCNT_T |
---|
1147 | typedef __darwin_fsfilcnt_t fsfilcnt_t; |
---|
1148 | # 68 "/opt/local/include/LegacySupport/sys/types.h" 2 |
---|
1149 | |
---|
1150 | |
---|
1151 | #define _MACPORTS_SYS_TYPES_H_ |
---|
1152 | |
---|
1153 | |
---|
1154 | |
---|
1155 | |
---|
1156 | typedef unsigned char u_char; |
---|
1157 | typedef unsigned short u_short; |
---|
1158 | typedef unsigned int u_int; |
---|
1159 | |
---|
1160 | typedef unsigned long u_long; |
---|
1161 | #define _U_LONG |
---|
1162 | |
---|
1163 | typedef unsigned short ushort; |
---|
1164 | typedef unsigned int uint; |
---|
1165 | # 30 "misc-utils/hardlink.c" 2 |
---|
1166 | # 1 "/opt/local/include/LegacySupport/sys/stat.h" 1 |
---|
1167 | # 19 "/opt/local/include/LegacySupport/sys/stat.h" |
---|
1168 | #define _MACPORTS_SYSSTAT_H_ |
---|
1169 | |
---|
1170 | |
---|
1171 | # 1 "/opt/local/include/LegacySupport/MacportsLegacySupport.h" 1 |
---|
1172 | # 20 "/opt/local/include/LegacySupport/MacportsLegacySupport.h" |
---|
1173 | #define _MACPORTS_LEGACYSUPPORTDEFS_H_ |
---|
1174 | # 29 "/opt/local/include/LegacySupport/MacportsLegacySupport.h" |
---|
1175 | #define __MP__BEGIN_DECLS |
---|
1176 | #define __MP__END_DECLS |
---|
1177 | |
---|
1178 | |
---|
1179 | |
---|
1180 | |
---|
1181 | |
---|
1182 | #define __MP_LEGACY_SUPPORT_FSGETPATH__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) |
---|
1183 | |
---|
1184 | |
---|
1185 | #define __MP_LEGACY_SUPPORT_SETATTRLISTAT__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) |
---|
1186 | |
---|
1187 | |
---|
1188 | #define __MP_LEGACY_SUPPORT_UTIMENSAT__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) |
---|
1189 | |
---|
1190 | |
---|
1191 | #define __MP_LEGACY_SUPPORT_GETTIME__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) |
---|
1192 | |
---|
1193 | |
---|
1194 | #define __MP_LEGACY_SUPPORT_ATCALLS__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000) |
---|
1195 | |
---|
1196 | |
---|
1197 | #define __MP_LEGACY_SUPPORT_FDOPENDIR__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000) |
---|
1198 | |
---|
1199 | |
---|
1200 | |
---|
1201 | |
---|
1202 | #define __MP_LEGACY_SUPPORT_NETIF_SOCKET_FIX__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) |
---|
1203 | |
---|
1204 | |
---|
1205 | #define __MP_LEGACY_SUPPORT_STRNLEN__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1206 | |
---|
1207 | |
---|
1208 | #define __MP_LEGACY_SUPPORT_STRNDUP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1209 | |
---|
1210 | |
---|
1211 | #define __MP_LEGACY_SUPPORT_DPRINTF__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1212 | |
---|
1213 | |
---|
1214 | #define __MP_LEGACY_SUPPORT_GETLINE__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1215 | |
---|
1216 | |
---|
1217 | #define __MP_LEGACY_SUPPORT_MEMMEM__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1218 | |
---|
1219 | |
---|
1220 | #define __MP_LEGACY_SUPPORT_WCSDUP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1221 | |
---|
1222 | |
---|
1223 | #define __MP_LEGACY_SUPPORT_WCSNLEN__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1224 | |
---|
1225 | |
---|
1226 | #define __MP_LEGACY_SUPPORT_WCPCPY__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1227 | |
---|
1228 | |
---|
1229 | #define __MP_LEGACY_SUPPORT_WCSCASECMP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1230 | |
---|
1231 | |
---|
1232 | #define __MP_LEGACY_SUPPORT_LLROUND__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1233 | |
---|
1234 | |
---|
1235 | #define __MP_LEGACY_SUPPORT_ARC4RANDOM__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1236 | |
---|
1237 | |
---|
1238 | #define __MP_LEGACY_SUPPORT_GETENTROPY__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) |
---|
1239 | |
---|
1240 | |
---|
1241 | #define __MP_LEGACY_SUPPORT_POSIX_MEMALIGN__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1242 | |
---|
1243 | |
---|
1244 | #define __MP_LEGACY_SUPPORT_AI_NUMERICSERV__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1245 | |
---|
1246 | |
---|
1247 | #define __MP_LEGACY_SUPPORT_REALPATH_WRAP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1248 | |
---|
1249 | |
---|
1250 | #define __MP_LEGACY_SUPPORT_FSETATTRLIST__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1251 | |
---|
1252 | |
---|
1253 | #define __MP_LEGACY_SUPPORT_TIME_THREAD_SAFE_FUNCTIONS__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1254 | |
---|
1255 | |
---|
1256 | #define __MP_LEGACY_SUPPORT_LSMOD__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1257 | |
---|
1258 | |
---|
1259 | #define __MP_LEGACY_SUPPORT_LUTIMES__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1260 | |
---|
1261 | |
---|
1262 | #define __MP_LEGACY_SUPPORT_SYSAIOTIGERFIX__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1263 | |
---|
1264 | |
---|
1265 | #define __MP_LEGACY_SUPPORT_SYSCONF_WRAP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101100) |
---|
1266 | |
---|
1267 | |
---|
1268 | #define __MP_LEGACY_SUPPORT_PTHREAD_RWLOCK__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1269 | |
---|
1270 | |
---|
1271 | #define __MP_LEGACY_SUPPORT_STAILQ_FOREACH__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1272 | |
---|
1273 | |
---|
1274 | |
---|
1275 | |
---|
1276 | |
---|
1277 | |
---|
1278 | |
---|
1279 | #define __MP_LEGACY_SUPPORT_CXX11_CMATH__ 0 |
---|
1280 | |
---|
1281 | |
---|
1282 | |
---|
1283 | #define __MP_LEGACY_SUPPORT_COSSIN__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) |
---|
1284 | |
---|
1285 | |
---|
1286 | #define __MP_LEGACY_SUPPORT_FFSL__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1287 | |
---|
1288 | #define __MP_LEGACY_SUPPORT_FFSLL__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) |
---|
1289 | |
---|
1290 | |
---|
1291 | #define __MP_LEGACY_SUPPORT_FLS__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1292 | |
---|
1293 | #define __MP_LEGACY_SUPPORT_FLSL__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050) |
---|
1294 | |
---|
1295 | #define __MP_LEGACY_SUPPORT_FLSLL__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1090) |
---|
1296 | |
---|
1297 | |
---|
1298 | #define __MP_LEGACY_SUPPORT_PTHREAD_SETNAME_NP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1299 | |
---|
1300 | |
---|
1301 | #define __MP_LEGACY_SUPPORT_NEED_ATCALL_MACROS__ (__MP_LEGACY_SUPPORT_ATCALLS__ || __MP_LEGACY_SUPPORT_SETATTRLISTAT__) |
---|
1302 | |
---|
1303 | #define __MP_LEGACY_SUPPORT_NEED_BEST_FCHDIR__ (__MP_LEGACY_SUPPORT_FDOPENDIR__ || __MP_LEGACY_SUPPORT_ATCALLS__ || __MP_LEGACY_SUPPORT_SETATTRLISTAT__) |
---|
1304 | |
---|
1305 | |
---|
1306 | #define __MP_LEGACY_SUPPORT_UUID__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1307 | |
---|
1308 | |
---|
1309 | #define __MP_LEGACY_SUPPORT_CoreFoundation__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1310 | |
---|
1311 | |
---|
1312 | #define __MP_LEGACY_SUPPORT_COPYFILE_WRAP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1060) |
---|
1313 | |
---|
1314 | |
---|
1315 | #define __MP_LEGACY_SUPPORT_ATEXIT_WRAP__ (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) |
---|
1316 | # 23 "/opt/local/include/LegacySupport/sys/stat.h" 2 |
---|
1317 | |
---|
1318 | |
---|
1319 | # 1 "/usr/include/sys/stat.h" 1 3 4 |
---|
1320 | # 65 "/usr/include/sys/stat.h" 3 4 |
---|
1321 | #define _SYS_STAT_H_ |
---|
1322 | # 128 "/usr/include/sys/stat.h" 3 4 |
---|
1323 | #define _TIMESPEC |
---|
1324 | struct timespec { |
---|
1325 | time_t tv_sec; |
---|
1326 | long tv_nsec; |
---|
1327 | }; |
---|
1328 | # 170 "/usr/include/sys/stat.h" 3 4 |
---|
1329 | struct stat { |
---|
1330 | dev_t st_dev; |
---|
1331 | ino_t st_ino; |
---|
1332 | mode_t st_mode; |
---|
1333 | nlink_t st_nlink; |
---|
1334 | uid_t st_uid; |
---|
1335 | gid_t st_gid; |
---|
1336 | dev_t st_rdev; |
---|
1337 | |
---|
1338 | |
---|
1339 | |
---|
1340 | |
---|
1341 | |
---|
1342 | time_t st_atime; |
---|
1343 | long st_atimensec; |
---|
1344 | time_t st_mtime; |
---|
1345 | long st_mtimensec; |
---|
1346 | time_t st_ctime; |
---|
1347 | long st_ctimensec; |
---|
1348 | |
---|
1349 | off_t st_size; |
---|
1350 | blkcnt_t st_blocks; |
---|
1351 | blksize_t st_blksize; |
---|
1352 | __uint32_t st_flags; |
---|
1353 | __uint32_t st_gen; |
---|
1354 | __int32_t st_lspare; |
---|
1355 | __int64_t st_qspare[2]; |
---|
1356 | }; |
---|
1357 | # 214 "/usr/include/sys/stat.h" 3 4 |
---|
1358 | #define S_IFMT 0170000 |
---|
1359 | #define S_IFIFO 0010000 |
---|
1360 | #define S_IFCHR 0020000 |
---|
1361 | #define S_IFDIR 0040000 |
---|
1362 | #define S_IFBLK 0060000 |
---|
1363 | #define S_IFREG 0100000 |
---|
1364 | #define S_IFLNK 0120000 |
---|
1365 | #define S_IFSOCK 0140000 |
---|
1366 | |
---|
1367 | |
---|
1368 | |
---|
1369 | |
---|
1370 | |
---|
1371 | |
---|
1372 | |
---|
1373 | #define S_IRWXU 0000700 |
---|
1374 | #define S_IRUSR 0000400 |
---|
1375 | #define S_IWUSR 0000200 |
---|
1376 | #define S_IXUSR 0000100 |
---|
1377 | |
---|
1378 | #define S_IRWXG 0000070 |
---|
1379 | #define S_IRGRP 0000040 |
---|
1380 | #define S_IWGRP 0000020 |
---|
1381 | #define S_IXGRP 0000010 |
---|
1382 | |
---|
1383 | #define S_IRWXO 0000007 |
---|
1384 | #define S_IROTH 0000004 |
---|
1385 | #define S_IWOTH 0000002 |
---|
1386 | #define S_IXOTH 0000001 |
---|
1387 | |
---|
1388 | #define S_ISUID 0004000 |
---|
1389 | #define S_ISGID 0002000 |
---|
1390 | #define S_ISVTX 0001000 |
---|
1391 | # 262 "/usr/include/sys/stat.h" 3 4 |
---|
1392 | #define S_ISBLK(m) (((m) & 0170000) == 0060000) |
---|
1393 | #define S_ISCHR(m) (((m) & 0170000) == 0020000) |
---|
1394 | #define S_ISDIR(m) (((m) & 0170000) == 0040000) |
---|
1395 | #define S_ISFIFO(m) (((m) & 0170000) == 0010000) |
---|
1396 | #define S_ISREG(m) (((m) & 0170000) == 0100000) |
---|
1397 | #define S_ISLNK(m) (((m) & 0170000) == 0120000) |
---|
1398 | #define S_ISSOCK(m) (((m) & 0170000) == 0140000) |
---|
1399 | # 289 "/usr/include/sys/stat.h" 3 4 |
---|
1400 | #define S_TYPEISMQ(buf) (0) |
---|
1401 | #define S_TYPEISSEM(buf) (0) |
---|
1402 | #define S_TYPEISSHM(buf) (0) |
---|
1403 | # 307 "/usr/include/sys/stat.h" 3 4 |
---|
1404 | #define S_TYPEISTMO(buf) (0) |
---|
1405 | # 340 "/usr/include/sys/stat.h" 3 4 |
---|
1406 | |
---|
1407 | |
---|
1408 | int chmod(const char *, mode_t); |
---|
1409 | int fchmod(int, mode_t); |
---|
1410 | int fstat(int, struct stat *); |
---|
1411 | int lstat(const char *, struct stat *); |
---|
1412 | int mkdir(const char *, mode_t); |
---|
1413 | int mkfifo(const char *, mode_t); |
---|
1414 | int stat(const char *, struct stat *); |
---|
1415 | int mknod(const char *, mode_t, dev_t); |
---|
1416 | mode_t umask(mode_t); |
---|
1417 | # 369 "/usr/include/sys/stat.h" 3 4 |
---|
1418 | |
---|
1419 | # 26 "/opt/local/include/LegacySupport/sys/stat.h" 2 |
---|
1420 | |
---|
1421 | |
---|
1422 | |
---|
1423 | |
---|
1424 | #define UTIME_NOW -1 |
---|
1425 | |
---|
1426 | |
---|
1427 | |
---|
1428 | #define UTIME_OMIT -2 |
---|
1429 | |
---|
1430 | |
---|
1431 | |
---|
1432 | |
---|
1433 | extern int futimens(int fd, const struct timespec _times_in[2]); |
---|
1434 | extern int utimensat(int fd, const char *path, const struct timespec _times_in[2], int flags); |
---|
1435 | |
---|
1436 | |
---|
1437 | |
---|
1438 | |
---|
1439 | |
---|
1440 | |
---|
1441 | |
---|
1442 | |
---|
1443 | |
---|
1444 | |
---|
1445 | extern int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags); |
---|
1446 | extern int fstatat(int dirfd, const char *pathname, struct stat *buf, int flags); |
---|
1447 | |
---|
1448 | |
---|
1449 | |
---|
1450 | |
---|
1451 | |
---|
1452 | |
---|
1453 | |
---|
1454 | extern int mkdirat(int dirfd, const char *pathname, mode_t mode); |
---|
1455 | |
---|
1456 | |
---|
1457 | |
---|
1458 | |
---|
1459 | |
---|
1460 | |
---|
1461 | |
---|
1462 | |
---|
1463 | |
---|
1464 | extern int lchmod(const char *, mode_t); |
---|
1465 | |
---|
1466 | |
---|
1467 | # 31 "misc-utils/hardlink.c" 2 |
---|
1468 | # 1 "/opt/local/include/LegacySupport/sys/time.h" 1 |
---|
1469 | # 19 "/opt/local/include/LegacySupport/sys/time.h" |
---|
1470 | #define _MACPORTS_SYSTIME_H_ |
---|
1471 | |
---|
1472 | |
---|
1473 | |
---|
1474 | |
---|
1475 | |
---|
1476 | # 1 "/usr/include/sys/time.h" 1 3 4 |
---|
1477 | # 59 "/usr/include/sys/time.h" 3 4 |
---|
1478 | #define _SYS_TIME_H_ |
---|
1479 | # 80 "/usr/include/sys/time.h" 3 4 |
---|
1480 | #define _TIMEVAL |
---|
1481 | struct timeval { |
---|
1482 | time_t tv_sec; |
---|
1483 | suseconds_t tv_usec; |
---|
1484 | }; |
---|
1485 | |
---|
1486 | |
---|
1487 | |
---|
1488 | |
---|
1489 | |
---|
1490 | |
---|
1491 | struct itimerval { |
---|
1492 | struct timeval it_interval; |
---|
1493 | struct timeval it_value; |
---|
1494 | }; |
---|
1495 | |
---|
1496 | |
---|
1497 | |
---|
1498 | |
---|
1499 | |
---|
1500 | #define ITIMER_REAL 0 |
---|
1501 | #define ITIMER_VIRTUAL 1 |
---|
1502 | #define ITIMER_PROF 2 |
---|
1503 | # 112 "/usr/include/sys/time.h" 3 4 |
---|
1504 | #define _FD_SET |
---|
1505 | # 121 "/usr/include/sys/time.h" 3 4 |
---|
1506 | #define FD_SETSIZE 1024 |
---|
1507 | |
---|
1508 | |
---|
1509 | #define __DARWIN_NBBY 8 |
---|
1510 | #define __DARWIN_NFDBITS (sizeof(__int32_t) * __DARWIN_NBBY) |
---|
1511 | #define __DARWIN_howmany(x,y) (((x) + ((y) - 1)) / (y)) |
---|
1512 | |
---|
1513 | |
---|
1514 | typedef struct fd_set { |
---|
1515 | __int32_t fds_bits[(((1024) + (((sizeof(__int32_t) * 8)) - 1)) / ((sizeof(__int32_t) * 8)))]; |
---|
1516 | } fd_set; |
---|
1517 | |
---|
1518 | |
---|
1519 | #define FD_SET(n,p) ((p)->fds_bits[(n)/__DARWIN_NFDBITS] |= (1<<((n) % __DARWIN_NFDBITS))) |
---|
1520 | #define FD_CLR(n,p) ((p)->fds_bits[(n)/__DARWIN_NFDBITS] &= ~(1<<((n) % __DARWIN_NFDBITS))) |
---|
1521 | #define FD_ISSET(n,p) ((p)->fds_bits[(n)/__DARWIN_NFDBITS] & (1<<((n) % __DARWIN_NFDBITS))) |
---|
1522 | |
---|
1523 | |
---|
1524 | |
---|
1525 | |
---|
1526 | |
---|
1527 | #define FD_ZERO(p) __builtin_bzero(p, sizeof(*(p))) |
---|
1528 | # 232 "/usr/include/sys/time.h" 3 4 |
---|
1529 | |
---|
1530 | # 242 "/usr/include/sys/time.h" 3 4 |
---|
1531 | int getitimer(int, struct itimerval *); |
---|
1532 | int gettimeofday(struct timeval * , struct timezone * ); |
---|
1533 | int select(int, fd_set * , fd_set * , |
---|
1534 | fd_set * , struct timeval * ); |
---|
1535 | int setitimer(int, const struct itimerval * , |
---|
1536 | struct itimerval * ); |
---|
1537 | int utimes(const char *, const struct timeval *); |
---|
1538 | |
---|
1539 | |
---|
1540 | # 26 "/opt/local/include/LegacySupport/sys/time.h" 2 |
---|
1541 | |
---|
1542 | |
---|
1543 | |
---|
1544 | |
---|
1545 | |
---|
1546 | extern int lutimes(const char *, const struct timeval *); |
---|
1547 | |
---|
1548 | |
---|
1549 | # 32 "misc-utils/hardlink.c" 2 |
---|
1550 | # 1 "/usr/include/sys/resource.h" 1 3 4 |
---|
1551 | # 59 "/usr/include/sys/resource.h" 3 4 |
---|
1552 | #define _SYS_RESOURCE_H_ |
---|
1553 | # 90 "/usr/include/sys/resource.h" 3 4 |
---|
1554 | typedef __int64_t rlim_t; |
---|
1555 | # 101 "/usr/include/sys/resource.h" 3 4 |
---|
1556 | #define PRIO_PROCESS 0 |
---|
1557 | #define PRIO_PGRP 1 |
---|
1558 | #define PRIO_USER 2 |
---|
1559 | # 123 "/usr/include/sys/resource.h" 3 4 |
---|
1560 | #define RUSAGE_SELF 0 |
---|
1561 | #define RUSAGE_CHILDREN -1 |
---|
1562 | # 135 "/usr/include/sys/resource.h" 3 4 |
---|
1563 | struct rusage { |
---|
1564 | struct timeval ru_utime; |
---|
1565 | struct timeval ru_stime; |
---|
1566 | |
---|
1567 | long ru_opaque[14]; |
---|
1568 | # 163 "/usr/include/sys/resource.h" 3 4 |
---|
1569 | }; |
---|
1570 | # 179 "/usr/include/sys/resource.h" 3 4 |
---|
1571 | #define RLIM_INFINITY (((__uint64_t)1 << 63) - 1) |
---|
1572 | #define RLIM_SAVED_MAX RLIM_INFINITY |
---|
1573 | #define RLIM_SAVED_CUR RLIM_INFINITY |
---|
1574 | |
---|
1575 | |
---|
1576 | |
---|
1577 | |
---|
1578 | |
---|
1579 | #define RLIMIT_CPU 0 |
---|
1580 | #define RLIMIT_FSIZE 1 |
---|
1581 | #define RLIMIT_DATA 2 |
---|
1582 | #define RLIMIT_STACK 3 |
---|
1583 | #define RLIMIT_CORE 4 |
---|
1584 | #define RLIMIT_AS 5 |
---|
1585 | |
---|
1586 | |
---|
1587 | |
---|
1588 | |
---|
1589 | |
---|
1590 | #define RLIMIT_NOFILE 8 |
---|
1591 | # 207 "/usr/include/sys/resource.h" 3 4 |
---|
1592 | struct rlimit { |
---|
1593 | rlim_t rlim_cur; |
---|
1594 | rlim_t rlim_max; |
---|
1595 | }; |
---|
1596 | |
---|
1597 | |
---|
1598 | |
---|
1599 | |
---|
1600 | int getpriority(int, id_t); |
---|
1601 | int getrlimit(int, struct rlimit *); |
---|
1602 | int getrusage(int, struct rusage *); |
---|
1603 | int setpriority(int, id_t, int); |
---|
1604 | int setrlimit(int, const struct rlimit *); |
---|
1605 | |
---|
1606 | # 33 "misc-utils/hardlink.c" 2 |
---|
1607 | # 1 "/usr/include/fcntl.h" 1 3 4 |
---|
1608 | # 23 "/usr/include/fcntl.h" 3 4 |
---|
1609 | # 1 "/opt/local/include/LegacySupport/sys/fcntl.h" 1 3 4 |
---|
1610 | # 19 "/opt/local/include/LegacySupport/sys/fcntl.h" 3 4 |
---|
1611 | #define _MACPORTS_SYSFCNTL_H_ |
---|
1612 | |
---|
1613 | |
---|
1614 | |
---|
1615 | |
---|
1616 | |
---|
1617 | # 1 "/usr/include/sys/fcntl.h" 1 3 4 |
---|
1618 | # 65 "/usr/include/sys/fcntl.h" 3 4 |
---|
1619 | #define _SYS_FCNTL_H_ |
---|
1620 | # 104 "/usr/include/sys/fcntl.h" 3 4 |
---|
1621 | #define O_RDONLY 0x0000 |
---|
1622 | #define O_WRONLY 0x0001 |
---|
1623 | #define O_RDWR 0x0002 |
---|
1624 | #define O_ACCMODE 0x0003 |
---|
1625 | # 121 "/usr/include/sys/fcntl.h" 3 4 |
---|
1626 | #define O_NONBLOCK 0x0004 |
---|
1627 | #define O_APPEND 0x0008 |
---|
1628 | #define O_SYNC 0x0080 |
---|
1629 | |
---|
1630 | |
---|
1631 | |
---|
1632 | |
---|
1633 | |
---|
1634 | |
---|
1635 | |
---|
1636 | #define O_CREAT 0x0200 |
---|
1637 | #define O_TRUNC 0x0400 |
---|
1638 | #define O_EXCL 0x0800 |
---|
1639 | # 144 "/usr/include/sys/fcntl.h" 3 4 |
---|
1640 | #define O_NOCTTY 0 |
---|
1641 | # 177 "/usr/include/sys/fcntl.h" 3 4 |
---|
1642 | #define F_DUPFD 0 |
---|
1643 | #define F_GETFD 1 |
---|
1644 | #define F_SETFD 2 |
---|
1645 | #define F_GETFL 3 |
---|
1646 | #define F_SETFL 4 |
---|
1647 | #define F_GETOWN 5 |
---|
1648 | #define F_SETOWN 6 |
---|
1649 | #define F_GETLK 7 |
---|
1650 | #define F_SETLK 8 |
---|
1651 | #define F_SETLKW 9 |
---|
1652 | # 209 "/usr/include/sys/fcntl.h" 3 4 |
---|
1653 | #define FD_CLOEXEC 1 |
---|
1654 | |
---|
1655 | |
---|
1656 | #define F_RDLCK 1 |
---|
1657 | #define F_UNLCK 2 |
---|
1658 | #define F_WRLCK 3 |
---|
1659 | |
---|
1660 | |
---|
1661 | |
---|
1662 | |
---|
1663 | |
---|
1664 | |
---|
1665 | #define SEEK_SET 0 |
---|
1666 | #define SEEK_CUR 1 |
---|
1667 | #define SEEK_END 2 |
---|
1668 | # 291 "/usr/include/sys/fcntl.h" 3 4 |
---|
1669 | struct flock { |
---|
1670 | off_t l_start; |
---|
1671 | off_t l_len; |
---|
1672 | pid_t l_pid; |
---|
1673 | short l_type; |
---|
1674 | short l_whence; |
---|
1675 | }; |
---|
1676 | # 392 "/usr/include/sys/fcntl.h" 3 4 |
---|
1677 | |
---|
1678 | int open(const char *, int, ...); |
---|
1679 | int creat(const char *, mode_t); |
---|
1680 | int fcntl(int, int, ...); |
---|
1681 | # 409 "/usr/include/sys/fcntl.h" 3 4 |
---|
1682 | |
---|
1683 | # 26 "/opt/local/include/LegacySupport/sys/fcntl.h" 2 3 4 |
---|
1684 | # 34 "/opt/local/include/LegacySupport/sys/fcntl.h" 3 4 |
---|
1685 | #define O_CLOEXEC 0 |
---|
1686 | |
---|
1687 | |
---|
1688 | |
---|
1689 | |
---|
1690 | |
---|
1691 | |
---|
1692 | #define AT_FDCWD -2 |
---|
1693 | |
---|
1694 | |
---|
1695 | #define AT_EACCESS 0x0010 |
---|
1696 | |
---|
1697 | |
---|
1698 | #define AT_SYMLINK_NOFOLLOW 0x0020 |
---|
1699 | |
---|
1700 | |
---|
1701 | #define AT_SYMLINK_FOLLOW 0x0040 |
---|
1702 | |
---|
1703 | |
---|
1704 | #define AT_REMOVEDIR 0x0080 |
---|
1705 | |
---|
1706 | |
---|
1707 | |
---|
1708 | |
---|
1709 | extern int openat(int dirfd, const char *pathname, int flags, ...); |
---|
1710 | |
---|
1711 | |
---|
1712 | # 23 "/usr/include/fcntl.h" 2 3 4 |
---|
1713 | # 34 "misc-utils/hardlink.c" 2 |
---|
1714 | # 1 "/usr/include/ftw.h" 1 3 4 |
---|
1715 | # 24 "/usr/include/ftw.h" 3 4 |
---|
1716 | #define _FTW_H |
---|
1717 | |
---|
1718 | |
---|
1719 | |
---|
1720 | |
---|
1721 | |
---|
1722 | |
---|
1723 | |
---|
1724 | #define FTW_F 0 |
---|
1725 | #define FTW_D 1 |
---|
1726 | #define FTW_DNR 2 |
---|
1727 | #define FTW_DP 3 |
---|
1728 | #define FTW_NS 4 |
---|
1729 | #define FTW_SL 5 |
---|
1730 | #define FTW_SLN 6 |
---|
1731 | |
---|
1732 | |
---|
1733 | |
---|
1734 | |
---|
1735 | #define FTW_PHYS 0x01 |
---|
1736 | #define FTW_MOUNT 0x02 |
---|
1737 | #define FTW_DEPTH 0x04 |
---|
1738 | #define FTW_CHDIR 0x08 |
---|
1739 | |
---|
1740 | struct FTW { |
---|
1741 | int base; |
---|
1742 | int level; |
---|
1743 | }; |
---|
1744 | |
---|
1745 | |
---|
1746 | int ftw(const char *, int (*)(const char *, const struct stat *, int), int) |
---|
1747 | __asm("_" "ftw" "$UNIX2003"); |
---|
1748 | int nftw(const char *, int (*)(const char *, const struct stat *, int, |
---|
1749 | struct FTW *), int, int) __asm("_" "nftw" "$UNIX2003"); |
---|
1750 | |
---|
1751 | # 35 "misc-utils/hardlink.c" 2 |
---|
1752 | # 1 "/usr/include/search.h" 1 3 4 |
---|
1753 | # 10 "/usr/include/search.h" 3 4 |
---|
1754 | #define _SEARCH_H_ |
---|
1755 | |
---|
1756 | |
---|
1757 | # 1 "/usr/include/_types.h" 1 3 4 |
---|
1758 | # 25 "/usr/include/_types.h" 3 4 |
---|
1759 | #define __TYPES_H_ |
---|
1760 | |
---|
1761 | |
---|
1762 | |
---|
1763 | typedef int __darwin_nl_item; |
---|
1764 | typedef int __darwin_wctrans_t; |
---|
1765 | |
---|
1766 | |
---|
1767 | |
---|
1768 | typedef unsigned long __darwin_wctype_t; |
---|
1769 | |
---|
1770 | |
---|
1771 | |
---|
1772 | #define __DARWIN_WCHAR_MAX __WCHAR_MAX__ |
---|
1773 | |
---|
1774 | |
---|
1775 | |
---|
1776 | |
---|
1777 | |
---|
1778 | #define __DARWIN_WCHAR_MIN (-0x7fffffff - 1) |
---|
1779 | |
---|
1780 | |
---|
1781 | |
---|
1782 | #define __DARWIN_WEOF ((__darwin_wint_t)-1) |
---|
1783 | # 14 "/usr/include/search.h" 2 3 4 |
---|
1784 | |
---|
1785 | |
---|
1786 | |
---|
1787 | |
---|
1788 | |
---|
1789 | |
---|
1790 | typedef struct entry { |
---|
1791 | char *key; |
---|
1792 | void *data; |
---|
1793 | } ENTRY; |
---|
1794 | |
---|
1795 | typedef enum { |
---|
1796 | FIND, ENTER |
---|
1797 | } ACTION; |
---|
1798 | |
---|
1799 | typedef enum { |
---|
1800 | preorder, |
---|
1801 | postorder, |
---|
1802 | endorder, |
---|
1803 | leaf |
---|
1804 | } VISIT; |
---|
1805 | # 48 "/usr/include/search.h" 3 4 |
---|
1806 | |
---|
1807 | int hcreate(size_t); |
---|
1808 | void hdestroy(void); |
---|
1809 | ENTRY *hsearch(ENTRY, ACTION); |
---|
1810 | void insque(void *, void *); |
---|
1811 | void *lfind(const void *, const void *, size_t *, size_t, |
---|
1812 | int (*)(const void *, const void *)); |
---|
1813 | void *lsearch(const void *, void *, size_t *, size_t, |
---|
1814 | int (*)(const void *, const void *)); |
---|
1815 | void remque(void *); |
---|
1816 | void *tdelete(const void * , void ** , |
---|
1817 | int (*)(const void *, const void *)); |
---|
1818 | void *tfind(const void *, void * const *, |
---|
1819 | int (*)(const void *, const void *)); |
---|
1820 | void *tsearch(const void *, void **, int (*)(const void *, const void *)); |
---|
1821 | void twalk(const void *, void (*)(const void *, VISIT, int)); |
---|
1822 | |
---|
1823 | # 36 "misc-utils/hardlink.c" 2 |
---|
1824 | # 1 "/usr/include/signal.h" 1 3 4 |
---|
1825 | # 59 "/usr/include/signal.h" 3 4 |
---|
1826 | #define _USER_SIGNAL_H |
---|
1827 | |
---|
1828 | |
---|
1829 | |
---|
1830 | # 1 "/usr/include/sys/signal.h" 1 3 4 |
---|
1831 | # 64 "/usr/include/sys/signal.h" 3 4 |
---|
1832 | #define _SYS_SIGNAL_H_ |
---|
1833 | # 73 "/usr/include/sys/signal.h" 3 4 |
---|
1834 | # 1 "/usr/include/machine/signal.h" 1 3 4 |
---|
1835 | # 23 "/usr/include/machine/signal.h" 3 4 |
---|
1836 | #define _BSD_MACHINE_SIGNAL_H_ |
---|
1837 | |
---|
1838 | |
---|
1839 | |
---|
1840 | # 1 "/usr/include/ppc/signal.h" 1 3 4 |
---|
1841 | # 27 "/usr/include/ppc/signal.h" 3 4 |
---|
1842 | #define _PPC_SIGNAL_ 1 |
---|
1843 | |
---|
1844 | |
---|
1845 | |
---|
1846 | |
---|
1847 | typedef int sig_atomic_t; |
---|
1848 | |
---|
1849 | |
---|
1850 | |
---|
1851 | |
---|
1852 | #define SV_SAVE_REGS 0x1000 |
---|
1853 | # 50 "/usr/include/ppc/signal.h" 3 4 |
---|
1854 | typedef enum { |
---|
1855 | REGS_SAVED_NONE, |
---|
1856 | REGS_SAVED_CALLER, |
---|
1857 | |
---|
1858 | |
---|
1859 | REGS_SAVED_ALL |
---|
1860 | } regs_saved_t; |
---|
1861 | # 66 "/usr/include/ppc/signal.h" 3 4 |
---|
1862 | struct sigcontext32 { |
---|
1863 | int sc_onstack; |
---|
1864 | int sc_mask; |
---|
1865 | int sc_ir; |
---|
1866 | int sc_psw; |
---|
1867 | int sc_sp; |
---|
1868 | void *sc_regs; |
---|
1869 | }; |
---|
1870 | |
---|
1871 | struct sigcontext64 { |
---|
1872 | int sc_onstack; |
---|
1873 | int sc_mask; |
---|
1874 | long long sc_ir; |
---|
1875 | long long sc_psw; |
---|
1876 | long long sc_sp; |
---|
1877 | void *sc_regs; |
---|
1878 | }; |
---|
1879 | |
---|
1880 | |
---|
1881 | |
---|
1882 | |
---|
1883 | |
---|
1884 | struct sigcontext { |
---|
1885 | int sc_onstack; |
---|
1886 | int sc_mask; |
---|
1887 | int sc_ir; |
---|
1888 | int sc_psw; |
---|
1889 | int sc_sp; |
---|
1890 | void *sc_regs; |
---|
1891 | }; |
---|
1892 | # 28 "/usr/include/machine/signal.h" 2 3 4 |
---|
1893 | # 74 "/usr/include/sys/signal.h" 2 3 4 |
---|
1894 | |
---|
1895 | #define SIGHUP 1 |
---|
1896 | #define SIGINT 2 |
---|
1897 | #define SIGQUIT 3 |
---|
1898 | #define SIGILL 4 |
---|
1899 | #define SIGTRAP 5 |
---|
1900 | #define SIGABRT 6 |
---|
1901 | |
---|
1902 | #define SIGPOLL 7 |
---|
1903 | |
---|
1904 | |
---|
1905 | |
---|
1906 | |
---|
1907 | #define SIGFPE 8 |
---|
1908 | #define SIGKILL 9 |
---|
1909 | #define SIGBUS 10 |
---|
1910 | #define SIGSEGV 11 |
---|
1911 | #define SIGSYS 12 |
---|
1912 | #define SIGPIPE 13 |
---|
1913 | #define SIGALRM 14 |
---|
1914 | #define SIGTERM 15 |
---|
1915 | #define SIGURG 16 |
---|
1916 | #define SIGSTOP 17 |
---|
1917 | #define SIGTSTP 18 |
---|
1918 | #define SIGCONT 19 |
---|
1919 | #define SIGCHLD 20 |
---|
1920 | #define SIGTTIN 21 |
---|
1921 | #define SIGTTOU 22 |
---|
1922 | |
---|
1923 | |
---|
1924 | |
---|
1925 | #define SIGXCPU 24 |
---|
1926 | #define SIGXFSZ 25 |
---|
1927 | #define SIGVTALRM 26 |
---|
1928 | #define SIGPROF 27 |
---|
1929 | |
---|
1930 | |
---|
1931 | |
---|
1932 | |
---|
1933 | #define SIGUSR1 30 |
---|
1934 | #define SIGUSR2 31 |
---|
1935 | |
---|
1936 | |
---|
1937 | |
---|
1938 | |
---|
1939 | |
---|
1940 | |
---|
1941 | |
---|
1942 | #define SIG_DFL (void (*)(int))0 |
---|
1943 | #define SIG_IGN (void (*)(int))1 |
---|
1944 | #define SIG_HOLD (void (*)(int))5 |
---|
1945 | #define SIG_ERR ((void (*)(int))-1) |
---|
1946 | # 138 "/usr/include/sys/signal.h" 3 4 |
---|
1947 | #define _MCONTEXT_T |
---|
1948 | typedef __darwin_mcontext_t mcontext_t; |
---|
1949 | # 160 "/usr/include/sys/signal.h" 3 4 |
---|
1950 | #define _SIGSET_T |
---|
1951 | typedef __darwin_sigset_t sigset_t; |
---|
1952 | # 170 "/usr/include/sys/signal.h" 3 4 |
---|
1953 | #define _UCONTEXT_T |
---|
1954 | typedef __darwin_ucontext_t ucontext_t; |
---|
1955 | # 186 "/usr/include/sys/signal.h" 3 4 |
---|
1956 | union sigval { |
---|
1957 | |
---|
1958 | int sival_int; |
---|
1959 | void *sival_ptr; |
---|
1960 | }; |
---|
1961 | |
---|
1962 | #define SIGEV_NONE 0 |
---|
1963 | #define SIGEV_SIGNAL 1 |
---|
1964 | #define SIGEV_THREAD 3 |
---|
1965 | |
---|
1966 | struct sigevent { |
---|
1967 | int sigev_notify; |
---|
1968 | int sigev_signo; |
---|
1969 | union sigval sigev_value; |
---|
1970 | void (*sigev_notify_function)(union sigval); |
---|
1971 | pthread_attr_t *sigev_notify_attributes; |
---|
1972 | }; |
---|
1973 | |
---|
1974 | |
---|
1975 | |
---|
1976 | typedef struct __siginfo { |
---|
1977 | int si_signo; |
---|
1978 | int si_errno; |
---|
1979 | int si_code; |
---|
1980 | pid_t si_pid; |
---|
1981 | uid_t si_uid; |
---|
1982 | int si_status; |
---|
1983 | void *si_addr; |
---|
1984 | union sigval si_value; |
---|
1985 | long si_band; |
---|
1986 | unsigned long pad[7]; |
---|
1987 | } siginfo_t; |
---|
1988 | # 236 "/usr/include/sys/signal.h" 3 4 |
---|
1989 | #define ILL_ILLOPC 1 |
---|
1990 | #define ILL_ILLTRP 2 |
---|
1991 | #define ILL_PRVOPC 3 |
---|
1992 | #define ILL_ILLOPN 4 |
---|
1993 | #define ILL_ILLADR 5 |
---|
1994 | #define ILL_PRVREG 6 |
---|
1995 | #define ILL_COPROC 7 |
---|
1996 | #define ILL_BADSTK 8 |
---|
1997 | |
---|
1998 | |
---|
1999 | |
---|
2000 | |
---|
2001 | |
---|
2002 | #define FPE_FLTDIV 1 |
---|
2003 | #define FPE_FLTOVF 2 |
---|
2004 | #define FPE_FLTUND 3 |
---|
2005 | #define FPE_FLTRES 4 |
---|
2006 | #define FPE_FLTINV 5 |
---|
2007 | #define FPE_FLTSUB 6 |
---|
2008 | #define FPE_INTDIV 7 |
---|
2009 | #define FPE_INTOVF 8 |
---|
2010 | |
---|
2011 | |
---|
2012 | |
---|
2013 | |
---|
2014 | |
---|
2015 | #define SEGV_MAPERR 1 |
---|
2016 | #define SEGV_ACCERR 2 |
---|
2017 | |
---|
2018 | |
---|
2019 | |
---|
2020 | |
---|
2021 | |
---|
2022 | #define BUS_ADRALN 1 |
---|
2023 | #define BUS_ADRERR 2 |
---|
2024 | #define BUS_OBJERR 3 |
---|
2025 | |
---|
2026 | |
---|
2027 | #define TRAP_BRKPT 1 |
---|
2028 | #define TRAP_TRACE 2 |
---|
2029 | |
---|
2030 | |
---|
2031 | |
---|
2032 | |
---|
2033 | |
---|
2034 | #define CLD_EXITED 1 |
---|
2035 | #define CLD_KILLED 2 |
---|
2036 | #define CLD_DUMPED 3 |
---|
2037 | #define CLD_TRAPPED 4 |
---|
2038 | #define CLD_STOPPED 5 |
---|
2039 | #define CLD_CONTINUED 6 |
---|
2040 | |
---|
2041 | |
---|
2042 | #define POLL_IN 1 |
---|
2043 | #define POLL_OUT 2 |
---|
2044 | #define POLL_MSG 3 |
---|
2045 | #define POLL_ERR 4 |
---|
2046 | #define POLL_PRI 5 |
---|
2047 | #define POLL_HUP 6 |
---|
2048 | |
---|
2049 | |
---|
2050 | union __sigaction_u { |
---|
2051 | void (*__sa_handler)(int); |
---|
2052 | void (*__sa_sigaction)(int, struct __siginfo *, |
---|
2053 | void *); |
---|
2054 | }; |
---|
2055 | |
---|
2056 | |
---|
2057 | struct __sigaction { |
---|
2058 | union __sigaction_u __sigaction_u; |
---|
2059 | void (*sa_tramp)(void *, int, int, siginfo_t *, void *); |
---|
2060 | sigset_t sa_mask; |
---|
2061 | int sa_flags; |
---|
2062 | }; |
---|
2063 | |
---|
2064 | |
---|
2065 | |
---|
2066 | |
---|
2067 | struct sigaction { |
---|
2068 | union __sigaction_u __sigaction_u; |
---|
2069 | sigset_t sa_mask; |
---|
2070 | int sa_flags; |
---|
2071 | }; |
---|
2072 | |
---|
2073 | |
---|
2074 | |
---|
2075 | |
---|
2076 | #define sa_handler __sigaction_u.__sa_handler |
---|
2077 | #define sa_sigaction __sigaction_u.__sa_sigaction |
---|
2078 | |
---|
2079 | #define SA_ONSTACK 0x0001 |
---|
2080 | #define SA_RESTART 0x0002 |
---|
2081 | #define SA_DISABLE 0x0004 |
---|
2082 | #define SA_RESETHAND 0x0004 |
---|
2083 | #define SA_NOCLDSTOP 0x0008 |
---|
2084 | #define SA_NODEFER 0x0010 |
---|
2085 | #define SA_NOCLDWAIT 0x0020 |
---|
2086 | #define SA_SIGINFO 0x0040 |
---|
2087 | # 343 "/usr/include/sys/signal.h" 3 4 |
---|
2088 | #define SIG_BLOCK 1 |
---|
2089 | #define SIG_UNBLOCK 2 |
---|
2090 | #define SIG_SETMASK 3 |
---|
2091 | |
---|
2092 | |
---|
2093 | #define SI_USER 0x10001 |
---|
2094 | #define SI_QUEUE 0x10002 |
---|
2095 | #define SI_TIMER 0x10003 |
---|
2096 | #define SI_ASYNCIO 0x10004 |
---|
2097 | #define SI_MESGQ 0x10005 |
---|
2098 | # 363 "/usr/include/sys/signal.h" 3 4 |
---|
2099 | #define _STACK_T |
---|
2100 | typedef __darwin_stack_t stack_t; |
---|
2101 | |
---|
2102 | |
---|
2103 | #define SS_ONSTACK 0x0001 |
---|
2104 | #define SS_DISABLE 0x0004 |
---|
2105 | #define MINSIGSTKSZ 32768 |
---|
2106 | #define SIGSTKSZ 131072 |
---|
2107 | # 396 "/usr/include/sys/signal.h" 3 4 |
---|
2108 | struct sigstack { |
---|
2109 | char *ss_sp; |
---|
2110 | int ss_onstack; |
---|
2111 | }; |
---|
2112 | # 418 "/usr/include/sys/signal.h" 3 4 |
---|
2113 | |
---|
2114 | void (*signal(int, void (*)(int)))(int); |
---|
2115 | |
---|
2116 | # 64 "/usr/include/signal.h" 2 3 4 |
---|
2117 | # 75 "/usr/include/signal.h" 3 4 |
---|
2118 | |
---|
2119 | int raise(int); |
---|
2120 | |
---|
2121 | |
---|
2122 | |
---|
2123 | |
---|
2124 | void (*bsd_signal(int, void (*)(int)))(int); |
---|
2125 | int kill(pid_t, int); |
---|
2126 | int killpg(pid_t, int); |
---|
2127 | int pthread_kill(pthread_t, int); |
---|
2128 | int pthread_sigmask(int, const sigset_t *, sigset_t *); |
---|
2129 | int sigaction(int, const struct sigaction * , |
---|
2130 | struct sigaction * ); |
---|
2131 | int sigaddset(sigset_t *, int); |
---|
2132 | int sigaltstack(const stack_t * , stack_t * ); |
---|
2133 | int sigdelset(sigset_t *, int); |
---|
2134 | int sigemptyset(sigset_t *); |
---|
2135 | int sigfillset(sigset_t *); |
---|
2136 | int sighold(int); |
---|
2137 | int sigignore(int); |
---|
2138 | int siginterrupt(int, int); |
---|
2139 | int sigismember(const sigset_t *, int); |
---|
2140 | int sigpause(int); |
---|
2141 | int sigpending(sigset_t *); |
---|
2142 | int sigprocmask(int, const sigset_t * , sigset_t * ); |
---|
2143 | int sigrelse(int); |
---|
2144 | void (*sigset(int, void (*)(int)))(int); |
---|
2145 | int sigsuspend(const sigset_t *); |
---|
2146 | int sigwait(const sigset_t * , int * ); |
---|
2147 | |
---|
2148 | |
---|
2149 | |
---|
2150 | |
---|
2151 | |
---|
2152 | |
---|
2153 | |
---|
2154 | |
---|
2155 | |
---|
2156 | |
---|
2157 | #define sigaddset(set,signo) (*(set) |= 1 << ((signo) - 1), 0) |
---|
2158 | #define sigdelset(set,signo) (*(set) &= ~(1 << ((signo) - 1)), 0) |
---|
2159 | #define sigemptyset(set) (*(set) = 0, 0) |
---|
2160 | #define sigfillset(set) (*(set) = ~(sigset_t)0, 0) |
---|
2161 | #define sigismember(set,signo) ((*(set) & (1 << ((signo) - 1))) != 0) |
---|
2162 | # 37 "misc-utils/hardlink.c" 2 |
---|
2163 | # 1 "/usr/include/getopt.h" 1 3 4 |
---|
2164 | # 41 "/usr/include/getopt.h" 3 4 |
---|
2165 | #define _GETOPT_H_ |
---|
2166 | |
---|
2167 | |
---|
2168 | # 1 "/opt/local/include/LegacySupport/unistd.h" 1 3 4 |
---|
2169 | # 78 "/opt/local/include/LegacySupport/unistd.h" 3 4 |
---|
2170 | #define _MACPORTS_UNISTD_H_ |
---|
2171 | |
---|
2172 | |
---|
2173 | # 1 "/opt/local/include/LegacySupport/MacportsLegacySupport.h" 1 3 4 |
---|
2174 | # 82 "/opt/local/include/LegacySupport/unistd.h" 2 3 4 |
---|
2175 | |
---|
2176 | # 1 "/usr/include/unistd.h" 1 3 4 |
---|
2177 | # 69 "/usr/include/unistd.h" 3 4 |
---|
2178 | #define _UNISTD_H_ |
---|
2179 | |
---|
2180 | |
---|
2181 | |
---|
2182 | |
---|
2183 | # 1 "/opt/local/include/LegacySupport/sys/unistd.h" 1 3 4 |
---|
2184 | # 19 "/opt/local/include/LegacySupport/sys/unistd.h" 3 4 |
---|
2185 | #define _MACPORTS_SYSUNISTD_H_ |
---|
2186 | |
---|
2187 | |
---|
2188 | |
---|
2189 | |
---|
2190 | |
---|
2191 | # 1 "/usr/include/sys/unistd.h" 1 3 4 |
---|
2192 | # 59 "/usr/include/sys/unistd.h" 3 4 |
---|
2193 | #define _SYS_UNISTD_H_ |
---|
2194 | # 71 "/usr/include/sys/unistd.h" 3 4 |
---|
2195 | #define _POSIX_VERSION 200112L |
---|
2196 | #define _POSIX2_VERSION 200112L |
---|
2197 | |
---|
2198 | |
---|
2199 | |
---|
2200 | |
---|
2201 | #define _POSIX_VDISABLE ((unsigned char)'\377') |
---|
2202 | |
---|
2203 | |
---|
2204 | #define _POSIX_THREAD_KEYS_MAX 128 |
---|
2205 | |
---|
2206 | |
---|
2207 | #define F_OK 0 |
---|
2208 | #define X_OK (1<<0) |
---|
2209 | #define W_OK (1<<1) |
---|
2210 | #define R_OK (1<<2) |
---|
2211 | # 140 "/usr/include/sys/unistd.h" 3 4 |
---|
2212 | #define _PC_LINK_MAX 1 |
---|
2213 | #define _PC_MAX_CANON 2 |
---|
2214 | #define _PC_MAX_INPUT 3 |
---|
2215 | #define _PC_NAME_MAX 4 |
---|
2216 | #define _PC_PATH_MAX 5 |
---|
2217 | #define _PC_PIPE_BUF 6 |
---|
2218 | #define _PC_CHOWN_RESTRICTED 7 |
---|
2219 | #define _PC_NO_TRUNC 8 |
---|
2220 | #define _PC_VDISABLE 9 |
---|
2221 | # 159 "/usr/include/sys/unistd.h" 3 4 |
---|
2222 | #define _CS_PATH 1 |
---|
2223 | # 26 "/opt/local/include/LegacySupport/sys/unistd.h" 2 3 4 |
---|
2224 | |
---|
2225 | |
---|
2226 | # 1 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdint.h" 1 3 4 |
---|
2227 | |
---|
2228 | |
---|
2229 | |
---|
2230 | |
---|
2231 | |
---|
2232 | |
---|
2233 | #define _STDINT_H_ |
---|
2234 | |
---|
2235 | |
---|
2236 | |
---|
2237 | |
---|
2238 | #define __WORDSIZE 32 |
---|
2239 | # 39 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdint.h" 3 4 |
---|
2240 | #define _UINT8_T |
---|
2241 | typedef unsigned char uint8_t; |
---|
2242 | |
---|
2243 | |
---|
2244 | |
---|
2245 | #define _UINT16_T |
---|
2246 | typedef unsigned short uint16_t; |
---|
2247 | |
---|
2248 | |
---|
2249 | |
---|
2250 | #define _UINT32_T |
---|
2251 | typedef unsigned int uint32_t; |
---|
2252 | |
---|
2253 | |
---|
2254 | |
---|
2255 | #define _UINT64_T |
---|
2256 | typedef unsigned long long uint64_t; |
---|
2257 | |
---|
2258 | |
---|
2259 | |
---|
2260 | typedef int8_t int_least8_t; |
---|
2261 | typedef int16_t int_least16_t; |
---|
2262 | typedef int32_t int_least32_t; |
---|
2263 | typedef int64_t int_least64_t; |
---|
2264 | typedef uint8_t uint_least8_t; |
---|
2265 | typedef uint16_t uint_least16_t; |
---|
2266 | typedef uint32_t uint_least32_t; |
---|
2267 | typedef uint64_t uint_least64_t; |
---|
2268 | |
---|
2269 | |
---|
2270 | |
---|
2271 | typedef int8_t int_fast8_t; |
---|
2272 | typedef int16_t int_fast16_t; |
---|
2273 | typedef int32_t int_fast32_t; |
---|
2274 | typedef int64_t int_fast64_t; |
---|
2275 | typedef uint8_t uint_fast8_t; |
---|
2276 | typedef uint16_t uint_fast16_t; |
---|
2277 | typedef uint32_t uint_fast32_t; |
---|
2278 | typedef uint64_t uint_fast64_t; |
---|
2279 | # 95 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdint.h" 3 4 |
---|
2280 | #define _INTMAX_T |
---|
2281 | |
---|
2282 | typedef long long int intmax_t; |
---|
2283 | |
---|
2284 | |
---|
2285 | |
---|
2286 | |
---|
2287 | |
---|
2288 | |
---|
2289 | #define _UINTMAX_T |
---|
2290 | |
---|
2291 | typedef long long unsigned int uintmax_t; |
---|
2292 | # 119 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdint.h" 3 4 |
---|
2293 | #define INT8_MAX 127 |
---|
2294 | #define INT16_MAX 32767 |
---|
2295 | #define INT32_MAX 2147483647 |
---|
2296 | #define INT64_MAX 9223372036854775807LL |
---|
2297 | |
---|
2298 | #define INT8_MIN -128 |
---|
2299 | #define INT16_MIN -32768 |
---|
2300 | |
---|
2301 | |
---|
2302 | |
---|
2303 | |
---|
2304 | |
---|
2305 | |
---|
2306 | #define INT32_MIN (-INT32_MAX-1) |
---|
2307 | #define INT64_MIN (-INT64_MAX-1) |
---|
2308 | |
---|
2309 | #define UINT8_MAX 255 |
---|
2310 | #define UINT16_MAX 65535 |
---|
2311 | #define UINT32_MAX 4294967295U |
---|
2312 | #define UINT64_MAX 18446744073709551615ULL |
---|
2313 | |
---|
2314 | |
---|
2315 | #define INT_LEAST8_MIN INT8_MIN |
---|
2316 | #define INT_LEAST16_MIN INT16_MIN |
---|
2317 | #define INT_LEAST32_MIN INT32_MIN |
---|
2318 | #define INT_LEAST64_MIN INT64_MIN |
---|
2319 | |
---|
2320 | #define INT_LEAST8_MAX INT8_MAX |
---|
2321 | #define INT_LEAST16_MAX INT16_MAX |
---|
2322 | #define INT_LEAST32_MAX INT32_MAX |
---|
2323 | #define INT_LEAST64_MAX INT64_MAX |
---|
2324 | |
---|
2325 | #define UINT_LEAST8_MAX UINT8_MAX |
---|
2326 | #define UINT_LEAST16_MAX UINT16_MAX |
---|
2327 | #define UINT_LEAST32_MAX UINT32_MAX |
---|
2328 | #define UINT_LEAST64_MAX UINT64_MAX |
---|
2329 | |
---|
2330 | |
---|
2331 | #define INT_FAST8_MIN INT8_MIN |
---|
2332 | #define INT_FAST16_MIN INT16_MIN |
---|
2333 | #define INT_FAST32_MIN INT32_MIN |
---|
2334 | #define INT_FAST64_MIN INT64_MIN |
---|
2335 | |
---|
2336 | #define INT_FAST8_MAX INT8_MAX |
---|
2337 | #define INT_FAST16_MAX INT16_MAX |
---|
2338 | #define INT_FAST32_MAX INT32_MAX |
---|
2339 | #define INT_FAST64_MAX INT64_MAX |
---|
2340 | |
---|
2341 | #define UINT_FAST8_MAX UINT8_MAX |
---|
2342 | #define UINT_FAST16_MAX UINT16_MAX |
---|
2343 | #define UINT_FAST32_MAX UINT32_MAX |
---|
2344 | #define UINT_FAST64_MAX UINT64_MAX |
---|
2345 | |
---|
2346 | |
---|
2347 | |
---|
2348 | |
---|
2349 | |
---|
2350 | |
---|
2351 | |
---|
2352 | #define INTPTR_MIN INT32_MIN |
---|
2353 | #define INTPTR_MAX INT32_MAX |
---|
2354 | |
---|
2355 | |
---|
2356 | |
---|
2357 | |
---|
2358 | |
---|
2359 | #define UINTPTR_MAX UINT32_MAX |
---|
2360 | |
---|
2361 | |
---|
2362 | |
---|
2363 | #define INTMAX_MIN INT64_MIN |
---|
2364 | #define INTMAX_MAX INT64_MAX |
---|
2365 | |
---|
2366 | #define UINTMAX_MAX UINT64_MAX |
---|
2367 | |
---|
2368 | |
---|
2369 | |
---|
2370 | |
---|
2371 | |
---|
2372 | |
---|
2373 | #define PTRDIFF_MIN INT32_MIN |
---|
2374 | #define PTRDIFF_MAX INT32_MAX |
---|
2375 | # 210 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdint.h" 3 4 |
---|
2376 | #define SIZE_MAX UINT32_MAX |
---|
2377 | |
---|
2378 | |
---|
2379 | |
---|
2380 | |
---|
2381 | #define WCHAR_MAX __WCHAR_MAX__ |
---|
2382 | # 229 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdint.h" 3 4 |
---|
2383 | #define WCHAR_MIN (-WCHAR_MAX-1) |
---|
2384 | |
---|
2385 | |
---|
2386 | |
---|
2387 | #define WINT_MIN INT32_MIN |
---|
2388 | #define WINT_MAX INT32_MAX |
---|
2389 | |
---|
2390 | #define SIG_ATOMIC_MIN INT32_MIN |
---|
2391 | #define SIG_ATOMIC_MAX INT32_MAX |
---|
2392 | |
---|
2393 | |
---|
2394 | #define INT8_C(v) (v) |
---|
2395 | #define INT16_C(v) (v) |
---|
2396 | #define INT32_C(v) (v) |
---|
2397 | #define INT64_C(v) (v ## LL) |
---|
2398 | |
---|
2399 | #define UINT8_C(v) (v ## U) |
---|
2400 | #define UINT16_C(v) (v ## U) |
---|
2401 | #define UINT32_C(v) (v ## U) |
---|
2402 | #define UINT64_C(v) (v ## ULL) |
---|
2403 | |
---|
2404 | #define INTMAX_C(v) (v ## LL) |
---|
2405 | #define UINTMAX_C(v) (v ## ULL) |
---|
2406 | # 29 "/opt/local/include/LegacySupport/sys/unistd.h" 2 3 4 |
---|
2407 | # 56 "/opt/local/include/LegacySupport/sys/unistd.h" 3 4 |
---|
2408 | |
---|
2409 | |
---|
2410 | extern int getattrlistat(int dirfd, const char *pathname, void *a, |
---|
2411 | void *buf, size_t size, unsigned long flags); |
---|
2412 | extern ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz); |
---|
2413 | extern int faccessat(int dirfd, const char *pathname, int mode, int flags); |
---|
2414 | extern int fchownat(int dirfd, const char *pathname, uid_t owner, gid_t group, int flags); |
---|
2415 | extern int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags); |
---|
2416 | extern int symlinkat(const char *oldpath, int newdirfd, const char *newpath); |
---|
2417 | extern int unlinkat(int dirfd, const char *pathname, int flags); |
---|
2418 | |
---|
2419 | |
---|
2420 | # 84 "/opt/local/include/LegacySupport/sys/unistd.h" 3 4 |
---|
2421 | |
---|
2422 | |
---|
2423 | extern int setattrlistat(int dirfd, const char *pathname, void *a, |
---|
2424 | void *buf, size_t size, uint32_t flags); |
---|
2425 | |
---|
2426 | |
---|
2427 | # 75 "/usr/include/unistd.h" 2 3 4 |
---|
2428 | # 125 "/usr/include/unistd.h" 3 4 |
---|
2429 | #define STDIN_FILENO 0 |
---|
2430 | #define STDOUT_FILENO 1 |
---|
2431 | #define STDERR_FILENO 2 |
---|
2432 | |
---|
2433 | |
---|
2434 | #define NULL __DARWIN_NULL |
---|
2435 | |
---|
2436 | |
---|
2437 | |
---|
2438 | |
---|
2439 | #define _XOPEN_VERSION 600 |
---|
2440 | #define _XOPEN_XCU_VERSION 4 |
---|
2441 | |
---|
2442 | |
---|
2443 | |
---|
2444 | #define _POSIX_ADVISORY_INFO (-1) |
---|
2445 | #define _POSIX_ASYNCHRONOUS_IO (-1) |
---|
2446 | #define _POSIX_BARRIERS (-1) |
---|
2447 | #define _POSIX_CHOWN_RESTRICTED 200112L |
---|
2448 | #define _POSIX_CLOCK_SELECTION (-1) |
---|
2449 | #define _POSIX_CPUTIME (-1) |
---|
2450 | #define _POSIX_FSYNC (-1) |
---|
2451 | #define _POSIX_IPV6 200112L |
---|
2452 | #define _POSIX_JOB_CONTROL 200112L |
---|
2453 | #define _POSIX_MAPPED_FILES 200112L |
---|
2454 | #define _POSIX_MEMLOCK (-1) |
---|
2455 | #define _POSIX_MEMLOCK_RANGE (-1) |
---|
2456 | #define _POSIX_MEMORY_PROTECTION 200112L |
---|
2457 | #define _POSIX_MESSAGE_PASSING (-1) |
---|
2458 | #define _POSIX_MONOTONIC_CLOCK (-1) |
---|
2459 | #define _POSIX_NO_TRUNC 200112L |
---|
2460 | #define _POSIX_PRIORITIZED_IO (-1) |
---|
2461 | #define _POSIX_PRIORITY_SCHEDULING (-1) |
---|
2462 | #define _POSIX_RAW_SOCKETS (-1) |
---|
2463 | #define _POSIX_READER_WRITER_LOCKS 200112L |
---|
2464 | #define _POSIX_REALTIME_SIGNALS (-1) |
---|
2465 | #define _POSIX_REGEXP 200112L |
---|
2466 | #define _POSIX_SAVED_IDS 200112L |
---|
2467 | #define _POSIX_SEMAPHORES (-1) |
---|
2468 | #define _POSIX_SHARED_MEMORY_OBJECTS (-1) |
---|
2469 | #define _POSIX_SHELL 200112L |
---|
2470 | #define _POSIX_SPAWN (-1) |
---|
2471 | #define _POSIX_SPIN_LOCKS (-1) |
---|
2472 | #define _POSIX_SPORADIC_SERVER (-1) |
---|
2473 | #define _POSIX_SYNCHRONIZED_IO (-1) |
---|
2474 | #define _POSIX_THREAD_ATTR_STACKADDR 200112L |
---|
2475 | #define _POSIX_THREAD_ATTR_STACKSIZE 200112L |
---|
2476 | #define _POSIX_THREAD_CPUTIME (-1) |
---|
2477 | #define _POSIX_THREAD_PRIO_INHERIT (-1) |
---|
2478 | #define _POSIX_THREAD_PRIO_PROTECT (-1) |
---|
2479 | #define _POSIX_THREAD_PRIORITY_SCHEDULING (-1) |
---|
2480 | #define _POSIX_THREAD_PROCESS_SHARED (-1) |
---|
2481 | #define _POSIX_THREAD_SAFE_FUNCTIONS 200112L |
---|
2482 | #define _POSIX_THREAD_SPORADIC_SERVER (-1) |
---|
2483 | #define _POSIX_THREADS 200112L |
---|
2484 | #define _POSIX_TIMEOUTS (-1) |
---|
2485 | #define _POSIX_TIMERS (-1) |
---|
2486 | #define _POSIX_TRACE (-1) |
---|
2487 | #define _POSIX_TRACE_EVENT_FILTER (-1) |
---|
2488 | #define _POSIX_TRACE_INHERIT (-1) |
---|
2489 | #define _POSIX_TRACE_LOG (-1) |
---|
2490 | #define _POSIX_TYPED_MEMORY_OBJECTS (-1) |
---|
2491 | |
---|
2492 | |
---|
2493 | |
---|
2494 | |
---|
2495 | #define _POSIX2_C_BIND 200112L |
---|
2496 | #define _POSIX2_C_DEV 200112L |
---|
2497 | #define _POSIX2_CHAR_TERM 200112L |
---|
2498 | #define _POSIX2_FORT_DEV (-1) |
---|
2499 | #define _POSIX2_FORT_RUN 200112L |
---|
2500 | #define _POSIX2_LOCALEDEF 200112L |
---|
2501 | #define _POSIX2_PBS (-1) |
---|
2502 | #define _POSIX2_PBS_ACCOUNTING (-1) |
---|
2503 | #define _POSIX2_PBS_CHECKPOINT (-1) |
---|
2504 | #define _POSIX2_PBS_LOCATE (-1) |
---|
2505 | #define _POSIX2_PBS_MESSAGE (-1) |
---|
2506 | #define _POSIX2_PBS_TRACK (-1) |
---|
2507 | #define _POSIX2_SW_DEV 200112L |
---|
2508 | #define _POSIX2_UPE 200112L |
---|
2509 | |
---|
2510 | #define _V6_ILP32_OFF32 (-1) |
---|
2511 | #define _V6_ILP32_OFFBIG (1) |
---|
2512 | #define _V6_LP64_OFF64 (1) |
---|
2513 | #define _V6_LPBIG_OFFBIG (1) |
---|
2514 | |
---|
2515 | #define _XBS5_ILP32_OFF32 _V6_ILP32_OFF32 |
---|
2516 | #define _XBS5_ILP32_OFFBIG _V6_ILP32_OFFBIG |
---|
2517 | #define _XBS5_LP64_OFF64 _V6_LP64_OFF64 |
---|
2518 | #define _XBS5_LPBIG_OFFBIG _V6_LPBIG_OFFBIG |
---|
2519 | |
---|
2520 | #define _XOPEN_CRYPT (1) |
---|
2521 | #define _XOPEN_ENH_I18N (1) |
---|
2522 | #define _XOPEN_LEGACY (-1) |
---|
2523 | #define _XOPEN_REALTIME (-1) |
---|
2524 | #define _XOPEN_REALTIME_THREADS (-1) |
---|
2525 | #define _XOPEN_SHM (1) |
---|
2526 | #define _XOPEN_STREAMS (-1) |
---|
2527 | #define _XOPEN_UNIX (1) |
---|
2528 | |
---|
2529 | |
---|
2530 | #define F_ULOCK 0 |
---|
2531 | #define F_LOCK 1 |
---|
2532 | #define F_TLOCK 2 |
---|
2533 | #define F_TEST 3 |
---|
2534 | |
---|
2535 | |
---|
2536 | #define _SC_ARG_MAX 1 |
---|
2537 | #define _SC_CHILD_MAX 2 |
---|
2538 | #define _SC_CLK_TCK 3 |
---|
2539 | #define _SC_NGROUPS_MAX 4 |
---|
2540 | #define _SC_OPEN_MAX 5 |
---|
2541 | #define _SC_JOB_CONTROL 6 |
---|
2542 | #define _SC_SAVED_IDS 7 |
---|
2543 | #define _SC_VERSION 8 |
---|
2544 | #define _SC_BC_BASE_MAX 9 |
---|
2545 | #define _SC_BC_DIM_MAX 10 |
---|
2546 | #define _SC_BC_SCALE_MAX 11 |
---|
2547 | #define _SC_BC_STRING_MAX 12 |
---|
2548 | #define _SC_COLL_WEIGHTS_MAX 13 |
---|
2549 | #define _SC_EXPR_NEST_MAX 14 |
---|
2550 | #define _SC_LINE_MAX 15 |
---|
2551 | #define _SC_RE_DUP_MAX 16 |
---|
2552 | #define _SC_2_VERSION 17 |
---|
2553 | #define _SC_2_C_BIND 18 |
---|
2554 | #define _SC_2_C_DEV 19 |
---|
2555 | #define _SC_2_CHAR_TERM 20 |
---|
2556 | #define _SC_2_FORT_DEV 21 |
---|
2557 | #define _SC_2_FORT_RUN 22 |
---|
2558 | #define _SC_2_LOCALEDEF 23 |
---|
2559 | #define _SC_2_SW_DEV 24 |
---|
2560 | #define _SC_2_UPE 25 |
---|
2561 | #define _SC_STREAM_MAX 26 |
---|
2562 | #define _SC_TZNAME_MAX 27 |
---|
2563 | #define _SC_ASYNCHRONOUS_IO 28 |
---|
2564 | #define _SC_PAGESIZE 29 |
---|
2565 | #define _SC_MEMLOCK 30 |
---|
2566 | #define _SC_MEMLOCK_RANGE 31 |
---|
2567 | #define _SC_MEMORY_PROTECTION 32 |
---|
2568 | #define _SC_MESSAGE_PASSING 33 |
---|
2569 | #define _SC_PRIORITIZED_IO 34 |
---|
2570 | #define _SC_PRIORITY_SCHEDULING 35 |
---|
2571 | #define _SC_REALTIME_SIGNALS 36 |
---|
2572 | #define _SC_SEMAPHORES 37 |
---|
2573 | #define _SC_FSYNC 38 |
---|
2574 | #define _SC_SHARED_MEMORY_OBJECTS 39 |
---|
2575 | #define _SC_SYNCHRONIZED_IO 40 |
---|
2576 | #define _SC_TIMERS 41 |
---|
2577 | #define _SC_AIO_LISTIO_MAX 42 |
---|
2578 | #define _SC_AIO_MAX 43 |
---|
2579 | #define _SC_AIO_PRIO_DELTA_MAX 44 |
---|
2580 | #define _SC_DELAYTIMER_MAX 45 |
---|
2581 | #define _SC_MQ_OPEN_MAX 46 |
---|
2582 | #define _SC_MAPPED_FILES 47 |
---|
2583 | #define _SC_RTSIG_MAX 48 |
---|
2584 | #define _SC_SEM_NSEMS_MAX 49 |
---|
2585 | #define _SC_SEM_VALUE_MAX 50 |
---|
2586 | #define _SC_SIGQUEUE_MAX 51 |
---|
2587 | #define _SC_TIMER_MAX 52 |
---|
2588 | #define _SC_2_PBS 59 |
---|
2589 | #define _SC_2_PBS_ACCOUNTING 60 |
---|
2590 | #define _SC_2_PBS_CHECKPOINT 61 |
---|
2591 | #define _SC_2_PBS_LOCATE 62 |
---|
2592 | #define _SC_2_PBS_MESSAGE 63 |
---|
2593 | #define _SC_2_PBS_TRACK 64 |
---|
2594 | #define _SC_ADVISORY_INFO 65 |
---|
2595 | #define _SC_BARRIERS 66 |
---|
2596 | #define _SC_CLOCK_SELECTION 67 |
---|
2597 | #define _SC_CPUTIME 68 |
---|
2598 | #define _SC_FILE_LOCKING 69 |
---|
2599 | #define _SC_GETGR_R_SIZE_MAX 70 |
---|
2600 | #define _SC_GETPW_R_SIZE_MAX 71 |
---|
2601 | #define _SC_HOST_NAME_MAX 72 |
---|
2602 | #define _SC_LOGIN_NAME_MAX 73 |
---|
2603 | #define _SC_MONOTONIC_CLOCK 74 |
---|
2604 | #define _SC_MQ_PRIO_MAX 75 |
---|
2605 | #define _SC_READER_WRITER_LOCKS 76 |
---|
2606 | #define _SC_REGEXP 77 |
---|
2607 | #define _SC_SHELL 78 |
---|
2608 | #define _SC_SPAWN 79 |
---|
2609 | #define _SC_SPIN_LOCKS 80 |
---|
2610 | #define _SC_SPORADIC_SERVER 81 |
---|
2611 | #define _SC_THREAD_ATTR_STACKADDR 82 |
---|
2612 | #define _SC_THREAD_ATTR_STACKSIZE 83 |
---|
2613 | #define _SC_THREAD_CPUTIME 84 |
---|
2614 | #define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 |
---|
2615 | #define _SC_THREAD_KEYS_MAX 86 |
---|
2616 | #define _SC_THREAD_PRIO_INHERIT 87 |
---|
2617 | #define _SC_THREAD_PRIO_PROTECT 88 |
---|
2618 | #define _SC_THREAD_PRIORITY_SCHEDULING 89 |
---|
2619 | #define _SC_THREAD_PROCESS_SHARED 90 |
---|
2620 | #define _SC_THREAD_SAFE_FUNCTIONS 91 |
---|
2621 | #define _SC_THREAD_SPORADIC_SERVER 92 |
---|
2622 | #define _SC_THREAD_STACK_MIN 93 |
---|
2623 | #define _SC_THREAD_THREADS_MAX 94 |
---|
2624 | #define _SC_TIMEOUTS 95 |
---|
2625 | #define _SC_THREADS 96 |
---|
2626 | #define _SC_TRACE 97 |
---|
2627 | #define _SC_TRACE_EVENT_FILTER 98 |
---|
2628 | #define _SC_TRACE_INHERIT 99 |
---|
2629 | #define _SC_TRACE_LOG 100 |
---|
2630 | #define _SC_TTY_NAME_MAX 101 |
---|
2631 | #define _SC_TYPED_MEMORY_OBJECTS 102 |
---|
2632 | #define _SC_V6_ILP32_OFF32 103 |
---|
2633 | #define _SC_V6_ILP32_OFFBIG 104 |
---|
2634 | #define _SC_V6_LP64_OFF64 105 |
---|
2635 | #define _SC_V6_LPBIG_OFFBIG 106 |
---|
2636 | #define _SC_IPV6 118 |
---|
2637 | #define _SC_RAW_SOCKETS 119 |
---|
2638 | #define _SC_SYMLOOP_MAX 120 |
---|
2639 | #define _SC_ATEXIT_MAX 107 |
---|
2640 | #define _SC_IOV_MAX 56 |
---|
2641 | #define _SC_PAGE_SIZE _SC_PAGESIZE |
---|
2642 | #define _SC_XOPEN_CRYPT 108 |
---|
2643 | #define _SC_XOPEN_ENH_I18N 109 |
---|
2644 | #define _SC_XOPEN_LEGACY 110 |
---|
2645 | #define _SC_XOPEN_REALTIME 111 |
---|
2646 | #define _SC_XOPEN_REALTIME_THREADS 112 |
---|
2647 | #define _SC_XOPEN_SHM 113 |
---|
2648 | #define _SC_XOPEN_STREAMS 114 |
---|
2649 | #define _SC_XOPEN_UNIX 115 |
---|
2650 | #define _SC_XOPEN_VERSION 116 |
---|
2651 | #define _SC_XOPEN_XCU_VERSION 121 |
---|
2652 | #define _SC_XBS5_ILP32_OFF32 122 |
---|
2653 | #define _SC_XBS5_ILP32_OFFBIG 123 |
---|
2654 | #define _SC_XBS5_LP64_OFF64 124 |
---|
2655 | #define _SC_XBS5_LPBIG_OFFBIG 125 |
---|
2656 | |
---|
2657 | |
---|
2658 | |
---|
2659 | |
---|
2660 | #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 |
---|
2661 | #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 |
---|
2662 | #define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 |
---|
2663 | #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 |
---|
2664 | #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 |
---|
2665 | #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 |
---|
2666 | #define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 |
---|
2667 | #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 |
---|
2668 | #define _CS_POSIX_V6_LP64_OFF64_LIBS 10 |
---|
2669 | #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 |
---|
2670 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 |
---|
2671 | #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 |
---|
2672 | #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 |
---|
2673 | |
---|
2674 | |
---|
2675 | #define _CS_XBS5_ILP32_OFF32_CFLAGS 20 |
---|
2676 | #define _CS_XBS5_ILP32_OFF32_LDFLAGS 21 |
---|
2677 | #define _CS_XBS5_ILP32_OFF32_LIBS 22 |
---|
2678 | #define _CS_XBS5_ILP32_OFF32_LINTFLAGS 23 |
---|
2679 | #define _CS_XBS5_ILP32_OFFBIG_CFLAGS 24 |
---|
2680 | #define _CS_XBS5_ILP32_OFFBIG_LDFLAGS 25 |
---|
2681 | #define _CS_XBS5_ILP32_OFFBIG_LIBS 26 |
---|
2682 | #define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 27 |
---|
2683 | #define _CS_XBS5_LP64_OFF64_CFLAGS 28 |
---|
2684 | #define _CS_XBS5_LP64_OFF64_LDFLAGS 29 |
---|
2685 | #define _CS_XBS5_LP64_OFF64_LIBS 30 |
---|
2686 | #define _CS_XBS5_LP64_OFF64_LINTFLAGS 31 |
---|
2687 | #define _CS_XBS5_LPBIG_OFFBIG_CFLAGS 32 |
---|
2688 | #define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS 33 |
---|
2689 | #define _CS_XBS5_LPBIG_OFFBIG_LIBS 34 |
---|
2690 | #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 35 |
---|
2691 | |
---|
2692 | |
---|
2693 | |
---|
2694 | void _exit(int) __attribute__((__noreturn__)); |
---|
2695 | int access(const char *, int); |
---|
2696 | unsigned int |
---|
2697 | alarm(unsigned int); |
---|
2698 | int chdir(const char *); |
---|
2699 | int chown(const char *, uid_t, gid_t); |
---|
2700 | int close(int); |
---|
2701 | size_t confstr(int, char *, size_t); |
---|
2702 | char *crypt(const char *, const char *); |
---|
2703 | char *ctermid(char *); |
---|
2704 | int dup(int); |
---|
2705 | int dup2(int, int); |
---|
2706 | int execl(const char *, const char *, ...); |
---|
2707 | int execle(const char *, const char *, ...); |
---|
2708 | int execlp(const char *, const char *, ...); |
---|
2709 | int execv(const char *, char * const *); |
---|
2710 | int execve(const char *, char * const *, char * const *); |
---|
2711 | int execvp(const char *, char * const *); |
---|
2712 | int fchown(int, uid_t, gid_t); |
---|
2713 | int fchdir(int); |
---|
2714 | pid_t fork(void); |
---|
2715 | long fpathconf(int, int); |
---|
2716 | int ftruncate(int, off_t); |
---|
2717 | char *getcwd(char *, size_t); |
---|
2718 | gid_t getegid(void); |
---|
2719 | uid_t geteuid(void); |
---|
2720 | gid_t getgid(void); |
---|
2721 | int getgroups(int, gid_t []); |
---|
2722 | long gethostid(void); |
---|
2723 | int gethostname(char *, size_t); |
---|
2724 | char *getlogin(void); |
---|
2725 | int getlogin_r(char *, size_t); |
---|
2726 | int getopt(int, char * const [], const char *); |
---|
2727 | pid_t getpgid(pid_t); |
---|
2728 | pid_t getpgrp(void); |
---|
2729 | pid_t getpid(void); |
---|
2730 | pid_t getppid(void); |
---|
2731 | pid_t getsid(pid_t); |
---|
2732 | uid_t getuid(void); |
---|
2733 | char *getwd(char *); |
---|
2734 | int isatty(int); |
---|
2735 | int lchown(const char *, uid_t, gid_t) __asm("_" "lchown" "$UNIX2003"); |
---|
2736 | int link(const char *, const char *); |
---|
2737 | int lockf(int, int, off_t); |
---|
2738 | off_t lseek(int, off_t, int); |
---|
2739 | int nice(int); |
---|
2740 | long pathconf(const char *, int); |
---|
2741 | int pause(void); |
---|
2742 | int pipe(int [2]); |
---|
2743 | ssize_t pread(int, void *, size_t, off_t); |
---|
2744 | ssize_t pwrite(int, const void *, size_t, off_t); |
---|
2745 | ssize_t read(int, void *, size_t); |
---|
2746 | ssize_t readlink(const char * , char * , size_t); |
---|
2747 | int rmdir(const char *); |
---|
2748 | int setegid(gid_t); |
---|
2749 | int seteuid(uid_t); |
---|
2750 | int setgid(gid_t); |
---|
2751 | int setpgid(pid_t, pid_t); |
---|
2752 | |
---|
2753 | pid_t setpgrp(void) __asm("_" "setpgrp" "$UNIX2003"); |
---|
2754 | |
---|
2755 | |
---|
2756 | |
---|
2757 | int setregid(gid_t, gid_t); |
---|
2758 | int setreuid(uid_t, uid_t); |
---|
2759 | pid_t setsid(void); |
---|
2760 | int setuid(uid_t); |
---|
2761 | unsigned int |
---|
2762 | sleep(unsigned int); |
---|
2763 | void swab(const void * , void * , ssize_t); |
---|
2764 | int symlink(const char *, const char *); |
---|
2765 | void sync(void); |
---|
2766 | long sysconf(int); |
---|
2767 | pid_t tcgetpgrp(int); |
---|
2768 | int tcsetpgrp(int, pid_t); |
---|
2769 | int truncate(const char *, off_t); |
---|
2770 | char *ttyname(int); |
---|
2771 | |
---|
2772 | int ttyname_r(int, char *, size_t) __asm("_" "ttyname_r" "$UNIX2003"); |
---|
2773 | |
---|
2774 | |
---|
2775 | |
---|
2776 | useconds_t |
---|
2777 | ualarm(useconds_t, useconds_t); |
---|
2778 | int unlink(const char *); |
---|
2779 | int usleep(useconds_t); |
---|
2780 | pid_t vfork(void); |
---|
2781 | ssize_t write(int, const void *, size_t); |
---|
2782 | |
---|
2783 | extern char *optarg; |
---|
2784 | extern int optind, opterr, optopt; |
---|
2785 | # 583 "/usr/include/unistd.h" 3 4 |
---|
2786 | |
---|
2787 | # 84 "/opt/local/include/LegacySupport/unistd.h" 2 3 4 |
---|
2788 | |
---|
2789 | |
---|
2790 | #define _SC_NPROCESSORS_CONF 57 |
---|
2791 | #define __MP_LEGACY_SUPPORT_SYSCONF_WRAP_NEED_SC_NPROCESSORS_CONF__ 1 |
---|
2792 | |
---|
2793 | |
---|
2794 | |
---|
2795 | #define _SC_NPROCESSORS_ONLN 58 |
---|
2796 | #define __MP_LEGACY_SUPPORT_SYSCONF_WRAP_NEED_SC_NPROCESSORS_ONLN__ 1 |
---|
2797 | |
---|
2798 | |
---|
2799 | |
---|
2800 | #define _SC_PHYS_PAGES 200 |
---|
2801 | #define __MP_LEGACY_SUPPORT_SYSCONF_WRAP_NEED_SC_PHYS_PAGES__ 1 |
---|
2802 | |
---|
2803 | |
---|
2804 | |
---|
2805 | |
---|
2806 | |
---|
2807 | |
---|
2808 | |
---|
2809 | int fsetattrlist(int,void*,void*,size_t,unsigned long); |
---|
2810 | # 45 "/usr/include/getopt.h" 2 3 4 |
---|
2811 | |
---|
2812 | |
---|
2813 | |
---|
2814 | |
---|
2815 | |
---|
2816 | #define no_argument 0 |
---|
2817 | #define required_argument 1 |
---|
2818 | #define optional_argument 2 |
---|
2819 | |
---|
2820 | struct option { |
---|
2821 | |
---|
2822 | const char *name; |
---|
2823 | |
---|
2824 | |
---|
2825 | |
---|
2826 | |
---|
2827 | int has_arg; |
---|
2828 | |
---|
2829 | int *flag; |
---|
2830 | |
---|
2831 | int val; |
---|
2832 | }; |
---|
2833 | |
---|
2834 | |
---|
2835 | int getopt_long(int, char * const *, const char *, |
---|
2836 | const struct option *, int *); |
---|
2837 | int getopt_long_only(int, char * const *, const char *, |
---|
2838 | const struct option *, int *); |
---|
2839 | |
---|
2840 | #define _GETOPT |
---|
2841 | int getopt(int, char * const [], const char *); |
---|
2842 | |
---|
2843 | extern char *optarg; |
---|
2844 | extern int optind, opterr, optopt; |
---|
2845 | |
---|
2846 | |
---|
2847 | #define _OPTRESET |
---|
2848 | extern int optreset; |
---|
2849 | |
---|
2850 | |
---|
2851 | # 38 "misc-utils/hardlink.c" 2 |
---|
2852 | # 1 "/usr/include/ctype.h" 1 3 4 |
---|
2853 | # 67 "/usr/include/ctype.h" 3 4 |
---|
2854 | #define _CTYPE_H_ |
---|
2855 | |
---|
2856 | # 1 "/usr/include/runetype.h" 1 3 4 |
---|
2857 | # 40 "/usr/include/runetype.h" 3 4 |
---|
2858 | #define _RUNETYPE_H_ |
---|
2859 | # 76 "/usr/include/runetype.h" 3 4 |
---|
2860 | #define _CACHED_RUNES (1 <<8 ) |
---|
2861 | #define _CRMASK (~(_CACHED_RUNES - 1)) |
---|
2862 | |
---|
2863 | |
---|
2864 | |
---|
2865 | |
---|
2866 | typedef struct { |
---|
2867 | __darwin_rune_t __min; |
---|
2868 | __darwin_rune_t __max; |
---|
2869 | __darwin_rune_t __map; |
---|
2870 | __uint32_t *__types; |
---|
2871 | } _RuneEntry; |
---|
2872 | |
---|
2873 | typedef struct { |
---|
2874 | int __nranges; |
---|
2875 | _RuneEntry *__ranges; |
---|
2876 | } _RuneRange; |
---|
2877 | |
---|
2878 | typedef struct { |
---|
2879 | char __magic[8]; |
---|
2880 | char __encoding[32]; |
---|
2881 | |
---|
2882 | __darwin_rune_t (*__sgetrune)(const char *, __darwin_size_t, char const **); |
---|
2883 | int (*__sputrune)(__darwin_rune_t, char *, __darwin_size_t, char **); |
---|
2884 | __darwin_rune_t __invalid_rune; |
---|
2885 | |
---|
2886 | __uint32_t __runetype[(1 <<8 )]; |
---|
2887 | __darwin_rune_t __maplower[(1 <<8 )]; |
---|
2888 | __darwin_rune_t __mapupper[(1 <<8 )]; |
---|
2889 | |
---|
2890 | |
---|
2891 | |
---|
2892 | |
---|
2893 | |
---|
2894 | |
---|
2895 | _RuneRange __runetype_ext; |
---|
2896 | _RuneRange __maplower_ext; |
---|
2897 | _RuneRange __mapupper_ext; |
---|
2898 | |
---|
2899 | void *__variable; |
---|
2900 | int __variable_len; |
---|
2901 | } _RuneLocale; |
---|
2902 | |
---|
2903 | #define _RUNE_MAGIC_1 "RuneMagi" |
---|
2904 | |
---|
2905 | |
---|
2906 | extern _RuneLocale _DefaultRuneLocale; |
---|
2907 | extern _RuneLocale *_CurrentRuneLocale; |
---|
2908 | |
---|
2909 | # 70 "/usr/include/ctype.h" 2 3 4 |
---|
2910 | |
---|
2911 | #define _CTYPE_A 0x00000100L |
---|
2912 | #define _CTYPE_C 0x00000200L |
---|
2913 | #define _CTYPE_D 0x00000400L |
---|
2914 | #define _CTYPE_G 0x00000800L |
---|
2915 | #define _CTYPE_L 0x00001000L |
---|
2916 | #define _CTYPE_P 0x00002000L |
---|
2917 | #define _CTYPE_S 0x00004000L |
---|
2918 | #define _CTYPE_U 0x00008000L |
---|
2919 | #define _CTYPE_X 0x00010000L |
---|
2920 | #define _CTYPE_B 0x00020000L |
---|
2921 | #define _CTYPE_R 0x00040000L |
---|
2922 | #define _CTYPE_I 0x00080000L |
---|
2923 | #define _CTYPE_T 0x00100000L |
---|
2924 | #define _CTYPE_Q 0x00200000L |
---|
2925 | #define _CTYPE_SW0 0x20000000L |
---|
2926 | #define _CTYPE_SW1 0x40000000L |
---|
2927 | #define _CTYPE_SW2 0x80000000L |
---|
2928 | #define _CTYPE_SW3 0xc0000000L |
---|
2929 | #define _CTYPE_SWM 0xe0000000L |
---|
2930 | #define _CTYPE_SWS 30 |
---|
2931 | # 116 "/usr/include/ctype.h" 3 4 |
---|
2932 | |
---|
2933 | int isalnum(int); |
---|
2934 | int isalpha(int); |
---|
2935 | int isblank(int); |
---|
2936 | int iscntrl(int); |
---|
2937 | int isdigit(int); |
---|
2938 | int isgraph(int); |
---|
2939 | int islower(int); |
---|
2940 | int isprint(int); |
---|
2941 | int ispunct(int); |
---|
2942 | int isspace(int); |
---|
2943 | int isupper(int); |
---|
2944 | int isxdigit(int); |
---|
2945 | int tolower(int); |
---|
2946 | int toupper(int); |
---|
2947 | int isascii(int); |
---|
2948 | int toascii(int); |
---|
2949 | # 145 "/usr/include/ctype.h" 3 4 |
---|
2950 | |
---|
2951 | |
---|
2952 | |
---|
2953 | #define isalnum(c) __istype((c), (_CTYPE_A|_CTYPE_D)) |
---|
2954 | #define isalpha(c) __istype((c), _CTYPE_A) |
---|
2955 | #define isblank(c) __istype((c), _CTYPE_B) |
---|
2956 | #define iscntrl(c) __istype((c), _CTYPE_C) |
---|
2957 | #define isdigit(c) __isctype((c), _CTYPE_D) |
---|
2958 | #define isgraph(c) __istype((c), _CTYPE_G) |
---|
2959 | #define islower(c) __istype((c), _CTYPE_L) |
---|
2960 | #define isprint(c) __istype((c), _CTYPE_R) |
---|
2961 | #define ispunct(c) __istype((c), _CTYPE_P) |
---|
2962 | #define isspace(c) __istype((c), _CTYPE_S) |
---|
2963 | #define isupper(c) __istype((c), _CTYPE_U) |
---|
2964 | #define isxdigit(c) __isctype((c), _CTYPE_X) |
---|
2965 | #define tolower(c) __tolower(c) |
---|
2966 | #define toupper(c) __toupper(c) |
---|
2967 | |
---|
2968 | #define _tolower(c) __tolower(c) |
---|
2969 | #define _toupper(c) __toupper(c) |
---|
2970 | # 179 "/usr/include/ctype.h" 3 4 |
---|
2971 | |
---|
2972 | unsigned long ___runetype(__darwin_ct_rune_t); |
---|
2973 | __darwin_ct_rune_t ___tolower(__darwin_ct_rune_t); |
---|
2974 | __darwin_ct_rune_t ___toupper(__darwin_ct_rune_t); |
---|
2975 | |
---|
2976 | # 208 "/usr/include/ctype.h" 3 4 |
---|
2977 | |
---|
2978 | int __maskrune(__darwin_ct_rune_t, unsigned long); |
---|
2979 | |
---|
2980 | |
---|
2981 | |
---|
2982 | static __inline int |
---|
2983 | __istype(__darwin_ct_rune_t _c, unsigned long _f) |
---|
2984 | { |
---|
2985 | |
---|
2986 | |
---|
2987 | |
---|
2988 | return !!(isascii(_c) ? (_DefaultRuneLocale.__runetype[_c] & _f) |
---|
2989 | : __maskrune(_c, _f)); |
---|
2990 | |
---|
2991 | } |
---|
2992 | |
---|
2993 | static __inline __darwin_ct_rune_t |
---|
2994 | __isctype(__darwin_ct_rune_t _c, unsigned long _f) |
---|
2995 | { |
---|
2996 | |
---|
2997 | |
---|
2998 | |
---|
2999 | return (_c < 0 || _c >= (1 <<8 )) ? 0 : |
---|
3000 | !!(_DefaultRuneLocale.__runetype[_c] & _f); |
---|
3001 | |
---|
3002 | } |
---|
3003 | # 248 "/usr/include/ctype.h" 3 4 |
---|
3004 | |
---|
3005 | __darwin_ct_rune_t __toupper(__darwin_ct_rune_t); |
---|
3006 | __darwin_ct_rune_t __tolower(__darwin_ct_rune_t); |
---|
3007 | |
---|
3008 | |
---|
3009 | |
---|
3010 | static __inline int |
---|
3011 | __wcwidth(__darwin_ct_rune_t _c) |
---|
3012 | { |
---|
3013 | unsigned int _x; |
---|
3014 | |
---|
3015 | if (_c == 0) |
---|
3016 | return (0); |
---|
3017 | _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); |
---|
3018 | if ((_x & 0xe0000000L) != 0) |
---|
3019 | return ((_x & 0xe0000000L) >> 30); |
---|
3020 | return ((_x & 0x00040000L) != 0 ? 1 : -1); |
---|
3021 | } |
---|
3022 | # 39 "misc-utils/hardlink.c" 2 |
---|
3023 | # 1 "/usr/include/sys/ioctl.h" 1 3 4 |
---|
3024 | # 64 "/usr/include/sys/ioctl.h" 3 4 |
---|
3025 | #define _SYS_IOCTL_H_ |
---|
3026 | |
---|
3027 | # 1 "/usr/include/sys/ttycom.h" 1 3 4 |
---|
3028 | # 64 "/usr/include/sys/ttycom.h" 3 4 |
---|
3029 | #define _SYS_TTYCOM_H_ |
---|
3030 | |
---|
3031 | # 1 "/usr/include/sys/ioccom.h" 1 3 4 |
---|
3032 | # 59 "/usr/include/sys/ioccom.h" 3 4 |
---|
3033 | #define _SYS_IOCCOM_H_ |
---|
3034 | |
---|
3035 | |
---|
3036 | |
---|
3037 | |
---|
3038 | |
---|
3039 | |
---|
3040 | #define IOCPARM_MASK 0x1fff |
---|
3041 | #define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK) |
---|
3042 | #define IOCBASECMD(x) ((x) & ~(IOCPARM_MASK << 16)) |
---|
3043 | #define IOCGROUP(x) (((x) >> 8) & 0xff) |
---|
3044 | |
---|
3045 | #define IOCPARM_MAX (IOCPARM_MASK + 1) |
---|
3046 | |
---|
3047 | #define IOC_VOID (unsigned long)0x20000000 |
---|
3048 | |
---|
3049 | #define IOC_OUT (unsigned long)0x40000000 |
---|
3050 | |
---|
3051 | #define IOC_IN (unsigned long)0x80000000 |
---|
3052 | |
---|
3053 | #define IOC_INOUT (IOC_IN|IOC_OUT) |
---|
3054 | |
---|
3055 | #define IOC_DIRMASK (unsigned long)0xe0000000 |
---|
3056 | |
---|
3057 | #define _IOC(inout,group,num,len) (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)) |
---|
3058 | |
---|
3059 | #define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0) |
---|
3060 | #define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) |
---|
3061 | #define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) |
---|
3062 | |
---|
3063 | #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) |
---|
3064 | # 67 "/usr/include/sys/ttycom.h" 2 3 4 |
---|
3065 | # 77 "/usr/include/sys/ttycom.h" 3 4 |
---|
3066 | struct winsize { |
---|
3067 | unsigned short ws_row; |
---|
3068 | unsigned short ws_col; |
---|
3069 | unsigned short ws_xpixel; |
---|
3070 | unsigned short ws_ypixel; |
---|
3071 | }; |
---|
3072 | |
---|
3073 | #define TIOCMODG _IOR('t', 3, int) |
---|
3074 | #define TIOCMODS _IOW('t', 4, int) |
---|
3075 | #define TIOCM_LE 0001 |
---|
3076 | #define TIOCM_DTR 0002 |
---|
3077 | #define TIOCM_RTS 0004 |
---|
3078 | #define TIOCM_ST 0010 |
---|
3079 | #define TIOCM_SR 0020 |
---|
3080 | #define TIOCM_CTS 0040 |
---|
3081 | #define TIOCM_CAR 0100 |
---|
3082 | #define TIOCM_CD TIOCM_CAR |
---|
3083 | #define TIOCM_RNG 0200 |
---|
3084 | #define TIOCM_RI TIOCM_RNG |
---|
3085 | #define TIOCM_DSR 0400 |
---|
3086 | |
---|
3087 | #define TIOCEXCL _IO('t', 13) |
---|
3088 | #define TIOCNXCL _IO('t', 14) |
---|
3089 | |
---|
3090 | #define TIOCFLUSH _IOW('t', 16, int) |
---|
3091 | |
---|
3092 | #define TIOCGETA _IOR('t', 19, struct termios) |
---|
3093 | #define TIOCSETA _IOW('t', 20, struct termios) |
---|
3094 | #define TIOCSETAW _IOW('t', 21, struct termios) |
---|
3095 | #define TIOCSETAF _IOW('t', 22, struct termios) |
---|
3096 | #define TIOCGETD _IOR('t', 26, int) |
---|
3097 | #define TIOCSETD _IOW('t', 27, int) |
---|
3098 | |
---|
3099 | #define TIOCSBRK _IO('t', 123) |
---|
3100 | #define TIOCCBRK _IO('t', 122) |
---|
3101 | #define TIOCSDTR _IO('t', 121) |
---|
3102 | #define TIOCCDTR _IO('t', 120) |
---|
3103 | #define TIOCGPGRP _IOR('t', 119, int) |
---|
3104 | #define TIOCSPGRP _IOW('t', 118, int) |
---|
3105 | |
---|
3106 | #define TIOCOUTQ _IOR('t', 115, int) |
---|
3107 | #define TIOCSTI _IOW('t', 114, char) |
---|
3108 | #define TIOCNOTTY _IO('t', 113) |
---|
3109 | #define TIOCPKT _IOW('t', 112, int) |
---|
3110 | #define TIOCPKT_DATA 0x00 |
---|
3111 | #define TIOCPKT_FLUSHREAD 0x01 |
---|
3112 | #define TIOCPKT_FLUSHWRITE 0x02 |
---|
3113 | #define TIOCPKT_STOP 0x04 |
---|
3114 | #define TIOCPKT_START 0x08 |
---|
3115 | #define TIOCPKT_NOSTOP 0x10 |
---|
3116 | #define TIOCPKT_DOSTOP 0x20 |
---|
3117 | #define TIOCPKT_IOCTL 0x40 |
---|
3118 | #define TIOCSTOP _IO('t', 111) |
---|
3119 | #define TIOCSTART _IO('t', 110) |
---|
3120 | #define TIOCMSET _IOW('t', 109, int) |
---|
3121 | #define TIOCMBIS _IOW('t', 108, int) |
---|
3122 | #define TIOCMBIC _IOW('t', 107, int) |
---|
3123 | #define TIOCMGET _IOR('t', 106, int) |
---|
3124 | #define TIOCREMOTE _IOW('t', 105, int) |
---|
3125 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) |
---|
3126 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) |
---|
3127 | #define TIOCUCNTL _IOW('t', 102, int) |
---|
3128 | #define TIOCSTAT _IO('t', 101) |
---|
3129 | #define UIOCCMD(n) _IO('u', n) |
---|
3130 | #define TIOCSCONS _IO('t', 99) |
---|
3131 | #define TIOCCONS _IOW('t', 98, int) |
---|
3132 | #define TIOCSCTTY _IO('t', 97) |
---|
3133 | #define TIOCEXT _IOW('t', 96, int) |
---|
3134 | #define TIOCSIG _IO('t', 95) |
---|
3135 | #define TIOCDRAIN _IO('t', 94) |
---|
3136 | #define TIOCMSDTRWAIT _IOW('t', 91, int) |
---|
3137 | #define TIOCMGDTRWAIT _IOR('t', 90, int) |
---|
3138 | #define TIOCTIMESTAMP _IOR('t', 89, struct timeval) |
---|
3139 | |
---|
3140 | #define TIOCDCDTIMESTAMP _IOR('t', 88, struct timeval) |
---|
3141 | |
---|
3142 | #define TIOCSDRAINWAIT _IOW('t', 87, int) |
---|
3143 | #define TIOCGDRAINWAIT _IOR('t', 86, int) |
---|
3144 | #define TIOCDSIMICROCODE _IO('t', 85) |
---|
3145 | |
---|
3146 | |
---|
3147 | #define TTYDISC 0 |
---|
3148 | #define TABLDISC 3 |
---|
3149 | #define SLIPDISC 4 |
---|
3150 | #define PPPDISC 5 |
---|
3151 | # 67 "/usr/include/sys/ioctl.h" 2 3 4 |
---|
3152 | |
---|
3153 | |
---|
3154 | |
---|
3155 | |
---|
3156 | |
---|
3157 | |
---|
3158 | struct ttysize { |
---|
3159 | unsigned short ts_lines; |
---|
3160 | unsigned short ts_cols; |
---|
3161 | unsigned short ts_xxx; |
---|
3162 | unsigned short ts_yyy; |
---|
3163 | }; |
---|
3164 | #define TIOCGSIZE TIOCGWINSZ |
---|
3165 | #define TIOCSSIZE TIOCSWINSZ |
---|
3166 | |
---|
3167 | |
---|
3168 | |
---|
3169 | # 1 "/usr/include/sys/filio.h" 1 3 4 |
---|
3170 | # 64 "/usr/include/sys/filio.h" 3 4 |
---|
3171 | #define _SYS_FILIO_H_ |
---|
3172 | |
---|
3173 | |
---|
3174 | |
---|
3175 | |
---|
3176 | #define FIOCLEX _IO('f', 1) |
---|
3177 | #define FIONCLEX _IO('f', 2) |
---|
3178 | #define FIONREAD _IOR('f', 127, int) |
---|
3179 | #define FIONBIO _IOW('f', 126, int) |
---|
3180 | #define FIOASYNC _IOW('f', 125, int) |
---|
3181 | #define FIOSETOWN _IOW('f', 124, int) |
---|
3182 | #define FIOGETOWN _IOR('f', 123, int) |
---|
3183 | #define FIODTYPE _IOR('f', 122, int) |
---|
3184 | # 85 "/usr/include/sys/ioctl.h" 2 3 4 |
---|
3185 | # 1 "/usr/include/sys/sockio.h" 1 3 4 |
---|
3186 | # 59 "/usr/include/sys/sockio.h" 3 4 |
---|
3187 | #define _SYS_SOCKIO_H_ |
---|
3188 | |
---|
3189 | |
---|
3190 | |
---|
3191 | |
---|
3192 | |
---|
3193 | |
---|
3194 | #define SIOCSHIWAT _IOW('s', 0, int) |
---|
3195 | #define SIOCGHIWAT _IOR('s', 1, int) |
---|
3196 | #define SIOCSLOWAT _IOW('s', 2, int) |
---|
3197 | #define SIOCGLOWAT _IOR('s', 3, int) |
---|
3198 | #define SIOCATMARK _IOR('s', 7, int) |
---|
3199 | #define SIOCSPGRP _IOW('s', 8, int) |
---|
3200 | #define SIOCGPGRP _IOR('s', 9, int) |
---|
3201 | |
---|
3202 | |
---|
3203 | |
---|
3204 | |
---|
3205 | |
---|
3206 | |
---|
3207 | #define SIOCSIFADDR _IOW('i', 12, struct ifreq) |
---|
3208 | #define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) |
---|
3209 | #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) |
---|
3210 | #define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) |
---|
3211 | #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) |
---|
3212 | #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) |
---|
3213 | #define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) |
---|
3214 | #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) |
---|
3215 | #define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) |
---|
3216 | #define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) |
---|
3217 | #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) |
---|
3218 | #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) |
---|
3219 | #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) |
---|
3220 | #define SIOCDIFADDR _IOW('i', 25, struct ifreq) |
---|
3221 | #define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq) |
---|
3222 | #define SIOCGETVIFCNT _IOWR('r', 27, struct sioc_vif_req) |
---|
3223 | #define SIOCGETSGCNT _IOWR('r', 28, struct sioc_sg_req) |
---|
3224 | #define SIOCALIFADDR _IOW('i', 29, struct if_laddrreq) |
---|
3225 | #define SIOCGLIFADDR _IOWR('i', 30, struct if_laddrreq) |
---|
3226 | #define SIOCDLIFADDR _IOW('i', 31, struct if_laddrreq) |
---|
3227 | |
---|
3228 | |
---|
3229 | #define SIOCGIFADDR _IOWR('i', 33, struct ifreq) |
---|
3230 | #define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) |
---|
3231 | #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) |
---|
3232 | #define SIOCGIFCONF _IOWR('i', 36, struct ifconf) |
---|
3233 | #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) |
---|
3234 | #define SIOCAUTOADDR _IOWR('i', 38, struct ifreq) |
---|
3235 | #define SIOCAUTONETMASK _IOW('i', 39, struct ifreq) |
---|
3236 | #define SIOCARPIPLL _IOWR('i', 40, struct ifreq) |
---|
3237 | |
---|
3238 | |
---|
3239 | #define SIOCADDMULTI _IOW('i', 49, struct ifreq) |
---|
3240 | #define SIOCDELMULTI _IOW('i', 50, struct ifreq) |
---|
3241 | #define SIOCGIFMTU _IOWR('i', 51, struct ifreq) |
---|
3242 | #define SIOCSIFMTU _IOW('i', 52, struct ifreq) |
---|
3243 | #define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) |
---|
3244 | #define SIOCSIFPHYS _IOW('i', 54, struct ifreq) |
---|
3245 | #define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) |
---|
3246 | #define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) |
---|
3247 | #define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) |
---|
3248 | #define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) |
---|
3249 | #define SIOCRSLVMULTI _IOWR('i', 59, struct rslvmulti_req) |
---|
3250 | |
---|
3251 | #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) |
---|
3252 | #define SIOCGIFSTATUS _IOWR('i', 61, struct ifstat) |
---|
3253 | #define SIOCSIFPHYADDR _IOW('i', 62, struct ifaliasreq) |
---|
3254 | #define SIOCGIFPSRCADDR _IOWR('i', 63, struct ifreq) |
---|
3255 | #define SIOCGIFPDSTADDR _IOWR('i', 64, struct ifreq) |
---|
3256 | #define SIOCDIFPHYADDR _IOW('i', 65, struct ifreq) |
---|
3257 | #define SIOCSLIFPHYADDR _IOW('i', 66, struct if_laddrreq) |
---|
3258 | #define SIOCGLIFPHYADDR _IOWR('i', 67, struct if_laddrreq) |
---|
3259 | |
---|
3260 | #define SIOCGIFDEVMTU _IOWR('i', 68, struct ifreq) |
---|
3261 | #define SIOCSIFALTMTU _IOW('i', 69, struct ifreq) |
---|
3262 | #define SIOCGIFALTMTU _IOWR('i', 72, struct ifreq) |
---|
3263 | #define SIOCSIFBOND _IOW('i', 70, struct ifreq) |
---|
3264 | #define SIOCGIFBOND _IOWR('i', 71, struct ifreq) |
---|
3265 | #define SIOCIFCREATE _IOWR('i', 120, struct ifreq) |
---|
3266 | #define SIOCIFDESTROY _IOW('i', 121, struct ifreq) |
---|
3267 | #define SIOCSIFVLAN _IOW('i', 126, struct ifreq) |
---|
3268 | #define SIOCGIFVLAN _IOWR('i', 127, struct ifreq) |
---|
3269 | #define SIOCSETVLAN SIOCSIFVLAN |
---|
3270 | #define SIOCGETVLAN SIOCGIFVLAN |
---|
3271 | |
---|
3272 | |
---|
3273 | #define SIOCGIFASYNCMAP _IOWR('i', 124, struct ifreq) |
---|
3274 | #define SIOCSIFASYNCMAP _IOW('i', 125, struct ifreq) |
---|
3275 | # 86 "/usr/include/sys/ioctl.h" 2 3 4 |
---|
3276 | |
---|
3277 | |
---|
3278 | |
---|
3279 | |
---|
3280 | |
---|
3281 | int ioctl(int, unsigned long, ...); |
---|
3282 | |
---|
3283 | # 40 "misc-utils/hardlink.c" 2 |
---|
3284 | # 49 "misc-utils/hardlink.c" |
---|
3285 | # 1 "./include/nls.h" 1 |
---|
3286 | |
---|
3287 | #define UTIL_LINUX_NLS_H |
---|
3288 | |
---|
3289 | |
---|
3290 | |
---|
3291 | |
---|
3292 | |
---|
3293 | |
---|
3294 | # 1 "/usr/include/locale.h" 1 3 4 |
---|
3295 | # 38 "/usr/include/locale.h" 3 4 |
---|
3296 | #define _LOCALE_H_ |
---|
3297 | |
---|
3298 | # 1 "/usr/include/_locale.h" 1 3 4 |
---|
3299 | # 38 "/usr/include/_locale.h" 3 4 |
---|
3300 | #define __LOCALE_H_ |
---|
3301 | |
---|
3302 | |
---|
3303 | |
---|
3304 | |
---|
3305 | struct lconv { |
---|
3306 | char *decimal_point; |
---|
3307 | char *thousands_sep; |
---|
3308 | char *grouping; |
---|
3309 | char *int_curr_symbol; |
---|
3310 | char *currency_symbol; |
---|
3311 | char *mon_decimal_point; |
---|
3312 | char *mon_thousands_sep; |
---|
3313 | char *mon_grouping; |
---|
3314 | char *positive_sign; |
---|
3315 | char *negative_sign; |
---|
3316 | char int_frac_digits; |
---|
3317 | char frac_digits; |
---|
3318 | char p_cs_precedes; |
---|
3319 | char p_sep_by_space; |
---|
3320 | char n_cs_precedes; |
---|
3321 | char n_sep_by_space; |
---|
3322 | char p_sign_posn; |
---|
3323 | char n_sign_posn; |
---|
3324 | char int_p_cs_precedes; |
---|
3325 | char int_n_cs_precedes; |
---|
3326 | char int_p_sep_by_space; |
---|
3327 | char int_n_sep_by_space; |
---|
3328 | char int_p_sign_posn; |
---|
3329 | char int_n_sign_posn; |
---|
3330 | }; |
---|
3331 | |
---|
3332 | |
---|
3333 | |
---|
3334 | |
---|
3335 | |
---|
3336 | |
---|
3337 | struct lconv *localeconv(void); |
---|
3338 | |
---|
3339 | # 41 "/usr/include/locale.h" 2 3 4 |
---|
3340 | |
---|
3341 | #define LC_ALL 0 |
---|
3342 | #define LC_COLLATE 1 |
---|
3343 | #define LC_CTYPE 2 |
---|
3344 | #define LC_MONETARY 3 |
---|
3345 | #define LC_NUMERIC 4 |
---|
3346 | #define LC_TIME 5 |
---|
3347 | #define LC_MESSAGES 6 |
---|
3348 | |
---|
3349 | #define _LC_LAST 7 |
---|
3350 | |
---|
3351 | |
---|
3352 | char *setlocale(int, const char *); |
---|
3353 | |
---|
3354 | # 10 "./include/nls.h" 2 |
---|
3355 | # 23 "./include/nls.h" |
---|
3356 | # 1 "/opt/local/include/libintl.h" 1 3 |
---|
3357 | # 18 "/opt/local/include/libintl.h" 3 |
---|
3358 | #define _LIBINTL_H 1 |
---|
3359 | |
---|
3360 | |
---|
3361 | |
---|
3362 | # 1 "/usr/include/xlocale.h" 1 3 4 |
---|
3363 | # 25 "/usr/include/xlocale.h" 3 4 |
---|
3364 | #define _XLOCALE_H_ |
---|
3365 | |
---|
3366 | |
---|
3367 | |
---|
3368 | |
---|
3369 | #define _USE_EXTENDED_LOCALES_ |
---|
3370 | |
---|
3371 | |
---|
3372 | struct _xlocale; |
---|
3373 | typedef struct _xlocale * locale_t; |
---|
3374 | |
---|
3375 | |
---|
3376 | # 1 "/usr/include/_xlocale.h" 1 3 4 |
---|
3377 | # 25 "/usr/include/_xlocale.h" 3 4 |
---|
3378 | #define __XLOCALE_H_ |
---|
3379 | |
---|
3380 | |
---|
3381 | |
---|
3382 | |
---|
3383 | int ___mb_cur_max(void); |
---|
3384 | int ___mb_cur_max_l(locale_t); |
---|
3385 | |
---|
3386 | # 38 "/usr/include/xlocale.h" 2 3 4 |
---|
3387 | |
---|
3388 | #define LC_ALL_MASK ( LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK ) |
---|
3389 | |
---|
3390 | |
---|
3391 | |
---|
3392 | |
---|
3393 | |
---|
3394 | #define LC_COLLATE_MASK (1 << 0) |
---|
3395 | #define LC_CTYPE_MASK (1 << 1) |
---|
3396 | #define LC_MESSAGES_MASK (1 << 2) |
---|
3397 | #define LC_MONETARY_MASK (1 << 3) |
---|
3398 | #define LC_NUMERIC_MASK (1 << 4) |
---|
3399 | #define LC_TIME_MASK (1 << 5) |
---|
3400 | |
---|
3401 | #define _LC_LAST_MASK (1 << (6 - 1)) |
---|
3402 | |
---|
3403 | #define LC_GLOBAL_LOCALE ((locale_t)-1) |
---|
3404 | # 64 "/usr/include/xlocale.h" 3 4 |
---|
3405 | |
---|
3406 | extern const locale_t _c_locale; |
---|
3407 | |
---|
3408 | locale_t duplocale(locale_t); |
---|
3409 | int freelocale(locale_t); |
---|
3410 | struct lconv * localeconv_l(locale_t); |
---|
3411 | locale_t newlocale(int, const char *, locale_t); |
---|
3412 | const char * querylocale(int, locale_t); |
---|
3413 | locale_t uselocale(locale_t); |
---|
3414 | |
---|
3415 | |
---|
3416 | |
---|
3417 | |
---|
3418 | |
---|
3419 | |
---|
3420 | # 1 "/usr/include/xlocale/_ctype.h" 1 3 4 |
---|
3421 | # 25 "/usr/include/xlocale/_ctype.h" 3 4 |
---|
3422 | #define _XLOCALE__CTYPE_H_ |
---|
3423 | |
---|
3424 | |
---|
3425 | int digittoint_l(int, locale_t); |
---|
3426 | int isalnum_l(int, locale_t); |
---|
3427 | int isalpha_l(int, locale_t); |
---|
3428 | int isblank_l(int, locale_t); |
---|
3429 | int iscntrl_l(int, locale_t); |
---|
3430 | int isdigit_l(int, locale_t); |
---|
3431 | int isgraph_l(int, locale_t); |
---|
3432 | int ishexnumber_l(int, locale_t); |
---|
3433 | int isideogram_l(int, locale_t); |
---|
3434 | int islower_l(int, locale_t); |
---|
3435 | int isnumber_l(int, locale_t); |
---|
3436 | int isphonogram_l(int, locale_t); |
---|
3437 | int isprint_l(int, locale_t); |
---|
3438 | int ispunct_l(int, locale_t); |
---|
3439 | int isrune_l(int, locale_t); |
---|
3440 | int isspace_l(int, locale_t); |
---|
3441 | int isspecial_l(int, locale_t); |
---|
3442 | int isupper_l(int, locale_t); |
---|
3443 | int isxdigit_l(int, locale_t); |
---|
3444 | int tolower_l(int, locale_t); |
---|
3445 | int toupper_l(int, locale_t); |
---|
3446 | |
---|
3447 | |
---|
3448 | #define digittoint_l(c,l) __maskrune_l((c), 0xFF, (l)) |
---|
3449 | #define ishexnumber_l(c,l) __istype_l((c), _CTYPE_X, (l)) |
---|
3450 | #define isideogram_l(c,l) __istype_l((c), _CTYPE_I, (l)) |
---|
3451 | #define isnumber_l(c,l) __istype_l((c), _CTYPE_D, (l)) |
---|
3452 | #define isphonogram_l(c,l) __istype_l((c), _CTYPE_Q, (l)) |
---|
3453 | #define isrune_l(c,l) __istype_l((c), 0xFFFFFF00L, (l)) |
---|
3454 | #define isspecial_l(c,l) __istype_l((c), _CTYPE_T, (l)) |
---|
3455 | #define isalnum_l(c,l) __istype_l((c), (_CTYPE_A|_CTYPE_D), (l)) |
---|
3456 | #define isalpha_l(c,l) __istype_l((c), _CTYPE_A, (l)) |
---|
3457 | #define isblank_l(c,l) __istype_l((c), _CTYPE_B, (l)) |
---|
3458 | #define iscntrl_l(c,l) __istype_l((c), _CTYPE_C, (l)) |
---|
3459 | #define isdigit_l(c,l) __istype_l((c), _CTYPE_D, (l)) |
---|
3460 | #define isgraph_l(c,l) __istype_l((c), _CTYPE_G, (l)) |
---|
3461 | #define islower_l(c,l) __istype_l((c), _CTYPE_L, (l)) |
---|
3462 | #define isprint_l(c,l) __istype_l((c), _CTYPE_R, (l)) |
---|
3463 | #define ispunct_l(c,l) __istype_l((c), _CTYPE_P, (l)) |
---|
3464 | #define isspace_l(c,l) __istype_l((c), _CTYPE_S, (l)) |
---|
3465 | #define isupper_l(c,l) __istype_l((c), _CTYPE_U, (l)) |
---|
3466 | #define isxdigit_l(c,l) __istype_l((c), _CTYPE_X, (l)) |
---|
3467 | #define tolower_l(c,l) __tolower_l(c, (l)) |
---|
3468 | #define toupper_l(c,l) __toupper_l(c, (l)) |
---|
3469 | |
---|
3470 | |
---|
3471 | |
---|
3472 | unsigned long ___runetype_l(__darwin_ct_rune_t, locale_t); |
---|
3473 | __darwin_ct_rune_t ___tolower_l(__darwin_ct_rune_t, locale_t); |
---|
3474 | __darwin_ct_rune_t ___toupper_l(__darwin_ct_rune_t, locale_t); |
---|
3475 | |
---|
3476 | |
---|
3477 | |
---|
3478 | |
---|
3479 | |
---|
3480 | |
---|
3481 | |
---|
3482 | |
---|
3483 | |
---|
3484 | int __maskrune_l(__darwin_ct_rune_t, unsigned long, locale_t); |
---|
3485 | |
---|
3486 | |
---|
3487 | static __inline int |
---|
3488 | __istype_l(__darwin_ct_rune_t _c, unsigned long _f, locale_t _l) |
---|
3489 | { |
---|
3490 | return !!(isascii(_c) ? (_DefaultRuneLocale.__runetype[_c] & _f) |
---|
3491 | : __maskrune_l(_c, _f, _l)); |
---|
3492 | } |
---|
3493 | |
---|
3494 | static __inline __darwin_ct_rune_t |
---|
3495 | __toupper_l(__darwin_ct_rune_t _c, locale_t _l) |
---|
3496 | { |
---|
3497 | return isascii(_c) ? _DefaultRuneLocale.__mapupper[_c] |
---|
3498 | : ___toupper_l(_c, _l); |
---|
3499 | } |
---|
3500 | |
---|
3501 | static __inline __darwin_ct_rune_t |
---|
3502 | __tolower_l(__darwin_ct_rune_t _c, locale_t _l) |
---|
3503 | { |
---|
3504 | return isascii(_c) ? _DefaultRuneLocale.__maplower[_c] |
---|
3505 | : ___tolower_l(_c, _l); |
---|
3506 | } |
---|
3507 | |
---|
3508 | static __inline int |
---|
3509 | __wcwidth_l(__darwin_ct_rune_t _c, locale_t _l) |
---|
3510 | { |
---|
3511 | unsigned int _x; |
---|
3512 | |
---|
3513 | if (_c == 0) |
---|
3514 | return (0); |
---|
3515 | _x = (unsigned int)__maskrune_l(_c, 0xe0000000L|0x00040000L, _l); |
---|
3516 | if ((_x & 0xe0000000L) != 0) |
---|
3517 | return ((_x & 0xe0000000L) >> 30); |
---|
3518 | return ((_x & 0x00040000L) != 0 ? 1 : -1); |
---|
3519 | } |
---|
3520 | # 80 "/usr/include/xlocale.h" 2 3 4 |
---|
3521 | # 23 "/opt/local/include/libintl.h" 2 3 |
---|
3522 | # 38 "/opt/local/include/libintl.h" 3 |
---|
3523 | #define __USE_GNU_GETTEXT 1 |
---|
3524 | |
---|
3525 | |
---|
3526 | |
---|
3527 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 || (major) == 1 ? 1 : -1) |
---|
3528 | # 57 "/opt/local/include/libintl.h" 3 |
---|
3529 | #define LIBINTL_VERSION 0x001500 |
---|
3530 | extern int libintl_version; |
---|
3531 | # 98 "/opt/local/include/libintl.h" 3 |
---|
3532 | #define _INTL_REDIRECT_MACROS |
---|
3533 | # 108 "/opt/local/include/libintl.h" 3 |
---|
3534 | #define _INTL_ASM(cname) |
---|
3535 | |
---|
3536 | |
---|
3537 | |
---|
3538 | |
---|
3539 | |
---|
3540 | |
---|
3541 | #define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) |
---|
3542 | # 134 "/opt/local/include/libintl.h" 3 |
---|
3543 | #define gettext libintl_gettext |
---|
3544 | |
---|
3545 | extern char *libintl_gettext (const char *__msgid) |
---|
3546 | |
---|
3547 | __attribute__ ((__format_arg__ (1))); |
---|
3548 | # 154 "/opt/local/include/libintl.h" 3 |
---|
3549 | #define dgettext libintl_dgettext |
---|
3550 | |
---|
3551 | extern char *libintl_dgettext (const char *__domainname, const char *__msgid) |
---|
3552 | |
---|
3553 | __attribute__ ((__format_arg__ (2))); |
---|
3554 | # 175 "/opt/local/include/libintl.h" 3 |
---|
3555 | #define dcgettext libintl_dcgettext |
---|
3556 | |
---|
3557 | extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, |
---|
3558 | int __category) |
---|
3559 | |
---|
3560 | __attribute__ ((__format_arg__ (2))); |
---|
3561 | # 199 "/opt/local/include/libintl.h" 3 |
---|
3562 | #define ngettext libintl_ngettext |
---|
3563 | |
---|
3564 | extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, |
---|
3565 | unsigned long int __n) |
---|
3566 | |
---|
3567 | __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); |
---|
3568 | # 222 "/opt/local/include/libintl.h" 3 |
---|
3569 | #define dngettext libintl_dngettext |
---|
3570 | |
---|
3571 | extern char *libintl_dngettext (const char *__domainname, |
---|
3572 | const char *__msgid1, const char *__msgid2, |
---|
3573 | unsigned long int __n) |
---|
3574 | |
---|
3575 | __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); |
---|
3576 | # 248 "/opt/local/include/libintl.h" 3 |
---|
3577 | #define dcngettext libintl_dcngettext |
---|
3578 | |
---|
3579 | extern char *libintl_dcngettext (const char *__domainname, |
---|
3580 | const char *__msgid1, const char *__msgid2, |
---|
3581 | unsigned long int __n, int __category) |
---|
3582 | |
---|
3583 | __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); |
---|
3584 | # 270 "/opt/local/include/libintl.h" 3 |
---|
3585 | #define textdomain libintl_textdomain |
---|
3586 | |
---|
3587 | extern char *libintl_textdomain (const char *__domainname) |
---|
3588 | ; |
---|
3589 | # 288 "/opt/local/include/libintl.h" 3 |
---|
3590 | #define bindtextdomain libintl_bindtextdomain |
---|
3591 | |
---|
3592 | extern char *libintl_bindtextdomain (const char *__domainname, const char *__dirname) |
---|
3593 | ; |
---|
3594 | # 327 "/opt/local/include/libintl.h" 3 |
---|
3595 | #define bind_textdomain_codeset libintl_bind_textdomain_codeset |
---|
3596 | |
---|
3597 | extern char *libintl_bind_textdomain_codeset (const char *__domainname, |
---|
3598 | const char *__codeset) |
---|
3599 | ; |
---|
3600 | # 487 "/opt/local/include/libintl.h" 3 |
---|
3601 | #undef setlocale |
---|
3602 | #define setlocale libintl_setlocale |
---|
3603 | extern char *libintl_setlocale (int, const char *); |
---|
3604 | |
---|
3605 | |
---|
3606 | |
---|
3607 | |
---|
3608 | #undef newlocale |
---|
3609 | #define newlocale libintl_newlocale |
---|
3610 | |
---|
3611 | |
---|
3612 | extern locale_t libintl_newlocale (int, const char *, locale_t); |
---|
3613 | # 513 "/opt/local/include/libintl.h" 3 |
---|
3614 | #define libintl_set_relocation_prefix libintl_set_relocation_prefix |
---|
3615 | extern void |
---|
3616 | libintl_set_relocation_prefix (const char *orig_prefix, |
---|
3617 | const char *curr_prefix); |
---|
3618 | # 24 "./include/nls.h" 2 |
---|
3619 | # 32 "./include/nls.h" |
---|
3620 | #define _(Text) gettext (Text) |
---|
3621 | |
---|
3622 | |
---|
3623 | |
---|
3624 | |
---|
3625 | #define N_(String) (String) |
---|
3626 | |
---|
3627 | #define P_(Singular,Plural,n) ngettext (Singular, Plural, n) |
---|
3628 | # 51 "./include/nls.h" |
---|
3629 | # 1 "/usr/include/langinfo.h" 1 3 4 |
---|
3630 | # 30 "/usr/include/langinfo.h" 3 4 |
---|
3631 | #define _LANGINFO_H_ |
---|
3632 | |
---|
3633 | |
---|
3634 | |
---|
3635 | |
---|
3636 | |
---|
3637 | typedef __darwin_nl_item nl_item; |
---|
3638 | #define _NL_ITEM |
---|
3639 | |
---|
3640 | |
---|
3641 | #define CODESET 0 |
---|
3642 | #define D_T_FMT 1 |
---|
3643 | #define D_FMT 2 |
---|
3644 | #define T_FMT 3 |
---|
3645 | #define T_FMT_AMPM 4 |
---|
3646 | #define AM_STR 5 |
---|
3647 | #define PM_STR 6 |
---|
3648 | |
---|
3649 | |
---|
3650 | #define DAY_1 7 |
---|
3651 | #define DAY_2 8 |
---|
3652 | #define DAY_3 9 |
---|
3653 | #define DAY_4 10 |
---|
3654 | #define DAY_5 11 |
---|
3655 | #define DAY_6 12 |
---|
3656 | #define DAY_7 13 |
---|
3657 | |
---|
3658 | |
---|
3659 | #define ABDAY_1 14 |
---|
3660 | #define ABDAY_2 15 |
---|
3661 | #define ABDAY_3 16 |
---|
3662 | #define ABDAY_4 17 |
---|
3663 | #define ABDAY_5 18 |
---|
3664 | #define ABDAY_6 19 |
---|
3665 | #define ABDAY_7 20 |
---|
3666 | |
---|
3667 | |
---|
3668 | #define MON_1 21 |
---|
3669 | #define MON_2 22 |
---|
3670 | #define MON_3 23 |
---|
3671 | #define MON_4 24 |
---|
3672 | #define MON_5 25 |
---|
3673 | #define MON_6 26 |
---|
3674 | #define MON_7 27 |
---|
3675 | #define MON_8 28 |
---|
3676 | #define MON_9 29 |
---|
3677 | #define MON_10 30 |
---|
3678 | #define MON_11 31 |
---|
3679 | #define MON_12 32 |
---|
3680 | |
---|
3681 | |
---|
3682 | #define ABMON_1 33 |
---|
3683 | #define ABMON_2 34 |
---|
3684 | #define ABMON_3 35 |
---|
3685 | #define ABMON_4 36 |
---|
3686 | #define ABMON_5 37 |
---|
3687 | #define ABMON_6 38 |
---|
3688 | #define ABMON_7 39 |
---|
3689 | #define ABMON_8 40 |
---|
3690 | #define ABMON_9 41 |
---|
3691 | #define ABMON_10 42 |
---|
3692 | #define ABMON_11 43 |
---|
3693 | #define ABMON_12 44 |
---|
3694 | |
---|
3695 | #define ERA 45 |
---|
3696 | #define ERA_D_FMT 46 |
---|
3697 | #define ERA_D_T_FMT 47 |
---|
3698 | #define ERA_T_FMT 48 |
---|
3699 | #define ALT_DIGITS 49 |
---|
3700 | |
---|
3701 | #define RADIXCHAR 50 |
---|
3702 | #define THOUSEP 51 |
---|
3703 | |
---|
3704 | #define YESEXPR 52 |
---|
3705 | #define NOEXPR 53 |
---|
3706 | |
---|
3707 | |
---|
3708 | #define YESSTR 54 |
---|
3709 | #define NOSTR 55 |
---|
3710 | |
---|
3711 | |
---|
3712 | #define CRNCYSTR 56 |
---|
3713 | |
---|
3714 | |
---|
3715 | |
---|
3716 | |
---|
3717 | |
---|
3718 | |
---|
3719 | char *nl_langinfo(nl_item); |
---|
3720 | |
---|
3721 | |
---|
3722 | |
---|
3723 | # 1 "/usr/include/xlocale/_langinfo.h" 1 3 4 |
---|
3724 | # 25 "/usr/include/xlocale/_langinfo.h" 3 4 |
---|
3725 | #define _XLOCALE__LANGINFO_H_ |
---|
3726 | |
---|
3727 | |
---|
3728 | char *nl_langinfo_l(nl_item, locale_t); |
---|
3729 | |
---|
3730 | # 123 "/usr/include/langinfo.h" 2 3 4 |
---|
3731 | # 52 "./include/nls.h" 2 |
---|
3732 | # 124 "./include/nls.h" |
---|
3733 | #define ALTMON_1 MON_1 |
---|
3734 | #define ALTMON_2 MON_2 |
---|
3735 | #define ALTMON_3 MON_3 |
---|
3736 | #define ALTMON_4 MON_4 |
---|
3737 | #define ALTMON_5 MON_5 |
---|
3738 | #define ALTMON_6 MON_6 |
---|
3739 | #define ALTMON_7 MON_7 |
---|
3740 | #define ALTMON_8 MON_8 |
---|
3741 | #define ALTMON_9 MON_9 |
---|
3742 | #define ALTMON_10 MON_10 |
---|
3743 | #define ALTMON_11 MON_11 |
---|
3744 | #define ALTMON_12 MON_12 |
---|
3745 | |
---|
3746 | |
---|
3747 | |
---|
3748 | #define _NL_ABALTMON_1 ABMON_1 |
---|
3749 | #define _NL_ABALTMON_2 ABMON_2 |
---|
3750 | #define _NL_ABALTMON_3 ABMON_3 |
---|
3751 | #define _NL_ABALTMON_4 ABMON_4 |
---|
3752 | #define _NL_ABALTMON_5 ABMON_5 |
---|
3753 | #define _NL_ABALTMON_6 ABMON_6 |
---|
3754 | #define _NL_ABALTMON_7 ABMON_7 |
---|
3755 | #define _NL_ABALTMON_8 ABMON_8 |
---|
3756 | #define _NL_ABALTMON_9 ABMON_9 |
---|
3757 | #define _NL_ABALTMON_10 ABMON_10 |
---|
3758 | #define _NL_ABALTMON_11 ABMON_11 |
---|
3759 | #define _NL_ABALTMON_12 ABMON_12 |
---|
3760 | # 50 "misc-utils/hardlink.c" 2 |
---|
3761 | # 1 "./include/c.h" 1 |
---|
3762 | |
---|
3763 | |
---|
3764 | |
---|
3765 | |
---|
3766 | |
---|
3767 | |
---|
3768 | |
---|
3769 | #define UTIL_LINUX_C_H |
---|
3770 | |
---|
3771 | # 1 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/limits.h" 1 3 4 |
---|
3772 | |
---|
3773 | |
---|
3774 | |
---|
3775 | |
---|
3776 | |
---|
3777 | |
---|
3778 | # 1 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/syslimits.h" 1 3 4 |
---|
3779 | |
---|
3780 | |
---|
3781 | |
---|
3782 | |
---|
3783 | |
---|
3784 | #define _GCC_NEXT_LIMITS_H |
---|
3785 | # 8 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/limits.h" 2 3 4 |
---|
3786 | |
---|
3787 | |
---|
3788 | # 1 "/usr/include/limits.h" 1 3 4 |
---|
3789 | # 61 "/usr/include/limits.h" 3 4 |
---|
3790 | #define _LIMITS_H_ |
---|
3791 | |
---|
3792 | # 1 "/usr/include/machine/limits.h" 1 3 4 |
---|
3793 | |
---|
3794 | |
---|
3795 | |
---|
3796 | |
---|
3797 | |
---|
3798 | # 1 "/usr/include/ppc/limits.h" 1 3 4 |
---|
3799 | # 37 "/usr/include/ppc/limits.h" 3 4 |
---|
3800 | #define _PPC_LIMITS_H_ |
---|
3801 | |
---|
3802 | # 1 "/usr/include/ppc/_limits.h" 1 3 4 |
---|
3803 | # 23 "/usr/include/ppc/_limits.h" 3 4 |
---|
3804 | #define _PPC__LIMITS_H_ |
---|
3805 | |
---|
3806 | #define __DARWIN_CLK_TCK 100 |
---|
3807 | # 40 "/usr/include/ppc/limits.h" 2 3 4 |
---|
3808 | |
---|
3809 | #define CHAR_BIT 8 |
---|
3810 | #define MB_LEN_MAX 6 |
---|
3811 | |
---|
3812 | #define CLK_TCK __DARWIN_CLK_TCK |
---|
3813 | # 56 "/usr/include/ppc/limits.h" 3 4 |
---|
3814 | #define SCHAR_MAX 127 |
---|
3815 | #define SCHAR_MIN (-128) |
---|
3816 | |
---|
3817 | #define UCHAR_MAX 255 |
---|
3818 | #define CHAR_MAX 127 |
---|
3819 | #define CHAR_MIN (-128) |
---|
3820 | |
---|
3821 | #define USHRT_MAX 65535 |
---|
3822 | #define SHRT_MAX 32767 |
---|
3823 | #define SHRT_MIN (-32768) |
---|
3824 | |
---|
3825 | #define UINT_MAX 0xffffffff |
---|
3826 | #define INT_MAX 2147483647 |
---|
3827 | #define INT_MIN (-2147483647-1) |
---|
3828 | |
---|
3829 | |
---|
3830 | |
---|
3831 | |
---|
3832 | |
---|
3833 | |
---|
3834 | #define ULONG_MAX 0xffffffffL |
---|
3835 | #define LONG_MAX 2147483647L |
---|
3836 | #define LONG_MIN (-2147483647L-1) |
---|
3837 | |
---|
3838 | |
---|
3839 | #define ULLONG_MAX 0xffffffffffffffffULL |
---|
3840 | #define LLONG_MAX 0x7fffffffffffffffLL |
---|
3841 | #define LLONG_MIN (-0x7fffffffffffffffLL-1) |
---|
3842 | |
---|
3843 | |
---|
3844 | #define SSIZE_MAX LONG_MAX |
---|
3845 | # 102 "/usr/include/ppc/limits.h" 3 4 |
---|
3846 | #define LONG_BIT 32 |
---|
3847 | |
---|
3848 | #define WORD_BIT 32 |
---|
3849 | # 7 "/usr/include/machine/limits.h" 2 3 4 |
---|
3850 | # 64 "/usr/include/limits.h" 2 3 4 |
---|
3851 | # 1 "/usr/include/sys/syslimits.h" 1 3 4 |
---|
3852 | # 60 "/usr/include/sys/syslimits.h" 3 4 |
---|
3853 | #define _SYS_SYSLIMITS_H_ |
---|
3854 | |
---|
3855 | |
---|
3856 | |
---|
3857 | |
---|
3858 | |
---|
3859 | |
---|
3860 | #define ARG_MAX (256 * 1024) |
---|
3861 | #define CHILD_MAX 266 |
---|
3862 | #define GID_MAX 2147483647U |
---|
3863 | #define LINK_MAX 32767 |
---|
3864 | #define MAX_CANON 255 |
---|
3865 | #define MAX_INPUT 255 |
---|
3866 | #define NAME_MAX 255 |
---|
3867 | #define NGROUPS_MAX 16 |
---|
3868 | #define UID_MAX 2147483647U |
---|
3869 | #define OPEN_MAX 10240 |
---|
3870 | #define PATH_MAX 1024 |
---|
3871 | #define PIPE_BUF 512 |
---|
3872 | |
---|
3873 | #define BC_BASE_MAX 99 |
---|
3874 | #define BC_DIM_MAX 2048 |
---|
3875 | #define BC_SCALE_MAX 99 |
---|
3876 | #define BC_STRING_MAX 1000 |
---|
3877 | #define COLL_WEIGHTS_MAX 2 |
---|
3878 | #define EQUIV_CLASS_MAX 2 |
---|
3879 | #define EXPR_NEST_MAX 32 |
---|
3880 | #define LINE_MAX 2048 |
---|
3881 | #define RE_DUP_MAX 255 |
---|
3882 | # 65 "/usr/include/limits.h" 2 3 4 |
---|
3883 | |
---|
3884 | |
---|
3885 | #define _POSIX_AIO_LISTIO_MAX 16 |
---|
3886 | #define _POSIX_AIO_MAX 1 |
---|
3887 | #define _POSIX_DELAYTIMER_MAX 32 |
---|
3888 | #define _POSIX_HOST_NAME_MAX 255 |
---|
3889 | #define _POSIX_LOGIN_NAME_MAX 9 |
---|
3890 | #define _POSIX_MQ_OPEN_MAX 8 |
---|
3891 | #define _POSIX_MQ_PRIO_MAX 32 |
---|
3892 | |
---|
3893 | #define _POSIX_ARG_MAX 4096 |
---|
3894 | #define _POSIX_CHILD_MAX 25 |
---|
3895 | #define _POSIX_LINK_MAX 8 |
---|
3896 | #define _POSIX_MAX_CANON 255 |
---|
3897 | #define _POSIX_MAX_INPUT 255 |
---|
3898 | #define _POSIX_NAME_MAX 14 |
---|
3899 | #define _POSIX_NGROUPS_MAX 8 |
---|
3900 | #define _POSIX_OPEN_MAX 20 |
---|
3901 | #define _POSIX_PATH_MAX 256 |
---|
3902 | #define _POSIX_PIPE_BUF 512 |
---|
3903 | #define _POSIX_SSIZE_MAX 32767 |
---|
3904 | #define _POSIX_STREAM_MAX 8 |
---|
3905 | #define _POSIX_TZNAME_MAX 6 |
---|
3906 | |
---|
3907 | #define _POSIX_RTSIG_MAX 8 |
---|
3908 | #define _POSIX_SEM_NSEMS_MAX 256 |
---|
3909 | #define _POSIX_SEM_VALUE_MAX 32767 |
---|
3910 | #define _POSIX_SIGQUEUE_MAX 32 |
---|
3911 | #define _POSIX_SSIZE_MAX 32767 |
---|
3912 | #define _POSIX_STREAM_MAX 8 |
---|
3913 | #define _POSIX_SS_REPL_MAX 4 |
---|
3914 | #define _POSIX_SYMLINK_MAX 255 |
---|
3915 | #define _POSIX_SYMLOOP_MAX 8 |
---|
3916 | #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 |
---|
3917 | #define _POSIX_THREAD_KEYS_MAX 128 |
---|
3918 | #define _POSIX_THREAD_THREADS_MAX 64 |
---|
3919 | #define _POSIX_TIMER_MAX 32 |
---|
3920 | #define _POSIX_TRACE_EVENT_NAME_MAX 30 |
---|
3921 | #define _POSIX_TRACE_NAME_MAX 8 |
---|
3922 | #define _POSIX_TRACE_SYS_MAX 8 |
---|
3923 | #define _POSIX_TRACE_USER_EVENT_MAX 32 |
---|
3924 | #define _POSIX_TTY_NAME_MAX 9 |
---|
3925 | |
---|
3926 | #define _POSIX2_BC_BASE_MAX 99 |
---|
3927 | #define _POSIX2_BC_DIM_MAX 2048 |
---|
3928 | #define _POSIX2_BC_SCALE_MAX 99 |
---|
3929 | #define _POSIX2_BC_STRING_MAX 1000 |
---|
3930 | #define _POSIX2_CHARCLASS_NAME_MAX 14 |
---|
3931 | #define _POSIX2_COLL_WEIGHTS_MAX 2 |
---|
3932 | #define _POSIX2_EQUIV_CLASS_MAX 2 |
---|
3933 | #define _POSIX2_EXPR_NEST_MAX 32 |
---|
3934 | #define _POSIX2_LINE_MAX 2048 |
---|
3935 | #define _POSIX2_RE_DUP_MAX 255 |
---|
3936 | |
---|
3937 | #define PTHREAD_STACK_MIN 8192 |
---|
3938 | #define PTHREAD_DESTRUCTOR_ITERATIONS 4 |
---|
3939 | #define PTHREAD_KEYS_MAX 128 |
---|
3940 | |
---|
3941 | |
---|
3942 | |
---|
3943 | |
---|
3944 | |
---|
3945 | #define NL_ARGMAX 9 |
---|
3946 | #define NL_LANGMAX 14 |
---|
3947 | #define NL_MSGMAX 32767 |
---|
3948 | #define NL_NMAX 1 |
---|
3949 | #define NL_SETMAX 255 |
---|
3950 | #define NL_TEXTMAX 2048 |
---|
3951 | |
---|
3952 | #define _XOPEN_IOV_MAX 16 |
---|
3953 | #define IOV_MAX 1024 |
---|
3954 | #define _XOPEN_NAME_MAX 255 |
---|
3955 | #define _XOPEN_PATH_MAX 1024 |
---|
3956 | # 11 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/limits.h" 2 3 4 |
---|
3957 | #undef _GCC_NEXT_LIMITS_H |
---|
3958 | |
---|
3959 | |
---|
3960 | |
---|
3961 | #define _LIMITS_H___ |
---|
3962 | |
---|
3963 | |
---|
3964 | #undef CHAR_BIT |
---|
3965 | #define CHAR_BIT __CHAR_BIT__ |
---|
3966 | |
---|
3967 | |
---|
3968 | |
---|
3969 | |
---|
3970 | |
---|
3971 | |
---|
3972 | |
---|
3973 | #undef SCHAR_MIN |
---|
3974 | #define SCHAR_MIN (-SCHAR_MAX - 1) |
---|
3975 | #undef SCHAR_MAX |
---|
3976 | #define SCHAR_MAX __SCHAR_MAX__ |
---|
3977 | |
---|
3978 | |
---|
3979 | #undef UCHAR_MAX |
---|
3980 | |
---|
3981 | |
---|
3982 | |
---|
3983 | #define UCHAR_MAX (SCHAR_MAX * 2 + 1) |
---|
3984 | # 51 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/limits.h" 3 4 |
---|
3985 | #undef CHAR_MIN |
---|
3986 | #define CHAR_MIN SCHAR_MIN |
---|
3987 | #undef CHAR_MAX |
---|
3988 | #define CHAR_MAX SCHAR_MAX |
---|
3989 | |
---|
3990 | |
---|
3991 | |
---|
3992 | #undef SHRT_MIN |
---|
3993 | #define SHRT_MIN (-SHRT_MAX - 1) |
---|
3994 | #undef SHRT_MAX |
---|
3995 | #define SHRT_MAX __SHRT_MAX__ |
---|
3996 | |
---|
3997 | |
---|
3998 | #undef USHRT_MAX |
---|
3999 | |
---|
4000 | |
---|
4001 | |
---|
4002 | #define USHRT_MAX (SHRT_MAX * 2 + 1) |
---|
4003 | |
---|
4004 | |
---|
4005 | |
---|
4006 | #undef INT_MIN |
---|
4007 | #define INT_MIN (-INT_MAX - 1) |
---|
4008 | #undef INT_MAX |
---|
4009 | #define INT_MAX __INT_MAX__ |
---|
4010 | |
---|
4011 | |
---|
4012 | #undef UINT_MAX |
---|
4013 | #define UINT_MAX (INT_MAX * 2U + 1U) |
---|
4014 | |
---|
4015 | |
---|
4016 | |
---|
4017 | #undef LONG_MIN |
---|
4018 | #define LONG_MIN (-LONG_MAX - 1L) |
---|
4019 | #undef LONG_MAX |
---|
4020 | #define LONG_MAX __LONG_MAX__ |
---|
4021 | |
---|
4022 | |
---|
4023 | #undef ULONG_MAX |
---|
4024 | #define ULONG_MAX (LONG_MAX * 2UL + 1UL) |
---|
4025 | # 106 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/limits.h" 3 4 |
---|
4026 | #undef LONG_LONG_MIN |
---|
4027 | #define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) |
---|
4028 | #undef LONG_LONG_MAX |
---|
4029 | #define LONG_LONG_MAX __LONG_LONG_MAX__ |
---|
4030 | |
---|
4031 | |
---|
4032 | #undef ULONG_LONG_MAX |
---|
4033 | #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) |
---|
4034 | # 11 "./include/c.h" 2 |
---|
4035 | # 1 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 1 3 4 |
---|
4036 | # 43 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 3 4 |
---|
4037 | #define _STDDEF_H |
---|
4038 | #define _STDDEF_H_ |
---|
4039 | |
---|
4040 | #define _ANSI_STDDEF_H |
---|
4041 | |
---|
4042 | #define __STDDEF_H__ |
---|
4043 | # 141 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 3 4 |
---|
4044 | #define _PTRDIFF_T |
---|
4045 | #define _T_PTRDIFF_ |
---|
4046 | #define _T_PTRDIFF |
---|
4047 | #define __PTRDIFF_T |
---|
4048 | #define _PTRDIFF_T_ |
---|
4049 | #define _BSD_PTRDIFF_T_ |
---|
4050 | #define ___int_ptrdiff_t_h |
---|
4051 | #define _GCC_PTRDIFF_T |
---|
4052 | |
---|
4053 | |
---|
4054 | |
---|
4055 | typedef int ptrdiff_t; |
---|
4056 | # 163 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 3 4 |
---|
4057 | #undef __need_ptrdiff_t |
---|
4058 | # 236 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 3 4 |
---|
4059 | #undef __need_size_t |
---|
4060 | # 265 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 3 4 |
---|
4061 | #define __wchar_t__ |
---|
4062 | #define __WCHAR_T__ |
---|
4063 | #define _WCHAR_T |
---|
4064 | #define _T_WCHAR_ |
---|
4065 | #define _T_WCHAR |
---|
4066 | #define __WCHAR_T |
---|
4067 | #define _WCHAR_T_ |
---|
4068 | #define _BSD_WCHAR_T_ |
---|
4069 | #define _WCHAR_T_DEFINED_ |
---|
4070 | #define _WCHAR_T_DEFINED |
---|
4071 | #define _WCHAR_T_H |
---|
4072 | #define ___int_wchar_t_h |
---|
4073 | #define __INT_WCHAR_T_H |
---|
4074 | #define _GCC_WCHAR_T |
---|
4075 | #define _WCHAR_T_DECLARED |
---|
4076 | # 292 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 3 4 |
---|
4077 | #undef _BSD_WCHAR_T_ |
---|
4078 | # 326 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 3 4 |
---|
4079 | typedef int wchar_t; |
---|
4080 | # 345 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 3 4 |
---|
4081 | #undef __need_wchar_t |
---|
4082 | # 398 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stddef.h" 3 4 |
---|
4083 | #undef NULL |
---|
4084 | |
---|
4085 | |
---|
4086 | |
---|
4087 | |
---|
4088 | #define NULL ((void *)0) |
---|
4089 | |
---|
4090 | |
---|
4091 | |
---|
4092 | |
---|
4093 | |
---|
4094 | #undef __need_NULL |
---|
4095 | |
---|
4096 | |
---|
4097 | |
---|
4098 | |
---|
4099 | #define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) |
---|
4100 | # 12 "./include/c.h" 2 |
---|
4101 | |
---|
4102 | # 1 "/opt/local/include/LegacySupport/stdio.h" 1 |
---|
4103 | # 20 "/opt/local/include/LegacySupport/stdio.h" |
---|
4104 | #define _MACPORTS_STDIO_H_ |
---|
4105 | |
---|
4106 | |
---|
4107 | |
---|
4108 | |
---|
4109 | |
---|
4110 | # 1 "/usr/include/stdio.h" 1 3 4 |
---|
4111 | # 62 "/usr/include/stdio.h" 3 4 |
---|
4112 | #define _STDIO_H_ |
---|
4113 | |
---|
4114 | |
---|
4115 | |
---|
4116 | |
---|
4117 | |
---|
4118 | #define _VA_LIST |
---|
4119 | |
---|
4120 | |
---|
4121 | typedef __darwin_va_list va_list; |
---|
4122 | # 84 "/usr/include/stdio.h" 3 4 |
---|
4123 | typedef __darwin_off_t fpos_t; |
---|
4124 | |
---|
4125 | |
---|
4126 | |
---|
4127 | |
---|
4128 | #define _FSTDIO |
---|
4129 | # 98 "/usr/include/stdio.h" 3 4 |
---|
4130 | struct __sbuf { |
---|
4131 | unsigned char *_base; |
---|
4132 | int _size; |
---|
4133 | }; |
---|
4134 | |
---|
4135 | |
---|
4136 | struct __sFILEX; |
---|
4137 | # 132 "/usr/include/stdio.h" 3 4 |
---|
4138 | typedef struct __sFILE { |
---|
4139 | unsigned char *_p; |
---|
4140 | int _r; |
---|
4141 | int _w; |
---|
4142 | short _flags; |
---|
4143 | short _file; |
---|
4144 | struct __sbuf _bf; |
---|
4145 | int _lbfsize; |
---|
4146 | |
---|
4147 | |
---|
4148 | void *_cookie; |
---|
4149 | int (*_close)(void *); |
---|
4150 | int (*_read) (void *, char *, int); |
---|
4151 | fpos_t (*_seek) (void *, fpos_t, int); |
---|
4152 | int (*_write)(void *, const char *, int); |
---|
4153 | |
---|
4154 | |
---|
4155 | struct __sbuf _ub; |
---|
4156 | struct __sFILEX *_extra; |
---|
4157 | int _ur; |
---|
4158 | |
---|
4159 | |
---|
4160 | unsigned char _ubuf[3]; |
---|
4161 | unsigned char _nbuf[1]; |
---|
4162 | |
---|
4163 | |
---|
4164 | struct __sbuf _lb; |
---|
4165 | |
---|
4166 | |
---|
4167 | int _blksize; |
---|
4168 | fpos_t _offset; |
---|
4169 | } FILE; |
---|
4170 | |
---|
4171 | |
---|
4172 | |
---|
4173 | extern FILE *__stdinp; |
---|
4174 | extern FILE *__stdoutp; |
---|
4175 | extern FILE *__stderrp; |
---|
4176 | |
---|
4177 | |
---|
4178 | |
---|
4179 | |
---|
4180 | |
---|
4181 | #define __SLBF 0x0001 |
---|
4182 | #define __SNBF 0x0002 |
---|
4183 | #define __SRD 0x0004 |
---|
4184 | #define __SWR 0x0008 |
---|
4185 | |
---|
4186 | #define __SRW 0x0010 |
---|
4187 | #define __SEOF 0x0020 |
---|
4188 | #define __SERR 0x0040 |
---|
4189 | #define __SMBF 0x0080 |
---|
4190 | #define __SAPP 0x0100 |
---|
4191 | #define __SSTR 0x0200 |
---|
4192 | #define __SOPT 0x0400 |
---|
4193 | #define __SNPT 0x0800 |
---|
4194 | #define __SOFF 0x1000 |
---|
4195 | #define __SMOD 0x2000 |
---|
4196 | #define __SALC 0x4000 |
---|
4197 | #define __SIGN 0x8000 |
---|
4198 | # 202 "/usr/include/stdio.h" 3 4 |
---|
4199 | #define _IOFBF 0 |
---|
4200 | #define _IOLBF 1 |
---|
4201 | #define _IONBF 2 |
---|
4202 | |
---|
4203 | #define BUFSIZ 1024 |
---|
4204 | #define EOF (-1) |
---|
4205 | |
---|
4206 | |
---|
4207 | |
---|
4208 | |
---|
4209 | |
---|
4210 | |
---|
4211 | |
---|
4212 | #define FOPEN_MAX 20 |
---|
4213 | #define FILENAME_MAX 1024 |
---|
4214 | |
---|
4215 | |
---|
4216 | |
---|
4217 | #define P_tmpdir "/var/tmp/" |
---|
4218 | |
---|
4219 | #define L_tmpnam 1024 |
---|
4220 | #define TMP_MAX 308915776 |
---|
4221 | # 236 "/usr/include/stdio.h" 3 4 |
---|
4222 | #define stdin __stdinp |
---|
4223 | #define stdout __stdoutp |
---|
4224 | #define stderr __stderrp |
---|
4225 | # 248 "/usr/include/stdio.h" 3 4 |
---|
4226 | |
---|
4227 | void clearerr(FILE *); |
---|
4228 | int fclose(FILE *); |
---|
4229 | int feof(FILE *); |
---|
4230 | int ferror(FILE *); |
---|
4231 | int fflush(FILE *); |
---|
4232 | int fgetc(FILE *); |
---|
4233 | int fgetpos(FILE * , fpos_t *); |
---|
4234 | char *fgets(char * , int, FILE *); |
---|
4235 | FILE *fopen(const char * , const char * ); |
---|
4236 | int fprintf(FILE * , const char * , ...) __asm("_" "fprintf" "$LDBL128"); |
---|
4237 | int fputc(int, FILE *); |
---|
4238 | int fputs(const char * , FILE * ); |
---|
4239 | size_t fread(void * , size_t, size_t, FILE * ); |
---|
4240 | FILE *freopen(const char * , const char * , |
---|
4241 | FILE * ) __asm("_" "freopen" "$UNIX2003"); |
---|
4242 | int fscanf(FILE * , const char * , ...) __asm("_" "fscanf" "$LDBL128"); |
---|
4243 | int fseek(FILE *, long, int); |
---|
4244 | int fsetpos(FILE *, const fpos_t *); |
---|
4245 | long ftell(FILE *); |
---|
4246 | size_t fwrite(const void * , size_t, size_t, FILE * ) __asm("_" "fwrite" "$UNIX2003"); |
---|
4247 | int getc(FILE *); |
---|
4248 | int getchar(void); |
---|
4249 | char *gets(char *); |
---|
4250 | |
---|
4251 | |
---|
4252 | |
---|
4253 | |
---|
4254 | void perror(const char *); |
---|
4255 | int printf(const char * , ...) __asm("_" "printf" "$LDBL128"); |
---|
4256 | int putc(int, FILE *); |
---|
4257 | int putchar(int); |
---|
4258 | int puts(const char *); |
---|
4259 | int remove(const char *); |
---|
4260 | int rename (const char *, const char *); |
---|
4261 | void rewind(FILE *); |
---|
4262 | int scanf(const char * , ...) __asm("_" "scanf" "$LDBL128"); |
---|
4263 | void setbuf(FILE * , char * ); |
---|
4264 | int setvbuf(FILE * , char * , int, size_t); |
---|
4265 | int sprintf(char * , const char * , ...) __asm("_" "sprintf" "$LDBL128"); |
---|
4266 | int sscanf(const char * , const char * , ...) __asm("_" "sscanf" "$LDBL128"); |
---|
4267 | FILE *tmpfile(void); |
---|
4268 | char *tmpnam(char *); |
---|
4269 | int ungetc(int, FILE *); |
---|
4270 | int vfprintf(FILE * , const char * , va_list) __asm("_" "vfprintf" "$LDBL128"); |
---|
4271 | int vprintf(const char * , va_list) __asm("_" "vprintf" "$LDBL128"); |
---|
4272 | int vsprintf(char * , const char * , va_list) __asm("_" "vsprintf" "$LDBL128"); |
---|
4273 | |
---|
4274 | |
---|
4275 | |
---|
4276 | |
---|
4277 | |
---|
4278 | |
---|
4279 | |
---|
4280 | |
---|
4281 | |
---|
4282 | |
---|
4283 | #define L_cuserid 9 |
---|
4284 | #define L_ctermid 1024 |
---|
4285 | |
---|
4286 | |
---|
4287 | char *ctermid(char *); |
---|
4288 | |
---|
4289 | |
---|
4290 | |
---|
4291 | FILE *fdopen(int, const char *); |
---|
4292 | |
---|
4293 | |
---|
4294 | |
---|
4295 | int fileno(FILE *); |
---|
4296 | void flockfile(FILE *); |
---|
4297 | |
---|
4298 | |
---|
4299 | |
---|
4300 | |
---|
4301 | |
---|
4302 | int fseeko(FILE *, fpos_t, int); |
---|
4303 | fpos_t ftello(FILE *); |
---|
4304 | int ftrylockfile(FILE *); |
---|
4305 | void funlockfile(FILE *); |
---|
4306 | int getc_unlocked(FILE *); |
---|
4307 | int getchar_unlocked(void); |
---|
4308 | |
---|
4309 | |
---|
4310 | |
---|
4311 | int pclose(FILE *); |
---|
4312 | FILE *popen(const char *, const char *); |
---|
4313 | int putc_unlocked(int, FILE *); |
---|
4314 | int putchar_unlocked(int); |
---|
4315 | |
---|
4316 | |
---|
4317 | |
---|
4318 | |
---|
4319 | |
---|
4320 | int snprintf(char * , size_t, const char * , ...) __asm("_" "snprintf" "$LDBL128"); |
---|
4321 | char *tempnam(const char *, const char *); |
---|
4322 | int vfscanf(FILE * , const char * , va_list) __asm("_" "vfscanf" "$LDBL128"); |
---|
4323 | int vscanf(const char * , va_list) __asm("_" "vscanf" "$LDBL128"); |
---|
4324 | int vsnprintf(char * , size_t, const char * , va_list) __asm("_" "vsnprintf" "$LDBL128"); |
---|
4325 | int vsscanf(const char * , const char * , va_list) __asm("_" "vsscanf" "$LDBL128"); |
---|
4326 | |
---|
4327 | |
---|
4328 | |
---|
4329 | |
---|
4330 | # 372 "/usr/include/stdio.h" 3 4 |
---|
4331 | |
---|
4332 | int __srget(FILE *); |
---|
4333 | int __svfscanf(FILE *, const char *, va_list) __asm("_" "__svfscanf" "$LDBL128"); |
---|
4334 | int __swbuf(int, FILE *); |
---|
4335 | |
---|
4336 | |
---|
4337 | |
---|
4338 | |
---|
4339 | |
---|
4340 | |
---|
4341 | #define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) |
---|
4342 | |
---|
4343 | static __inline int __sputc(int _c, FILE *_p) { |
---|
4344 | if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) |
---|
4345 | return (*_p->_p++ = _c); |
---|
4346 | else |
---|
4347 | return (__swbuf(_c, _p)); |
---|
4348 | } |
---|
4349 | # 404 "/usr/include/stdio.h" 3 4 |
---|
4350 | #define __sfeof(p) (((p)->_flags & __SEOF) != 0) |
---|
4351 | #define __sferror(p) (((p)->_flags & __SERR) != 0) |
---|
4352 | #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) |
---|
4353 | #define __sfileno(p) ((p)->_file) |
---|
4354 | # 418 "/usr/include/stdio.h" 3 4 |
---|
4355 | #define getc_unlocked(fp) __sgetc(fp) |
---|
4356 | #define putc_unlocked(x,fp) __sputc(x, fp) |
---|
4357 | |
---|
4358 | |
---|
4359 | #define getchar_unlocked() getc_unlocked(stdin) |
---|
4360 | #define putchar_unlocked(x) putc_unlocked(x, stdout) |
---|
4361 | |
---|
4362 | |
---|
4363 | |
---|
4364 | # 1 "/usr/include/xlocale/_stdio.h" 1 3 4 |
---|
4365 | # 25 "/usr/include/xlocale/_stdio.h" 3 4 |
---|
4366 | #define _XLOCALE__STDIO_H_ |
---|
4367 | |
---|
4368 | |
---|
4369 | int asprintf_l(char **, locale_t, const char *, ...) |
---|
4370 | __asm("_" "asprintf_l" "$LDBL128"); |
---|
4371 | int fprintf_l(FILE * , locale_t, const char * , ...) |
---|
4372 | __asm("_" "fprintf_l" "$LDBL128"); |
---|
4373 | int fscanf_l(FILE * , locale_t, const char * , ...) |
---|
4374 | __asm("_" "fscanf_l" "$LDBL128"); |
---|
4375 | int printf_l(locale_t, const char * , ...) |
---|
4376 | __asm("_" "printf_l" "$LDBL128"); |
---|
4377 | int scanf_l(locale_t, const char * , ...) |
---|
4378 | __asm("_" "scanf_l" "$LDBL128"); |
---|
4379 | int snprintf_l(char * , size_t, locale_t, |
---|
4380 | const char * , ...) __asm("_" "snprintf_l" "$LDBL128"); |
---|
4381 | int sprintf_l(char * , locale_t, const char * , ...) |
---|
4382 | __asm("_" "sprintf_l" "$LDBL128"); |
---|
4383 | int sscanf_l(const char * , locale_t, const char * , |
---|
4384 | ...) __asm("_" "sscanf_l" "$LDBL128"); |
---|
4385 | int vasprintf_l(char **, locale_t, const char *, va_list) |
---|
4386 | __asm("_" "vasprintf_l" "$LDBL128"); |
---|
4387 | int vfprintf_l(FILE * , locale_t, const char * , |
---|
4388 | va_list) __asm("_" "vfprintf_l" "$LDBL128"); |
---|
4389 | int vfscanf_l(FILE * , locale_t, const char * , |
---|
4390 | va_list) __asm("_" "vfscanf_l" "$LDBL128"); |
---|
4391 | int vprintf_l(locale_t, const char * , va_list) |
---|
4392 | __asm("_" "vprintf_l" "$LDBL128"); |
---|
4393 | int vscanf_l(locale_t, const char * , va_list) |
---|
4394 | __asm("_" "vscanf_l" "$LDBL128"); |
---|
4395 | int vsnprintf_l(char * , size_t, locale_t, |
---|
4396 | const char * , va_list) |
---|
4397 | __asm("_" "vsnprintf_l" "$LDBL128"); |
---|
4398 | int vsprintf_l(char * , locale_t, const char * , |
---|
4399 | va_list) __asm("_" "vsprintf_l" "$LDBL128"); |
---|
4400 | int vsscanf_l(const char * , locale_t, const char * , |
---|
4401 | va_list) __asm("_" "vsscanf_l" "$LDBL128"); |
---|
4402 | |
---|
4403 | # 428 "/usr/include/stdio.h" 2 3 4 |
---|
4404 | # 27 "/opt/local/include/LegacySupport/stdio.h" 2 |
---|
4405 | |
---|
4406 | |
---|
4407 | |
---|
4408 | |
---|
4409 | |
---|
4410 | extern int dprintf(int fd, const char * format, ...); |
---|
4411 | |
---|
4412 | # 54 "/opt/local/include/LegacySupport/stdio.h" |
---|
4413 | |
---|
4414 | extern ssize_t getdelim(char **lineptr, size_t *n, int delimiter, FILE *fp); |
---|
4415 | extern ssize_t getline (char **lineptr, size_t *n, FILE *stream); |
---|
4416 | |
---|
4417 | # 78 "/opt/local/include/LegacySupport/stdio.h" |
---|
4418 | |
---|
4419 | extern int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); |
---|
4420 | |
---|
4421 | # 14 "./include/c.h" 2 |
---|
4422 | |
---|
4423 | # 1 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdarg.h" 1 3 4 |
---|
4424 | # 34 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdarg.h" 3 4 |
---|
4425 | #define _STDARG_H |
---|
4426 | #define _ANSI_STDARG_H_ |
---|
4427 | |
---|
4428 | #undef __need___va_list |
---|
4429 | |
---|
4430 | |
---|
4431 | |
---|
4432 | |
---|
4433 | #define __GNUC_VA_LIST |
---|
4434 | typedef __builtin_va_list __gnuc_va_list; |
---|
4435 | |
---|
4436 | |
---|
4437 | |
---|
4438 | |
---|
4439 | |
---|
4440 | |
---|
4441 | #define va_start(v,l) __builtin_va_start(v,l) |
---|
4442 | #define va_end(v) __builtin_va_end(v) |
---|
4443 | #define va_arg(v,l) __builtin_va_arg(v,l) |
---|
4444 | |
---|
4445 | #define va_copy(d,s) __builtin_va_copy(d,s) |
---|
4446 | |
---|
4447 | #define __va_copy(d,s) __builtin_va_copy(d,s) |
---|
4448 | # 111 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdarg.h" 3 4 |
---|
4449 | #define _VA_LIST_ |
---|
4450 | |
---|
4451 | |
---|
4452 | |
---|
4453 | |
---|
4454 | |
---|
4455 | #define _VA_LIST_DEFINED |
---|
4456 | |
---|
4457 | |
---|
4458 | #define _VA_LIST_T_H |
---|
4459 | |
---|
4460 | |
---|
4461 | #define __va_list__ |
---|
4462 | # 16 "./include/c.h" 2 |
---|
4463 | # 1 "/opt/local/include/LegacySupport/stdlib.h" 1 |
---|
4464 | # 19 "/opt/local/include/LegacySupport/stdlib.h" |
---|
4465 | #define _MACPORTS_STDLIB_H_ |
---|
4466 | |
---|
4467 | |
---|
4468 | |
---|
4469 | |
---|
4470 | |
---|
4471 | # 1 "/usr/include/stdlib.h" 1 3 4 |
---|
4472 | # 59 "/usr/include/stdlib.h" 3 4 |
---|
4473 | #define _STDLIB_H_ |
---|
4474 | |
---|
4475 | |
---|
4476 | |
---|
4477 | |
---|
4478 | # 1 "/usr/include/sys/wait.h" 1 3 4 |
---|
4479 | # 59 "/usr/include/sys/wait.h" 3 4 |
---|
4480 | #define _SYS_WAIT_H_ |
---|
4481 | # 73 "/usr/include/sys/wait.h" 3 4 |
---|
4482 | typedef enum { |
---|
4483 | P_ALL, |
---|
4484 | P_PID, |
---|
4485 | P_PGID |
---|
4486 | } idtype_t; |
---|
4487 | # 122 "/usr/include/sys/wait.h" 3 4 |
---|
4488 | #define WNOHANG 0x01 |
---|
4489 | #define WUNTRACED 0x02 |
---|
4490 | |
---|
4491 | |
---|
4492 | |
---|
4493 | |
---|
4494 | |
---|
4495 | |
---|
4496 | #define _W_INT(i) (i) |
---|
4497 | |
---|
4498 | |
---|
4499 | |
---|
4500 | |
---|
4501 | |
---|
4502 | |
---|
4503 | #define _WSTATUS(x) (_W_INT(x) & 0177) |
---|
4504 | #define _WSTOPPED 0177 |
---|
4505 | |
---|
4506 | |
---|
4507 | |
---|
4508 | |
---|
4509 | |
---|
4510 | #define WEXITSTATUS(x) (_W_INT(x) >> 8) |
---|
4511 | #define WIFCONTINUED(x) (x == 0x13) |
---|
4512 | #define WIFEXITED(x) (_WSTATUS(x) == 0) |
---|
4513 | #define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0) |
---|
4514 | #define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED) |
---|
4515 | #define WSTOPSIG(x) (_W_INT(x) >> 8) |
---|
4516 | #define WTERMSIG(x) (_WSTATUS(x)) |
---|
4517 | # 164 "/usr/include/sys/wait.h" 3 4 |
---|
4518 | #define WEXITED 0x04 |
---|
4519 | |
---|
4520 | |
---|
4521 | #define WSTOPPED 0x08 |
---|
4522 | |
---|
4523 | #define WCONTINUED 0x10 |
---|
4524 | #define WNOWAIT 0x20 |
---|
4525 | # 240 "/usr/include/sys/wait.h" 3 4 |
---|
4526 | |
---|
4527 | pid_t wait(int *); |
---|
4528 | pid_t waitpid(pid_t, int *, int); |
---|
4529 | |
---|
4530 | int waitid(idtype_t, id_t, siginfo_t *, int); |
---|
4531 | |
---|
4532 | |
---|
4533 | |
---|
4534 | |
---|
4535 | |
---|
4536 | |
---|
4537 | # 65 "/usr/include/stdlib.h" 2 3 4 |
---|
4538 | # 96 "/usr/include/stdlib.h" 3 4 |
---|
4539 | typedef struct { |
---|
4540 | int quot; |
---|
4541 | int rem; |
---|
4542 | } div_t; |
---|
4543 | |
---|
4544 | typedef struct { |
---|
4545 | long quot; |
---|
4546 | long rem; |
---|
4547 | } ldiv_t; |
---|
4548 | |
---|
4549 | |
---|
4550 | typedef struct { |
---|
4551 | long long quot; |
---|
4552 | long long rem; |
---|
4553 | } lldiv_t; |
---|
4554 | |
---|
4555 | |
---|
4556 | |
---|
4557 | |
---|
4558 | |
---|
4559 | |
---|
4560 | #define EXIT_FAILURE 1 |
---|
4561 | #define EXIT_SUCCESS 0 |
---|
4562 | |
---|
4563 | #define RAND_MAX 0x7fffffff |
---|
4564 | |
---|
4565 | |
---|
4566 | |
---|
4567 | |
---|
4568 | |
---|
4569 | |
---|
4570 | |
---|
4571 | #define MB_CUR_MAX (___mb_cur_max()) |
---|
4572 | |
---|
4573 | #define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) |
---|
4574 | # 143 "/usr/include/stdlib.h" 3 4 |
---|
4575 | |
---|
4576 | void abort(void) __attribute__((__noreturn__)); |
---|
4577 | int abs(int) __attribute__((__const__)); |
---|
4578 | int atexit(void (*)(void)); |
---|
4579 | double atof(const char *); |
---|
4580 | int atoi(const char *); |
---|
4581 | long atol(const char *); |
---|
4582 | |
---|
4583 | long long |
---|
4584 | atoll(const char *); |
---|
4585 | |
---|
4586 | void *bsearch(const void *, const void *, size_t, |
---|
4587 | size_t, int (*)(const void *, const void *)); |
---|
4588 | void *calloc(size_t, size_t); |
---|
4589 | div_t div(int, int) __attribute__((__const__)); |
---|
4590 | void exit(int) __attribute__((__noreturn__)); |
---|
4591 | void free(void *); |
---|
4592 | char *getenv(const char *); |
---|
4593 | long labs(long) __attribute__((__const__)); |
---|
4594 | ldiv_t ldiv(long, long) __attribute__((__const__)); |
---|
4595 | |
---|
4596 | long long |
---|
4597 | llabs(long long); |
---|
4598 | lldiv_t lldiv(long long, long long); |
---|
4599 | |
---|
4600 | void *malloc(size_t); |
---|
4601 | int mblen(const char *, size_t); |
---|
4602 | size_t mbstowcs(wchar_t * , const char * , size_t); |
---|
4603 | int mbtowc(wchar_t * , const char * , size_t); |
---|
4604 | void qsort(void *, size_t, size_t, |
---|
4605 | int (*)(const void *, const void *)); |
---|
4606 | int rand(void); |
---|
4607 | void *realloc(void *, size_t); |
---|
4608 | void srand(unsigned); |
---|
4609 | double strtod(const char *, char **); |
---|
4610 | float strtof(const char *, char **); |
---|
4611 | long strtol(const char *, char **, int); |
---|
4612 | long double |
---|
4613 | strtold(const char *, char **) __asm("_" "strtold" "$LDBL128"); |
---|
4614 | |
---|
4615 | long long |
---|
4616 | strtoll(const char *, char **, int); |
---|
4617 | |
---|
4618 | unsigned long |
---|
4619 | strtoul(const char *, char **, int); |
---|
4620 | |
---|
4621 | unsigned long long |
---|
4622 | strtoull(const char *, char **, int); |
---|
4623 | |
---|
4624 | int system(const char *); |
---|
4625 | size_t wcstombs(char * , const wchar_t * , size_t); |
---|
4626 | int wctomb(char *, wchar_t); |
---|
4627 | |
---|
4628 | |
---|
4629 | void _Exit(int) __attribute__((__noreturn__)); |
---|
4630 | long a64l(const char *); |
---|
4631 | double drand48(void); |
---|
4632 | char *ecvt(double, int, int *, int *); |
---|
4633 | double erand48(unsigned short[3]); |
---|
4634 | char *fcvt(double, int, int *, int *); |
---|
4635 | char *gcvt(double, int, char *); |
---|
4636 | int getsubopt(char **, char * const *, char **); |
---|
4637 | int grantpt(int); |
---|
4638 | |
---|
4639 | char *initstate(unsigned, char *, size_t); |
---|
4640 | |
---|
4641 | |
---|
4642 | |
---|
4643 | long jrand48(unsigned short[3]); |
---|
4644 | char *l64a(long); |
---|
4645 | void lcong48(unsigned short[7]); |
---|
4646 | long lrand48(void); |
---|
4647 | char *mktemp(char *); |
---|
4648 | int mkstemp(char *); |
---|
4649 | long mrand48(void); |
---|
4650 | long nrand48(unsigned short[3]); |
---|
4651 | int posix_openpt(int); |
---|
4652 | char *ptsname(int); |
---|
4653 | int putenv(char *) __asm("_" "putenv" "$UNIX2003"); |
---|
4654 | long random(void); |
---|
4655 | char *realpath(const char *, char *resolved_path); |
---|
4656 | unsigned short |
---|
4657 | *seed48(unsigned short[3]); |
---|
4658 | int setenv(const char *, const char *, int) __asm("_" "setenv" "$UNIX2003"); |
---|
4659 | |
---|
4660 | void setkey(const char *) __asm("_" "setkey" "$UNIX2003"); |
---|
4661 | |
---|
4662 | |
---|
4663 | |
---|
4664 | char *setstate(const char *); |
---|
4665 | void srand48(long); |
---|
4666 | |
---|
4667 | void srandom(unsigned); |
---|
4668 | |
---|
4669 | |
---|
4670 | |
---|
4671 | int unlockpt(int); |
---|
4672 | |
---|
4673 | int unsetenv(const char *) __asm("_" "unsetenv" "$UNIX2003"); |
---|
4674 | # 309 "/usr/include/stdlib.h" 3 4 |
---|
4675 | |
---|
4676 | |
---|
4677 | |
---|
4678 | # 1 "/usr/include/xlocale/_stdlib.h" 1 3 4 |
---|
4679 | # 25 "/usr/include/xlocale/_stdlib.h" 3 4 |
---|
4680 | #define _XLOCALE__STDLIB_H_ |
---|
4681 | |
---|
4682 | |
---|
4683 | double atof_l(const char *, locale_t); |
---|
4684 | int atoi_l(const char *, locale_t); |
---|
4685 | long atol_l(const char *, locale_t); |
---|
4686 | |
---|
4687 | long long |
---|
4688 | atoll_l(const char *, locale_t); |
---|
4689 | |
---|
4690 | int mblen_l(const char *, size_t, locale_t); |
---|
4691 | size_t mbstowcs_l(wchar_t * , const char * , size_t, |
---|
4692 | locale_t); |
---|
4693 | int mbtowc_l(wchar_t * , const char * , size_t, |
---|
4694 | locale_t); |
---|
4695 | double strtod_l(const char *, char **, locale_t); |
---|
4696 | float strtof_l(const char *, char **, locale_t); |
---|
4697 | long strtol_l(const char *, char **, int, locale_t); |
---|
4698 | long double |
---|
4699 | strtold_l(const char *, char **, locale_t) |
---|
4700 | __asm("_" "strtold_l" "$LDBL128"); |
---|
4701 | long long |
---|
4702 | strtoll_l(const char *, char **, int, locale_t); |
---|
4703 | |
---|
4704 | long long |
---|
4705 | strtoq_l(const char *, char **, int, locale_t); |
---|
4706 | |
---|
4707 | unsigned long |
---|
4708 | strtoul_l(const char *, char **, int, locale_t); |
---|
4709 | unsigned long long |
---|
4710 | strtoull_l(const char *, char **, int, locale_t); |
---|
4711 | |
---|
4712 | unsigned long long |
---|
4713 | strtouq_l(const char *, char **, int, locale_t); |
---|
4714 | |
---|
4715 | size_t wcstombs_l(char * , const wchar_t * , size_t, |
---|
4716 | locale_t); |
---|
4717 | int wctomb_l(char *, wchar_t, locale_t); |
---|
4718 | |
---|
4719 | # 313 "/usr/include/stdlib.h" 2 3 4 |
---|
4720 | # 26 "/opt/local/include/LegacySupport/stdlib.h" 2 |
---|
4721 | # 44 "/opt/local/include/LegacySupport/stdlib.h" |
---|
4722 | |
---|
4723 | extern int posix_memalign(void **memptr, size_t alignment, size_t size); |
---|
4724 | |
---|
4725 | # 66 "/opt/local/include/LegacySupport/stdlib.h" |
---|
4726 | |
---|
4727 | extern uint32_t arc4random_uniform( uint32_t upper_bound ); |
---|
4728 | |
---|
4729 | |
---|
4730 | |
---|
4731 | |
---|
4732 | |
---|
4733 | |
---|
4734 | extern void arc4random_buf( void* buf, size_t n ); |
---|
4735 | |
---|
4736 | # 17 "./include/c.h" 2 |
---|
4737 | # 1 "/opt/local/include/LegacySupport/string.h" 1 |
---|
4738 | # 19 "/opt/local/include/LegacySupport/string.h" |
---|
4739 | #define _MACPORTS_STRING_H_ |
---|
4740 | |
---|
4741 | |
---|
4742 | |
---|
4743 | |
---|
4744 | |
---|
4745 | # 1 "/usr/include/string.h" 1 3 4 |
---|
4746 | # 59 "/usr/include/string.h" 3 4 |
---|
4747 | #define _STRING_H_ |
---|
4748 | # 80 "/usr/include/string.h" 3 4 |
---|
4749 | |
---|
4750 | void *memchr(const void *, int, size_t); |
---|
4751 | int memcmp(const void *, const void *, size_t); |
---|
4752 | void *memcpy(void *, const void *, size_t); |
---|
4753 | void *memmove(void *, const void *, size_t); |
---|
4754 | void *memset(void *, int, size_t); |
---|
4755 | |
---|
4756 | |
---|
4757 | |
---|
4758 | |
---|
4759 | char *strcat(char *, const char *); |
---|
4760 | char *strchr(const char *, int); |
---|
4761 | int strcmp(const char *, const char *); |
---|
4762 | int strcoll(const char *, const char *); |
---|
4763 | char *strcpy(char *, const char *); |
---|
4764 | size_t strcspn(const char *, const char *); |
---|
4765 | char *strerror(int); |
---|
4766 | int strerror_r(int, char *, size_t); |
---|
4767 | size_t strlen(const char *); |
---|
4768 | char *strncat(char *, const char *, size_t); |
---|
4769 | int strncmp(const char *, const char *, size_t); |
---|
4770 | char *strncpy(char *, const char *, size_t); |
---|
4771 | |
---|
4772 | |
---|
4773 | |
---|
4774 | char *strpbrk(const char *, const char *); |
---|
4775 | char *strrchr(const char *, int); |
---|
4776 | size_t strspn(const char *, const char *); |
---|
4777 | char *strstr(const char *, const char *); |
---|
4778 | char *strtok(char *, const char *); |
---|
4779 | size_t strxfrm(char *, const char *, size_t); |
---|
4780 | |
---|
4781 | |
---|
4782 | |
---|
4783 | void *memccpy(void *, const void *, int, size_t); |
---|
4784 | char *strtok_r(char *, const char *, char **); |
---|
4785 | char *strdup(const char *); |
---|
4786 | # 134 "/usr/include/string.h" 3 4 |
---|
4787 | |
---|
4788 | |
---|
4789 | |
---|
4790 | # 1 "/usr/include/xlocale/_string.h" 1 3 4 |
---|
4791 | # 25 "/usr/include/xlocale/_string.h" 3 4 |
---|
4792 | #define _XLOCALE__STRING_H_ |
---|
4793 | |
---|
4794 | |
---|
4795 | int strcoll_l(const char *, const char *, locale_t); |
---|
4796 | size_t strxfrm_l(char *, const char *, size_t, locale_t); |
---|
4797 | int strcasecmp_l(const char *, const char *, locale_t); |
---|
4798 | char *strcasestr_l(const char *, const char *, locale_t); |
---|
4799 | int strncasecmp_l(const char *, const char *, size_t, locale_t); |
---|
4800 | |
---|
4801 | # 138 "/usr/include/string.h" 2 3 4 |
---|
4802 | # 26 "/opt/local/include/LegacySupport/string.h" 2 |
---|
4803 | |
---|
4804 | |
---|
4805 | |
---|
4806 | |
---|
4807 | extern size_t strnlen(const char *s, size_t maxlen); |
---|
4808 | |
---|
4809 | |
---|
4810 | |
---|
4811 | |
---|
4812 | |
---|
4813 | |
---|
4814 | extern char *strndup(const char *s, size_t n); |
---|
4815 | |
---|
4816 | |
---|
4817 | |
---|
4818 | |
---|
4819 | |
---|
4820 | |
---|
4821 | extern void * |
---|
4822 | memmem(const void *l, size_t l_len, const void *s, size_t s_len); |
---|
4823 | |
---|
4824 | # 18 "./include/c.h" 2 |
---|
4825 | # 1 "/usr/include/errno.h" 1 3 4 |
---|
4826 | # 23 "/usr/include/errno.h" 3 4 |
---|
4827 | # 1 "/usr/include/sys/errno.h" 1 3 4 |
---|
4828 | # 64 "/usr/include/sys/errno.h" 3 4 |
---|
4829 | #define _SYS_ERRNO_H_ |
---|
4830 | |
---|
4831 | |
---|
4832 | |
---|
4833 | |
---|
4834 | extern int * __error(void); |
---|
4835 | #define errno (*__error()) |
---|
4836 | |
---|
4837 | |
---|
4838 | |
---|
4839 | |
---|
4840 | |
---|
4841 | |
---|
4842 | |
---|
4843 | #define EPERM 1 |
---|
4844 | #define ENOENT 2 |
---|
4845 | #define ESRCH 3 |
---|
4846 | #define EINTR 4 |
---|
4847 | #define EIO 5 |
---|
4848 | #define ENXIO 6 |
---|
4849 | #define E2BIG 7 |
---|
4850 | #define ENOEXEC 8 |
---|
4851 | #define EBADF 9 |
---|
4852 | #define ECHILD 10 |
---|
4853 | #define EDEADLK 11 |
---|
4854 | |
---|
4855 | #define ENOMEM 12 |
---|
4856 | #define EACCES 13 |
---|
4857 | #define EFAULT 14 |
---|
4858 | |
---|
4859 | |
---|
4860 | |
---|
4861 | #define EBUSY 16 |
---|
4862 | #define EEXIST 17 |
---|
4863 | #define EXDEV 18 |
---|
4864 | #define ENODEV 19 |
---|
4865 | #define ENOTDIR 20 |
---|
4866 | #define EISDIR 21 |
---|
4867 | #define EINVAL 22 |
---|
4868 | #define ENFILE 23 |
---|
4869 | #define EMFILE 24 |
---|
4870 | #define ENOTTY 25 |
---|
4871 | #define ETXTBSY 26 |
---|
4872 | #define EFBIG 27 |
---|
4873 | #define ENOSPC 28 |
---|
4874 | #define ESPIPE 29 |
---|
4875 | #define EROFS 30 |
---|
4876 | #define EMLINK 31 |
---|
4877 | #define EPIPE 32 |
---|
4878 | |
---|
4879 | |
---|
4880 | #define EDOM 33 |
---|
4881 | #define ERANGE 34 |
---|
4882 | |
---|
4883 | |
---|
4884 | #define EAGAIN 35 |
---|
4885 | #define EWOULDBLOCK EAGAIN |
---|
4886 | #define EINPROGRESS 36 |
---|
4887 | #define EALREADY 37 |
---|
4888 | |
---|
4889 | |
---|
4890 | #define ENOTSOCK 38 |
---|
4891 | #define EDESTADDRREQ 39 |
---|
4892 | #define EMSGSIZE 40 |
---|
4893 | #define EPROTOTYPE 41 |
---|
4894 | #define ENOPROTOOPT 42 |
---|
4895 | #define EPROTONOSUPPORT 43 |
---|
4896 | |
---|
4897 | |
---|
4898 | |
---|
4899 | #define ENOTSUP 45 |
---|
4900 | # 150 "/usr/include/sys/errno.h" 3 4 |
---|
4901 | #define EAFNOSUPPORT 47 |
---|
4902 | #define EADDRINUSE 48 |
---|
4903 | #define EADDRNOTAVAIL 49 |
---|
4904 | |
---|
4905 | |
---|
4906 | #define ENETDOWN 50 |
---|
4907 | #define ENETUNREACH 51 |
---|
4908 | #define ENETRESET 52 |
---|
4909 | #define ECONNABORTED 53 |
---|
4910 | #define ECONNRESET 54 |
---|
4911 | #define ENOBUFS 55 |
---|
4912 | #define EISCONN 56 |
---|
4913 | #define ENOTCONN 57 |
---|
4914 | |
---|
4915 | |
---|
4916 | |
---|
4917 | |
---|
4918 | #define ETIMEDOUT 60 |
---|
4919 | #define ECONNREFUSED 61 |
---|
4920 | |
---|
4921 | #define ELOOP 62 |
---|
4922 | #define ENAMETOOLONG 63 |
---|
4923 | |
---|
4924 | |
---|
4925 | |
---|
4926 | |
---|
4927 | |
---|
4928 | #define EHOSTUNREACH 65 |
---|
4929 | #define ENOTEMPTY 66 |
---|
4930 | |
---|
4931 | |
---|
4932 | |
---|
4933 | |
---|
4934 | |
---|
4935 | |
---|
4936 | #define EDQUOT 69 |
---|
4937 | |
---|
4938 | |
---|
4939 | #define ESTALE 70 |
---|
4940 | # 198 "/usr/include/sys/errno.h" 3 4 |
---|
4941 | #define ENOLCK 77 |
---|
4942 | #define ENOSYS 78 |
---|
4943 | # 211 "/usr/include/sys/errno.h" 3 4 |
---|
4944 | #define EOVERFLOW 84 |
---|
4945 | # 221 "/usr/include/sys/errno.h" 3 4 |
---|
4946 | #define ECANCELED 89 |
---|
4947 | |
---|
4948 | #define EIDRM 90 |
---|
4949 | #define ENOMSG 91 |
---|
4950 | #define EILSEQ 92 |
---|
4951 | |
---|
4952 | |
---|
4953 | |
---|
4954 | |
---|
4955 | #define EBADMSG 94 |
---|
4956 | #define EMULTIHOP 95 |
---|
4957 | #define ENODATA 96 |
---|
4958 | #define ENOLINK 97 |
---|
4959 | #define ENOSR 98 |
---|
4960 | #define ENOSTR 99 |
---|
4961 | #define EPROTO 100 |
---|
4962 | #define ETIME 101 |
---|
4963 | |
---|
4964 | |
---|
4965 | |
---|
4966 | #define EOPNOTSUPP 102 |
---|
4967 | # 24 "/usr/include/errno.h" 2 3 4 |
---|
4968 | # 19 "./include/c.h" 2 |
---|
4969 | # 1 "/opt/local/include/LegacySupport/sys/types.h" 1 |
---|
4970 | # 20 "./include/c.h" 2 |
---|
4971 | # 1 "/usr/include/grp.h" 1 3 4 |
---|
4972 | # 64 "/usr/include/grp.h" 3 4 |
---|
4973 | #define _GRP_H_ |
---|
4974 | # 87 "/usr/include/grp.h" 3 4 |
---|
4975 | struct group { |
---|
4976 | char *gr_name; |
---|
4977 | char *gr_passwd; |
---|
4978 | gid_t gr_gid; |
---|
4979 | char **gr_mem; |
---|
4980 | }; |
---|
4981 | |
---|
4982 | |
---|
4983 | |
---|
4984 | |
---|
4985 | |
---|
4986 | struct group *getgrgid(gid_t); |
---|
4987 | struct group *getgrnam(const char *); |
---|
4988 | |
---|
4989 | int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); |
---|
4990 | int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); |
---|
4991 | |
---|
4992 | struct group *getgrent(void); |
---|
4993 | int setgrent(void); |
---|
4994 | void endgrent(void); |
---|
4995 | # 115 "/usr/include/grp.h" 3 4 |
---|
4996 | |
---|
4997 | # 21 "./include/c.h" 2 |
---|
4998 | |
---|
4999 | # 1 "/usr/include/assert.h" 1 3 4 |
---|
5000 | # 52 "/usr/include/assert.h" 3 4 |
---|
5001 | #undef assert |
---|
5002 | #undef __assert |
---|
5003 | # 75 "/usr/include/assert.h" 3 4 |
---|
5004 | |
---|
5005 | void __assert_rtn(const char *, const char *, int, const char *) __attribute__((__noreturn__)); |
---|
5006 | void __eprintf(const char *, const char *, unsigned, const char *) __attribute__((__noreturn__)); |
---|
5007 | |
---|
5008 | |
---|
5009 | #define __assert(e,file,line) (__eprintf ("%s:%u: failed assertion `%s'\n", file, line, e), 0) |
---|
5010 | |
---|
5011 | |
---|
5012 | |
---|
5013 | #define assert(e) (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) |
---|
5014 | # 23 "./include/c.h" 2 |
---|
5015 | |
---|
5016 | |
---|
5017 | # 1 "/usr/include/err.h" 1 3 4 |
---|
5018 | # 59 "/usr/include/err.h" 3 4 |
---|
5019 | #define _ERR_H_ |
---|
5020 | # 71 "/usr/include/err.h" 3 4 |
---|
5021 | |
---|
5022 | void err(int, const char *, ...) __asm("_" "err" "$LDBL128") __attribute__((__noreturn__)); |
---|
5023 | void verr(int, const char *, __darwin_va_list) __asm("_" "verr" "$LDBL128") __attribute__((__noreturn__)); |
---|
5024 | void errc(int, int, const char *, ...) __asm("_" "errc" "$LDBL128") __attribute__((__noreturn__)); |
---|
5025 | void verrc(int, int, const char *, __darwin_va_list) __asm("_" "verrc" "$LDBL128") __attribute__((__noreturn__)); |
---|
5026 | void errx(int, const char *, ...) __asm("_" "errx" "$LDBL128") __attribute__((__noreturn__)); |
---|
5027 | void verrx(int, const char *, __darwin_va_list) __asm("_" "verrx" "$LDBL128") __attribute__((__noreturn__)); |
---|
5028 | void warn(const char *, ...) __asm("_" "warn" "$LDBL128"); |
---|
5029 | void vwarn(const char *, __darwin_va_list) __asm("_" "vwarn" "$LDBL128"); |
---|
5030 | void warnc(int, const char *, ...) __asm("_" "warnc" "$LDBL128"); |
---|
5031 | void vwarnc(int, const char *, __darwin_va_list) __asm("_" "vwarnc" "$LDBL128"); |
---|
5032 | void warnx(const char *, ...) __asm("_" "warnx" "$LDBL128"); |
---|
5033 | void vwarnx(const char *, __darwin_va_list) __asm("_" "vwarnx" "$LDBL128"); |
---|
5034 | void err_set_file(void *); |
---|
5035 | void err_set_exit(void (*)(int)); |
---|
5036 | |
---|
5037 | |
---|
5038 | # 26 "./include/c.h" 2 |
---|
5039 | |
---|
5040 | |
---|
5041 | |
---|
5042 | |
---|
5043 | |
---|
5044 | |
---|
5045 | |
---|
5046 | #define LOGIN_NAME_MAX 256 |
---|
5047 | # 46 "./include/c.h" |
---|
5048 | #define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) |
---|
5049 | # 56 "./include/c.h" |
---|
5050 | #define __must_be_array(a) UL_BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0]))) |
---|
5051 | |
---|
5052 | |
---|
5053 | #define ignore_result(x) __extension__ ({ __typeof__(x) __dummy __attribute__((__unused__)) = (x); (void) __dummy; }) |
---|
5054 | # 75 "./include/c.h" |
---|
5055 | #define restrict __restrict |
---|
5056 | # 89 "./include/c.h" |
---|
5057 | #define __has_attribute(x) 0 |
---|
5058 | |
---|
5059 | |
---|
5060 | |
---|
5061 | #define __has_feature(x) 0 |
---|
5062 | # 103 "./include/c.h" |
---|
5063 | #define __ul_alloc_size(s) |
---|
5064 | |
---|
5065 | |
---|
5066 | |
---|
5067 | |
---|
5068 | |
---|
5069 | |
---|
5070 | |
---|
5071 | #define __ul_calloc_size(n,s) |
---|
5072 | |
---|
5073 | |
---|
5074 | |
---|
5075 | |
---|
5076 | |
---|
5077 | |
---|
5078 | #define __ul_returns_nonnull |
---|
5079 | # 127 "./include/c.h" |
---|
5080 | #define UL_BUILD_BUG_ON_ZERO(e) __extension__ (sizeof(struct { int:-!!(e); })) |
---|
5081 | #define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); })) |
---|
5082 | |
---|
5083 | |
---|
5084 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
---|
5085 | |
---|
5086 | |
---|
5087 | |
---|
5088 | |
---|
5089 | |
---|
5090 | |
---|
5091 | |
---|
5092 | #define TRUE 1 |
---|
5093 | |
---|
5094 | |
---|
5095 | |
---|
5096 | #define FALSE 0 |
---|
5097 | |
---|
5098 | |
---|
5099 | |
---|
5100 | #define min(x,y) __extension__ ({ __typeof__(x) _min1 = (x); __typeof__(y) _min2 = (y); (void) (&_min1 == &_min2); _min1 < _min2 ? _min1 : _min2; }) |
---|
5101 | |
---|
5102 | |
---|
5103 | |
---|
5104 | |
---|
5105 | |
---|
5106 | |
---|
5107 | |
---|
5108 | #define max(x,y) __extension__ ({ __typeof__(x) _max1 = (x); __typeof__(y) _max2 = (y); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; }) |
---|
5109 | |
---|
5110 | |
---|
5111 | |
---|
5112 | |
---|
5113 | |
---|
5114 | |
---|
5115 | |
---|
5116 | #define abs_diff(x,y) __extension__ ({ __typeof__(x) _a = (x); __typeof__(y) _b = (y); (void) (&_a == &_b); _a > _b ? _a - _b : _b - _a; }) |
---|
5117 | |
---|
5118 | |
---|
5119 | |
---|
5120 | |
---|
5121 | |
---|
5122 | |
---|
5123 | |
---|
5124 | #define cmp_numbers(x,y) __extension__ ({ __typeof__(x) _a = (x); __typeof__(y) _b = (y); (void) (&_a == &_b); _a == _b ? 0 : _a > _b ? 1 : -1; }) |
---|
5125 | # 180 "./include/c.h" |
---|
5126 | #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)) |
---|
5127 | # 191 "./include/c.h" |
---|
5128 | #define cmp_stat_mtime(_a,_b,CMP) ((_a)->st_mtime CMP (_b)->st_mtime) |
---|
5129 | # 207 "./include/c.h" |
---|
5130 | #define container_of(ptr,type,member) __extension__ ({ const __typeof__( ((type *)0)->member ) *__mptr = (ptr); (type *)( (char *)__mptr - offsetof(type,member) );}) |
---|
5131 | |
---|
5132 | |
---|
5133 | |
---|
5134 | |
---|
5135 | |
---|
5136 | |
---|
5137 | extern char *__progname; |
---|
5138 | #define program_invocation_short_name __progname |
---|
5139 | # 287 "./include/c.h" |
---|
5140 | #define errtryhelp(eval) __extension__ ({ fprintf(stderr, _("Try '%s --help' for more information.\n"), program_invocation_short_name); exit(eval); }) |
---|
5141 | |
---|
5142 | |
---|
5143 | |
---|
5144 | |
---|
5145 | |
---|
5146 | |
---|
5147 | #define EX_EXEC_FAILED 126 |
---|
5148 | #define EX_EXEC_ENOENT 127 |
---|
5149 | #define errexec(name) err(errno == ENOENT ? EX_EXEC_ENOENT : EX_EXEC_FAILED, _("failed to execute %s"), name) |
---|
5150 | |
---|
5151 | |
---|
5152 | |
---|
5153 | static inline __attribute__((const)) int is_power_of_2(unsigned long num) |
---|
5154 | { |
---|
5155 | return (num != 0 && ((num & (num - 1)) == 0)); |
---|
5156 | } |
---|
5157 | |
---|
5158 | |
---|
5159 | typedef int64_t loff_t; |
---|
5160 | # 321 "./include/c.h" |
---|
5161 | # 1 "/usr/include/fcntl.h" 1 3 4 |
---|
5162 | # 322 "./include/c.h" 2 |
---|
5163 | |
---|
5164 | |
---|
5165 | #define UL_CLOEXECSTR "e" |
---|
5166 | # 341 "./include/c.h" |
---|
5167 | #define AI_ADDRCONFIG 0x0020 |
---|
5168 | |
---|
5169 | |
---|
5170 | |
---|
5171 | #define IUTF8 0040000 |
---|
5172 | |
---|
5173 | |
---|
5174 | |
---|
5175 | |
---|
5176 | |
---|
5177 | static inline size_t get_hostname_max(void) |
---|
5178 | { |
---|
5179 | long len = sysconf(72); |
---|
5180 | |
---|
5181 | if (0 < len) |
---|
5182 | return len; |
---|
5183 | |
---|
5184 | |
---|
5185 | |
---|
5186 | |
---|
5187 | |
---|
5188 | |
---|
5189 | return 64; |
---|
5190 | } |
---|
5191 | |
---|
5192 | |
---|
5193 | static inline int drop_permissions(void) |
---|
5194 | { |
---|
5195 | (*__error()) = 0; |
---|
5196 | |
---|
5197 | |
---|
5198 | if (setgid(getgid()) < 0) |
---|
5199 | goto fail; |
---|
5200 | |
---|
5201 | |
---|
5202 | if (setuid(getuid()) < 0) |
---|
5203 | goto fail; |
---|
5204 | |
---|
5205 | return 0; |
---|
5206 | fail: |
---|
5207 | return (*__error()) ? -(*__error()) : -1; |
---|
5208 | } |
---|
5209 | |
---|
5210 | |
---|
5211 | |
---|
5212 | |
---|
5213 | |
---|
5214 | |
---|
5215 | # 1 "/opt/local/include/LegacySupport/time.h" 1 |
---|
5216 | # 19 "/opt/local/include/LegacySupport/time.h" |
---|
5217 | #define _MACPORTS_TIME_H_ |
---|
5218 | |
---|
5219 | |
---|
5220 | |
---|
5221 | |
---|
5222 | |
---|
5223 | # 1 "/usr/include/time.h" 1 3 4 |
---|
5224 | # 64 "/usr/include/time.h" 3 4 |
---|
5225 | #define _TIME_H_ |
---|
5226 | # 95 "/usr/include/time.h" 3 4 |
---|
5227 | struct tm { |
---|
5228 | int tm_sec; |
---|
5229 | int tm_min; |
---|
5230 | int tm_hour; |
---|
5231 | int tm_mday; |
---|
5232 | int tm_mon; |
---|
5233 | int tm_year; |
---|
5234 | int tm_wday; |
---|
5235 | int tm_yday; |
---|
5236 | int tm_isdst; |
---|
5237 | long tm_gmtoff; |
---|
5238 | char *tm_zone; |
---|
5239 | }; |
---|
5240 | |
---|
5241 | # 1 "/usr/include/machine/_limits.h" 1 3 4 |
---|
5242 | # 23 "/usr/include/machine/_limits.h" 3 4 |
---|
5243 | #define _BSD_MACHINE__LIMITS_H_ |
---|
5244 | # 110 "/usr/include/time.h" 2 3 4 |
---|
5245 | |
---|
5246 | #define CLOCKS_PER_SEC (__DARWIN_CLK_TCK) |
---|
5247 | |
---|
5248 | |
---|
5249 | |
---|
5250 | |
---|
5251 | extern char *tzname[]; |
---|
5252 | |
---|
5253 | |
---|
5254 | extern int getdate_err; |
---|
5255 | |
---|
5256 | extern long timezone __asm("_" "timezone" "$UNIX2003"); |
---|
5257 | |
---|
5258 | extern int daylight; |
---|
5259 | |
---|
5260 | |
---|
5261 | char *asctime(const struct tm *); |
---|
5262 | clock_t clock(void); |
---|
5263 | char *ctime(const time_t *); |
---|
5264 | double difftime(time_t, time_t); |
---|
5265 | struct tm *getdate(const char *); |
---|
5266 | struct tm *gmtime(const time_t *); |
---|
5267 | struct tm *localtime(const time_t *); |
---|
5268 | time_t mktime(struct tm *); |
---|
5269 | size_t strftime(char * , size_t, const char * , const struct tm * ) __asm("_" "strftime" "$UNIX2003"); |
---|
5270 | char *strptime(const char * , const char * , struct tm * ); |
---|
5271 | time_t time(time_t *); |
---|
5272 | |
---|
5273 | |
---|
5274 | void tzset(void); |
---|
5275 | # 158 "/usr/include/time.h" 3 4 |
---|
5276 | int nanosleep(const struct timespec *, struct timespec *) __asm("_" "nanosleep" "$UNIX2003"); |
---|
5277 | |
---|
5278 | |
---|
5279 | |
---|
5280 | |
---|
5281 | # 1 "/usr/include/xlocale/_time.h" 1 3 4 |
---|
5282 | # 25 "/usr/include/xlocale/_time.h" 3 4 |
---|
5283 | #define _XLOCALE__TIME_H_ |
---|
5284 | |
---|
5285 | |
---|
5286 | size_t strftime_l(char * , size_t, const char * , |
---|
5287 | const struct tm * , locale_t) |
---|
5288 | __asm("_" "strftime_l" "$UNIX2003"); |
---|
5289 | char *strptime_l(const char * , const char * , |
---|
5290 | struct tm * , locale_t); |
---|
5291 | |
---|
5292 | # 164 "/usr/include/time.h" 2 3 4 |
---|
5293 | # 26 "/opt/local/include/LegacySupport/time.h" 2 |
---|
5294 | |
---|
5295 | |
---|
5296 | |
---|
5297 | |
---|
5298 | |
---|
5299 | |
---|
5300 | |
---|
5301 | |
---|
5302 | char *asctime_r(const struct tm *, char *); |
---|
5303 | char *ctime_r(const time_t *, char *); |
---|
5304 | struct tm *gmtime_r(const time_t *, struct tm *); |
---|
5305 | struct tm *localtime_r(const time_t *, struct tm *); |
---|
5306 | |
---|
5307 | |
---|
5308 | # 49 "/opt/local/include/LegacySupport/time.h" |
---|
5309 | #define CLOCK_REALTIME 0 |
---|
5310 | #define CLOCK_MONOTONIC 6 |
---|
5311 | typedef int clockid_t; |
---|
5312 | |
---|
5313 | |
---|
5314 | |
---|
5315 | extern int clock_gettime( clockid_t clk_id, struct timespec *ts ); |
---|
5316 | extern int clock_getres ( clockid_t clk_id, struct timespec *ts ); |
---|
5317 | |
---|
5318 | |
---|
5319 | # 390 "./include/c.h" 2 |
---|
5320 | |
---|
5321 | static inline int xusleep(useconds_t usec) |
---|
5322 | { |
---|
5323 | |
---|
5324 | struct timespec waittime = { |
---|
5325 | .tv_sec = usec / 1000000L, |
---|
5326 | .tv_nsec = (usec % 1000000L) * 1000 |
---|
5327 | }; |
---|
5328 | return nanosleep(&waittime, ((void *)0)); |
---|
5329 | |
---|
5330 | |
---|
5331 | |
---|
5332 | |
---|
5333 | |
---|
5334 | } |
---|
5335 | |
---|
5336 | |
---|
5337 | |
---|
5338 | |
---|
5339 | |
---|
5340 | #define USAGE_HEADER _("\nUsage:\n") |
---|
5341 | #define USAGE_OPTIONS _("\nOptions:\n") |
---|
5342 | #define USAGE_FUNCTIONS _("\nFunctions:\n") |
---|
5343 | #define USAGE_COMMANDS _("\nCommands:\n") |
---|
5344 | #define USAGE_ARGUMENTS _("\nArguments:\n") |
---|
5345 | #define USAGE_COLUMNS _("\nAvailable output columns:\n") |
---|
5346 | #define USAGE_SEPARATOR "\n" |
---|
5347 | |
---|
5348 | #define USAGE_OPTSTR_HELP _("display this help") |
---|
5349 | #define USAGE_OPTSTR_VERSION _("display version") |
---|
5350 | |
---|
5351 | #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 |
---|
5352 | |
---|
5353 | |
---|
5354 | |
---|
5355 | |
---|
5356 | |
---|
5357 | #define USAGE_ARG_SEPARATOR "\n" |
---|
5358 | #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 |
---|
5359 | |
---|
5360 | |
---|
5361 | |
---|
5362 | #define USAGE_MAN_TAIL(_man) _("\nFor more details see %s.\n"), _man |
---|
5363 | |
---|
5364 | #define UTIL_LINUX_VERSION _("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING |
---|
5365 | |
---|
5366 | #define print_version(eval) __extension__ ({ printf(UTIL_LINUX_VERSION); exit(eval); }) |
---|
5367 | # 445 "./include/c.h" |
---|
5368 | #define SEEK_DATA 3 |
---|
5369 | |
---|
5370 | |
---|
5371 | #define SEEK_HOLE 4 |
---|
5372 | # 457 "./include/c.h" |
---|
5373 | #define stringify_value(s) stringify(s) |
---|
5374 | #define stringify(s) #s |
---|
5375 | # 473 "./include/c.h" |
---|
5376 | #define HAS_FEATURE_ADDRESS_SANITIZER 0 |
---|
5377 | # 487 "./include/c.h" |
---|
5378 | #define UL_ASAN_BLACKLIST |
---|
5379 | |
---|
5380 | |
---|
5381 | |
---|
5382 | |
---|
5383 | |
---|
5384 | |
---|
5385 | |
---|
5386 | #define UL_GETPW_BUFSIZ (16 * 1024) |
---|
5387 | # 51 "misc-utils/hardlink.c" 2 |
---|
5388 | # 1 "./include/xalloc.h" 1 |
---|
5389 | # 11 "./include/xalloc.h" |
---|
5390 | #define UTIL_LINUX_XALLOC_H |
---|
5391 | |
---|
5392 | |
---|
5393 | |
---|
5394 | |
---|
5395 | # 1 "./include/c.h" 1 |
---|
5396 | # 17 "./include/xalloc.h" 2 |
---|
5397 | |
---|
5398 | |
---|
5399 | #define XALLOC_EXIT_CODE EXIT_FAILURE |
---|
5400 | |
---|
5401 | |
---|
5402 | static inline |
---|
5403 | __attribute__((__noreturn__)) |
---|
5404 | void __err_oom(const char *file, unsigned int line) |
---|
5405 | { |
---|
5406 | err(1, "%s: %u: cannot allocate memory", file, line); |
---|
5407 | } |
---|
5408 | |
---|
5409 | #define err_oom() __err_oom(__FILE__, __LINE__) |
---|
5410 | |
---|
5411 | static inline |
---|
5412 | |
---|
5413 | |
---|
5414 | void *xmalloc(const size_t size) |
---|
5415 | { |
---|
5416 | void *ret = malloc(size); |
---|
5417 | |
---|
5418 | if (!ret && size) |
---|
5419 | err(1, "cannot allocate %zu bytes", size); |
---|
5420 | return ret; |
---|
5421 | } |
---|
5422 | |
---|
5423 | static inline |
---|
5424 | |
---|
5425 | |
---|
5426 | void *xrealloc(void *ptr, const size_t size) |
---|
5427 | { |
---|
5428 | void *ret = realloc(ptr, size); |
---|
5429 | |
---|
5430 | if (!ret && size) |
---|
5431 | err(1, "cannot allocate %zu bytes", size); |
---|
5432 | return ret; |
---|
5433 | } |
---|
5434 | |
---|
5435 | static inline |
---|
5436 | |
---|
5437 | |
---|
5438 | void *xcalloc(const size_t nelems, const size_t size) |
---|
5439 | { |
---|
5440 | void *ret = calloc(nelems, size); |
---|
5441 | |
---|
5442 | if (!ret && size && nelems) |
---|
5443 | err(1, "cannot allocate %zu bytes", size); |
---|
5444 | return ret; |
---|
5445 | } |
---|
5446 | |
---|
5447 | static inline |
---|
5448 | __attribute__((warn_unused_result)) |
---|
5449 | |
---|
5450 | char *xstrdup(const char *str) |
---|
5451 | { |
---|
5452 | char *ret; |
---|
5453 | |
---|
5454 | (__builtin_expect(!(str), 0) ? __assert_rtn(__func__, "./include/xalloc.h", 74, "str") : (void)0); |
---|
5455 | ret = strdup(str); |
---|
5456 | if (!ret) |
---|
5457 | err(1, "cannot duplicate string"); |
---|
5458 | return ret; |
---|
5459 | } |
---|
5460 | |
---|
5461 | static inline |
---|
5462 | __attribute__((warn_unused_result)) |
---|
5463 | |
---|
5464 | char *xstrndup(const char *str, size_t size) |
---|
5465 | { |
---|
5466 | char *ret; |
---|
5467 | |
---|
5468 | (__builtin_expect(!(str), 0) ? __assert_rtn(__func__, "./include/xalloc.h", 88, "str") : (void)0); |
---|
5469 | ret = strndup(str, size); |
---|
5470 | if (!ret) |
---|
5471 | err(1, "cannot duplicate string"); |
---|
5472 | return ret; |
---|
5473 | } |
---|
5474 | |
---|
5475 | |
---|
5476 | static inline |
---|
5477 | __attribute__((__format__(printf, 2, 3))) |
---|
5478 | int xasprintf(char **strp, const char *fmt, ...) |
---|
5479 | { |
---|
5480 | int ret; |
---|
5481 | va_list args; |
---|
5482 | |
---|
5483 | __builtin_va_start(args,fmt); |
---|
5484 | ret = vasprintf(&(*strp), fmt, args); |
---|
5485 | __builtin_va_end(args); |
---|
5486 | if (ret < 0) |
---|
5487 | err(1, "cannot allocate string"); |
---|
5488 | return ret; |
---|
5489 | } |
---|
5490 | |
---|
5491 | static inline |
---|
5492 | __attribute__((__format__(printf, 2, 0))) |
---|
5493 | int xvasprintf(char **strp, const char *fmt, va_list ap) |
---|
5494 | { |
---|
5495 | int ret = vasprintf(&(*strp), fmt, ap); |
---|
5496 | |
---|
5497 | if (ret < 0) |
---|
5498 | err(1, "cannot allocate string"); |
---|
5499 | return ret; |
---|
5500 | } |
---|
5501 | |
---|
5502 | |
---|
5503 | static inline |
---|
5504 | __attribute__((warn_unused_result)) |
---|
5505 | char *xgethostname(void) |
---|
5506 | { |
---|
5507 | char *name; |
---|
5508 | size_t sz = get_hostname_max() + 1; |
---|
5509 | |
---|
5510 | name = xmalloc(sizeof(char) * sz); |
---|
5511 | if (gethostname(name, sz) != 0) { |
---|
5512 | free(name); |
---|
5513 | return ((void *)0); |
---|
5514 | } |
---|
5515 | name[sz - 1] = '\0'; |
---|
5516 | return name; |
---|
5517 | } |
---|
5518 | # 52 "misc-utils/hardlink.c" 2 |
---|
5519 | # 1 "./include/strutils.h" 1 |
---|
5520 | |
---|
5521 | #define UTIL_LINUX_STRUTILS |
---|
5522 | |
---|
5523 | |
---|
5524 | # 1 "/usr/include/inttypes.h" 1 3 4 |
---|
5525 | # 32 "/usr/include/inttypes.h" 3 4 |
---|
5526 | #define _INTTYPES_H_ |
---|
5527 | # 51 "/usr/include/inttypes.h" 3 4 |
---|
5528 | #undef __PRI_8_LENGTH_MODIFIER__ |
---|
5529 | #undef __PRI_64_LENGTH_MODIFIER__ |
---|
5530 | #undef __SCN_64_LENGTH_MODIFIER__ |
---|
5531 | |
---|
5532 | |
---|
5533 | |
---|
5534 | |
---|
5535 | |
---|
5536 | #define __PRI_8_LENGTH_MODIFIER__ "" |
---|
5537 | #define __PRI_64_LENGTH_MODIFIER__ "q" |
---|
5538 | #define __SCN_64_LENGTH_MODIFIER__ "q" |
---|
5539 | #define __PRI_MAX_LENGTH_MODIFIER__ "j" |
---|
5540 | #define __SCN_MAX_LENGTH_MODIFIER__ "j" |
---|
5541 | |
---|
5542 | #define PRId8 __PRI_8_LENGTH_MODIFIER__ "d" |
---|
5543 | #define PRIi8 __PRI_8_LENGTH_MODIFIER__ "i" |
---|
5544 | #define PRIo8 __PRI_8_LENGTH_MODIFIER__ "o" |
---|
5545 | #define PRIu8 __PRI_8_LENGTH_MODIFIER__ "u" |
---|
5546 | #define PRIx8 __PRI_8_LENGTH_MODIFIER__ "x" |
---|
5547 | #define PRIX8 __PRI_8_LENGTH_MODIFIER__ "X" |
---|
5548 | |
---|
5549 | #define PRId16 "hd" |
---|
5550 | #define PRIi16 "hi" |
---|
5551 | #define PRIo16 "ho" |
---|
5552 | #define PRIu16 "hu" |
---|
5553 | #define PRIx16 "hx" |
---|
5554 | #define PRIX16 "hX" |
---|
5555 | |
---|
5556 | #define PRId32 "d" |
---|
5557 | #define PRIi32 "i" |
---|
5558 | #define PRIo32 "o" |
---|
5559 | #define PRIu32 "u" |
---|
5560 | #define PRIx32 "x" |
---|
5561 | #define PRIX32 "X" |
---|
5562 | |
---|
5563 | #define PRId64 __PRI_64_LENGTH_MODIFIER__ "d" |
---|
5564 | #define PRIi64 __PRI_64_LENGTH_MODIFIER__ "i" |
---|
5565 | #define PRIo64 __PRI_64_LENGTH_MODIFIER__ "o" |
---|
5566 | #define PRIu64 __PRI_64_LENGTH_MODIFIER__ "u" |
---|
5567 | #define PRIx64 __PRI_64_LENGTH_MODIFIER__ "x" |
---|
5568 | #define PRIX64 __PRI_64_LENGTH_MODIFIER__ "X" |
---|
5569 | |
---|
5570 | #define PRIdLEAST8 PRId8 |
---|
5571 | #define PRIiLEAST8 PRIi8 |
---|
5572 | #define PRIoLEAST8 PRIo8 |
---|
5573 | #define PRIuLEAST8 PRIu8 |
---|
5574 | #define PRIxLEAST8 PRIx8 |
---|
5575 | #define PRIXLEAST8 PRIX8 |
---|
5576 | |
---|
5577 | #define PRIdLEAST16 PRId16 |
---|
5578 | #define PRIiLEAST16 PRIi16 |
---|
5579 | #define PRIoLEAST16 PRIo16 |
---|
5580 | #define PRIuLEAST16 PRIu16 |
---|
5581 | #define PRIxLEAST16 PRIx16 |
---|
5582 | #define PRIXLEAST16 PRIX16 |
---|
5583 | |
---|
5584 | #define PRIdLEAST32 PRId32 |
---|
5585 | #define PRIiLEAST32 PRIi32 |
---|
5586 | #define PRIoLEAST32 PRIo32 |
---|
5587 | #define PRIuLEAST32 PRIu32 |
---|
5588 | #define PRIxLEAST32 PRIx32 |
---|
5589 | #define PRIXLEAST32 PRIX32 |
---|
5590 | |
---|
5591 | #define PRIdLEAST64 PRId64 |
---|
5592 | #define PRIiLEAST64 PRIi64 |
---|
5593 | #define PRIoLEAST64 PRIo64 |
---|
5594 | #define PRIuLEAST64 PRIu64 |
---|
5595 | #define PRIxLEAST64 PRIx64 |
---|
5596 | #define PRIXLEAST64 PRIX64 |
---|
5597 | |
---|
5598 | #define PRIdFAST8 PRId8 |
---|
5599 | #define PRIiFAST8 PRIi8 |
---|
5600 | #define PRIoFAST8 PRIo8 |
---|
5601 | #define PRIuFAST8 PRIu8 |
---|
5602 | #define PRIxFAST8 PRIx8 |
---|
5603 | #define PRIXFAST8 PRIX8 |
---|
5604 | |
---|
5605 | #define PRIdFAST16 PRId16 |
---|
5606 | #define PRIiFAST16 PRIi16 |
---|
5607 | #define PRIoFAST16 PRIo16 |
---|
5608 | #define PRIuFAST16 PRIu16 |
---|
5609 | #define PRIxFAST16 PRIx16 |
---|
5610 | #define PRIXFAST16 PRIX16 |
---|
5611 | |
---|
5612 | #define PRIdFAST32 PRId32 |
---|
5613 | #define PRIiFAST32 PRIi32 |
---|
5614 | #define PRIoFAST32 PRIo32 |
---|
5615 | #define PRIuFAST32 PRIu32 |
---|
5616 | #define PRIxFAST32 PRIx32 |
---|
5617 | #define PRIXFAST32 PRIX32 |
---|
5618 | |
---|
5619 | #define PRIdFAST64 PRId64 |
---|
5620 | #define PRIiFAST64 PRIi64 |
---|
5621 | #define PRIoFAST64 PRIo64 |
---|
5622 | #define PRIuFAST64 PRIu64 |
---|
5623 | #define PRIxFAST64 PRIx64 |
---|
5624 | #define PRIXFAST64 PRIX64 |
---|
5625 | |
---|
5626 | |
---|
5627 | #define PRIdPTR "ld" |
---|
5628 | #define PRIiPTR "li" |
---|
5629 | #define PRIoPTR "lo" |
---|
5630 | #define PRIuPTR "lu" |
---|
5631 | #define PRIxPTR "lx" |
---|
5632 | #define PRIXPTR "lX" |
---|
5633 | |
---|
5634 | #define PRIdMAX __PRI_MAX_LENGTH_MODIFIER__ "d" |
---|
5635 | #define PRIiMAX __PRI_MAX_LENGTH_MODIFIER__ "i" |
---|
5636 | #define PRIoMAX __PRI_MAX_LENGTH_MODIFIER__ "o" |
---|
5637 | #define PRIuMAX __PRI_MAX_LENGTH_MODIFIER__ "u" |
---|
5638 | #define PRIxMAX __PRI_MAX_LENGTH_MODIFIER__ "x" |
---|
5639 | #define PRIXMAX __PRI_MAX_LENGTH_MODIFIER__ "X" |
---|
5640 | |
---|
5641 | #define SCNd8 "hhd" |
---|
5642 | #define SCNi8 "hhi" |
---|
5643 | #define SCNo8 "hho" |
---|
5644 | #define SCNu8 "hhu" |
---|
5645 | #define SCNx8 "hhx" |
---|
5646 | |
---|
5647 | #define SCNd16 "hd" |
---|
5648 | #define SCNi16 "hi" |
---|
5649 | #define SCNo16 "ho" |
---|
5650 | #define SCNu16 "hu" |
---|
5651 | #define SCNx16 "hx" |
---|
5652 | |
---|
5653 | #define SCNd32 "d" |
---|
5654 | #define SCNi32 "i" |
---|
5655 | #define SCNo32 "o" |
---|
5656 | #define SCNu32 "u" |
---|
5657 | #define SCNx32 "x" |
---|
5658 | |
---|
5659 | #define SCNd64 __SCN_64_LENGTH_MODIFIER__ "d" |
---|
5660 | #define SCNi64 __SCN_64_LENGTH_MODIFIER__ "i" |
---|
5661 | #define SCNo64 __SCN_64_LENGTH_MODIFIER__ "o" |
---|
5662 | #define SCNu64 __SCN_64_LENGTH_MODIFIER__ "u" |
---|
5663 | #define SCNx64 __SCN_64_LENGTH_MODIFIER__ "x" |
---|
5664 | |
---|
5665 | #define SCNdLEAST8 SCNd8 |
---|
5666 | #define SCNiLEAST8 SCNi8 |
---|
5667 | #define SCNoLEAST8 SCNo8 |
---|
5668 | #define SCNuLEAST8 SCNu8 |
---|
5669 | #define SCNxLEAST8 SCNx8 |
---|
5670 | |
---|
5671 | #define SCNdLEAST16 SCNd16 |
---|
5672 | #define SCNiLEAST16 SCNi16 |
---|
5673 | #define SCNoLEAST16 SCNo16 |
---|
5674 | #define SCNuLEAST16 SCNu16 |
---|
5675 | #define SCNxLEAST16 SCNx16 |
---|
5676 | |
---|
5677 | #define SCNdLEAST32 SCNd32 |
---|
5678 | #define SCNiLEAST32 SCNi32 |
---|
5679 | #define SCNoLEAST32 SCNo32 |
---|
5680 | #define SCNuLEAST32 SCNu32 |
---|
5681 | #define SCNxLEAST32 SCNx32 |
---|
5682 | |
---|
5683 | #define SCNdLEAST64 SCNd64 |
---|
5684 | #define SCNiLEAST64 SCNi64 |
---|
5685 | #define SCNoLEAST64 SCNo64 |
---|
5686 | #define SCNuLEAST64 SCNu64 |
---|
5687 | #define SCNxLEAST64 SCNx64 |
---|
5688 | |
---|
5689 | #define SCNdFAST8 SCNd8 |
---|
5690 | #define SCNiFAST8 SCNi8 |
---|
5691 | #define SCNoFAST8 SCNo8 |
---|
5692 | #define SCNuFAST8 SCNu8 |
---|
5693 | #define SCNxFAST8 SCNx8 |
---|
5694 | |
---|
5695 | #define SCNdFAST16 SCNd16 |
---|
5696 | #define SCNiFAST16 SCNi16 |
---|
5697 | #define SCNoFAST16 SCNo16 |
---|
5698 | #define SCNuFAST16 SCNu16 |
---|
5699 | #define SCNxFAST16 SCNx16 |
---|
5700 | |
---|
5701 | #define SCNdFAST32 SCNd32 |
---|
5702 | #define SCNiFAST32 SCNi32 |
---|
5703 | #define SCNoFAST32 SCNo32 |
---|
5704 | #define SCNuFAST32 SCNu32 |
---|
5705 | #define SCNxFAST32 SCNx32 |
---|
5706 | |
---|
5707 | #define SCNdFAST64 SCNd64 |
---|
5708 | #define SCNiFAST64 SCNi64 |
---|
5709 | #define SCNoFAST64 SCNo64 |
---|
5710 | #define SCNuFAST64 SCNu64 |
---|
5711 | #define SCNxFAST64 SCNx64 |
---|
5712 | |
---|
5713 | #define SCNdPTR "ld" |
---|
5714 | #define SCNiPTR "li" |
---|
5715 | #define SCNoPTR "lo" |
---|
5716 | #define SCNuPTR "lu" |
---|
5717 | #define SCNxPTR "lx" |
---|
5718 | |
---|
5719 | #define SCNdMAX __SCN_MAX_LENGTH_MODIFIER__ "d" |
---|
5720 | #define SCNiMAX __SCN_MAX_LENGTH_MODIFIER__ "i" |
---|
5721 | #define SCNoMAX __SCN_MAX_LENGTH_MODIFIER__ "o" |
---|
5722 | #define SCNuMAX __SCN_MAX_LENGTH_MODIFIER__ "u" |
---|
5723 | #define SCNxMAX __SCN_MAX_LENGTH_MODIFIER__ "x" |
---|
5724 | |
---|
5725 | |
---|
5726 | |
---|
5727 | |
---|
5728 | |
---|
5729 | |
---|
5730 | extern intmax_t imaxabs(intmax_t j); |
---|
5731 | |
---|
5732 | |
---|
5733 | typedef struct { |
---|
5734 | intmax_t quot; |
---|
5735 | intmax_t rem; |
---|
5736 | } imaxdiv_t; |
---|
5737 | |
---|
5738 | extern imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); |
---|
5739 | |
---|
5740 | |
---|
5741 | extern intmax_t strtoimax(const char * nptr, char ** endptr, int base); |
---|
5742 | extern uintmax_t strtoumax(const char * nptr, char ** endptr, int base); |
---|
5743 | # 275 "/usr/include/inttypes.h" 3 4 |
---|
5744 | extern intmax_t wcstoimax(const wchar_t * nptr, wchar_t ** endptr, int base); |
---|
5745 | extern uintmax_t wcstoumax(const wchar_t * nptr, wchar_t ** endptr, int base); |
---|
5746 | |
---|
5747 | |
---|
5748 | |
---|
5749 | |
---|
5750 | # 1 "/usr/include/xlocale/_inttypes.h" 1 3 4 |
---|
5751 | # 25 "/usr/include/xlocale/_inttypes.h" 3 4 |
---|
5752 | #define _XLOCALE__INTTYPES_H_ |
---|
5753 | |
---|
5754 | |
---|
5755 | intmax_t strtoimax_l(const char * nptr, char ** endptr, |
---|
5756 | int base, locale_t); |
---|
5757 | uintmax_t strtoumax_l(const char * nptr, char ** endptr, |
---|
5758 | int base, locale_t); |
---|
5759 | intmax_t wcstoimax_l(const wchar_t * nptr, |
---|
5760 | wchar_t ** endptr, int base, locale_t); |
---|
5761 | uintmax_t wcstoumax_l(const wchar_t * nptr, |
---|
5762 | wchar_t ** endptr, int base, locale_t); |
---|
5763 | |
---|
5764 | # 282 "/usr/include/inttypes.h" 2 3 4 |
---|
5765 | # 6 "./include/strutils.h" 2 |
---|
5766 | |
---|
5767 | # 1 "/opt/local/include/LegacySupport/sys/types.h" 1 |
---|
5768 | # 8 "./include/strutils.h" 2 |
---|
5769 | |
---|
5770 | |
---|
5771 | # 1 "/usr/include/errno.h" 1 3 4 |
---|
5772 | # 11 "./include/strutils.h" 2 |
---|
5773 | |
---|
5774 | |
---|
5775 | |
---|
5776 | |
---|
5777 | |
---|
5778 | extern void strutils_set_exitcode(int exit_code); |
---|
5779 | |
---|
5780 | extern int parse_size(const char *str, uintmax_t *res, int *power); |
---|
5781 | extern int strtosize(const char *str, uintmax_t *res); |
---|
5782 | extern uintmax_t strtosize_or_err(const char *str, const char *errmesg); |
---|
5783 | |
---|
5784 | extern int ul_strtos64(const char *str, int64_t *num, int base); |
---|
5785 | extern int ul_strtou64(const char *str, uint64_t *num, int base); |
---|
5786 | extern int ul_strtos32(const char *str, int32_t *num, int base); |
---|
5787 | extern int ul_strtou32(const char *str, uint32_t *num, int base); |
---|
5788 | |
---|
5789 | extern int64_t str2num_or_err(const char *str, int base, const char *errmesg, int64_t low, int64_t up); |
---|
5790 | extern uint64_t str2unum_or_err(const char *str, int base, const char *errmesg, uint64_t up); |
---|
5791 | |
---|
5792 | #define strtos64_or_err(_s,_e) str2num_or_err(_s, 10, _e, 0, 0) |
---|
5793 | #define strtou64_or_err(_s,_e) str2unum_or_err(_s, 10, _e, 0) |
---|
5794 | #define strtox64_or_err(_s,_e) str2unum_or_err(_s, 16, _e, 0) |
---|
5795 | |
---|
5796 | #define strtos32_or_err(_s,_e) (int32_t) str2num_or_err(_s, 10, _e, INT32_MIN, INT32_MAX) |
---|
5797 | #define strtou32_or_err(_s,_e) (uint32_t) str2unum_or_err(_s, 10, _e, UINT32_MAX) |
---|
5798 | #define strtox32_or_err(_s,_e) (uint32_t) str2unum_or_err(_s, 16, _e, UINT32_MAX) |
---|
5799 | |
---|
5800 | #define strtos16_or_err(_s,_e) (int16_t) str2num_or_err(_s, 10, _e, INT16_MIN, INT16_MAX) |
---|
5801 | #define strtou16_or_err(_s,_e) (uint16_t) str2unum_or_err(_s, 10, _e, UINT16_MAX) |
---|
5802 | #define strtox16_or_err(_s,_e) (uint16_t) str2unum_or_err(_s, 16, _e, UINT16_MAX) |
---|
5803 | |
---|
5804 | extern double strtod_or_err(const char *str, const char *errmesg); |
---|
5805 | extern long double strtold_or_err(const char *str, const char *errmesg); |
---|
5806 | |
---|
5807 | extern long strtol_or_err(const char *str, const char *errmesg); |
---|
5808 | extern unsigned long strtoul_or_err(const char *str, const char *errmesg); |
---|
5809 | |
---|
5810 | extern void strtotimeval_or_err(const char *str, struct timeval *tv, |
---|
5811 | const char *errmesg); |
---|
5812 | extern time_t strtotime_or_err(const char *str, const char *errmesg); |
---|
5813 | |
---|
5814 | extern int isdigit_strend(const char *str, const char **end); |
---|
5815 | #define isdigit_string(_s) isdigit_strend(_s, NULL) |
---|
5816 | |
---|
5817 | extern int isxdigit_strend(const char *str, const char **end); |
---|
5818 | #define isxdigit_string(_s) isxdigit_strend(_s, NULL) |
---|
5819 | |
---|
5820 | |
---|
5821 | extern int parse_switch(const char *arg, const char *errmesg, ...); |
---|
5822 | |
---|
5823 | |
---|
5824 | extern void *mempcpy(void * dest, const void * src, size_t n); |
---|
5825 | # 71 "./include/strutils.h" |
---|
5826 | extern char *strnchr(const char *s, size_t maxlen, int c); |
---|
5827 | |
---|
5828 | |
---|
5829 | |
---|
5830 | static inline void xstrncpy(char *dest, const char *src, size_t n) |
---|
5831 | { |
---|
5832 | size_t len = src ? strlen(src) : 0; |
---|
5833 | |
---|
5834 | if (!len) |
---|
5835 | return; |
---|
5836 | len = __extension__ ({ __typeof__(len) _min1 = (len); __typeof__(n - 1) _min2 = (n - 1); (void) (&_min1 == &_min2); _min1 < _min2 ? _min1 : _min2; }); |
---|
5837 | memcpy(dest, src, len); |
---|
5838 | dest[len] = 0; |
---|
5839 | } |
---|
5840 | # 93 "./include/strutils.h" |
---|
5841 | static inline void * __attribute__((nonnull (1))) |
---|
5842 | str2memcpy(void *dest, const char *src, size_t n) |
---|
5843 | { |
---|
5844 | size_t bytes = strlen(src) + 1; |
---|
5845 | |
---|
5846 | if (bytes > n) |
---|
5847 | bytes = n; |
---|
5848 | |
---|
5849 | memcpy(dest, src, bytes); |
---|
5850 | return dest; |
---|
5851 | } |
---|
5852 | |
---|
5853 | static inline char * __attribute__((nonnull (1))) |
---|
5854 | mem2strcpy(char *dest, const void *src, size_t n, size_t nmax) |
---|
5855 | { |
---|
5856 | if (n + 1 > nmax) |
---|
5857 | n = nmax - 1; |
---|
5858 | |
---|
5859 | memset(dest, '\0', nmax); |
---|
5860 | memcpy(dest, src, n); |
---|
5861 | return dest; |
---|
5862 | } |
---|
5863 | |
---|
5864 | |
---|
5865 | |
---|
5866 | |
---|
5867 | static inline char * __attribute__((warn_unused_result)) |
---|
5868 | strrealloc(char *str, const char *newstr) |
---|
5869 | { |
---|
5870 | size_t nsz, osz; |
---|
5871 | |
---|
5872 | if (!str) |
---|
5873 | return newstr ? strdup(newstr) : ((void *)0); |
---|
5874 | if (!newstr) |
---|
5875 | return ((void *)0); |
---|
5876 | |
---|
5877 | osz = strlen(str); |
---|
5878 | nsz = strlen(newstr); |
---|
5879 | |
---|
5880 | if (nsz > osz) |
---|
5881 | str = realloc(str, nsz + 1); |
---|
5882 | if (str) |
---|
5883 | memcpy(str, newstr, nsz + 1); |
---|
5884 | return str; |
---|
5885 | } |
---|
5886 | |
---|
5887 | |
---|
5888 | static inline int strdup_to_offset(void *stru, size_t offset, const char *str) |
---|
5889 | { |
---|
5890 | char **o; |
---|
5891 | char *p = ((void *)0); |
---|
5892 | |
---|
5893 | if (!stru) |
---|
5894 | return -22; |
---|
5895 | |
---|
5896 | o = (char **) ((char *) stru + offset); |
---|
5897 | if (str) { |
---|
5898 | p = strdup(str); |
---|
5899 | if (!p) |
---|
5900 | return -12; |
---|
5901 | } |
---|
5902 | |
---|
5903 | free(*o); |
---|
5904 | *o = p; |
---|
5905 | return 0; |
---|
5906 | } |
---|
5907 | |
---|
5908 | |
---|
5909 | #define strdup_to_struct_member(_s,_m,_str) strdup_to_offset((void *) _s, offsetof(__typeof__(*(_s)), _m), _str) |
---|
5910 | |
---|
5911 | |
---|
5912 | |
---|
5913 | static inline int strdup_between_offsets(void *stru_dst, void *stru_src, size_t offset) |
---|
5914 | { |
---|
5915 | char **src; |
---|
5916 | char **dst; |
---|
5917 | char *p = ((void *)0); |
---|
5918 | |
---|
5919 | if (!stru_src || !stru_dst) |
---|
5920 | return -22; |
---|
5921 | |
---|
5922 | src = (char **) ((char *) stru_src + offset); |
---|
5923 | dst = (char **) ((char *) stru_dst + offset); |
---|
5924 | |
---|
5925 | if (*src) { |
---|
5926 | p = strdup(*src); |
---|
5927 | if (!p) |
---|
5928 | return -12; |
---|
5929 | } |
---|
5930 | |
---|
5931 | free(*dst); |
---|
5932 | *dst = p; |
---|
5933 | return 0; |
---|
5934 | } |
---|
5935 | |
---|
5936 | |
---|
5937 | |
---|
5938 | #define strdup_between_structs(_dst,_src,_m) strdup_between_offsets((void *)_dst, (void *)_src, offsetof(__typeof__(*(_src)), _m)) |
---|
5939 | |
---|
5940 | |
---|
5941 | |
---|
5942 | extern char *xstrmode(mode_t mode, char *str); |
---|
5943 | |
---|
5944 | |
---|
5945 | enum |
---|
5946 | { |
---|
5947 | SIZE_SUFFIX_1LETTER = 0, |
---|
5948 | SIZE_SUFFIX_3LETTER = (1 << 0), |
---|
5949 | SIZE_SUFFIX_SPACE = (1 << 1), |
---|
5950 | SIZE_DECIMAL_2DIGITS = (1 << 2) |
---|
5951 | }; |
---|
5952 | |
---|
5953 | extern char *size_to_human_string(int options, uint64_t bytes); |
---|
5954 | |
---|
5955 | extern int string_to_idarray(const char *list, int ary[], size_t arysz, |
---|
5956 | int (name2id)(const char *, size_t)); |
---|
5957 | extern int string_add_to_idarray(const char *list, int ary[], |
---|
5958 | size_t arysz, size_t *ary_pos, |
---|
5959 | int (name2id)(const char *, size_t)); |
---|
5960 | |
---|
5961 | extern int string_to_bitarray(const char *list, char *ary, |
---|
5962 | int (*name2bit)(const char *, size_t)); |
---|
5963 | |
---|
5964 | extern int string_to_bitmask(const char *list, |
---|
5965 | unsigned long *mask, |
---|
5966 | long (*name2flag)(const char *, size_t)); |
---|
5967 | extern int parse_range(const char *str, int *lower, int *upper, int def); |
---|
5968 | |
---|
5969 | extern int streq_paths(const char *a, const char *b); |
---|
5970 | |
---|
5971 | |
---|
5972 | |
---|
5973 | |
---|
5974 | static inline const char *startswith(const char *s, const char *prefix) |
---|
5975 | { |
---|
5976 | size_t sz = prefix ? strlen(prefix) : 0; |
---|
5977 | |
---|
5978 | if (s && sz && strncmp(s, prefix, sz) == 0) |
---|
5979 | return s + sz; |
---|
5980 | return ((void *)0); |
---|
5981 | } |
---|
5982 | |
---|
5983 | |
---|
5984 | |
---|
5985 | |
---|
5986 | static inline const char *startswith_no_case(const char *s, const char *prefix) |
---|
5987 | { |
---|
5988 | size_t sz = prefix ? strlen(prefix) : 0; |
---|
5989 | |
---|
5990 | if (s && sz && strncasecmp(s, prefix, sz) == 0) |
---|
5991 | return s + sz; |
---|
5992 | return ((void *)0); |
---|
5993 | } |
---|
5994 | |
---|
5995 | |
---|
5996 | |
---|
5997 | |
---|
5998 | static inline const char *endswith(const char *s, const char *postfix) |
---|
5999 | { |
---|
6000 | size_t sl = s ? strlen(s) : 0; |
---|
6001 | size_t pl = postfix ? strlen(postfix) : 0; |
---|
6002 | |
---|
6003 | if (pl == 0) |
---|
6004 | return s + sl; |
---|
6005 | if (sl < pl) |
---|
6006 | return ((void *)0); |
---|
6007 | if (memcmp(s + sl - pl, postfix, pl) != 0) |
---|
6008 | return ((void *)0); |
---|
6009 | return s + sl - pl; |
---|
6010 | } |
---|
6011 | |
---|
6012 | |
---|
6013 | |
---|
6014 | |
---|
6015 | static inline const char *skip_space(const char *p) |
---|
6016 | { |
---|
6017 | while (__istype((*p), 0x00004000L)) |
---|
6018 | ++p; |
---|
6019 | return p; |
---|
6020 | } |
---|
6021 | |
---|
6022 | static inline const char *skip_blank(const char *p) |
---|
6023 | { |
---|
6024 | while (__istype((*p), 0x00020000L)) |
---|
6025 | ++p; |
---|
6026 | return p; |
---|
6027 | } |
---|
6028 | |
---|
6029 | |
---|
6030 | |
---|
6031 | |
---|
6032 | |
---|
6033 | |
---|
6034 | |
---|
6035 | static inline size_t rtrim_whitespace(unsigned char *str) |
---|
6036 | { |
---|
6037 | size_t i; |
---|
6038 | |
---|
6039 | if (!str) |
---|
6040 | return 0; |
---|
6041 | i = strlen((char *) str); |
---|
6042 | while (i) { |
---|
6043 | i--; |
---|
6044 | if (!__istype((str[i]), 0x00004000L)) { |
---|
6045 | i++; |
---|
6046 | break; |
---|
6047 | } |
---|
6048 | } |
---|
6049 | str[i] = '\0'; |
---|
6050 | return i; |
---|
6051 | } |
---|
6052 | |
---|
6053 | |
---|
6054 | |
---|
6055 | |
---|
6056 | |
---|
6057 | static inline size_t ltrim_whitespace(unsigned char *str) |
---|
6058 | { |
---|
6059 | size_t len; |
---|
6060 | unsigned char *p; |
---|
6061 | |
---|
6062 | if (!str) |
---|
6063 | return 0; |
---|
6064 | for (p = str; *p && __istype((*p), 0x00004000L); p++); |
---|
6065 | |
---|
6066 | len = strlen((char *) p); |
---|
6067 | |
---|
6068 | if (p > str) |
---|
6069 | memmove(str, p, len + 1); |
---|
6070 | |
---|
6071 | return len; |
---|
6072 | } |
---|
6073 | |
---|
6074 | |
---|
6075 | |
---|
6076 | static inline size_t __normalize_whitespace( |
---|
6077 | const unsigned char *src, |
---|
6078 | size_t sz, |
---|
6079 | unsigned char *dst, |
---|
6080 | size_t len) |
---|
6081 | { |
---|
6082 | size_t i, x = 0; |
---|
6083 | int nsp = 0, intext = 0; |
---|
6084 | |
---|
6085 | if (!sz) |
---|
6086 | goto done; |
---|
6087 | |
---|
6088 | for (i = 0, x = 0; i < sz && x < len - 1; ) { |
---|
6089 | if (__istype((src[i]), 0x00004000L)) |
---|
6090 | nsp++; |
---|
6091 | else |
---|
6092 | nsp = 0, intext = 1; |
---|
6093 | |
---|
6094 | if (nsp > 1 || (nsp && !intext)) |
---|
6095 | i++; |
---|
6096 | else |
---|
6097 | dst[x++] = src[i++]; |
---|
6098 | } |
---|
6099 | if (nsp && x > 0) |
---|
6100 | x--; |
---|
6101 | done: |
---|
6102 | dst[x] = '\0'; |
---|
6103 | return x; |
---|
6104 | } |
---|
6105 | |
---|
6106 | static inline size_t normalize_whitespace(unsigned char *str) |
---|
6107 | { |
---|
6108 | size_t sz = strlen((char *) str); |
---|
6109 | return __normalize_whitespace(str, sz, str, sz + 1); |
---|
6110 | } |
---|
6111 | |
---|
6112 | static inline void strrep(char *s, int find, int replace) |
---|
6113 | { |
---|
6114 | while (s && *s && (s = strchr(s, find)) != ((void *)0)) |
---|
6115 | *s++ = replace; |
---|
6116 | } |
---|
6117 | |
---|
6118 | static inline void strrem(char *s, int rem) |
---|
6119 | { |
---|
6120 | char *p; |
---|
6121 | |
---|
6122 | if (!s) |
---|
6123 | return; |
---|
6124 | for (p = s; *s; s++) { |
---|
6125 | if (*s != rem) |
---|
6126 | *p++ = *s; |
---|
6127 | } |
---|
6128 | *p = '\0'; |
---|
6129 | } |
---|
6130 | |
---|
6131 | extern char *strnconcat(const char *s, const char *suffix, size_t b); |
---|
6132 | extern char *strconcat(const char *s, const char *suffix); |
---|
6133 | extern char *strfconcat(const char *s, const char *format, ...) |
---|
6134 | __attribute__ ((__format__ (__printf__, 2, 3))); |
---|
6135 | |
---|
6136 | extern int strappend(char **a, const char *b); |
---|
6137 | |
---|
6138 | extern const char *split(const char **state, size_t *l, const char *separator, int quoted); |
---|
6139 | |
---|
6140 | extern int skip_fline(FILE *fp); |
---|
6141 | extern int ul_stralnumcmp(const char *p1, const char *p2); |
---|
6142 | # 53 "misc-utils/hardlink.c" 2 |
---|
6143 | # 1 "./include/monotonic.h" 1 |
---|
6144 | |
---|
6145 | |
---|
6146 | |
---|
6147 | |
---|
6148 | |
---|
6149 | #define UTIL_LINUX_MONOTONIC_H |
---|
6150 | |
---|
6151 | |
---|
6152 | |
---|
6153 | |
---|
6154 | #define UL_CLOCK_MONOTONIC CLOCK_MONOTONIC |
---|
6155 | |
---|
6156 | |
---|
6157 | |
---|
6158 | |
---|
6159 | extern int get_boot_time(struct timeval *boot_time); |
---|
6160 | |
---|
6161 | extern time_t get_suspended_time(void); |
---|
6162 | |
---|
6163 | extern int gettime_monotonic(struct timeval *tv); |
---|
6164 | # 54 "misc-utils/hardlink.c" 2 |
---|
6165 | # 1 "./include/optutils.h" 1 |
---|
6166 | |
---|
6167 | #define UTIL_LINUX_OPTUTILS_H |
---|
6168 | |
---|
6169 | # 1 "/usr/include/assert.h" 1 3 4 |
---|
6170 | # 52 "/usr/include/assert.h" 3 4 |
---|
6171 | #undef assert |
---|
6172 | #undef __assert |
---|
6173 | # 75 "/usr/include/assert.h" 3 4 |
---|
6174 | |
---|
6175 | void __assert_rtn(const char *, const char *, int, const char *) __attribute__((__noreturn__)); |
---|
6176 | void __eprintf(const char *, const char *, unsigned, const char *) __attribute__((__noreturn__)); |
---|
6177 | |
---|
6178 | |
---|
6179 | #define __assert(e,file,line) (__eprintf ("%s:%u: failed assertion `%s'\n", file, line, e), 0) |
---|
6180 | |
---|
6181 | |
---|
6182 | |
---|
6183 | #define assert(e) (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) |
---|
6184 | # 5 "./include/optutils.h" 2 |
---|
6185 | |
---|
6186 | |
---|
6187 | # 1 "./include/nls.h" 1 |
---|
6188 | # 8 "./include/optutils.h" 2 |
---|
6189 | # 1 "./include/cctype.h" 1 |
---|
6190 | # 29 "./include/cctype.h" |
---|
6191 | #define UTIL_LINUX_CCTYPE_H |
---|
6192 | # 68 "./include/cctype.h" |
---|
6193 | #define C_CTYPE_ASCII 1 |
---|
6194 | # 80 "./include/cctype.h" |
---|
6195 | #define _C_CTYPE_CNTRL case '\a': case '\b': case '\f': case '\n': case '\r': case '\t': case '\v': _C_CTYPE_OTHER_CNTRL |
---|
6196 | |
---|
6197 | |
---|
6198 | |
---|
6199 | |
---|
6200 | |
---|
6201 | |
---|
6202 | #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' |
---|
6203 | # 112 "./include/cctype.h" |
---|
6204 | #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) |
---|
6205 | |
---|
6206 | |
---|
6207 | #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) |
---|
6208 | # 124 "./include/cctype.h" |
---|
6209 | #define _C_CTYPE_A_THRU_F _C_CTYPE_LOWER_A_THRU_F_N (0): _C_CTYPE_LOWER_A_THRU_F_N ('A' - 'a') |
---|
6210 | |
---|
6211 | |
---|
6212 | #define _C_CTYPE_DIGIT case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9' |
---|
6213 | |
---|
6214 | |
---|
6215 | |
---|
6216 | #define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0) |
---|
6217 | #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 '~' |
---|
6218 | # 141 "./include/cctype.h" |
---|
6219 | #define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a') |
---|
6220 | # 161 "./include/cctype.h" |
---|
6221 | static inline int c_isalnum (int c) |
---|
6222 | { |
---|
6223 | switch (c) { |
---|
6224 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
6225 | 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): |
---|
6226 | 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'): |
---|
6227 | return 1; |
---|
6228 | default: |
---|
6229 | return 0; |
---|
6230 | } |
---|
6231 | } |
---|
6232 | |
---|
6233 | static inline int c_isalpha (int c) |
---|
6234 | { |
---|
6235 | switch (c) { |
---|
6236 | 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): |
---|
6237 | 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'): |
---|
6238 | return 1; |
---|
6239 | default: |
---|
6240 | return 0; |
---|
6241 | } |
---|
6242 | } |
---|
6243 | |
---|
6244 | |
---|
6245 | |
---|
6246 | |
---|
6247 | static inline int c_isascii (int c) |
---|
6248 | { |
---|
6249 | switch (c) { |
---|
6250 | case ' ': |
---|
6251 | 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': |
---|
6252 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
6253 | 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): |
---|
6254 | 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 '~': |
---|
6255 | 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'): |
---|
6256 | return 1; |
---|
6257 | default: |
---|
6258 | return 0; |
---|
6259 | } |
---|
6260 | } |
---|
6261 | |
---|
6262 | static inline int c_isblank (int c) |
---|
6263 | { |
---|
6264 | return c == ' ' || c == '\t'; |
---|
6265 | } |
---|
6266 | |
---|
6267 | static inline int c_iscntrl (int c) |
---|
6268 | { |
---|
6269 | switch (c) { |
---|
6270 | 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': |
---|
6271 | return 1; |
---|
6272 | default: |
---|
6273 | return 0; |
---|
6274 | } |
---|
6275 | } |
---|
6276 | |
---|
6277 | static inline int c_isdigit (int c) |
---|
6278 | { |
---|
6279 | switch (c) { |
---|
6280 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
6281 | return 1; |
---|
6282 | default: |
---|
6283 | return 0; |
---|
6284 | } |
---|
6285 | } |
---|
6286 | |
---|
6287 | static inline int c_isgraph (int c) |
---|
6288 | { |
---|
6289 | switch (c) { |
---|
6290 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
6291 | 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): |
---|
6292 | 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 '~': |
---|
6293 | 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'): |
---|
6294 | return 1; |
---|
6295 | default: |
---|
6296 | return 0; |
---|
6297 | } |
---|
6298 | } |
---|
6299 | |
---|
6300 | static inline int c_islower (int c) |
---|
6301 | { |
---|
6302 | switch (c) { |
---|
6303 | 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): |
---|
6304 | return 1; |
---|
6305 | default: |
---|
6306 | return 0; |
---|
6307 | } |
---|
6308 | } |
---|
6309 | |
---|
6310 | static inline int c_isprint (int c) |
---|
6311 | { |
---|
6312 | switch (c) { |
---|
6313 | case ' ': |
---|
6314 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
6315 | 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): |
---|
6316 | 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 '~': |
---|
6317 | 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'): |
---|
6318 | return 1; |
---|
6319 | default: |
---|
6320 | return 0; |
---|
6321 | } |
---|
6322 | } |
---|
6323 | |
---|
6324 | static inline int c_ispunct (int c) |
---|
6325 | { |
---|
6326 | switch (c) { |
---|
6327 | 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 '~': |
---|
6328 | return 1; |
---|
6329 | default: |
---|
6330 | return 0; |
---|
6331 | } |
---|
6332 | } |
---|
6333 | |
---|
6334 | static inline int c_isspace (int c) |
---|
6335 | { |
---|
6336 | switch (c) { |
---|
6337 | case ' ': case '\t': case '\n': case '\v': case '\f': case '\r': |
---|
6338 | return 1; |
---|
6339 | default: |
---|
6340 | return 0; |
---|
6341 | } |
---|
6342 | } |
---|
6343 | |
---|
6344 | static inline int c_isupper (int c) |
---|
6345 | { |
---|
6346 | switch (c) { |
---|
6347 | 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'): |
---|
6348 | return 1; |
---|
6349 | default: |
---|
6350 | return 0; |
---|
6351 | } |
---|
6352 | } |
---|
6353 | |
---|
6354 | static inline int c_isxdigit (int c) |
---|
6355 | { |
---|
6356 | switch (c) { |
---|
6357 | case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': |
---|
6358 | 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'): |
---|
6359 | return 1; |
---|
6360 | default: |
---|
6361 | return 0; |
---|
6362 | } |
---|
6363 | } |
---|
6364 | |
---|
6365 | static inline int c_tolower (int c) |
---|
6366 | { |
---|
6367 | switch (c) { |
---|
6368 | 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'): |
---|
6369 | return c - 'A' + 'a'; |
---|
6370 | default: |
---|
6371 | return c; |
---|
6372 | } |
---|
6373 | } |
---|
6374 | |
---|
6375 | static inline int c_toupper (int c) |
---|
6376 | { |
---|
6377 | switch (c) { |
---|
6378 | 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): |
---|
6379 | return c - 'a' + 'A'; |
---|
6380 | default: |
---|
6381 | return c; |
---|
6382 | } |
---|
6383 | } |
---|
6384 | # 9 "./include/optutils.h" 2 |
---|
6385 | |
---|
6386 | static inline const char *option_to_longopt(int c, const struct option *opts) |
---|
6387 | { |
---|
6388 | const struct option *o; |
---|
6389 | |
---|
6390 | (__builtin_expect(!(!(opts == ((void *)0))), 0) ? __assert_rtn(__func__, "./include/optutils.h", 14, "!(opts == NULL)") : (void)0); |
---|
6391 | for (o = opts; o->name; o++) |
---|
6392 | if (o->val == c) |
---|
6393 | return o->name; |
---|
6394 | return ((void *)0); |
---|
6395 | } |
---|
6396 | |
---|
6397 | |
---|
6398 | #define OPTUTILS_EXIT_CODE EXIT_FAILURE |
---|
6399 | # 63 "./include/optutils.h" |
---|
6400 | #define UL_EXCL_STATUS_INIT { 0 } |
---|
6401 | typedef int ul_excl_t[16]; |
---|
6402 | |
---|
6403 | static inline void err_exclusive_options( |
---|
6404 | int c, |
---|
6405 | const struct option *opts, |
---|
6406 | const ul_excl_t *excl, |
---|
6407 | int *status) |
---|
6408 | { |
---|
6409 | int e; |
---|
6410 | |
---|
6411 | for (e = 0; excl[e][0] && excl[e][0] <= c; e++) { |
---|
6412 | const int *op = excl[e]; |
---|
6413 | |
---|
6414 | for (; *op && *op <= c; op++) { |
---|
6415 | if (*op != c) |
---|
6416 | continue; |
---|
6417 | if (status[e] == 0) |
---|
6418 | status[e] = c; |
---|
6419 | else if (status[e] != c) { |
---|
6420 | size_t ct = 0; |
---|
6421 | |
---|
6422 | fprintf(__stderrp, libintl_gettext ("%s: mutually exclusive " "arguments:"), |
---|
6423 | |
---|
6424 | __progname); |
---|
6425 | |
---|
6426 | for (op = excl[e]; |
---|
6427 | 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; |
---|
6428 | op++, ct++) { |
---|
6429 | const char *n = option_to_longopt(*op, opts); |
---|
6430 | if (n) |
---|
6431 | fprintf(__stderrp, " --%s", n); |
---|
6432 | else if (c_isgraph(*op)) |
---|
6433 | fprintf(__stderrp, " -%c", *op); |
---|
6434 | } |
---|
6435 | fputc('\n', __stderrp); |
---|
6436 | exit(1); |
---|
6437 | } |
---|
6438 | break; |
---|
6439 | } |
---|
6440 | } |
---|
6441 | } |
---|
6442 | # 55 "misc-utils/hardlink.c" 2 |
---|
6443 | # 1 "./include/fileeq.h" 1 |
---|
6444 | |
---|
6445 | #define UTIL_LINUX_FILEEQ |
---|
6446 | |
---|
6447 | |
---|
6448 | |
---|
6449 | # 1 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdbool.h" 1 3 4 |
---|
6450 | # 32 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdbool.h" 3 4 |
---|
6451 | #define _STDBOOL_H |
---|
6452 | |
---|
6453 | |
---|
6454 | |
---|
6455 | #define bool _Bool |
---|
6456 | #define true 1 |
---|
6457 | #define false 0 |
---|
6458 | # 51 "/opt/local/lib/apple-gcc42/gcc/powerpc-apple-darwin8/4.2.4/include/stdbool.h" 3 4 |
---|
6459 | #define __bool_true_false_are_defined 1 |
---|
6460 | # 7 "./include/fileeq.h" 2 |
---|
6461 | |
---|
6462 | |
---|
6463 | |
---|
6464 | #define UL_FILEEQ_INTROSIZ 32 |
---|
6465 | |
---|
6466 | struct ul_fileeq_data { |
---|
6467 | unsigned char intro[32]; |
---|
6468 | unsigned char *blocks; |
---|
6469 | size_t nblocks; |
---|
6470 | size_t maxblocks; |
---|
6471 | int fd; |
---|
6472 | const char *name; |
---|
6473 | _Bool is_eof; |
---|
6474 | }; |
---|
6475 | |
---|
6476 | struct ul_fileeq { |
---|
6477 | int fd_api; |
---|
6478 | int fd_cip; |
---|
6479 | |
---|
6480 | size_t readsiz; |
---|
6481 | uint64_t filesiz; |
---|
6482 | uint64_t blocksmax; |
---|
6483 | const struct ul_fileeq_method *method; |
---|
6484 | |
---|
6485 | |
---|
6486 | unsigned char *buf_a; |
---|
6487 | unsigned char *buf_b; |
---|
6488 | unsigned char *buf_last; |
---|
6489 | }; |
---|
6490 | |
---|
6491 | extern int ul_fileeq_init(struct ul_fileeq *eq, const char *method); |
---|
6492 | extern void ul_fileeq_deinit(struct ul_fileeq *eq); |
---|
6493 | |
---|
6494 | |
---|
6495 | extern int ul_fileeq_data_associated(struct ul_fileeq_data *data); |
---|
6496 | extern void ul_fileeq_data_close_file(struct ul_fileeq_data *data); |
---|
6497 | extern void ul_fileeq_data_init(struct ul_fileeq_data *data); |
---|
6498 | extern void ul_fileeq_data_deinit(struct ul_fileeq_data *data); |
---|
6499 | extern void ul_fileeq_data_set_file(struct ul_fileeq_data *data, |
---|
6500 | const char *name); |
---|
6501 | extern size_t ul_fileeq_set_size(struct ul_fileeq *eq, uint64_t filesiz, |
---|
6502 | size_t readsiz, size_t memsiz); |
---|
6503 | |
---|
6504 | extern int ul_fileeq(struct ul_fileeq *eq, |
---|
6505 | struct ul_fileeq_data *a, struct ul_fileeq_data *b); |
---|
6506 | # 56 "misc-utils/hardlink.c" 2 |
---|
6507 | # 1 "./include/statfs_magic.h" 1 |
---|
6508 | |
---|
6509 | #define UTIL_LINUX_STATFS_MAGIC_H |
---|
6510 | |
---|
6511 | |
---|
6512 | |
---|
6513 | |
---|
6514 | |
---|
6515 | |
---|
6516 | |
---|
6517 | #define F_TYPE_EQUAL(a,b) (a == (__typeof__(a)) b) |
---|
6518 | # 22 "./include/statfs_magic.h" |
---|
6519 | #define STATFS_ADFS_MAGIC 0xadf5 |
---|
6520 | #define STATFS_AFFS_MAGIC 0xadff |
---|
6521 | #define STATFS_AFS_MAGIC 0x5346414F |
---|
6522 | #define STATFS_AUTOFS_MAGIC 0x0187 |
---|
6523 | #define STATFS_BDEVFS_MAGIC 0x62646576 |
---|
6524 | #define STATFS_BEFS_MAGIC 0x42465331 |
---|
6525 | #define STATFS_BFS_MAGIC 0x1BADFACE |
---|
6526 | #define STATFS_BINFMTFS_MAGIC 0x42494e4d |
---|
6527 | #define STATFS_BTRFS_MAGIC 0x9123683E |
---|
6528 | #define STATFS_CEPH_MAGIC 0x00c36400 |
---|
6529 | #define STATFS_CGROUP_MAGIC 0x27e0eb |
---|
6530 | #define STATFS_CGROUP2_MAGIC 0x63677270 |
---|
6531 | #define STATFS_CIFS_MAGIC 0xff534d42 |
---|
6532 | #define STATFS_CODA_MAGIC 0x73757245 |
---|
6533 | #define STATFS_CONFIGFS_MAGIC 0x62656570 |
---|
6534 | #define STATFS_CRAMFS_MAGIC 0x28cd3d45 |
---|
6535 | #define STATFS_DEBUGFS_MAGIC 0x64626720 |
---|
6536 | #define STATFS_DEVPTS_MAGIC 0x1cd1 |
---|
6537 | #define STATFS_ECRYPTFS_MAGIC 0xf15f |
---|
6538 | #define STATFS_EFIVARFS_MAGIC 0xde5e81e4 |
---|
6539 | #define STATFS_EFS_MAGIC 0x414A53 |
---|
6540 | #define STATFS_EXOFS_MAGIC 0x5DF5 |
---|
6541 | #define STATFS_EXT2_MAGIC 0xEF53 |
---|
6542 | #define STATFS_EXT3_MAGIC 0xEF53 |
---|
6543 | #define STATFS_EXT4_MAGIC 0xEF53 |
---|
6544 | #define STATFS_F2FS_MAGIC 0xF2F52010 |
---|
6545 | #define STATFS_FUSE_MAGIC 0x65735546 |
---|
6546 | #define STATFS_FUTEXFS_MAGIC 0xBAD1DEA |
---|
6547 | #define STATFS_GFS2_MAGIC 0x01161970 |
---|
6548 | #define STATFS_HFSPLUS_MAGIC 0x482b |
---|
6549 | #define STATFS_HOSTFS_MAGIC 0x00c0ffee |
---|
6550 | #define STATFS_HPFS_MAGIC 0xf995e849 |
---|
6551 | #define STATFS_HPPFS_MAGIC 0xb00000ee |
---|
6552 | #define STATFS_HUGETLBFS_MAGIC 0x958458f6 |
---|
6553 | #define STATFS_ISOFS_MAGIC 0x9660 |
---|
6554 | #define STATFS_JFFS2_MAGIC 0x72b6 |
---|
6555 | #define STATFS_JFS_MAGIC 0x3153464a |
---|
6556 | #define STATFS_LOGFS_MAGIC 0xc97e8168 |
---|
6557 | #define STATFS_MINIX2_MAGIC 0x2468 |
---|
6558 | #define STATFS_MINIX2_MAGIC2 0x2478 |
---|
6559 | #define STATFS_MINIX3_MAGIC 0x4d5a |
---|
6560 | #define STATFS_MINIX_MAGIC 0x137F |
---|
6561 | #define STATFS_MINIX_MAGIC2 0x138F |
---|
6562 | #define STATFS_MQUEUE_MAGIC 0x19800202 |
---|
6563 | #define STATFS_MSDOS_MAGIC 0x4d44 |
---|
6564 | #define STATFS_NCP_MAGIC 0x564c |
---|
6565 | #define STATFS_NFS_MAGIC 0x6969 |
---|
6566 | #define STATFS_NILFS_MAGIC 0x3434 |
---|
6567 | #define STATFS_NTFS_MAGIC 0x5346544e |
---|
6568 | #define STATFS_OCFS2_MAGIC 0x7461636f |
---|
6569 | #define STATFS_OMFS_MAGIC 0xC2993D87 |
---|
6570 | #define STATFS_OPENPROMFS_MAGIC 0x9fa1 |
---|
6571 | #define STATFS_PIPEFS_MAGIC 0x50495045 |
---|
6572 | #define STATFS_PROC_MAGIC 0x9fa0 |
---|
6573 | #define STATFS_PSTOREFS_MAGIC 0x6165676C |
---|
6574 | #define STATFS_QNX4_MAGIC 0x002f |
---|
6575 | #define STATFS_QNX6_MAGIC 0x68191122 |
---|
6576 | #define STATFS_RAMFS_MAGIC 0x858458f6 |
---|
6577 | #define STATFS_REISERFS_MAGIC 0x52654973 |
---|
6578 | #define STATFS_ROMFS_MAGIC 0x7275 |
---|
6579 | #define STATFS_SECURITYFS_MAGIC 0x73636673 |
---|
6580 | #define STATFS_SELINUXFS_MAGIC 0xf97cff8c |
---|
6581 | #define STATFS_SMACKFS_MAGIC 0x43415d53 |
---|
6582 | #define STATFS_SMB_MAGIC 0x517B |
---|
6583 | #define STATFS_SOCKFS_MAGIC 0x534F434B |
---|
6584 | #define STATFS_SQUASHFS_MAGIC 0x73717368 |
---|
6585 | #define STATFS_SYSFS_MAGIC 0x62656572 |
---|
6586 | #define STATFS_TMPFS_MAGIC 0x01021994 |
---|
6587 | #define STATFS_UBIFS_MAGIC 0x24051905 |
---|
6588 | #define STATFS_UDF_MAGIC 0x15013346 |
---|
6589 | #define STATFS_UFS2_MAGIC 0x19540119 |
---|
6590 | #define STATFS_UFS_MAGIC 0x00011954 |
---|
6591 | #define STATFS_V9FS_MAGIC 0x01021997 |
---|
6592 | #define STATFS_VXFS_MAGIC 0xa501FCF5 |
---|
6593 | #define STATFS_XENFS_MAGIC 0xabba1974 |
---|
6594 | #define STATFS_XFS_MAGIC 0x58465342 |
---|
6595 | # 57 "misc-utils/hardlink.c" 2 |
---|
6596 | |
---|
6597 | # 1 "/usr/include/regex.h" 1 3 4 |
---|
6598 | # 63 "/usr/include/regex.h" 3 4 |
---|
6599 | #define _REGEX_H_ |
---|
6600 | |
---|
6601 | |
---|
6602 | |
---|
6603 | |
---|
6604 | |
---|
6605 | typedef __darwin_off_t regoff_t; |
---|
6606 | |
---|
6607 | |
---|
6608 | |
---|
6609 | |
---|
6610 | |
---|
6611 | |
---|
6612 | typedef struct { |
---|
6613 | int re_magic; |
---|
6614 | size_t re_nsub; |
---|
6615 | const char *re_endp; |
---|
6616 | struct re_guts *re_g; |
---|
6617 | } regex_t; |
---|
6618 | |
---|
6619 | typedef struct { |
---|
6620 | regoff_t rm_so; |
---|
6621 | regoff_t rm_eo; |
---|
6622 | } regmatch_t; |
---|
6623 | |
---|
6624 | |
---|
6625 | |
---|
6626 | |
---|
6627 | |
---|
6628 | #define REG_EXTENDED 0001 |
---|
6629 | #define REG_ICASE 0002 |
---|
6630 | #define REG_NOSUB 0004 |
---|
6631 | #define REG_NEWLINE 0010 |
---|
6632 | |
---|
6633 | |
---|
6634 | |
---|
6635 | |
---|
6636 | |
---|
6637 | |
---|
6638 | |
---|
6639 | #define REG_ENOSYS (-1) |
---|
6640 | #define REG_NOMATCH 1 |
---|
6641 | #define REG_BADPAT 2 |
---|
6642 | #define REG_ECOLLATE 3 |
---|
6643 | #define REG_ECTYPE 4 |
---|
6644 | #define REG_EESCAPE 5 |
---|
6645 | #define REG_ESUBREG 6 |
---|
6646 | #define REG_EBRACK 7 |
---|
6647 | #define REG_EPAREN 8 |
---|
6648 | #define REG_EBRACE 9 |
---|
6649 | #define REG_BADBR 10 |
---|
6650 | #define REG_ERANGE 11 |
---|
6651 | #define REG_ESPACE 12 |
---|
6652 | #define REG_BADRPT 13 |
---|
6653 | # 127 "/usr/include/regex.h" 3 4 |
---|
6654 | #define REG_NOTBOL 00001 |
---|
6655 | #define REG_NOTEOL 00002 |
---|
6656 | |
---|
6657 | |
---|
6658 | |
---|
6659 | |
---|
6660 | |
---|
6661 | |
---|
6662 | |
---|
6663 | |
---|
6664 | int regcomp(regex_t * , const char * , int) __asm("_" "regcomp" "$UNIX2003"); |
---|
6665 | size_t regerror(int, const regex_t * , char * , size_t); |
---|
6666 | |
---|
6667 | int regexec(const regex_t * , |
---|
6668 | const char * , size_t, regmatch_t * , int); |
---|
6669 | void regfree(regex_t *); |
---|
6670 | |
---|
6671 | # 59 "misc-utils/hardlink.c" 2 |
---|
6672 | |
---|
6673 | |
---|
6674 | |
---|
6675 | |
---|
6676 | |
---|
6677 | |
---|
6678 | static int quiet; |
---|
6679 | # 77 "misc-utils/hardlink.c" |
---|
6680 | static struct ul_fileeq fileeq; |
---|
6681 | # 88 "misc-utils/hardlink.c" |
---|
6682 | struct file { |
---|
6683 | struct stat st; |
---|
6684 | struct ul_fileeq_data data; |
---|
6685 | |
---|
6686 | struct file *next; |
---|
6687 | struct link { |
---|
6688 | struct link *next; |
---|
6689 | int basename; |
---|
6690 | |
---|
6691 | |
---|
6692 | |
---|
6693 | char path[0]; |
---|
6694 | |
---|
6695 | |
---|
6696 | |
---|
6697 | } *links; |
---|
6698 | }; |
---|
6699 | # 113 "misc-utils/hardlink.c" |
---|
6700 | enum log_level { |
---|
6701 | JLOG_SUMMARY, |
---|
6702 | JLOG_INFO, |
---|
6703 | JLOG_VERBOSE1, |
---|
6704 | JLOG_VERBOSE2 |
---|
6705 | }; |
---|
6706 | # 130 "misc-utils/hardlink.c" |
---|
6707 | static struct statistics { |
---|
6708 | int started; |
---|
6709 | size_t files; |
---|
6710 | size_t linked; |
---|
6711 | size_t xattr_comparisons; |
---|
6712 | size_t comparisons; |
---|
6713 | size_t ignored_reflinks; |
---|
6714 | double saved; |
---|
6715 | struct timeval start_time; |
---|
6716 | } stats; |
---|
6717 | |
---|
6718 | |
---|
6719 | struct hdl_regex { |
---|
6720 | regex_t re; |
---|
6721 | |
---|
6722 | struct hdl_regex *next; |
---|
6723 | }; |
---|
6724 | # 165 "misc-utils/hardlink.c" |
---|
6725 | static struct options { |
---|
6726 | struct hdl_regex *include; |
---|
6727 | struct hdl_regex *exclude; |
---|
6728 | |
---|
6729 | const char *method; |
---|
6730 | signed int verbosity; |
---|
6731 | unsigned int respect_mode:1; |
---|
6732 | unsigned int respect_owner:1; |
---|
6733 | unsigned int respect_name:1; |
---|
6734 | unsigned int respect_time:1; |
---|
6735 | unsigned int respect_xattrs:1; |
---|
6736 | unsigned int maximise:1; |
---|
6737 | unsigned int minimise:1; |
---|
6738 | unsigned int keep_oldest:1; |
---|
6739 | unsigned int dry_run:1; |
---|
6740 | uintmax_t min_size; |
---|
6741 | uintmax_t max_size; |
---|
6742 | size_t io_size; |
---|
6743 | size_t cache_size; |
---|
6744 | } opts = { |
---|
6745 | |
---|
6746 | .method = "sha256", |
---|
6747 | .respect_mode = 1, |
---|
6748 | .respect_owner = 1, |
---|
6749 | .respect_time = 1, |
---|
6750 | .respect_xattrs = 0, |
---|
6751 | .keep_oldest = 0, |
---|
6752 | .min_size = 1, |
---|
6753 | .cache_size = 10*1024*1024 |
---|
6754 | }; |
---|
6755 | |
---|
6756 | |
---|
6757 | |
---|
6758 | |
---|
6759 | |
---|
6760 | |
---|
6761 | |
---|
6762 | static void *files; |
---|
6763 | static void *files_by_ino; |
---|
6764 | |
---|
6765 | |
---|
6766 | |
---|
6767 | |
---|
6768 | |
---|
6769 | |
---|
6770 | |
---|
6771 | static int last_signal; |
---|
6772 | |
---|
6773 | |
---|
6774 | #define is_log_enabled(_level) (quiet == 0 && (_level) <= (unsigned int)opts.verbosity) |
---|
6775 | |
---|
6776 | |
---|
6777 | |
---|
6778 | |
---|
6779 | |
---|
6780 | |
---|
6781 | __attribute__((format(printf, 2, 3))) |
---|
6782 | static void jlog(enum log_level level, const char *format, ...) |
---|
6783 | { |
---|
6784 | va_list args; |
---|
6785 | |
---|
6786 | if (!(quiet == 0 && (level) <= (unsigned int)opts.verbosity)) |
---|
6787 | return; |
---|
6788 | |
---|
6789 | __builtin_va_start(args,format); |
---|
6790 | vfprintf(__stdoutp, format, args); |
---|
6791 | __builtin_va_end(args); |
---|
6792 | fputc('\n', __stdoutp); |
---|
6793 | } |
---|
6794 | # 242 "misc-utils/hardlink.c" |
---|
6795 | #define CMP(a,b) ((a) > (b) ? 1 : ((a) < (b) ? -1 : 0)) |
---|
6796 | |
---|
6797 | |
---|
6798 | |
---|
6799 | |
---|
6800 | |
---|
6801 | |
---|
6802 | static void register_regex(struct hdl_regex **pregs, const char *regex) |
---|
6803 | { |
---|
6804 | struct hdl_regex *link; |
---|
6805 | int err; |
---|
6806 | |
---|
6807 | link = xmalloc(sizeof(*link)); |
---|
6808 | |
---|
6809 | if ((err = regcomp(&link->re, regex, 0004 | 0001)) != 0) { |
---|
6810 | size_t size = regerror(err, &link->re, ((void *)0), 0); |
---|
6811 | char *buf = xmalloc(size + 1); |
---|
6812 | |
---|
6813 | regerror(err, &link->re, buf, size); |
---|
6814 | |
---|
6815 | errx(1, libintl_gettext ("could not compile regular expression %s: %s"), |
---|
6816 | regex, buf); |
---|
6817 | } |
---|
6818 | link->next = *pregs; *pregs = link; |
---|
6819 | } |
---|
6820 | # 276 "misc-utils/hardlink.c" |
---|
6821 | static int match_any_regex(struct hdl_regex *pregs, const char *what) |
---|
6822 | { |
---|
6823 | for (; pregs != ((void *)0); pregs = pregs->next) { |
---|
6824 | if (regexec(&pregs->re, what, 0, ((void *)0), 0) == 0) |
---|
6825 | return 1; |
---|
6826 | } |
---|
6827 | return 0; |
---|
6828 | } |
---|
6829 | # 292 "misc-utils/hardlink.c" |
---|
6830 | static int compare_nodes(const void *_a, const void *_b) |
---|
6831 | { |
---|
6832 | const struct file *a = _a; |
---|
6833 | const struct file *b = _b; |
---|
6834 | int diff = 0; |
---|
6835 | |
---|
6836 | if (diff == 0) |
---|
6837 | diff = ((a->st.st_dev) > (b->st.st_dev) ? 1 : ((a->st.st_dev) < (b->st.st_dev) ? -1 : 0)); |
---|
6838 | if (diff == 0) |
---|
6839 | diff = ((a->st.st_size) > (b->st.st_size) ? 1 : ((a->st.st_size) < (b->st.st_size) ? -1 : 0)); |
---|
6840 | |
---|
6841 | return diff; |
---|
6842 | } |
---|
6843 | # 313 "misc-utils/hardlink.c" |
---|
6844 | static int compare_nodes_ino(const void *_a, const void *_b) |
---|
6845 | { |
---|
6846 | const struct file *a = _a; |
---|
6847 | const struct file *b = _b; |
---|
6848 | int diff = 0; |
---|
6849 | |
---|
6850 | if (diff == 0) |
---|
6851 | diff = ((a->st.st_dev) > (b->st.st_dev) ? 1 : ((a->st.st_dev) < (b->st.st_dev) ? -1 : 0)); |
---|
6852 | if (diff == 0) |
---|
6853 | diff = ((a->st.st_ino) > (b->st.st_ino) ? 1 : ((a->st.st_ino) < (b->st.st_ino) ? -1 : 0)); |
---|
6854 | |
---|
6855 | |
---|
6856 | |
---|
6857 | |
---|
6858 | if (diff == 0 && opts.respect_name) |
---|
6859 | diff = strcmp(a->links->path + a->links->basename, |
---|
6860 | b->links->path + b->links->basename); |
---|
6861 | |
---|
6862 | return diff; |
---|
6863 | } |
---|
6864 | |
---|
6865 | |
---|
6866 | |
---|
6867 | |
---|
6868 | static void print_stats(void) |
---|
6869 | { |
---|
6870 | struct timeval end = { 0, 0 }, delta = { 0, 0 }; |
---|
6871 | char *ssz; |
---|
6872 | |
---|
6873 | gettime_monotonic(&end); |
---|
6874 | timersub(&end, &stats.start_time, &delta); |
---|
6875 | |
---|
6876 | jlog(JLOG_SUMMARY, "%-25s %s", libintl_gettext ("Mode:"), |
---|
6877 | opts.dry_run ? libintl_gettext ("dry-run") : libintl_gettext ("real")); |
---|
6878 | jlog(JLOG_SUMMARY, "%-25s %s", libintl_gettext ("Method:"), opts.method); |
---|
6879 | jlog(JLOG_SUMMARY, "%-25s %zu", libintl_gettext ("Files:"), stats.files); |
---|
6880 | jlog(JLOG_SUMMARY, libintl_gettext ("%-25s %zu files"), libintl_gettext ("Linked:"), stats.linked); |
---|
6881 | |
---|
6882 | |
---|
6883 | |
---|
6884 | |
---|
6885 | |
---|
6886 | jlog(JLOG_SUMMARY, libintl_gettext ("%-25s %zu files"), libintl_gettext ("Compared:"), |
---|
6887 | stats.comparisons); |
---|
6888 | |
---|
6889 | |
---|
6890 | |
---|
6891 | |
---|
6892 | |
---|
6893 | ssz = size_to_human_string(SIZE_SUFFIX_3LETTER | |
---|
6894 | SIZE_SUFFIX_SPACE | |
---|
6895 | SIZE_DECIMAL_2DIGITS, stats.saved); |
---|
6896 | |
---|
6897 | jlog(JLOG_SUMMARY, "%-25s %s", libintl_gettext ("Saved:"), ssz); |
---|
6898 | free(ssz); |
---|
6899 | |
---|
6900 | jlog(JLOG_SUMMARY, libintl_gettext ("%-25s %""q" "d"".%06""q" "d"" seconds"), libintl_gettext ("Duration:"), |
---|
6901 | (int64_t)delta.tv_sec, (int64_t)delta.tv_usec); |
---|
6902 | } |
---|
6903 | |
---|
6904 | |
---|
6905 | |
---|
6906 | |
---|
6907 | |
---|
6908 | |
---|
6909 | static int handle_interrupt(void) |
---|
6910 | { |
---|
6911 | switch (last_signal) { |
---|
6912 | case 2: |
---|
6913 | case 15: |
---|
6914 | return 1; |
---|
6915 | case 30: |
---|
6916 | print_stats(); |
---|
6917 | putchar('\n'); |
---|
6918 | break; |
---|
6919 | } |
---|
6920 | |
---|
6921 | last_signal = 0; |
---|
6922 | return 0; |
---|
6923 | } |
---|
6924 | # 580 "misc-utils/hardlink.c" |
---|
6925 | static int file_xattrs_equal(const struct file *a, const struct file *b) |
---|
6926 | { |
---|
6927 | return 1; |
---|
6928 | } |
---|
6929 | # 594 "misc-utils/hardlink.c" |
---|
6930 | static int file_may_link_to(const struct file *a, const struct file *b) |
---|
6931 | { |
---|
6932 | return (a->st.st_size != 0 && |
---|
6933 | a->st.st_size == b->st.st_size && |
---|
6934 | a->links != ((void *)0) && b->links != ((void *)0) && |
---|
6935 | a->st.st_dev == b->st.st_dev && |
---|
6936 | a->st.st_ino != b->st.st_ino && |
---|
6937 | (!opts.respect_mode || a->st.st_mode == b->st.st_mode) && |
---|
6938 | (!opts.respect_owner || a->st.st_uid == b->st.st_uid) && |
---|
6939 | (!opts.respect_owner || a->st.st_gid == b->st.st_gid) && |
---|
6940 | (!opts.respect_time || a->st.st_mtime == b->st.st_mtime) && |
---|
6941 | (!opts.respect_name |
---|
6942 | || strcmp(a->links->path + a->links->basename, |
---|
6943 | b->links->path + b->links->basename) == 0) && |
---|
6944 | (!opts.respect_xattrs || file_xattrs_equal(a, b))); |
---|
6945 | } |
---|
6946 | # 620 "misc-utils/hardlink.c" |
---|
6947 | static int file_compare(const struct file *a, const struct file *b) |
---|
6948 | { |
---|
6949 | int res = 0; |
---|
6950 | if (a->st.st_dev == b->st.st_dev && a->st.st_ino == b->st.st_ino) |
---|
6951 | return 0; |
---|
6952 | |
---|
6953 | if (res == 0 && opts.maximise) |
---|
6954 | res = ((a->st.st_nlink) > (b->st.st_nlink) ? 1 : ((a->st.st_nlink) < (b->st.st_nlink) ? -1 : 0)); |
---|
6955 | if (res == 0 && opts.minimise) |
---|
6956 | res = ((b->st.st_nlink) > (a->st.st_nlink) ? 1 : ((b->st.st_nlink) < (a->st.st_nlink) ? -1 : 0)); |
---|
6957 | if (res == 0) |
---|
6958 | res = opts.keep_oldest ? ((b->st.st_mtime) > (a->st.st_mtime) ? 1 : ((b->st.st_mtime) < (a->st.st_mtime) ? -1 : 0)) |
---|
6959 | : ((a->st.st_mtime) > (b->st.st_mtime) ? 1 : ((a->st.st_mtime) < (b->st.st_mtime) ? -1 : 0)); |
---|
6960 | if (res == 0) |
---|
6961 | res = ((b->st.st_ino) > (a->st.st_ino) ? 1 : ((b->st.st_ino) < (a->st.st_ino) ? -1 : 0)); |
---|
6962 | |
---|
6963 | return res; |
---|
6964 | } |
---|
6965 | # 677 "misc-utils/hardlink.c" |
---|
6966 | static inline int do_link(struct file *a, |
---|
6967 | struct file *b __attribute__((__unused__)), |
---|
6968 | const char *new_name, |
---|
6969 | int reflink __attribute__((__unused__))) |
---|
6970 | { |
---|
6971 | return link(a->links->path, new_name); |
---|
6972 | } |
---|
6973 | # 695 "misc-utils/hardlink.c" |
---|
6974 | static int file_link(struct file *a, struct file *b, int reflink) |
---|
6975 | { |
---|
6976 | |
---|
6977 | file_link: |
---|
6978 | (__builtin_expect(!(a->links != ((void *)0)), 0) ? __assert_rtn(__func__, "misc-utils/hardlink.c", 699, "a->links != NULL") : (void)0); |
---|
6979 | (__builtin_expect(!(b->links != ((void *)0)), 0) ? __assert_rtn(__func__, "misc-utils/hardlink.c", 700, "b->links != NULL") : (void)0); |
---|
6980 | |
---|
6981 | if ((quiet == 0 && (JLOG_INFO) <= (unsigned int)opts.verbosity)) { |
---|
6982 | char *ssz = size_to_human_string(SIZE_SUFFIX_3LETTER | |
---|
6983 | SIZE_SUFFIX_SPACE | |
---|
6984 | SIZE_DECIMAL_2DIGITS, a->st.st_size); |
---|
6985 | jlog(JLOG_INFO, libintl_gettext ("%s%sLinking %s to %s (-%s)"), |
---|
6986 | opts.dry_run ? libintl_gettext ("[DryRun] ") : "", |
---|
6987 | reflink ? "Ref" : "", |
---|
6988 | a->links->path, b->links->path, |
---|
6989 | ssz); |
---|
6990 | free(ssz); |
---|
6991 | } |
---|
6992 | |
---|
6993 | if (!opts.dry_run) { |
---|
6994 | char *new_path; |
---|
6995 | int failed = 1; |
---|
6996 | |
---|
6997 | xasprintf(&new_path, "%s.hardlink-temporary", b->links->path); |
---|
6998 | |
---|
6999 | if (do_link(a, b, new_path, reflink) != 0) |
---|
7000 | warn(libintl_gettext ("cannot link %s to %s"), a->links->path, new_path); |
---|
7001 | |
---|
7002 | else if (rename(new_path, b->links->path) != 0) { |
---|
7003 | warn(libintl_gettext ("cannot rename %s to %s"), a->links->path, new_path); |
---|
7004 | unlink(new_path); |
---|
7005 | } else |
---|
7006 | failed = 0; |
---|
7007 | |
---|
7008 | free(new_path); |
---|
7009 | if (failed) |
---|
7010 | return 0; |
---|
7011 | } |
---|
7012 | |
---|
7013 | |
---|
7014 | stats.linked++; |
---|
7015 | |
---|
7016 | |
---|
7017 | a->st.st_nlink++; |
---|
7018 | b->st.st_nlink--; |
---|
7019 | |
---|
7020 | if (b->st.st_nlink == 0) |
---|
7021 | stats.saved += a->st.st_size; |
---|
7022 | |
---|
7023 | |
---|
7024 | { |
---|
7025 | struct link *new_link = b->links; |
---|
7026 | |
---|
7027 | b->links = b->links->next; |
---|
7028 | new_link->next = a->links->next; |
---|
7029 | a->links->next = new_link; |
---|
7030 | } |
---|
7031 | |
---|
7032 | |
---|
7033 | if (b->links) |
---|
7034 | goto file_link; |
---|
7035 | |
---|
7036 | return 1; |
---|
7037 | } |
---|
7038 | |
---|
7039 | static int has_fpath(struct file *node, const char *path) |
---|
7040 | { |
---|
7041 | struct link *l; |
---|
7042 | |
---|
7043 | for (l = node->links; l; l = l->next) { |
---|
7044 | if (strcmp(l->path, path) == 0) |
---|
7045 | return 1; |
---|
7046 | } |
---|
7047 | |
---|
7048 | return 0; |
---|
7049 | } |
---|
7050 | # 783 "misc-utils/hardlink.c" |
---|
7051 | static int inserter(const char *fpath, const struct stat *sb, |
---|
7052 | int typeflag, struct FTW *ftwbuf) |
---|
7053 | { |
---|
7054 | struct file *fil; |
---|
7055 | struct file **node; |
---|
7056 | size_t pathlen; |
---|
7057 | int included; |
---|
7058 | int excluded; |
---|
7059 | |
---|
7060 | if (handle_interrupt()) |
---|
7061 | return 1; |
---|
7062 | if (typeflag == 2 || typeflag == 4) |
---|
7063 | warn(libintl_gettext ("cannot read %s"), fpath); |
---|
7064 | if (typeflag != 0 || !(((sb->st_mode) & 0170000) == 0100000)) |
---|
7065 | return 0; |
---|
7066 | |
---|
7067 | included = match_any_regex(opts.include, fpath); |
---|
7068 | excluded = match_any_regex(opts.exclude, fpath); |
---|
7069 | |
---|
7070 | if ((opts.exclude && excluded && !included) || |
---|
7071 | (!opts.exclude && opts.include && !included)) |
---|
7072 | return 0; |
---|
7073 | |
---|
7074 | stats.files++; |
---|
7075 | |
---|
7076 | if ((uintmax_t) sb->st_size < opts.min_size) { |
---|
7077 | jlog(JLOG_VERBOSE1, |
---|
7078 | libintl_gettext ("Skipped %s (smaller than configured size)"), fpath); |
---|
7079 | return 0; |
---|
7080 | } |
---|
7081 | |
---|
7082 | jlog(JLOG_VERBOSE2, " %5zu: [%ld/%ld/%zu] %s", |
---|
7083 | stats.files, sb->st_dev, sb->st_ino, |
---|
7084 | (size_t) sb->st_nlink, fpath); |
---|
7085 | |
---|
7086 | if ((opts.max_size > 0) && ((uintmax_t) sb->st_size > opts.max_size)) { |
---|
7087 | jlog(JLOG_VERBOSE1, |
---|
7088 | libintl_gettext ("Skipped %s (greater than configured size)"), fpath); |
---|
7089 | return 0; |
---|
7090 | } |
---|
7091 | |
---|
7092 | pathlen = strlen(fpath) + 1; |
---|
7093 | |
---|
7094 | fil = xcalloc(1, sizeof(*fil)); |
---|
7095 | fil->links = xcalloc(1, sizeof(struct link) + pathlen); |
---|
7096 | |
---|
7097 | fil->st = *sb; |
---|
7098 | fil->links->basename = ftwbuf->base; |
---|
7099 | fil->links->next = ((void *)0); |
---|
7100 | |
---|
7101 | memcpy(fil->links->path, fpath, pathlen); |
---|
7102 | |
---|
7103 | node = tsearch(fil, &files_by_ino, compare_nodes_ino); |
---|
7104 | |
---|
7105 | if (node == ((void *)0)) |
---|
7106 | goto fail; |
---|
7107 | |
---|
7108 | if (*node != fil) { |
---|
7109 | |
---|
7110 | (__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); |
---|
7111 | (__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); |
---|
7112 | |
---|
7113 | if (has_fpath(*node, fpath)) { |
---|
7114 | jlog(JLOG_VERBOSE1, |
---|
7115 | libintl_gettext ("Skipped %s (specified more than once)"), fpath); |
---|
7116 | free(fil->links); |
---|
7117 | } else { |
---|
7118 | fil->links->next = (*node)->links; |
---|
7119 | (*node)->links = fil->links; |
---|
7120 | } |
---|
7121 | |
---|
7122 | free(fil); |
---|
7123 | } else { |
---|
7124 | |
---|
7125 | node = tsearch(fil, &files, compare_nodes); |
---|
7126 | |
---|
7127 | if (node == ((void *)0)) |
---|
7128 | goto fail; |
---|
7129 | |
---|
7130 | if (*node != fil) { |
---|
7131 | struct file *l; |
---|
7132 | |
---|
7133 | if (file_compare(fil, *node) >= 0) { |
---|
7134 | fil->next = *node; |
---|
7135 | *node = fil; |
---|
7136 | } else { |
---|
7137 | for (l = *node; l != ((void *)0); l = l->next) { |
---|
7138 | if (l->next != ((void *)0) |
---|
7139 | && file_compare(fil, l->next) < 0) |
---|
7140 | continue; |
---|
7141 | |
---|
7142 | fil->next = l->next; |
---|
7143 | l->next = fil; |
---|
7144 | |
---|
7145 | break; |
---|
7146 | } |
---|
7147 | } |
---|
7148 | } |
---|
7149 | } |
---|
7150 | |
---|
7151 | return 0; |
---|
7152 | |
---|
7153 | fail: |
---|
7154 | warn(libintl_gettext ("cannot continue")); |
---|
7155 | return 0; |
---|
7156 | } |
---|
7157 | # 981 "misc-utils/hardlink.c" |
---|
7158 | static inline size_t count_nodes(struct file *x) |
---|
7159 | { |
---|
7160 | size_t ct = 0; |
---|
7161 | |
---|
7162 | for ( ; x != ((void *)0); x = x->next) |
---|
7163 | ct++; |
---|
7164 | |
---|
7165 | return ct; |
---|
7166 | } |
---|
7167 | # 1001 "misc-utils/hardlink.c" |
---|
7168 | static void visitor(const void *nodep, const VISIT which, const int depth) |
---|
7169 | { |
---|
7170 | struct file *master = *(struct file **)nodep; |
---|
7171 | struct file *begin = master; |
---|
7172 | struct file *other; |
---|
7173 | |
---|
7174 | (void)depth; |
---|
7175 | |
---|
7176 | if (which != leaf && which != endorder) |
---|
7177 | return; |
---|
7178 | |
---|
7179 | for (; master != ((void *)0); master = master->next) { |
---|
7180 | size_t nnodes, memsiz; |
---|
7181 | int may_reflink = 0; |
---|
7182 | |
---|
7183 | if (handle_interrupt()) |
---|
7184 | exit(1); |
---|
7185 | if (master->links == ((void *)0)) |
---|
7186 | continue; |
---|
7187 | |
---|
7188 | |
---|
7189 | nnodes = count_nodes(master); |
---|
7190 | if (!nnodes) |
---|
7191 | continue; |
---|
7192 | |
---|
7193 | |
---|
7194 | memsiz = opts.cache_size / nnodes; |
---|
7195 | |
---|
7196 | ul_fileeq_set_size(&fileeq, master->st.st_size, opts.io_size, memsiz); |
---|
7197 | # 1039 "misc-utils/hardlink.c" |
---|
7198 | for (other = master->next; other != ((void *)0); other = other->next) { |
---|
7199 | int eq; |
---|
7200 | |
---|
7201 | if (handle_interrupt()) |
---|
7202 | exit(1); |
---|
7203 | |
---|
7204 | (__builtin_expect(!(other != other->next), 0) ? __assert_rtn(__func__, "misc-utils/hardlink.c", 1045, "other != other->next") : (void)0); |
---|
7205 | (__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); |
---|
7206 | |
---|
7207 | if (!other->links) |
---|
7208 | continue; |
---|
7209 | |
---|
7210 | |
---|
7211 | if (!file_may_link_to(master, other)) { |
---|
7212 | jlog(JLOG_VERBOSE2, |
---|
7213 | libintl_gettext ("Skipped (attributes mismatch) %s"), other->links->path); |
---|
7214 | continue; |
---|
7215 | } |
---|
7216 | # 1066 "misc-utils/hardlink.c" |
---|
7217 | if (!ul_fileeq_data_associated(&master->data)) |
---|
7218 | ul_fileeq_data_set_file(&master->data, master->links->path); |
---|
7219 | if (!ul_fileeq_data_associated(&other->data)) |
---|
7220 | ul_fileeq_data_set_file(&other->data, other->links->path); |
---|
7221 | |
---|
7222 | |
---|
7223 | eq = ul_fileeq(&fileeq, &master->data, &other->data); |
---|
7224 | |
---|
7225 | |
---|
7226 | ul_fileeq_data_close_file(&other->data); |
---|
7227 | |
---|
7228 | stats.comparisons++; |
---|
7229 | |
---|
7230 | if (!eq) { |
---|
7231 | jlog(JLOG_VERBOSE2, |
---|
7232 | libintl_gettext ("Skipped (content mismatch) %s"), other->links->path); |
---|
7233 | continue; |
---|
7234 | } |
---|
7235 | |
---|
7236 | |
---|
7237 | if (!file_link(master, other, may_reflink) && (*__error()) == 31) { |
---|
7238 | ul_fileeq_data_deinit(&master->data); |
---|
7239 | master = other; |
---|
7240 | } |
---|
7241 | } |
---|
7242 | |
---|
7243 | |
---|
7244 | ul_fileeq_data_deinit(&master->data); |
---|
7245 | } |
---|
7246 | |
---|
7247 | |
---|
7248 | for (other = begin; other != ((void *)0); other = other->next) { |
---|
7249 | if (ul_fileeq_data_associated(&other->data)) |
---|
7250 | ul_fileeq_data_deinit(&other->data); |
---|
7251 | } |
---|
7252 | } |
---|
7253 | |
---|
7254 | |
---|
7255 | |
---|
7256 | |
---|
7257 | static void __attribute__((__noreturn__)) usage(void) |
---|
7258 | { |
---|
7259 | FILE *out = __stdoutp; |
---|
7260 | |
---|
7261 | fputs(libintl_gettext ("\nUsage:\n"), out); |
---|
7262 | fprintf(out, libintl_gettext (" %s [options] <directory>|<file> ...\n"), |
---|
7263 | __progname); |
---|
7264 | |
---|
7265 | fputs("\n", out); |
---|
7266 | fputs(libintl_gettext ("Consolidate duplicate files using hardlinks.\n"), out); |
---|
7267 | |
---|
7268 | fputs(libintl_gettext ("\nOptions:\n"), out); |
---|
7269 | fputs(libintl_gettext (" -v, --verbose verbose output (repeat for more verbosity)\n"), out); |
---|
7270 | fputs(libintl_gettext (" -q, --quiet quiet mode - don't print anything\n"), out); |
---|
7271 | fputs(libintl_gettext (" -n, --dry-run don't actually link anything\n"), out); |
---|
7272 | fputs(libintl_gettext (" -y, --method <name> file content comparison method\n"), out); |
---|
7273 | |
---|
7274 | fputs(libintl_gettext (" -f, --respect-name filenames have to be identical\n"), out); |
---|
7275 | fputs(libintl_gettext (" -p, --ignore-mode ignore changes of file mode\n"), out); |
---|
7276 | fputs(libintl_gettext (" -o, --ignore-owner ignore owner changes\n"), out); |
---|
7277 | fputs(libintl_gettext (" -t, --ignore-time ignore timestamps (when testing for equality)\n"), out); |
---|
7278 | |
---|
7279 | |
---|
7280 | |
---|
7281 | |
---|
7282 | |
---|
7283 | |
---|
7284 | |
---|
7285 | fputs(libintl_gettext (" -m, --maximize maximize the hardlink count, remove the file with\n" " lowest hardlink count\n"), out); |
---|
7286 | |
---|
7287 | fputs(libintl_gettext (" -M, --minimize reverse the meaning of -m\n"), out); |
---|
7288 | fputs(libintl_gettext (" -O, --keep-oldest keep the oldest file of multiple equal files\n" " (lower precedence than minimize/maximize)\n"), out); |
---|
7289 | |
---|
7290 | fputs(libintl_gettext (" -x, --exclude <regex> regular expression to exclude files\n"), out); |
---|
7291 | fputs(libintl_gettext (" -i, --include <regex> regular expression to include files/dirs\n"), out); |
---|
7292 | fputs(libintl_gettext (" -s, --minimum-size <size> minimum size for files.\n"), out); |
---|
7293 | fputs(libintl_gettext (" -S, --maximum-size <size> maximum size for files.\n"), out); |
---|
7294 | fputs(libintl_gettext (" -b, --io-size <size> I/O buffer size for file reading (speedup, using more RAM)\n"), out); |
---|
7295 | fputs(libintl_gettext (" -r, --cache-size <size> memory limit for cached file content data\n"), out); |
---|
7296 | fputs(libintl_gettext (" -c, --content compare only file contents, same as -pot\n"), out); |
---|
7297 | |
---|
7298 | fputs("\n", out); |
---|
7299 | printf("%-" "28" "s%s\n" "%-" "28" "s%s\n" , " -h, --help", libintl_gettext ("display this help") , " -V, --version", libintl_gettext ("display version")); |
---|
7300 | printf(libintl_gettext ("\nFor more details see %s.\n"), "hardlink(1)"); |
---|
7301 | |
---|
7302 | exit(0); |
---|
7303 | } |
---|
7304 | |
---|
7305 | |
---|
7306 | |
---|
7307 | |
---|
7308 | |
---|
7309 | |
---|
7310 | static int parse_options(int argc, char *argv[]) |
---|
7311 | { |
---|
7312 | enum { |
---|
7313 | OPT_REFLINK = 127 + 1, |
---|
7314 | OPT_SKIP_RELINKS |
---|
7315 | }; |
---|
7316 | static const char optstr[] = "VhvnfpotXcmMOx:y:i:r:S:s:b:q"; |
---|
7317 | static const struct option long_options[] = { |
---|
7318 | {"version", 0, ((void *)0), 'V'}, |
---|
7319 | {"help", 0, ((void *)0), 'h'}, |
---|
7320 | {"verbose", 0, ((void *)0), 'v'}, |
---|
7321 | {"dry-run", 0, ((void *)0), 'n'}, |
---|
7322 | {"respect-name", 0, ((void *)0), 'f'}, |
---|
7323 | {"ignore-mode", 0, ((void *)0), 'p'}, |
---|
7324 | {"ignore-owner", 0, ((void *)0), 'o'}, |
---|
7325 | {"ignore-time", 0, ((void *)0), 't'}, |
---|
7326 | {"respect-xattrs", 0, ((void *)0), 'X'}, |
---|
7327 | {"maximize", 0, ((void *)0), 'm'}, |
---|
7328 | {"minimize", 0, ((void *)0), 'M'}, |
---|
7329 | {"keep-oldest", 0, ((void *)0), 'O'}, |
---|
7330 | {"exclude", 1, ((void *)0), 'x'}, |
---|
7331 | {"include", 1, ((void *)0), 'i'}, |
---|
7332 | {"method", 1, ((void *)0), 'y' }, |
---|
7333 | {"minimum-size", 1, ((void *)0), 's'}, |
---|
7334 | {"maximum-size", 1, ((void *)0), 'S'}, |
---|
7335 | |
---|
7336 | |
---|
7337 | |
---|
7338 | |
---|
7339 | {"io-size", 1, ((void *)0), 'b'}, |
---|
7340 | {"content", 0, ((void *)0), 'c'}, |
---|
7341 | {"quiet", 0, ((void *)0), 'q'}, |
---|
7342 | {"cache-size", 1, ((void *)0), 'r'}, |
---|
7343 | {((void *)0), 0, ((void *)0), 0} |
---|
7344 | }; |
---|
7345 | static const ul_excl_t excl[] = { |
---|
7346 | {'q', 'v'}, |
---|
7347 | {0} |
---|
7348 | }; |
---|
7349 | int excl_st[(sizeof(excl) / sizeof((excl)[0]) + __extension__ (sizeof(struct { int:-!!(__builtin_types_compatible_p(__typeof__(excl), __typeof__(&excl[0]))); })))] = { 0 }; |
---|
7350 | int c; |
---|
7351 | |
---|
7352 | while ((c = getopt_long(argc, argv, optstr, long_options, ((void *)0))) != -1) { |
---|
7353 | |
---|
7354 | err_exclusive_options(c, long_options, excl, excl_st); |
---|
7355 | |
---|
7356 | switch (c) { |
---|
7357 | case 'p': |
---|
7358 | opts.respect_mode = 0; |
---|
7359 | break; |
---|
7360 | case 'o': |
---|
7361 | opts.respect_owner = 0; |
---|
7362 | break; |
---|
7363 | case 't': |
---|
7364 | opts.respect_time = 0; |
---|
7365 | break; |
---|
7366 | case 'X': |
---|
7367 | opts.respect_xattrs = 1; |
---|
7368 | break; |
---|
7369 | case 'm': |
---|
7370 | opts.maximise = 1; |
---|
7371 | break; |
---|
7372 | case 'M': |
---|
7373 | opts.minimise = 1; |
---|
7374 | break; |
---|
7375 | case 'O': |
---|
7376 | opts.keep_oldest = 1; |
---|
7377 | break; |
---|
7378 | case 'f': |
---|
7379 | opts.respect_name = 1; |
---|
7380 | break; |
---|
7381 | case 'v': |
---|
7382 | opts.verbosity++; |
---|
7383 | break; |
---|
7384 | case 'q': |
---|
7385 | quiet = 1; |
---|
7386 | break; |
---|
7387 | case 'c': |
---|
7388 | opts.respect_mode = 0; |
---|
7389 | opts.respect_name = 0; |
---|
7390 | opts.respect_owner = 0; |
---|
7391 | opts.respect_time = 0; |
---|
7392 | opts.respect_xattrs = 0; |
---|
7393 | break; |
---|
7394 | case 'n': |
---|
7395 | opts.dry_run = 1; |
---|
7396 | break; |
---|
7397 | case 'x': |
---|
7398 | register_regex(&opts.exclude, optarg); |
---|
7399 | break; |
---|
7400 | case 'y': |
---|
7401 | opts.method = optarg; |
---|
7402 | break; |
---|
7403 | case 'i': |
---|
7404 | register_regex(&opts.include, optarg); |
---|
7405 | break; |
---|
7406 | case 's': |
---|
7407 | opts.min_size = strtosize_or_err(optarg, libintl_gettext ("failed to parse minimum size")); |
---|
7408 | break; |
---|
7409 | case 'S': |
---|
7410 | opts.max_size = strtosize_or_err(optarg, libintl_gettext ("failed to parse maximum size")); |
---|
7411 | break; |
---|
7412 | case 'r': |
---|
7413 | opts.cache_size = strtosize_or_err(optarg, libintl_gettext ("failed to parse cache size")); |
---|
7414 | break; |
---|
7415 | case 'b': |
---|
7416 | opts.io_size = strtosize_or_err(optarg, libintl_gettext ("failed to parse I/O size")); |
---|
7417 | break; |
---|
7418 | # 1287 "misc-utils/hardlink.c" |
---|
7419 | case 'h': |
---|
7420 | usage(); |
---|
7421 | case 'V': |
---|
7422 | __extension__ ({ printf(libintl_gettext ("%s from %s\n"), __progname, "util-linux 2.38"); exit(0); }); |
---|
7423 | default: |
---|
7424 | __extension__ ({ fprintf(__stderrp, libintl_gettext ("Try '%s --help' for more information.\n"), __progname); exit(1); });} |
---|
7425 | } |
---|
7426 | |
---|
7427 | return 0; |
---|
7428 | } |
---|
7429 | |
---|
7430 | |
---|
7431 | |
---|
7432 | |
---|
7433 | static void to_be_called_atexit(void) |
---|
7434 | { |
---|
7435 | if (stats.started) |
---|
7436 | print_stats(); |
---|
7437 | } |
---|
7438 | |
---|
7439 | |
---|
7440 | |
---|
7441 | |
---|
7442 | |
---|
7443 | static void sighandler(int i) |
---|
7444 | { |
---|
7445 | if (last_signal != 2) |
---|
7446 | last_signal = i; |
---|
7447 | if (i == 2) |
---|
7448 | putchar('\n'); |
---|
7449 | } |
---|
7450 | |
---|
7451 | int main(int argc, char *argv[]) |
---|
7452 | { |
---|
7453 | struct sigaction sa; |
---|
7454 | int rc; |
---|
7455 | |
---|
7456 | sa.__sigaction_u.__sa_handler = sighandler; |
---|
7457 | sa.sa_flags = 0x0002; |
---|
7458 | (*(&sa.sa_mask) = ~(sigset_t)0, 0); |
---|
7459 | |
---|
7460 | |
---|
7461 | sigaction(2, &sa, ((void *)0)); |
---|
7462 | sigaction(30, &sa, ((void *)0)); |
---|
7463 | |
---|
7464 | |
---|
7465 | libintl_setlocale(0, ""); |
---|
7466 | libintl_bindtextdomain("util-linux", "/opt/local/share/locale"); |
---|
7467 | libintl_textdomain("util-linux"); |
---|
7468 | |
---|
7469 | if (atexit(to_be_called_atexit) != 0) |
---|
7470 | err(1, libintl_gettext ("cannot register exit handler")); |
---|
7471 | |
---|
7472 | parse_options(argc, argv); |
---|
7473 | |
---|
7474 | if (optind == argc) |
---|
7475 | errx(1, libintl_gettext ("no directory or file specified")); |
---|
7476 | |
---|
7477 | gettime_monotonic(&stats.start_time); |
---|
7478 | |
---|
7479 | rc = ul_fileeq_init(&fileeq, opts.method); |
---|
7480 | if (rc != 0 && strcmp(opts.method, "memcmp") != 0) { |
---|
7481 | warnx(libintl_gettext ("cannot initialize %s method, use 'memcmp' fallback"), opts.method); |
---|
7482 | opts.method = "memcmp"; |
---|
7483 | rc = ul_fileeq_init(&fileeq, opts.method); |
---|
7484 | } |
---|
7485 | if (rc < 0) |
---|
7486 | err(1, libintl_gettext ("failed to initialize files comparior")); |
---|
7487 | |
---|
7488 | |
---|
7489 | if (!opts.io_size) { |
---|
7490 | if (strcmp(opts.method, "memcmp") == 0) |
---|
7491 | opts.io_size = 8*1024; |
---|
7492 | else |
---|
7493 | opts.io_size = 1024*1024; |
---|
7494 | } |
---|
7495 | |
---|
7496 | stats.started = 1; |
---|
7497 | |
---|
7498 | jlog(JLOG_VERBOSE2, libintl_gettext ("Scanning [device/inode/links]:")); |
---|
7499 | for (; optind < argc; optind++) { |
---|
7500 | char *path = realpath(argv[optind], ((void *)0)); |
---|
7501 | |
---|
7502 | if (!path) { |
---|
7503 | warn(libintl_gettext ("cannot get realpath: %s"), argv[optind]); |
---|
7504 | continue; |
---|
7505 | } |
---|
7506 | if (nftw(path, inserter, 20, 0x01) == -1) |
---|
7507 | warn(libintl_gettext ("cannot process %s"), path); |
---|
7508 | free(path); |
---|
7509 | } |
---|
7510 | |
---|
7511 | twalk(files, visitor); |
---|
7512 | |
---|
7513 | ul_fileeq_deinit(&fileeq); |
---|
7514 | return 0; |
---|
7515 | } |
---|