· 10 years ago · Nov 07, 2015, 08:18 AM
1# 1 "<built-in>"
2# 1 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/null.c"
3/*
4 * Copyright (c) 2010 Kungliga Tekniska Högskolan
5 * (Royal Institute of Technology, Stockholm, Sweden).
6 * All rights reserved.
7 *
8 * Portions Copyright (c) 2010 Apple Inc. All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 *
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 *
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 *
21 * 3. Neither the name of the Institute nor the names of its contributors
22 * may be used to endorse or promote products derived from this software
23 * without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE.
36 */
37
38#if 0 /* expanded by -frewrite-includes */
39#include "baselocl.h"
40#endif /* expanded by -frewrite-includes */
41# 36 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/null.c"
42# 1 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 1
43/*
44 * Copyright (c) 2010 Kungliga Tekniska Högskolan
45 * (Royal Institute of Technology, Stockholm, Sweden).
46 * All rights reserved.
47 *
48 * Portions Copyright (c) 2010 Apple Inc. All rights reserved.
49 *
50 * Redistribution and use in source and binary forms, with or without
51 * modification, are permitted provided that the following conditions
52 * are met:
53 *
54 * 1. Redistributions of source code must retain the above copyright
55 * notice, this list of conditions and the following disclaimer.
56 *
57 * 2. Redistributions in binary form must reproduce the above copyright
58 * notice, this list of conditions and the following disclaimer in the
59 * documentation and/or other materials provided with the distribution.
60 *
61 * 3. Neither the name of the Institute nor the names of its contributors
62 * may be used to endorse or promote products derived from this software
63 * without specific prior written permission.
64 *
65 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
66 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
67 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
68 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
69 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
70 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
71 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
72 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
73 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
74 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
75 * SUCH DAMAGE.
76 */
77
78#if 0 /* expanded by -frewrite-includes */
79#include "config.h"
80#endif /* expanded by -frewrite-includes */
81# 36 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
82# 1 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h" 1
83/* include/config.h. Generated from config.h.in by configure. */
84/* include/config.h.in. Generated from configure.ac by autoheader. */
85
86/* $FreeBSD$ */
87
88#ifndef RCSID
89#define RCSID(msg) \
90static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
91#endif
92# 10 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
93
94/* Maximum values on all known systems */
95#define MaxHostNameLen (64+4)
96#define MaxPathLen (1024+4)
97
98
99
100#ifdef BUILD_KRB5_LIB
101#ifndef KRB5_LIB
102#ifdef _WIN32_
103#define KRB5_LIB_FUNCTION __declspec(dllexport)
104#define KRB5_LIB_CALL __stdcall
105#define KRB5_LIB_VARIABLE __declspec(dllexport)
106#else
107# 24 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
108#define KRB5_LIB_FUNCTION
109#define KRB5_LIB_CALL
110#define KRB5_LIB_VARIABLE
111#endif
112# 28 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
113#endif
114# 29 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
115#endif
116# 30 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
117
118
119#ifdef BUILD_ROKEN_LIB
120#ifndef ROKEN_LIB
121#ifdef _WIN32_
122#define ROKEN_LIB_FUNCTION __declspec(dllexport)
123#define ROKEN_LIB_CALL __stdcall
124#define ROKEN_LIB_VARIABLE __declspec(dllexport)
125#else
126# 39 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
127#define ROKEN_LIB_FUNCTION
128#define ROKEN_LIB_CALL
129#define ROKEN_LIB_VARIABLE
130#endif
131# 43 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
132#endif
133# 44 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
134#endif
135# 45 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
136
137
138#ifdef BUILD_GSSAPI_LIB
139#ifndef GSSAPI_LIB
140#ifdef _WIN32_
141#define GSSAPI_LIB_FUNCTION __declspec(dllexport)
142#define GSSAPI_LIB_CALL __stdcall
143#define GSSAPI_LIB_VARIABLE __declspec(dllexport)
144#else
145# 54 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
146#define GSSAPI_LIB_FUNCTION
147#define GSSAPI_LIB_CALL
148#define GSSAPI_LIB_VARIABLE
149#endif
150# 58 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
151#endif
152# 59 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
153#endif
154# 60 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
155
156
157/* Define if you want authentication support in telnet. */
158#define AUTHENTICATION 1
159
160/* path to bin */
161#define BINDIR "/usr/bin"
162
163/* Define if realloc(NULL) doesn't work. */
164/* #undef BROKEN_REALLOC */
165
166/* Define if you want support for DCE/DFS PAG's. */
167/* #undef DCE */
168
169/* Define if you want to use DES encryption in telnet. */
170#define DES_ENCRYPTION 1
171
172/* Define this to enable diagnostics in telnet. */
173#define DIAGNOSTICS 1
174
175/* Define to enable DIGEST. */
176#define DIGEST 1
177
178/* Define if want to use the weak AFS string to key functions. */
179#define ENABLE_AFS_STRING_TO_KEY 1
180
181/* Define if you want have a thread safe libraries */
182#define ENABLE_PTHREAD_SUPPORT 1
183
184/* Define if you want encryption support in telnet. */
185#define ENCRYPTION 1
186
187/* define if sys/param.h defines the endiness */
188#define ENDIANESS_IN_SYS_PARAM_H 1
189
190/* Define this if you want support for broken ENV_{VAR,VAL} telnets. */
191/* #undef ENV_HACK */
192
193/* define if prototype of gethostbyaddr is compatible with struct hostent
194 *gethostbyaddr(const void *, size_t, int) */
195/* #undef GETHOSTBYADDR_PROTO_COMPATIBLE */
196
197/* define if prototype of gethostbyname is compatible with struct hostent
198 *gethostbyname(const char *) */
199#define GETHOSTBYNAME_PROTO_COMPATIBLE 1
200
201/* define if prototype of getservbyname is compatible with struct servent
202 *getservbyname(const char *, const char *) */
203#define GETSERVBYNAME_PROTO_COMPATIBLE 1
204
205/* define if prototype of getsockname is compatible with int getsockname(int,
206 struct sockaddr*, socklen_t*) */
207#define GETSOCKNAME_PROTO_COMPATIBLE 1
208
209/* Define if you have the `altzone' variable. */
210/* #undef HAVE_ALTZONE */
211
212/* Define to 1 if you have the `arc4random' function. */
213#define HAVE_ARC4RANDOM 1
214
215/* Define to 1 if you have the <arpa/ftp.h> header file. */
216#define HAVE_ARPA_FTP_H 1
217
218/* Define to 1 if you have the <arpa/inet.h> header file. */
219#define HAVE_ARPA_INET_H 1
220
221/* Define to 1 if you have the <arpa/nameser.h> header file. */
222#define HAVE_ARPA_NAMESER_H 1
223
224/* Define to 1 if you have the <arpa/telnet.h> header file. */
225#define HAVE_ARPA_TELNET_H 1
226
227/* Define to 1 if you have the <asl.h> header file. */
228/* #undef HAVE_ASL_H */
229
230/* Define to 1 if you have the `asnprintf' function. */
231/* #undef HAVE_ASNPRINTF */
232
233/* Define to 1 if you have the `asprintf' function. */
234#define HAVE_ASPRINTF 1
235
236/* Define to 1 if you have the `atexit' function. */
237#define HAVE_ATEXIT 1
238
239/* Define to 1 if you have the `backtrace' function. */
240/* #undef HAVE_BACKTRACE */
241
242/* Define to 1 if you have the <bind/bitypes.h> header file. */
243/* #undef HAVE_BIND_BITYPES_H */
244
245/* Define to 1 if you have the <bsdsetjmp.h> header file. */
246/* #undef HAVE_BSDSETJMP_H */
247
248/* Define to 1 if you have the `bswap16' function. */
249/* #undef HAVE_BSWAP16 */
250
251/* Define to 1 if you have the `bswap32' function. */
252/* #undef HAVE_BSWAP32 */
253
254/* Define to 1 if you have the <capability.h> header file. */
255/* #undef HAVE_CAPABILITY_H */
256
257/* whether capng is available for privilege reduction */
258/* #undef HAVE_CAPNG */
259
260/* Define to 1 if you have the `cap_set_proc' function. */
261/* #undef HAVE_CAP_SET_PROC */
262
263/* Define to 1 if you have the `cgetent' function. */
264#define HAVE_CGETENT 1
265
266/* Define if you have the function `chown'. */
267#define HAVE_CHOWN 1
268
269/* Define if you have the function `closefrom'. */
270#define HAVE_CLOSEFROM 1
271
272/* Define to 1 if you have the <CommonCrypto/CommonCryptor.h> header file. */
273/* #undef HAVE_COMMONCRYPTO_COMMONCRYPTOR_H */
274
275/* Define to 1 if you have the <CommonCrypto/CommonDigest.h> header file. */
276/* #undef HAVE_COMMONCRYPTO_COMMONDIGEST_H */
277
278/* Define to 1 if you have the <config.h> header file. */
279/* #undef HAVE_CONFIG_H */
280
281/* Define if you have the function `copyhostent'. */
282/* #undef HAVE_COPYHOSTENT */
283
284/* Define to 1 if you have the `crypt' function. */
285#define HAVE_CRYPT 1
286
287/* Define to 1 if you have the <crypt.h> header file. */
288/* #undef HAVE_CRYPT_H */
289
290/* Define to 1 if you have the <curses.h> header file. */
291#define HAVE_CURSES_H 1
292
293/* Define if you have the function `daemon'. */
294#define HAVE_DAEMON 1
295
296/* define if you have a berkeley db1/2 library */
297#define HAVE_DB1 1
298
299/* define if you have a berkeley db3/4/5 library */
300/* #undef HAVE_DB3 */
301
302/* Define to 1 if you have the <db3/db.h> header file. */
303/* #undef HAVE_DB3_DB_H */
304
305/* Define to 1 if you have the <db4/db.h> header file. */
306/* #undef HAVE_DB4_DB_H */
307
308/* Define to 1 if you have the <db5/db.h> header file. */
309/* #undef HAVE_DB5_DB_H */
310
311/* Define if you have user supplied header location */
312/* #undef HAVE_DBHEADER */
313
314/* Define to 1 if you have the `dbm_firstkey' function. */
315#define HAVE_DBM_FIRSTKEY 1
316
317/* Define to 1 if you have the <dbm.h> header file. */
318/* #undef HAVE_DBM_H */
319
320/* Define to 1 if you have the `dbopen' function. */
321#define HAVE_DBOPEN 1
322
323/* Define to 1 if you have the `db_create' function. */
324/* #undef HAVE_DB_CREATE */
325
326/* Define to 1 if you have the <db.h> header file. */
327#define HAVE_DB_H 1
328
329/* define if you have ndbm compat in db */
330/* #undef HAVE_DB_NDBM */
331
332/* Define to 1 if you have the declaration of `altzone', and to 0 if you
333 don't. */
334/* #undef HAVE_DECL_ALTZONE */
335
336/* Define to 1 if you have the declaration of `environ', and to 0 if you
337 don't. */
338#define HAVE_DECL_ENVIRON 0
339
340/* Define to 1 if you have the declaration of `h_errlist', and to 0 if you
341 don't. */
342#define HAVE_DECL_H_ERRLIST 0
343
344/* Define to 1 if you have the declaration of `h_errno', and to 0 if you
345 don't. */
346#define HAVE_DECL_H_ERRNO 1
347
348/* Define to 1 if you have the declaration of `h_nerr', and to 0 if you don't.
349 */
350/* #undef HAVE_DECL_H_NERR */
351
352/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
353 */
354#define HAVE_DECL_OPTARG 1
355
356/* Define to 1 if you have the declaration of `opterr', and to 0 if you don't.
357 */
358#define HAVE_DECL_OPTERR 1
359
360/* Define to 1 if you have the declaration of `optind', and to 0 if you don't.
361 */
362#define HAVE_DECL_OPTIND 1
363
364/* Define to 1 if you have the declaration of `optopt', and to 0 if you don't.
365 */
366#define HAVE_DECL_OPTOPT 1
367
368/* Define to 1 if you have the declaration of `timezone', and to 0 if you
369 don't. */
370#define HAVE_DECL_TIMEZONE 1
371
372/* Define to 1 if you have the declaration of `_res', and to 0 if you don't.
373 */
374#define HAVE_DECL__RES 1
375
376/* Define to 1 if you have the declaration of `__progname', and to 0 if you
377 don't. */
378#define HAVE_DECL___PROGNAME 0
379
380/* Define to 1 if you have the <dirent.h> header file. */
381#define HAVE_DIRENT_H 1
382
383/* have a dirfd function/macro */
384#define HAVE_DIRFD 1
385
386/* Define if DIR has field dd_fd. */
387#define HAVE_DIR_DD_FD 1
388
389/* Define to 1 if you have the `dispatch_async_f' function. */
390/* #undef HAVE_DISPATCH_ASYNC_F */
391
392/* Define to 1 if you have the <dispatch/dispatch.h> header file. */
393/* #undef HAVE_DISPATCH_DISPATCH_H */
394
395/* Define to 1 if you have the <dlfcn.h> header file. */
396#define HAVE_DLFCN_H 1
397
398/* Define to 1 if you have the `dlopen' function. */
399#define HAVE_DLOPEN 1
400
401/* Define to 1 if you have the <dns.h> header file. */
402/* #undef HAVE_DNS_H */
403
404/* Define to 1 if you have the `dns_search' function. */
405/* #undef HAVE_DNS_SEARCH */
406
407/* Define to 1 if you have the `dn_expand' function. */
408#define HAVE_DN_EXPAND 1
409
410/* Define to 1 if you have the `door_create' function. */
411/* #undef HAVE_DOOR_CREATE */
412
413/* Define if you have the function `ecalloc'. */
414/* #undef HAVE_ECALLOC */
415
416/* Define if you have the function `emalloc'. */
417/* #undef HAVE_EMALLOC */
418
419/* Define if you have the function `erealloc'. */
420/* #undef HAVE_EREALLOC */
421
422/* Define if you have the function `err'. */
423#define HAVE_ERR 1
424
425/* Define to 1 if you have the <errno.h> header file. */
426#define HAVE_ERRNO_H 1
427
428/* Define if you have the function `errx'. */
429#define HAVE_ERRX 1
430
431/* Define to 1 if you have the <err.h> header file. */
432#define HAVE_ERR_H 1
433
434/* Define if you have the function `estrdup'. */
435/* #undef HAVE_ESTRDUP */
436
437/* Define to 1 if you have the <execinfo.h> header file. */
438/* #undef HAVE_EXECINFO_H */
439
440/* Define if you have the function `fchown'. */
441#define HAVE_FCHOWN 1
442
443/* Define to 1 if you have the `fcntl' function. */
444#define HAVE_FCNTL 1
445
446/* Define to 1 if you have the <fcntl.h> header file. */
447#define HAVE_FCNTL_H 1
448
449/* Define if you have the function `flock'. */
450#define HAVE_FLOCK 1
451
452/* Define if you have the function `fnmatch'. */
453#define HAVE_FNMATCH 1
454
455/* Define to 1 if you have the <fnmatch.h> header file. */
456#define HAVE_FNMATCH_H 1
457
458/* Have -framework Security */
459/* #undef HAVE_FRAMEWORK_SECURITY */
460
461/* Define to 1 if you have the `freeaddrinfo' function. */
462#define HAVE_FREEADDRINFO 1
463
464/* Define if you have the function `freehostent'. */
465#define HAVE_FREEHOSTENT 1
466
467/* Define to 1 if you have the `gai_strerror' function. */
468#define HAVE_GAI_STRERROR 1
469
470/* Define if os support gcd. */
471/* #undef HAVE_GCD */
472
473/* Define to 1 if you have the <gdbm/ndbm.h> header file. */
474/* #undef HAVE_GDBM_NDBM_H */
475
476/* Define to 1 if you have the `getaddrinfo' function. */
477#define HAVE_GETADDRINFO 1
478
479/* Define to 1 if you have the `getconfattr' function. */
480/* #undef HAVE_GETCONFATTR */
481
482/* Define if you have the function `getcwd'. */
483#define HAVE_GETCWD 1
484
485/* Define if you have the function `getdtablesize'. */
486#define HAVE_GETDTABLESIZE 1
487
488/* Define if you have the function `getegid'. */
489#define HAVE_GETEGID 1
490
491/* Define if you have the function `geteuid'. */
492#define HAVE_GETEUID 1
493
494/* Define if you have the function `getgid'. */
495#define HAVE_GETGID 1
496
497/* Define to 1 if you have the `gethostbyname' function. */
498#define HAVE_GETHOSTBYNAME 1
499
500/* Define to 1 if you have the `gethostbyname2' function. */
501#define HAVE_GETHOSTBYNAME2 1
502
503/* Define if you have the function `gethostname'. */
504#define HAVE_GETHOSTNAME 1
505
506/* Define if you have the function `getifaddrs'. */
507#define HAVE_GETIFADDRS 1
508
509/* Define if you have the function `getipnodebyaddr'. */
510#define HAVE_GETIPNODEBYADDR 1
511
512/* Define if you have the function `getipnodebyname'. */
513#define HAVE_GETIPNODEBYNAME 1
514
515/* Define to 1 if you have the `getlogin' function. */
516#define HAVE_GETLOGIN 1
517
518/* Define if you have a working getmsg. */
519/* #undef HAVE_GETMSG */
520
521/* Define to 1 if you have the `getnameinfo' function. */
522#define HAVE_GETNAMEINFO 1
523
524/* Define if you have the function `getopt'. */
525#define HAVE_GETOPT 1
526
527/* Define to 1 if you have the `getpagesize' function. */
528#define HAVE_GETPAGESIZE 1
529
530/* Define to 1 if you have the `getpeereid' function. */
531#define HAVE_GETPEEREID 1
532
533/* Define to 1 if you have the `getpeerucred' function. */
534/* #undef HAVE_GETPEERUCRED */
535
536/* Define to 1 if you have the `getprogname' function. */
537#define HAVE_GETPROGNAME 1
538
539/* Define to 1 if you have the `getpwnam_r' function. */
540#define HAVE_GETPWNAM_R 1
541
542/* Define to 1 if you have the `getrlimit' function. */
543#define HAVE_GETRLIMIT 1
544
545/* Define to 1 if you have the `getsockopt' function. */
546#define HAVE_GETSOCKOPT 1
547
548/* Define to 1 if you have the `getspnam' function. */
549/* #undef HAVE_GETSPNAM */
550
551/* Define if you have the function `gettimeofday'. */
552#define HAVE_GETTIMEOFDAY 1
553
554/* Define to 1 if you have the `getudbnam' function. */
555/* #undef HAVE_GETUDBNAM */
556
557/* Define if you have the function `getuid'. */
558#define HAVE_GETUID 1
559
560/* Define if you have the function `getusershell'. */
561#define HAVE_GETUSERSHELL 1
562
563/* define if you have a glob() that groks GLOB_BRACE, GLOB_NOCHECK,
564 GLOB_QUOTE, GLOB_TILDE, and GLOB_LIMIT */
565#define HAVE_GLOB 1
566
567/* Define to 1 if you have the `grantpt' function. */
568#define HAVE_GRANTPT 1
569
570/* Define to 1 if you have the <grp.h> header file. */
571#define HAVE_GRP_H 1
572
573/* Define to 1 if you have the `hstrerror' function. */
574#define HAVE_HSTRERROR 1
575
576/* Define if you have the `h_errlist' variable. */
577#define HAVE_H_ERRLIST 1
578
579/* Define if you have the `h_errno' variable. */
580#define HAVE_H_ERRNO 1
581
582/* Define if you have the `h_nerr' variable. */
583/* #undef HAVE_H_NERR */
584
585/* Define to 1 if you have the <ifaddrs.h> header file. */
586#define HAVE_IFADDRS_H 1
587
588/* Define if you have the in6addr_loopback variable */
589#define HAVE_IN6ADDR_LOOPBACK 1
590
591/* define */
592#define HAVE_INET_ATON 1
593
594/* define */
595#define HAVE_INET_NTOP 1
596
597/* define */
598#define HAVE_INET_PTON 1
599
600/* Define if you have the function `initgroups'. */
601#define HAVE_INITGROUPS 1
602
603/* Define if you have the function `innetgr'. */
604#define HAVE_INNETGR 1
605
606/* Define to 1 if the system has the type `int16_t'. */
607#define HAVE_INT16_T 1
608
609/* Define to 1 if the system has the type `int32_t'. */
610#define HAVE_INT32_T 1
611
612/* Define to 1 if the system has the type `int64_t'. */
613#define HAVE_INT64_T 1
614
615/* Define to 1 if the system has the type `int8_t'. */
616#define HAVE_INT8_T 1
617
618/* Define to 1 if you have the <inttypes.h> header file. */
619#define HAVE_INTTYPES_H 1
620
621/* Define to 1 if you have the <io.h> header file. */
622/* #undef HAVE_IO_H */
623
624/* Define if you have IPv6. */
625#define HAVE_IPV6 1
626
627/* Define if you have the function `iruserok'. */
628#define HAVE_IRUSEROK 1
629
630/* Define to 1 if you have the `issetugid' function. */
631#define HAVE_ISSETUGID 1
632
633/* Define if you want to use the Kerberos Credentials Manager. */
634#define HAVE_KCM 1
635
636/* Define to 1 if you have the <libutil.h> header file. */
637#define HAVE_LIBUTIL_H 1
638
639/* Define to 1 if you have the <limits.h> header file. */
640#define HAVE_LIMITS_H 1
641
642/* Define to 1 if you have the `loadquery' function. */
643/* #undef HAVE_LOADQUERY */
644
645/* Define to 1 if you have the <locale.h> header file. */
646#define HAVE_LOCALE_H 1
647
648/* Define if you have the function `localtime_r'. */
649#define HAVE_LOCALTIME_R 1
650
651/* Define to 1 if you have the `logout' function. */
652/* #undef HAVE_LOGOUT */
653
654/* Define to 1 if you have the `logwtmp' function. */
655/* #undef HAVE_LOGWTMP */
656
657/* Define to 1 if the system has the type `long long'. */
658#define HAVE_LONG_LONG 1
659
660/* Define if you have the function `lstat'. */
661#define HAVE_LSTAT 1
662
663/* Define to 1 if you have the <maillock.h> header file. */
664/* #undef HAVE_MAILLOCK_H */
665
666/* Define if you have the function `memmove'. */
667#define HAVE_MEMMOVE 1
668
669/* Define to 1 if you have the <memory.h> header file. */
670#define HAVE_MEMORY_H 1
671
672/* Define if you have the function `mkstemp'. */
673#define HAVE_MKSTEMP 1
674
675/* Define to 1 if you have the `mktime' function. */
676#define HAVE_MKTIME 1
677
678/* Define to 1 if you have a working `mmap' system call. */
679#define HAVE_MMAP 1
680
681/* define if you have a ndbm library */
682#define HAVE_NDBM 1
683
684/* Define to 1 if you have the <ndbm.h> header file. */
685#define HAVE_NDBM_H 1
686
687/* Define to 1 if you have the <netdb.h> header file. */
688#define HAVE_NETDB_H 1
689
690/* Define to 1 if you have the <netgroup.h> header file. */
691/* #undef HAVE_NETGROUP_H */
692
693/* Define to 1 if you have the <netinet6/in6.h> header file. */
694/* #undef HAVE_NETINET6_IN6_H */
695
696/* Define to 1 if you have the <netinet6/in6_var.h> header file. */
697/* #undef HAVE_NETINET6_IN6_VAR_H */
698
699/* Define to 1 if you have the <netinet/in6.h> header file. */
700/* #undef HAVE_NETINET_IN6_H */
701
702/* Define to 1 if you have the <netinet/in6_machtypes.h> header file. */
703/* #undef HAVE_NETINET_IN6_MACHTYPES_H */
704
705/* Define to 1 if you have the <netinet/in.h> header file. */
706#define HAVE_NETINET_IN_H 1
707
708/* Define to 1 if you have the <netinet/in_systm.h> header file. */
709#define HAVE_NETINET_IN_SYSTM_H 1
710
711/* Define to 1 if you have the <netinet/ip.h> header file. */
712#define HAVE_NETINET_IP_H 1
713
714/* Define to 1 if you have the <netinet/tcp.h> header file. */
715#define HAVE_NETINET_TCP_H 1
716
717/* Define to 1 if you have the <net/if.h> header file. */
718#define HAVE_NET_IF_H 1
719
720/* Define if NDBM really is DB (creates files *.db) */
721#define HAVE_NEW_DB 1
722
723/* Define to 1 if you have the `on_exit' function. */
724/* #undef HAVE_ON_EXIT */
725
726/* Define to 1 if you have the `openpty' function. */
727#define HAVE_OPENPTY 1
728
729/* define to use openssl's libcrypto */
730#define HAVE_OPENSSL 1
731
732/* Define to enable basic OSF C2 support. */
733/* #undef HAVE_OSFC2 */
734
735/* Define to 1 if you have the <paths.h> header file. */
736#define HAVE_PATHS_H 1
737
738/* Define to 1 if you have the `pidfile' function. */
739/* #undef HAVE_PIDFILE */
740
741/* Define to 1 if you have the `poll' function. */
742#define HAVE_POLL 1
743
744/* Define to 1 if you have the <poll.h> header file. */
745#define HAVE_POLL_H 1
746
747/* Define to 1 if you have the <pthread.h> header file. */
748#define HAVE_PTHREAD_H 1
749
750/* Define to 1 if you have the `ptsname' function. */
751#define HAVE_PTSNAME 1
752
753/* Define to 1 if you have the <pty.h> header file. */
754/* #undef HAVE_PTY_H */
755
756/* Define if you have the function `putenv'. */
757#define HAVE_PUTENV 1
758
759/* Define to 1 if you have the <pwd.h> header file. */
760#define HAVE_PWD_H 1
761
762/* Define to 1 if you have the `rand' function. */
763#define HAVE_RAND 1
764
765/* Define to 1 if you have the `random' function. */
766#define HAVE_RANDOM 1
767
768/* Define if you have the function `rcmd'. */
769#define HAVE_RCMD 1
770
771/* Define if you have a readline compatible library. */
772#define HAVE_READLINE 1
773
774/* Define to 1 if you have the
775 <[readline.h])[][]_AH_CHECK_HEADER([readline/readline.h]> header file. */
776/* #undef HAVE_READLINE_H */
777
778/* Define to 1 if you have the <readline/readline.h > header file. */
779/* #undef HAVE_READLINE_READLINE_H_ */
780
781/* Define if you have the function `readv'. */
782#define HAVE_READV 1
783
784/* Define if you have the function `recvmsg'. */
785#define HAVE_RECVMSG 1
786
787/* Define to 1 if you have the <resolv.h> header file. */
788#define HAVE_RESOLV_H 1
789
790/* Define to 1 if you have the `res_ndestroy' function. */
791#define HAVE_RES_NDESTROY 1
792
793/* Define to 1 if you have the `res_nsearch' function. */
794#define HAVE_RES_NSEARCH 1
795
796/* Define to 1 if you have the `res_search' function. */
797#define HAVE_RES_SEARCH 1
798
799/* Define to 1 if you have the `revoke' function. */
800#define HAVE_REVOKE 1
801
802/* Define to 1 if you have the <rpcsvc/ypclnt.h> header file. */
803#define HAVE_RPCSVC_YPCLNT_H 1
804
805/* Define to 1 if you have the <sac.h> header file. */
806/* #undef HAVE_SAC_H */
807
808/* Define to 1 if the system has the type `sa_family_t'. */
809#define HAVE_SA_FAMILY_T 1
810
811/* Define if you want support for cache in sqlite. */
812#undef HAVE_SCC
813
814/* Define to 1 if you have the <search.h> header file. */
815#define HAVE_SEARCH_H 1
816
817/* Define to 1 if you have the <security/pam_modules.h> header file. */
818#define HAVE_SECURITY_PAM_MODULES_H 1
819
820/* Define to 1 if you have the `select' function. */
821#define HAVE_SELECT 1
822
823/* Define if you have the function `sendmsg'. */
824#define HAVE_SENDMSG 1
825
826/* Define if you have the function `setegid'. */
827#define HAVE_SETEGID 1
828
829/* Define if you have the function `setenv'. */
830#define HAVE_SETENV 1
831
832/* Define if you have the function `seteuid'. */
833#define HAVE_SETEUID 1
834
835/* Define to 1 if you have the `setitimer' function. */
836#define HAVE_SETITIMER 1
837
838/* Define to 1 if you have the `setlim' function. */
839/* #undef HAVE_SETLIM */
840
841/* Define to 1 if you have the `setlogin' function. */
842#define HAVE_SETLOGIN 1
843
844/* Define to 1 if you have the `setpcred' function. */
845/* #undef HAVE_SETPCRED */
846
847/* Define to 1 if you have the `setpgid' function. */
848#define HAVE_SETPGID 1
849
850/* Define to 1 if you have the `setproctitle' function. */
851#define HAVE_SETPROCTITLE 1
852
853/* Define to 1 if you have the `setprogname' function. */
854#define HAVE_SETPROGNAME 1
855
856/* Define to 1 if you have the `setregid' function. */
857#define HAVE_SETREGID 1
858
859/* Define to 1 if you have the `setresgid' function. */
860#define HAVE_SETRESGID 1
861
862/* Define to 1 if you have the `setresuid' function. */
863#define HAVE_SETRESUID 1
864
865/* Define to 1 if you have the `setreuid' function. */
866#define HAVE_SETREUID 1
867
868/* Define to 1 if you have the `setsid' function. */
869#define HAVE_SETSID 1
870
871/* Define to 1 if you have the `setsockopt' function. */
872#define HAVE_SETSOCKOPT 1
873
874/* Define to 1 if you have the `setutent' function. */
875/* #undef HAVE_SETUTENT */
876
877/* Define to 1 if you have the `sgi_getcapabilitybyname' function. */
878/* #undef HAVE_SGI_GETCAPABILITYBYNAME */
879
880/* Define to 1 if you have the <sgtty.h> header file. */
881/* #undef HAVE_SGTTY_H */
882
883/* Define to 1 if you have the <shadow.h> header file. */
884/* #undef HAVE_SHADOW_H */
885
886/* Define to 1 if you have the <siad.h> header file. */
887/* #undef HAVE_SIAD_H */
888
889/* Define to 1 if you have the `sigaction' function. */
890#define HAVE_SIGACTION 1
891
892/* Define to 1 if you have the <signal.h> header file. */
893#define HAVE_SIGNAL_H 1
894
895/* define if you have a working snprintf */
896#define HAVE_SNPRINTF 1
897
898/* Define to 1 if you have the `socket' function. */
899#define HAVE_SOCKET 1
900
901/* Define to 1 if the system has the type `socklen_t'. */
902#define HAVE_SOCKLEN_T 1
903
904/* Define if you want support for sqlite in Heimdal. */
905#define HAVE_SQLITE3 1
906
907/* Define to 1 if the system has the type `ssize_t'. */
908#define HAVE_SSIZE_T 1
909
910/* Define to 1 if you have the <standards.h> header file. */
911/* #undef HAVE_STANDARDS_H */
912
913/* Define to 1 if you have the <stdint.h> header file. */
914#define HAVE_STDINT_H 1
915
916/* Define to 1 if you have the <stdlib.h> header file. */
917#define HAVE_STDLIB_H 1
918
919/* Define if you have the function `strcasecmp'. */
920#define HAVE_STRCASECMP 1
921
922/* Define if you have the function `strdup'. */
923#define HAVE_STRDUP 1
924
925/* Define if you have the function `strerror'. */
926#define HAVE_STRERROR 1
927
928/* Define if you have the function strerror_r. */
929#define HAVE_STRERROR_R 1
930
931/* Define if you have the function `strftime'. */
932#define HAVE_STRFTIME 1
933
934/* Define to 1 if you have the <strings.h> header file. */
935#define HAVE_STRINGS_H 1
936
937/* Define to 1 if you have the <string.h> header file. */
938#define HAVE_STRING_H 1
939
940/* Define if you have the function `strlcat'. */
941#define HAVE_STRLCAT 1
942
943/* Define if you have the function `strlcpy'. */
944#define HAVE_STRLCPY 1
945
946/* Define if you have the function `strlwr'. */
947/* #undef HAVE_STRLWR */
948
949/* Define if you have the function `strncasecmp'. */
950#define HAVE_STRNCASECMP 1
951
952/* Define if you have the function `strndup'. */
953#define HAVE_STRNDUP 1
954
955/* Define if you have the function `strnlen'. */
956#define HAVE_STRNLEN 1
957
958/* Define to 1 if you have the <stropts.h> header file. */
959/* #undef HAVE_STROPTS_H */
960
961/* Define if you have the function `strptime'. */
962#define HAVE_STRPTIME 1
963
964/* Define if you have the function `strsep'. */
965#define HAVE_STRSEP 1
966
967/* Define if you have the function `strsep_copy'. */
968/* #undef HAVE_STRSEP_COPY */
969
970/* Define to 1 if you have the `strstr' function. */
971#define HAVE_STRSTR 1
972
973/* Define to 1 if you have the `strsvis' function. */
974/* #undef HAVE_STRSVIS */
975
976/* Define to 1 if you have the `strsvisx' function. */
977/* #undef HAVE_STRSVISX */
978
979/* Define if you have the function `strtok_r'. */
980#define HAVE_STRTOK_R 1
981
982/* Define to 1 if the system has the type `struct addrinfo'. */
983#define HAVE_STRUCT_ADDRINFO 1
984
985/* Define to 1 if the system has the type `struct ifaddrs'. */
986#define HAVE_STRUCT_IFADDRS 1
987
988/* Define to 1 if the system has the type `struct iovec'. */
989#define HAVE_STRUCT_IOVEC 1
990
991/* Define to 1 if the system has the type `struct msghdr'. */
992#define HAVE_STRUCT_MSGHDR 1
993
994/* Define to 1 if the system has the type `struct sockaddr'. */
995#define HAVE_STRUCT_SOCKADDR 1
996
997/* Define if struct sockaddr has field sa_len. */
998#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
999
1000/* Define to 1 if the system has the type `struct sockaddr_storage'. */
1001#define HAVE_STRUCT_SOCKADDR_STORAGE 1
1002
1003/* define if you have struct spwd */
1004/* #undef HAVE_STRUCT_SPWD */
1005
1006/* Define if struct tm has field tm_gmtoff. */
1007#define HAVE_STRUCT_TM_TM_GMTOFF 1
1008
1009/* Define if struct tm has field tm_zone. */
1010#define HAVE_STRUCT_TM_TM_ZONE 1
1011
1012/* Define if struct utmpx has field ut_exit. */
1013/* #undef HAVE_STRUCT_UTMPX_UT_EXIT */
1014
1015/* Define if struct utmpx has field ut_host. */
1016#define HAVE_STRUCT_UTMPX_UT_HOST 1
1017
1018/* Define if struct utmpx has field ut_id. */
1019#define HAVE_STRUCT_UTMPX_UT_ID 1
1020
1021/* Define if struct utmpx has field ut_line. */
1022#define HAVE_STRUCT_UTMPX_UT_LINE 1
1023
1024/* Define if struct utmpx has field ut_pid. */
1025#define HAVE_STRUCT_UTMPX_UT_PID 1
1026
1027/* Define if struct utmpx has field ut_syslen. */
1028/* #undef HAVE_STRUCT_UTMPX_UT_SYSLEN */
1029
1030/* Define if struct utmpx has field ut_tv. */
1031#define HAVE_STRUCT_UTMPX_UT_TV 1
1032
1033/* Define if struct utmpx has field ut_type. */
1034#define HAVE_STRUCT_UTMPX_UT_TYPE 1
1035
1036/* Define if struct utmpx has field ut_user. */
1037#define HAVE_STRUCT_UTMPX_UT_USER 1
1038
1039/* Define if struct utmp has field ut_addr. */
1040/* #undef HAVE_STRUCT_UTMP_UT_ADDR */
1041
1042/* Define if struct utmp has field ut_host. */
1043/* #undef HAVE_STRUCT_UTMP_UT_HOST */
1044
1045/* Define if struct utmp has field ut_id. */
1046/* #undef HAVE_STRUCT_UTMP_UT_ID */
1047
1048/* Define if struct utmp has field ut_pid. */
1049/* #undef HAVE_STRUCT_UTMP_UT_PID */
1050
1051/* Define if struct utmp has field ut_type. */
1052/* #undef HAVE_STRUCT_UTMP_UT_TYPE */
1053
1054/* Define if struct utmp has field ut_user. */
1055/* #undef HAVE_STRUCT_UTMP_UT_USER */
1056
1057/* define if struct winsize is declared in sys/termios.h */
1058#define HAVE_STRUCT_WINSIZE 1
1059
1060/* Define to 1 if you have the `strunvis' function. */
1061#define HAVE_STRUNVIS 1
1062
1063/* Define if you have the function `strupr'. */
1064/* #undef HAVE_STRUPR */
1065
1066/* Define to 1 if you have the `strvis' function. */
1067#define HAVE_STRVIS 1
1068
1069/* Define to 1 if you have the `strvisx' function. */
1070#define HAVE_STRVISX 1
1071
1072/* Define to 1 if you have the `svis' function. */
1073/* #undef HAVE_SVIS */
1074
1075/* Define if you have the function `swab'. */
1076#define HAVE_SWAB 1
1077
1078/* Define to 1 if you have the `sysconf' function. */
1079#define HAVE_SYSCONF 1
1080
1081/* Define to 1 if you have the `sysctl' function. */
1082#define HAVE_SYSCTL 1
1083
1084/* Define to 1 if you have the `syslog' function. */
1085#define HAVE_SYSLOG 1
1086
1087/* Define to 1 if you have the <syslog.h> header file. */
1088#define HAVE_SYSLOG_H 1
1089
1090/* Define to 1 if you have the <sys/bitypes.h> header file. */
1091/* #undef HAVE_SYS_BITYPES_H */
1092
1093/* Define to 1 if you have the <sys/bswap.h> header file. */
1094/* #undef HAVE_SYS_BSWAP_H */
1095
1096/* Define to 1 if you have the <sys/capability.h> header file. */
1097#define HAVE_SYS_CAPABILITY_H 1
1098
1099/* Define to 1 if you have the <sys/category.h> header file. */
1100/* #undef HAVE_SYS_CATEGORY_H */
1101
1102/* Define to 1 if you have the <sys/file.h> header file. */
1103#define HAVE_SYS_FILE_H 1
1104
1105/* Define to 1 if you have the <sys/filio.h> header file. */
1106#define HAVE_SYS_FILIO_H 1
1107
1108/* Define to 1 if you have the <sys/ioccom.h> header file. */
1109#define HAVE_SYS_IOCCOM_H 1
1110
1111/* Define to 1 if you have the <sys/ioctl.h> header file. */
1112#define HAVE_SYS_IOCTL_H 1
1113
1114/* Define to 1 if you have the <sys/mman.h> header file. */
1115#define HAVE_SYS_MMAN_H 1
1116
1117/* Define to 1 if you have the <sys/param.h> header file. */
1118#define HAVE_SYS_PARAM_H 1
1119
1120/* Define to 1 if you have the <sys/proc.h> header file. */
1121#define HAVE_SYS_PROC_H 1
1122
1123/* Define to 1 if you have the <sys/ptyio.h> header file. */
1124/* #undef HAVE_SYS_PTYIO_H */
1125
1126/* Define to 1 if you have the <sys/ptyvar.h> header file. */
1127/* #undef HAVE_SYS_PTYVAR_H */
1128
1129/* Define to 1 if you have the <sys/pty.h> header file. */
1130/* #undef HAVE_SYS_PTY_H */
1131
1132/* Define to 1 if you have the <sys/resource.h> header file. */
1133#define HAVE_SYS_RESOURCE_H 1
1134
1135/* Define to 1 if you have the <sys/select.h> header file. */
1136#define HAVE_SYS_SELECT_H 1
1137
1138/* Define to 1 if you have the <sys/socket.h> header file. */
1139#define HAVE_SYS_SOCKET_H 1
1140
1141/* Define to 1 if you have the <sys/sockio.h> header file. */
1142#define HAVE_SYS_SOCKIO_H 1
1143
1144/* Define to 1 if you have the <sys/stat.h> header file. */
1145#define HAVE_SYS_STAT_H 1
1146
1147/* Define to 1 if you have the <sys/stream.h> header file. */
1148/* #undef HAVE_SYS_STREAM_H */
1149
1150/* Define to 1 if you have the <sys/stropts.h> header file. */
1151/* #undef HAVE_SYS_STROPTS_H */
1152
1153/* Define to 1 if you have the <sys/strtty.h> header file. */
1154/* #undef HAVE_SYS_STRTTY_H */
1155
1156/* Define to 1 if you have the <sys/str_tty.h> header file. */
1157/* #undef HAVE_SYS_STR_TTY_H */
1158
1159/* Define to 1 if you have the <sys/syscall.h> header file. */
1160#define HAVE_SYS_SYSCALL_H 1
1161
1162/* Define to 1 if you have the <sys/sysctl.h> header file. */
1163#define HAVE_SYS_SYSCTL_H 1
1164
1165/* Define to 1 if you have the <sys/termio.h> header file. */
1166/* #undef HAVE_SYS_TERMIO_H */
1167
1168/* Define to 1 if you have the <sys/timeb.h> header file. */
1169#define HAVE_SYS_TIMEB_H 1
1170
1171/* Define to 1 if you have the <sys/times.h> header file. */
1172#define HAVE_SYS_TIMES_H 1
1173
1174/* Define to 1 if you have the <sys/time.h> header file. */
1175#define HAVE_SYS_TIME_H 1
1176
1177/* Define to 1 if you have the <sys/tty.h> header file. */
1178#define HAVE_SYS_TTY_H 1
1179
1180/* Define to 1 if you have the <sys/types.h> header file. */
1181#define HAVE_SYS_TYPES_H 1
1182
1183/* Define to 1 if you have the <sys/ucred.h> header file. */
1184#define HAVE_SYS_UCRED_H 1
1185
1186/* Define to 1 if you have the <sys/uio.h> header file. */
1187#define HAVE_SYS_UIO_H 1
1188
1189/* Define to 1 if you have the <sys/un.h> header file. */
1190#define HAVE_SYS_UN_H 1
1191
1192/* Define to 1 if you have the <sys/utsname.h> header file. */
1193#define HAVE_SYS_UTSNAME_H 1
1194
1195/* Define to 1 if you have the <sys/wait.h> header file. */
1196#define HAVE_SYS_WAIT_H 1
1197
1198/* Define to 1 if you have the `tdelete' function. */
1199#define HAVE_TDELETE 1
1200
1201/* Define to 1 if you have the <termcap.h> header file. */
1202#define HAVE_TERMCAP_H 1
1203
1204/* Define to 1 if you have the <termios.h> header file. */
1205#define HAVE_TERMIOS_H 1
1206
1207/* Define to 1 if you have the <termio.h> header file. */
1208/* #undef HAVE_TERMIO_H */
1209
1210/* Define to 1 if you have the <term.h> header file. */
1211#define HAVE_TERM_H 1
1212
1213/* Define to 1 if you have the `tfind' function. */
1214#define HAVE_TFIND 1
1215
1216/* Define to 1 if you have the `tgetent' function. */
1217#define HAVE_TGETENT 1
1218
1219/* Define if you have the function `timegm'. */
1220#define HAVE_TIMEGM 1
1221
1222/* Define if you have the `timezone' variable. */
1223#define HAVE_TIMEZONE 1
1224
1225/* Define to 1 if you have the <time.h> header file. */
1226#define HAVE_TIME_H 1
1227
1228/* Define to 1 if you have the <tmpdir.h> header file. */
1229/* #undef HAVE_TMPDIR_H */
1230
1231/* Define if you have the function `tsearch'. */
1232#define HAVE_TSEARCH 1
1233
1234/* Define to 1 if you have the `ttyname' function. */
1235#define HAVE_TTYNAME 1
1236
1237/* Define to 1 if you have the `ttyslot' function. */
1238/* #undef HAVE_TTYSLOT */
1239
1240/* Define to 1 if you have the `twalk' function. */
1241#define HAVE_TWALK 1
1242
1243/* Define to 1 if you have the <udb.h> header file. */
1244/* #undef HAVE_UDB_H */
1245
1246/* Define to 1 if the system has the type `uint16_t'. */
1247#define HAVE_UINT16_T 1
1248
1249/* Define to 1 if the system has the type `uint32_t'. */
1250#define HAVE_UINT32_T 1
1251
1252/* Define to 1 if the system has the type `uint64_t'. */
1253#define HAVE_UINT64_T 1
1254
1255/* Define to 1 if the system has the type `uint8_t'. */
1256#define HAVE_UINT8_T 1
1257
1258/* Define to 1 if the system has the type `uintptr_t'. */
1259#define HAVE_UINTPTR_T 1
1260
1261/* Define to 1 if you have the `umask' function. */
1262#define HAVE_UMASK 1
1263
1264/* Define to 1 if you have the `uname' function. */
1265#define HAVE_UNAME 1
1266
1267/* Define to 1 if you have the <unistd.h> header file. */
1268#define HAVE_UNISTD_H 1
1269
1270/* Define to 1 if you have the `unlockpt' function. */
1271#define HAVE_UNLOCKPT 1
1272
1273/* Define if you have the function `unsetenv'. */
1274#define HAVE_UNSETENV 1
1275
1276/* Define to 1 if you have the `unvis' function. */
1277#define HAVE_UNVIS 1
1278
1279/* Define to 1 if you have the <userconf.h> header file. */
1280/* #undef HAVE_USERCONF_H */
1281
1282/* Define to 1 if you have the <usersec.h> header file. */
1283/* #undef HAVE_USERSEC_H */
1284
1285/* Define to 1 if you have the <util.h> header file. */
1286/* #undef HAVE_UTIL_H */
1287
1288/* Define to 1 if you have the <utmpx.h> header file. */
1289#define HAVE_UTMPX_H 1
1290
1291/* Define to 1 if you have the <utmp.h> header file. */
1292/* #undef HAVE_UTMP_H */
1293
1294/* Define to 1 if the system has the type `u_int16_t'. */
1295#define HAVE_U_INT16_T 1
1296
1297/* Define to 1 if the system has the type `u_int32_t'. */
1298#define HAVE_U_INT32_T 1
1299
1300/* Define to 1 if the system has the type `u_int64_t'. */
1301#define HAVE_U_INT64_T 1
1302
1303/* Define to 1 if the system has the type `u_int8_t'. */
1304#define HAVE_U_INT8_T 1
1305
1306/* Define to 1 if you have the `vasnprintf' function. */
1307/* #undef HAVE_VASNPRINTF */
1308
1309/* Define to 1 if you have the `vasprintf' function. */
1310#define HAVE_VASPRINTF 1
1311
1312/* Define if you have the function `verr'. */
1313#define HAVE_VERR 1
1314
1315/* Define if you have the function `verrx'. */
1316#define HAVE_VERRX 1
1317
1318/* Define to 1 if you have the `vhangup' function. */
1319/* #undef HAVE_VHANGUP */
1320
1321/* Define to 1 if you have the `vis' function. */
1322#define HAVE_VIS 1
1323
1324/* Define to 1 if you have the <vis.h> header file. */
1325#define HAVE_VIS_H 1
1326
1327/* define if you have a working vsnprintf */
1328#define HAVE_VSNPRINTF 1
1329
1330/* Define if you have the function `vsyslog'. */
1331#define HAVE_VSYSLOG 1
1332
1333/* Define if you have the function `vwarn'. */
1334#define HAVE_VWARN 1
1335
1336/* Define if you have the function `vwarnx'. */
1337#define HAVE_VWARNX 1
1338
1339/* Define if you have the function `warn'. */
1340#define HAVE_WARN 1
1341
1342/* Define if you have the function `warnx'. */
1343#define HAVE_WARNX 1
1344
1345/* Define to 1 if you have the <winsock2.h> header file. */
1346/* #undef HAVE_WINSOCK2_H */
1347
1348/* Define if you have the function `writev'. */
1349#define HAVE_WRITEV 1
1350
1351/* Define to 1 if you have the <ws2tcpip.h> header file. */
1352/* #undef HAVE_WS2TCPIP_H */
1353
1354/* define if struct winsize has ws_xpixel */
1355#define HAVE_WS_XPIXEL 1
1356
1357/* define if struct winsize has ws_ypixel */
1358#define HAVE_WS_YPIXEL 1
1359
1360/* Define to 1 if you have the `XauFileName' function. */
1361/* #undef HAVE_XAUFILENAME */
1362
1363/* Define to 1 if you have the `XauReadAuth' function. */
1364/* #undef HAVE_XAUREADAUTH */
1365
1366/* Define to 1 if you have the `XauWriteAuth' function. */
1367/* #undef HAVE_XAUWRITEAUTH */
1368
1369/* Define to 1 if you have the `yp_get_default_domain' function. */
1370#define HAVE_YP_GET_DEFAULT_DOMAIN 1
1371
1372/* Define to 1 if you have the `_getpty' function. */
1373/* #undef HAVE__GETPTY */
1374
1375/* Define if you have the `_res' variable. */
1376#define HAVE__RES 1
1377
1378/* Define to 1 if you have the `_scrsize' function. */
1379/* #undef HAVE__SCRSIZE */
1380
1381/* define if your compiler has __attribute__ */
1382#define HAVE___ATTRIBUTE__ 1
1383
1384/* Define if you have the `__progname' variable. */
1385#define HAVE___PROGNAME 1
1386
1387/* have __sync_add_and_fetch */
1388#if defined(__FreeBSD__) && (defined(__arm__) || defined(__mips__))
1389#undef HAVE___SYNC_ADD_AND_FETCH /* Not supported on FreeBSD/arm */
1390#else
1391# 1296 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1392#define HAVE___SYNC_ADD_AND_FETCH 1
1393#endif
1394# 1298 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1395
1396/* Define if you want support for weak crypto */
1397#define HEIM_WEAK_CRYPTO 1
1398
1399/* Define if you have the hesiod package. */
1400/* #undef HESIOD */
1401
1402/* Enable Kerberos 5 support in applications. */
1403#define KRB5 1
1404
1405/* Define to enable kx509. */
1406#define KX509 1
1407
1408/* path to lib */
1409#define LIBDIR "/usr/lib"
1410
1411/* Define if you have the libedit package. */
1412/* #undef LIBEDIT */
1413
1414/* path to libexec */
1415#define LIBEXECDIR "/usr/libexec"
1416
1417/* Define if you have the libintl package. */
1418/* #undef LIBINTL */
1419
1420/* path to localstate */
1421#define LOCALSTATEDIR "/var/heimdal"
1422
1423/* Define to the sub-directory in which libtool stores uninstalled libraries.
1424 */
1425#define LT_OBJDIR ".libs/"
1426
1427/* define if the system is missing a prototype for asnprintf() */
1428#define NEED_ASNPRINTF_PROTO 1
1429
1430/* define if the system is missing a prototype for asprintf() */
1431/* #undef NEED_ASPRINTF_PROTO */
1432
1433/* define if the system is missing a prototype for crypt() */
1434/* #undef NEED_CRYPT_PROTO */
1435
1436/* define if the system is missing a prototype for daemon() */
1437#define NEED_DAEMON_PROTO 1
1438
1439/* define if the system is missing a prototype for gethostname() */
1440/* #undef NEED_GETHOSTNAME_PROTO */
1441
1442/* define if the system is missing a prototype for getusershell() */
1443/* #undef NEED_GETUSERSHELL_PROTO */
1444
1445/* define if the system is missing a prototype for glob() */
1446/* #undef NEED_GLOB_PROTO */
1447
1448/* define if the system is missing a prototype for hstrerror() */
1449/* #undef NEED_HSTRERROR_PROTO */
1450
1451/* define if the system is missing a prototype for inet_aton() */
1452/* #undef NEED_INET_ATON_PROTO */
1453
1454/* define if the system is missing a prototype for iruserok() */
1455/* #undef NEED_IRUSEROK_PROTO */
1456
1457/* define if the system is missing a prototype for mkstemp() */
1458/* #undef NEED_MKSTEMP_PROTO */
1459
1460/* if your qsort is not a stable sort */
1461/* #undef NEED_QSORT */
1462
1463/* define if the system is missing a prototype for SecKeyGetCSPHandle() */
1464/* #undef NEED_SECKEYGETCSPHANDLE_PROTO */
1465
1466/* define if the system is missing a prototype for setenv() */
1467/* #undef NEED_SETENV_PROTO */
1468
1469/* define if the system is missing a prototype for snprintf() */
1470/* #undef NEED_SNPRINTF_PROTO */
1471
1472/* define if the system is missing a prototype for strndup() */
1473/* #undef NEED_STRNDUP_PROTO */
1474
1475/* define if the system is missing a prototype for strsep() */
1476/* #undef NEED_STRSEP_PROTO */
1477
1478/* define if the system is missing a prototype for strsvisx() */
1479#define NEED_STRSVISX_PROTO 1
1480
1481/* define if the system is missing a prototype for strsvis() */
1482#define NEED_STRSVIS_PROTO 1
1483
1484/* define if the system is missing a prototype for strtok_r() */
1485/* #undef NEED_STRTOK_R_PROTO */
1486
1487/* define if the system is missing a prototype for strunvis() */
1488/* #undef NEED_STRUNVIS_PROTO */
1489
1490/* define if the system is missing a prototype for strvisx() */
1491/* #undef NEED_STRVISX_PROTO */
1492
1493/* define if the system is missing a prototype for strvis() */
1494/* #undef NEED_STRVIS_PROTO */
1495
1496/* define if the system is missing a prototype for svis() */
1497#define NEED_SVIS_PROTO 1
1498
1499/* define if the system is missing a prototype for unsetenv() */
1500/* #undef NEED_UNSETENV_PROTO */
1501
1502/* define if the system is missing a prototype for unvis() */
1503/* #undef NEED_UNVIS_PROTO */
1504
1505/* define if the system is missing a prototype for vasnprintf() */
1506#define NEED_VASNPRINTF_PROTO 1
1507
1508/* define if the system is missing a prototype for vasprintf() */
1509/* #undef NEED_VASPRINTF_PROTO */
1510
1511/* define if the system is missing a prototype for vis() */
1512/* #undef NEED_VIS_PROTO */
1513
1514/* define if the system is missing a prototype for vsnprintf() */
1515/* #undef NEED_VSNPRINTF_PROTO */
1516
1517/* Define if you don't wan't support for AFS. */
1518/* #undef NO_AFS */
1519
1520/* Define to 1 if your C compiler doesn't accept -c and -o together. */
1521/* #undef NO_MINUS_C_MINUS_O */
1522
1523/* Define if you don't want to use mmap. */
1524/* #undef NO_MMAP */
1525
1526/* Define this to enable old environment option in telnet. */
1527#define OLD_ENVIRON 1
1528
1529/* Define if you have the openldap package. */
1530/* #undef OPENLDAP */
1531
1532/* Define if you want support for hdb ldap module */
1533/* #undef OPENLDAP_MODULE */
1534
1535/* define if prototype of openlog is compatible with void openlog(const char
1536 *, int, int) */
1537#define OPENLOG_PROTO_COMPATIBLE 1
1538
1539/* Define if you want OTP support in applications. */
1540#define OTP 1
1541
1542/* Name of package */
1543#define PACKAGE "heimdal"
1544
1545/* Define to the address where bug reports for this package should be sent. */
1546#define PACKAGE_BUGREPORT "heimdal-bugs@h5l.org"
1547
1548/* Define to the full name of this package. */
1549#define PACKAGE_NAME "Heimdal"
1550
1551/* Define to the full name and version of this package. */
1552#define PACKAGE_STRING "Heimdal 1.5.2"
1553
1554/* Define to the one symbol short name of this package. */
1555#define PACKAGE_TARNAME "heimdal"
1556
1557/* Define to the home page for this package. */
1558#define PACKAGE_URL ""
1559
1560/* Define to the version of this package. */
1561#define PACKAGE_VERSION "1.5.2"
1562
1563/* Define to enable PKINIT. */
1564#define PKINIT 1
1565
1566/* Define if getlogin has POSIX flavour (and not BSD). */
1567/* #undef POSIX_GETLOGIN */
1568
1569/* Define if getpwnam_r has POSIX flavour. */
1570#define POSIX_GETPWNAM_R 1
1571
1572/* Define if you have the readline package. */
1573/* #undef READLINE */
1574
1575/* Define as the return type of signal handlers (`int' or `void'). */
1576#define RETSIGTYPE void
1577
1578/* path to sbin */
1579#define SBINDIR "/usr/sbin"
1580
1581/* Define if you want to use samba socket wrappers. */
1582/* #undef SOCKET_WRAPPER_REPLACE */
1583
1584/* Define if you have the sqlite3 package. */
1585/* #undef SQLITE3 */
1586
1587/* Define to 1 if you have the ANSI C header files. */
1588#define STDC_HEADERS 1
1589
1590/* Define if you have streams ptys. */
1591/* #undef STREAMSPTY */
1592
1593/* define if prototype of strerror_r is compatible with int strerror_r(int,
1594 char *, size_t) */
1595#define STRERROR_R_PROTO_COMPATIBLE 1
1596
1597/* Define if os support want to detach is daemonens. */
1598#define SUPPORT_DETACH 1
1599
1600/* Enable use of inetd style startup. */
1601#define SUPPORT_INETD 1
1602
1603/* path to sysconf */
1604#define SYSCONFDIR "/etc"
1605
1606/* Define to what version of SunOS you are running. */
1607/* #undef SunOS */
1608
1609/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
1610#define TIME_WITH_SYS_TIME 1
1611
1612/* Define to 1 if your <sys/time.h> declares `struct tm'. */
1613/* #undef TM_IN_SYS_TIME */
1614
1615/* Version number of package */
1616#define VERSION "1.5.2"
1617
1618/* Define if signal handlers return void. */
1619#define VOID_RETSIGTYPE 1
1620
1621/* define if target is big endian */
1622/* #undef WORDS_BIGENDIAN */
1623
1624/* Define to 1 if the X Window System is missing or not being used. */
1625#define X_DISPLAY_MISSING 1
1626
1627/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
1628 `char[]'. */
1629#define YYTEXT_POINTER 1
1630
1631/* Required for functional/sane headers on AIX */
1632/* #undef _ALL_SOURCE */
1633
1634/* Number of bits in a file offset, on hosts where this is settable. */
1635/* #undef _FILE_OFFSET_BITS */
1636
1637/* Define to enable extensions on glibc-based systems such as Linux. */
1638#define _GNU_SOURCE 1
1639
1640/* Define for large files, on AIX-style hosts. */
1641/* #undef _LARGE_FILES */
1642
1643/* Define to get POSIX getpwnam_r in some systems. */
1644/* #undef _POSIX_PTHREAD_SEMANTICS */
1645
1646/* Define to empty if `const' does not conform to ANSI C. */
1647/* #undef const */
1648
1649/* Define to `int' if <sys/types.h> doesn't define. */
1650/* #undef gid_t */
1651
1652/* Define to `__inline__' or `__inline' if that's what the C compiler
1653 calls it, or to nothing if 'inline' is not supported under any name. */
1654#ifndef __cplusplus
1655/* #undef inline */
1656#endif
1657# 1560 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1658
1659/* Define this to what the type mode_t should be. */
1660/* #undef mode_t */
1661
1662/* Define to `long int' if <sys/types.h> does not define. */
1663/* #undef off_t */
1664
1665/* Define to `int' if <sys/types.h> does not define. */
1666/* #undef pid_t */
1667
1668/* Path name delimiter */
1669#define rk_PATH_DELIM '/'
1670
1671/* Define this to what the type sig_atomic_t should be. */
1672/* #undef sig_atomic_t */
1673
1674/* Define to `unsigned int' if <sys/types.h> does not define. */
1675/* #undef size_t */
1676
1677/* Define to `int' if <sys/types.h> doesn't define. */
1678/* #undef uid_t */
1679
1680#if _AIX
1681/* XXX this is gross, but kills about a gazillion warnings */
1682struct ether_addr;
1683struct sockaddr;
1684struct sockaddr_dl;
1685struct sockaddr_in;
1686#endif
1687# 1589 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1688
1689#ifdef __APPLE__
1690#if 0 /* expanded by -frewrite-includes */
1691#include <AvailabilityMacros.h>
1692#endif /* expanded by -frewrite-includes */
1693# 1591 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1694# 1592 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1695#endif
1696# 1593 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1697
1698#ifdef ROKEN_RENAME
1699#if 0 /* expanded by -frewrite-includes */
1700#include "roken_rename.h"
1701#endif /* expanded by -frewrite-includes */
1702# 1595 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1703# 1596 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1704#endif
1705# 1597 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1706
1707#ifdef VOID_RETSIGTYPE
1708#define SIGRETURN(x) return
1709#else
1710# 1601 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1711#define SIGRETURN(x) return (RETSIGTYPE)(x)
1712#endif
1713# 1603 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1714
1715#ifdef BROKEN_REALLOC
1716#define realloc(X, Y) rk_realloc((X), (Y))
1717#endif
1718# 1607 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1719
1720
1721#ifdef ENDIANESS_IN_SYS_PARAM_H
1722#if 0 /* expanded by -frewrite-includes */
1723# include <sys/types.h>
1724#endif /* expanded by -frewrite-includes */
1725# 1610 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
1726# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 1 3 4
1727/*-
1728 * Copyright (c) 1982, 1986, 1991, 1993, 1994
1729 * The Regents of the University of California. All rights reserved.
1730 * (c) UNIX System Laboratories, Inc.
1731 * All or some portions of this file are derived from material licensed
1732 * to the University of California by American Telephone and Telegraph
1733 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
1734 * the permission of UNIX System Laboratories, Inc.
1735 *
1736 * Redistribution and use in source and binary forms, with or without
1737 * modification, are permitted provided that the following conditions
1738 * are met:
1739 * 1. Redistributions of source code must retain the above copyright
1740 * notice, this list of conditions and the following disclaimer.
1741 * 2. Redistributions in binary form must reproduce the above copyright
1742 * notice, this list of conditions and the following disclaimer in the
1743 * documentation and/or other materials provided with the distribution.
1744 * 4. Neither the name of the University nor the names of its contributors
1745 * may be used to endorse or promote products derived from this software
1746 * without specific prior written permission.
1747 *
1748 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1749 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1750 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1751 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1752 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1753 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1754 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1755 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1756 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1757 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1758 * SUCH DAMAGE.
1759 *
1760 * @(#)types.h 8.6 (Berkeley) 2/19/95
1761 * $FreeBSD$
1762 */
1763
1764#ifndef _SYS_TYPES_H_
1765#define _SYS_TYPES_H_
1766
1767#if 0 /* expanded by -frewrite-includes */
1768#include <sys/cdefs.h>
1769#endif /* expanded by -frewrite-includes */
1770# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
1771# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 1 3 4
1772/*-
1773 * Copyright (c) 1991, 1993
1774 * The Regents of the University of California. All rights reserved.
1775 *
1776 * This code is derived from software contributed to Berkeley by
1777 * Berkeley Software Design, Inc.
1778 *
1779 * Redistribution and use in source and binary forms, with or without
1780 * modification, are permitted provided that the following conditions
1781 * are met:
1782 * 1. Redistributions of source code must retain the above copyright
1783 * notice, this list of conditions and the following disclaimer.
1784 * 2. Redistributions in binary form must reproduce the above copyright
1785 * notice, this list of conditions and the following disclaimer in the
1786 * documentation and/or other materials provided with the distribution.
1787 * 4. Neither the name of the University nor the names of its contributors
1788 * may be used to endorse or promote products derived from this software
1789 * without specific prior written permission.
1790 *
1791 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1792 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1793 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1794 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1795 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1796 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1797 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1798 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1799 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1800 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1801 * SUCH DAMAGE.
1802 *
1803 * @(#)cdefs.h 8.8 (Berkeley) 1/9/95
1804 * $FreeBSD$
1805 */
1806
1807#ifndef _SYS_CDEFS_H_
1808#define _SYS_CDEFS_H_
1809
1810/*
1811 * Testing against Clang-specific extensions.
1812 */
1813
1814#ifndef __has_attribute
1815#define __has_attribute(x) 0
1816#endif
1817# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1818#ifndef __has_extension
1819#define __has_extension __has_feature
1820#endif
1821# 49 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1822#ifndef __has_feature
1823#define __has_feature(x) 0
1824#endif
1825# 52 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1826#ifndef __has_include
1827#define __has_include(x) 0
1828#endif
1829# 55 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1830#ifndef __has_builtin
1831#define __has_builtin(x) 0
1832#endif
1833# 58 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1834
1835#if defined(__cplusplus)
1836#define __BEGIN_DECLS extern "C" {
1837#define __END_DECLS }
1838#else
1839# 63 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1840#define __BEGIN_DECLS
1841#define __END_DECLS
1842#endif
1843# 66 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1844
1845/*
1846 * This code has been put in place to help reduce the addition of
1847 * compiler specific defines in FreeBSD code. It helps to aid in
1848 * having a compiler-agnostic source tree.
1849 */
1850
1851#if defined(__GNUC__) || defined(__INTEL_COMPILER)
1852
1853#if __GNUC__ >= 3 || defined(__INTEL_COMPILER)
1854#define __GNUCLIKE_ASM 3
1855#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS
1856#else
1857# 79 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1858#define __GNUCLIKE_ASM 2
1859#endif
1860# 81 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1861#define __GNUCLIKE___TYPEOF 1
1862#define __GNUCLIKE___OFFSETOF 1
1863#define __GNUCLIKE___SECTION 1
1864
1865#ifndef __INTEL_COMPILER
1866#define __GNUCLIKE_CTOR_SECTION_HANDLING 1
1867#endif
1868# 88 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1869
1870#define __GNUCLIKE_BUILTIN_CONSTANT_P 1
1871#if defined(__INTEL_COMPILER) && defined(__cplusplus) && \
1872 __INTEL_COMPILER < 800
1873#undef __GNUCLIKE_BUILTIN_CONSTANT_P
1874#endif
1875# 94 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1876
1877#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3)
1878#define __GNUCLIKE_BUILTIN_VARARGS 1
1879#define __GNUCLIKE_BUILTIN_STDARG 1
1880#define __GNUCLIKE_BUILTIN_VAALIST 1
1881#endif
1882# 100 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1883
1884#if defined(__GNUC__)
1885#define __GNUC_VA_LIST_COMPATIBILITY 1
1886#endif
1887# 104 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1888
1889/*
1890 * Compiler memory barriers, specific to gcc and clang.
1891 */
1892#if defined(__GNUC__)
1893#define __compiler_membar() __asm __volatile(" " : : : "memory")
1894#endif
1895# 111 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1896
1897#ifndef __INTEL_COMPILER
1898#define __GNUCLIKE_BUILTIN_NEXT_ARG 1
1899#define __GNUCLIKE_MATH_BUILTIN_RELOPS
1900#endif
1901# 116 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1902
1903#define __GNUCLIKE_BUILTIN_MEMCPY 1
1904
1905/* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */
1906#define __CC_SUPPORTS_INLINE 1
1907#define __CC_SUPPORTS___INLINE 1
1908#define __CC_SUPPORTS___INLINE__ 1
1909
1910#define __CC_SUPPORTS___FUNC__ 1
1911#define __CC_SUPPORTS_WARNING 1
1912
1913#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */
1914
1915#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1
1916
1917#endif /* __GNUC__ || __INTEL_COMPILER */
1918# 132 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1919
1920/*
1921 * Macro to test if we're using a specific version of gcc or later.
1922 */
1923#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
1924#define __GNUC_PREREQ__(ma, mi) \
1925 (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
1926#else
1927# 140 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1928#define __GNUC_PREREQ__(ma, mi) 0
1929#endif
1930# 142 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1931
1932/*
1933 * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
1934 * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
1935 * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
1936 * mode -- there must be no spaces between its arguments, and for nested
1937 * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
1938 * concatenate double-quoted strings produced by the __STRING macro, but
1939 * this only works with ANSI C.
1940 *
1941 * __XSTRING is like __STRING, but it expands any macros in its argument
1942 * first. It is only available with ANSI C.
1943 */
1944#if defined(__STDC__) || defined(__cplusplus)
1945#define __P(protos) protos /* full-blown ANSI C */
1946#define __CONCAT1(x,y) x ## y
1947#define __CONCAT(x,y) __CONCAT1(x,y)
1948#define __STRING(x) #x /* stringify without expanding x */
1949#define __XSTRING(x) __STRING(x) /* expand x, then stringify */
1950
1951#define __const const /* define reserved names to standard */
1952#define __signed signed
1953#define __volatile volatile
1954#if defined(__cplusplus)
1955#define __inline inline /* convert to C++ keyword */
1956#else
1957# 168 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1958#if !(defined(__CC_SUPPORTS___INLINE))
1959#define __inline /* delete GCC keyword */
1960#endif /* ! __CC_SUPPORTS___INLINE */
1961# 171 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1962#endif /* !__cplusplus */
1963# 172 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1964
1965#else /* !(__STDC__ || __cplusplus) */
1966# 174 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1967#define __P(protos) () /* traditional C preprocessor */
1968#define __CONCAT(x,y) x/**/y
1969#define __STRING(x) "x"
1970
1971#if !defined(__CC_SUPPORTS___INLINE)
1972#define __const /* delete pseudo-ANSI C keywords */
1973#define __inline
1974#define __signed
1975#define __volatile
1976/*
1977 * In non-ANSI C environments, new programs will want ANSI-only C keywords
1978 * deleted from the program and old programs will want them left alone.
1979 * When using a compiler other than gcc, programs using the ANSI C keywords
1980 * const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
1981 * When using "gcc -traditional", we assume that this is the intent; if
1982 * __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
1983 */
1984#ifndef NO_ANSI_KEYWORDS
1985#define const /* delete ANSI C keywords */
1986#define inline
1987#define signed
1988#define volatile
1989#endif /* !NO_ANSI_KEYWORDS */
1990# 197 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1991#endif /* !__CC_SUPPORTS___INLINE */
1992# 198 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1993#endif /* !(__STDC__ || __cplusplus) */
1994# 199 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
1995
1996/*
1997 * Compiler-dependent macros to help declare dead (non-returning) and
1998 * pure (no side effects) functions, and unused variables. They are
1999 * null except for versions of gcc that are known to support the features
2000 * properly (old versions of gcc-2 supported the dead and pure features
2001 * in a different (wrong) way). If we do not provide an implementation
2002 * for a given compiler, let the compile fail if it is told to use
2003 * a feature that we cannot live without.
2004 */
2005#ifdef lint
2006#define __dead2
2007#define __pure2
2008#define __unused
2009#define __packed
2010#define __aligned(x)
2011#define __section(x)
2012#define __weak_symbol
2013#else
2014# 218 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2015#define __weak_symbol __attribute__((__weak__))
2016#if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER)
2017#define __dead2
2018#define __pure2
2019#define __unused
2020#endif
2021# 224 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2022#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER)
2023#define __dead2 __attribute__((__noreturn__))
2024#define __pure2 __attribute__((__const__))
2025#define __unused
2026/* XXX Find out what to do for __packed, __aligned and __section */
2027#endif
2028# 230 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2029#if __GNUC_PREREQ__(2, 7)
2030#define __dead2 __attribute__((__noreturn__))
2031#define __pure2 __attribute__((__const__))
2032#define __unused __attribute__((__unused__))
2033#define __used __attribute__((__used__))
2034#define __packed __attribute__((__packed__))
2035#define __aligned(x) __attribute__((__aligned__(x)))
2036#define __section(x) __attribute__((__section__(x)))
2037#endif
2038# 239 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2039#if defined(__INTEL_COMPILER)
2040#define __dead2 __attribute__((__noreturn__))
2041#define __pure2 __attribute__((__const__))
2042#define __unused __attribute__((__unused__))
2043#define __used __attribute__((__used__))
2044#define __packed __attribute__((__packed__))
2045#define __aligned(x) __attribute__((__aligned__(x)))
2046#define __section(x) __attribute__((__section__(x)))
2047#endif
2048# 248 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2049#endif /* lint */
2050# 249 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2051
2052#if !__GNUC_PREREQ__(2, 95)
2053#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b)
2054#endif
2055# 253 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2056
2057/*
2058 * Keywords added in C11.
2059 */
2060
2061#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint)
2062
2063#if !__has_extension(c_alignas)
2064#if (defined(__cplusplus) && __cplusplus >= 201103L) || \
2065 __has_extension(cxx_alignas)
2066#define _Alignas(x) alignas(x)
2067#else
2068# 265 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2069/* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */
2070#define _Alignas(x) __aligned(x)
2071#endif
2072# 268 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2073#endif
2074# 269 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2075
2076#if defined(__cplusplus) && __cplusplus >= 201103L
2077#define _Alignof(x) alignof(x)
2078#else
2079# 273 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2080#define _Alignof(x) __alignof(x)
2081#endif
2082# 275 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2083
2084#if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
2085/*
2086 * No native support for _Atomic(). Place object in structure to prevent
2087 * most forms of direct non-atomic access.
2088 */
2089#define _Atomic(T) struct { T volatile __val; }
2090#endif
2091# 283 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2092
2093#if defined(__cplusplus) && __cplusplus >= 201103L
2094#define _Noreturn [[noreturn]]
2095#else
2096# 287 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2097#define _Noreturn __dead2
2098#endif
2099# 289 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2100
2101#if !__has_extension(c_static_assert)
2102#if (defined(__cplusplus) && __cplusplus >= 201103L) || \
2103 __has_extension(cxx_static_assert)
2104#define _Static_assert(x, y) static_assert(x, y)
2105#elif __GNUC_PREREQ__(4,6)
2106# 295 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2107/* Nothing, gcc 4.6 and higher has _Static_assert built-in */
2108#elif defined(__COUNTER__)
2109# 297 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2110#define _Static_assert(x, y) __Static_assert(x, __COUNTER__)
2111#define __Static_assert(x, y) ___Static_assert(x, y)
2112#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \
2113 __unused
2114#else
2115# 302 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2116#define _Static_assert(x, y) struct __hack
2117#endif
2118# 304 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2119#endif
2120# 305 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2121
2122#if !__has_extension(c_thread_local)
2123/*
2124 * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode
2125 * without actually supporting the thread_local keyword. Don't check for
2126 * the presence of C++11 when defining _Thread_local.
2127 */
2128#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \
2129 __has_extension(cxx_thread_local)
2130#define _Thread_local thread_local
2131#else
2132# 316 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2133#define _Thread_local __thread
2134#endif
2135# 318 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2136#endif
2137# 319 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2138
2139#endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */
2140# 321 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2141
2142/*
2143 * Emulation of C11 _Generic(). Unlike the previously defined C11
2144 * keywords, it is not possible to implement this using exactly the same
2145 * syntax. Therefore implement something similar under the name
2146 * __generic(). Unlike _Generic(), this macro can only distinguish
2147 * between a single type, so it requires nested invocations to
2148 * distinguish multiple cases.
2149 */
2150
2151#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
2152 __has_extension(c_generic_selections)
2153#define __generic(expr, t, yes, no) \
2154 _Generic(expr, t: yes, default: no)
2155#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
2156# 336 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2157#define __generic(expr, t, yes, no) \
2158 __builtin_choose_expr( \
2159 __builtin_types_compatible_p(__typeof(expr), t), yes, no)
2160#endif
2161# 340 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2162
2163#if __GNUC_PREREQ__(2, 96)
2164#define __malloc_like __attribute__((__malloc__))
2165#define __pure __attribute__((__pure__))
2166#else
2167# 345 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2168#define __malloc_like
2169#define __pure
2170#endif
2171# 348 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2172
2173#if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
2174#define __always_inline __attribute__((__always_inline__))
2175#else
2176# 352 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2177#define __always_inline
2178#endif
2179# 354 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2180
2181#if __GNUC_PREREQ__(3, 1)
2182#define __noinline __attribute__ ((__noinline__))
2183#else
2184# 358 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2185#define __noinline
2186#endif
2187# 360 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2188
2189#if __GNUC_PREREQ__(3, 3)
2190#define __nonnull(x) __attribute__((__nonnull__(x)))
2191#define __nonnull_all __attribute__((__nonnull__))
2192#else
2193# 365 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2194#define __nonnull(x)
2195#define __nonnull_all
2196#endif
2197# 368 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2198
2199#if __GNUC_PREREQ__(3, 4)
2200#define __fastcall __attribute__((__fastcall__))
2201#define __result_use_check __attribute__((__warn_unused_result__))
2202#else
2203# 373 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2204#define __fastcall
2205#define __result_use_check
2206#endif
2207# 376 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2208
2209#if __GNUC_PREREQ__(4, 1)
2210#define __returns_twice __attribute__((__returns_twice__))
2211#else
2212# 380 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2213#define __returns_twice
2214#endif
2215# 382 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2216
2217#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3)
2218#define __alloc_size(x) __attribute__((__alloc_size__(x)))
2219#else
2220# 386 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2221#define __alloc_size(x)
2222#endif
2223# 388 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2224
2225#if __has_builtin(__builtin_unreachable) || __GNUC_PREREQ__(4, 6)
2226#define __unreachable() __builtin_unreachable()
2227#else
2228# 392 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2229#define __unreachable() ((void)0)
2230#endif
2231# 394 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2232
2233#if __has_attribute(alloc_align) || __GNUC_PREREQ__(4, 9)
2234#define __alloc_align(x) __attribute__((__alloc_align__(x)))
2235#else
2236# 398 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2237#define __alloc_align(x)
2238#endif
2239# 400 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2240
2241/* XXX: should use `#if __STDC_VERSION__ < 199901'. */
2242#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
2243#define __func__ NULL
2244#endif
2245# 405 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2246
2247#if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901
2248#define __LONG_LONG_SUPPORTED
2249#endif
2250# 409 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2251
2252/* C++11 exposes a load of C99 stuff */
2253#if defined(__cplusplus) && __cplusplus >= 201103L
2254#define __LONG_LONG_SUPPORTED
2255#ifndef __STDC_LIMIT_MACROS
2256#define __STDC_LIMIT_MACROS
2257#endif
2258# 416 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2259#ifndef __STDC_CONSTANT_MACROS
2260#define __STDC_CONSTANT_MACROS
2261#endif
2262# 419 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2263#endif
2264# 420 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2265
2266/*
2267 * GCC 2.95 provides `__restrict' as an extension to C90 to support the
2268 * C99-specific `restrict' type qualifier. We happen to use `__restrict' as
2269 * a way to define the `restrict' type qualifier without disturbing older
2270 * software that is unaware of C99 keywords.
2271 */
2272#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95)
2273#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 || defined(lint)
2274#define __restrict
2275#else
2276# 431 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2277#define __restrict restrict
2278#endif
2279# 433 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2280#endif
2281# 434 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2282
2283/*
2284 * GNU C version 2.96 adds explicit branch prediction so that
2285 * the CPU back-end can hint the processor and also so that
2286 * code blocks can be reordered such that the predicted path
2287 * sees a more linear flow, thus improving cache behavior, etc.
2288 *
2289 * The following two macros provide us with a way to utilize this
2290 * compiler feature. Use __predict_true() if you expect the expression
2291 * to evaluate to true, and __predict_false() if you expect the
2292 * expression to evaluate to false.
2293 *
2294 * A few notes about usage:
2295 *
2296 * * Generally, __predict_false() error condition checks (unless
2297 * you have some _strong_ reason to do otherwise, in which case
2298 * document it), and/or __predict_true() `no-error' condition
2299 * checks, assuming you want to optimize for the no-error case.
2300 *
2301 * * Other than that, if you don't know the likelihood of a test
2302 * succeeding from empirical or other `hard' evidence, don't
2303 * make predictions.
2304 *
2305 * * These are meant to be used in places that are run `a lot'.
2306 * It is wasteful to make predictions in code that is run
2307 * seldomly (e.g. at subsystem initialization time) as the
2308 * basic block reordering that this affects can often generate
2309 * larger code.
2310 */
2311#if __GNUC_PREREQ__(2, 96)
2312#define __predict_true(exp) __builtin_expect((exp), 1)
2313#define __predict_false(exp) __builtin_expect((exp), 0)
2314#else
2315# 467 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2316#define __predict_true(exp) (exp)
2317#define __predict_false(exp) (exp)
2318#endif
2319# 470 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2320
2321#if __GNUC_PREREQ__(4, 0)
2322#define __sentinel __attribute__((__sentinel__))
2323#define __exported __attribute__((__visibility__("default")))
2324#define __hidden __attribute__((__visibility__("hidden")))
2325#else
2326# 476 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2327#define __sentinel
2328#define __exported
2329#define __hidden
2330#endif
2331# 480 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2332
2333/*
2334 * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
2335 * require it.
2336 */
2337#if __GNUC_PREREQ__(4, 1)
2338#define __offsetof(type, field) __builtin_offsetof(type, field)
2339#else
2340# 488 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2341#ifndef __cplusplus
2342#define __offsetof(type, field) \
2343 ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field))
2344#else
2345# 492 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2346#define __offsetof(type, field) \
2347 (__offsetof__ (reinterpret_cast <__size_t> \
2348 (&reinterpret_cast <const volatile char &> \
2349 (static_cast<type *> (0)->field))))
2350#endif
2351# 497 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2352#endif
2353# 498 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2354#define __rangeof(type, start, end) \
2355 (__offsetof(type, end) - __offsetof(type, start))
2356
2357/*
2358 * Given the pointer x to the member m of the struct s, return
2359 * a pointer to the containing structure. When using GCC, we first
2360 * assign pointer x to a local variable, to check that its type is
2361 * compatible with member m.
2362 */
2363#if __GNUC_PREREQ__(3, 1)
2364#define __containerof(x, s, m) ({ \
2365 const volatile __typeof(((s *)0)->m) *__x = (x); \
2366 __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\
2367})
2368#else
2369# 513 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2370#define __containerof(x, s, m) \
2371 __DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m))
2372#endif
2373# 516 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2374
2375/*
2376 * Compiler-dependent macros to declare that functions take printf-like
2377 * or scanf-like arguments. They are null except for versions of gcc
2378 * that are known to support the features properly (old versions of gcc-2
2379 * didn't permit keeping the keywords out of the application namespace).
2380 */
2381#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
2382#define __printflike(fmtarg, firstvararg)
2383#define __scanflike(fmtarg, firstvararg)
2384#define __format_arg(fmtarg)
2385#define __strfmonlike(fmtarg, firstvararg)
2386#define __strftimelike(fmtarg, firstvararg)
2387#else
2388# 530 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2389#define __printflike(fmtarg, firstvararg) \
2390 __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
2391#define __scanflike(fmtarg, firstvararg) \
2392 __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
2393#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg)))
2394#define __strfmonlike(fmtarg, firstvararg) \
2395 __attribute__((__format__ (__strfmon__, fmtarg, firstvararg)))
2396#define __strftimelike(fmtarg, firstvararg) \
2397 __attribute__((__format__ (__strftime__, fmtarg, firstvararg)))
2398#endif
2399# 540 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2400
2401/*
2402 * FORTIFY_SOURCE, and perhaps other compiler-specific features, require
2403 * the use of non-standard inlining. In general we should try to avoid
2404 * using these but GCC-compatible compilers tend to support the extensions
2405 * well enough to use them in limited cases.
2406 */
2407#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__)
2408#if __has_attribute(artificial) || __GNUC_PREREQ__(4, 3)
2409#define __gnu_inline __attribute__((__gnu_inline__, __artificial__))
2410#else
2411# 551 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2412#define __gnu_inline __attribute__((__gnu_inline__))
2413#endif /* artificial */
2414# 553 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2415#else
2416# 554 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2417#define __gnu_inline
2418#endif
2419# 556 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2420
2421/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */
2422#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \
2423 defined(__GNUC__) && !defined(__INTEL_COMPILER)
2424#define __printf0like(fmtarg, firstvararg) \
2425 __attribute__((__format__ (__printf0__, fmtarg, firstvararg)))
2426#else
2427# 563 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2428#define __printf0like(fmtarg, firstvararg)
2429#endif
2430# 565 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2431
2432#if defined(__GNUC__) || defined(__INTEL_COMPILER)
2433#ifndef __INTEL_COMPILER
2434#define __strong_reference(sym,aliassym) \
2435 extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
2436#endif
2437# 571 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2438#ifdef __STDC__
2439#define __weak_reference(sym,alias) \
2440 __asm__(".weak " #alias); \
2441 __asm__(".equ " #alias ", " #sym)
2442#define __warn_references(sym,msg) \
2443 __asm__(".section .gnu.warning." #sym); \
2444 __asm__(".asciz \"" msg "\""); \
2445 __asm__(".previous")
2446#define __sym_compat(sym,impl,verid) \
2447 __asm__(".symver " #impl ", " #sym "@" #verid)
2448#define __sym_default(sym,impl,verid) \
2449 __asm__(".symver " #impl ", " #sym "@@" #verid)
2450#else
2451# 584 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2452#define __weak_reference(sym,alias) \
2453 __asm__(".weak alias"); \
2454 __asm__(".equ alias, sym")
2455#define __warn_references(sym,msg) \
2456 __asm__(".section .gnu.warning.sym"); \
2457 __asm__(".asciz \"msg\""); \
2458 __asm__(".previous")
2459#define __sym_compat(sym,impl,verid) \
2460 __asm__(".symver impl, sym@verid")
2461#define __sym_default(impl,sym,verid) \
2462 __asm__(".symver impl, sym@@verid")
2463#endif /* __STDC__ */
2464# 596 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2465#endif /* __GNUC__ || __INTEL_COMPILER */
2466# 597 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2467
2468#define __GLOBL1(sym) __asm__(".globl " #sym)
2469#define __GLOBL(sym) __GLOBL1(sym)
2470
2471#if defined(__GNUC__) || defined(__INTEL_COMPILER)
2472#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"")
2473#else
2474# 604 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2475/*
2476 * The following definition might not work well if used in header files,
2477 * but it should be better than nothing. If you want a "do nothing"
2478 * version, then it should generate some harmless declaration, such as:
2479 * #define __IDSTRING(name,string) struct __hack
2480 */
2481#define __IDSTRING(name,string) static const char name[] __unused = string
2482#endif
2483# 612 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2484
2485/*
2486 * Embed the rcs id of a source file in the resulting library. Note that in
2487 * more recent ELF binutils, we use .ident allowing the ID to be stripped.
2488 * Usage:
2489 * __FBSDID("$FreeBSD$");
2490 */
2491#ifndef __FBSDID
2492#if !defined(lint) && !defined(STRIP_FBSDID)
2493#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
2494#else
2495# 623 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2496#define __FBSDID(s) struct __hack
2497#endif
2498# 625 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2499#endif
2500# 626 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2501
2502#ifndef __RCSID
2503#ifndef NO__RCSID
2504#define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
2505#else
2506# 631 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2507#define __RCSID(s) struct __hack
2508#endif
2509# 633 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2510#endif
2511# 634 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2512
2513#ifndef __RCSID_SOURCE
2514#ifndef NO__RCSID_SOURCE
2515#define __RCSID_SOURCE(s) __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s)
2516#else
2517# 639 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2518#define __RCSID_SOURCE(s) struct __hack
2519#endif
2520# 641 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2521#endif
2522# 642 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2523
2524#ifndef __SCCSID
2525#ifndef NO__SCCSID
2526#define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s)
2527#else
2528# 647 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2529#define __SCCSID(s) struct __hack
2530#endif
2531# 649 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2532#endif
2533# 650 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2534
2535#ifndef __COPYRIGHT
2536#ifndef NO__COPYRIGHT
2537#define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s)
2538#else
2539# 655 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2540#define __COPYRIGHT(s) struct __hack
2541#endif
2542# 657 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2543#endif
2544# 658 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2545
2546#ifndef __DECONST
2547#if !__has_feature(capabilities)
2548#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var))
2549#else
2550# 663 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2551#define __DECONST(type, var) ((type)(__intcap_t)(__capability const void *)(var))
2552#endif
2553# 665 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2554#endif
2555# 666 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2556
2557#ifndef __DEVOLATILE
2558#if !__has_feature(capabilities)
2559#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var))
2560#else
2561# 671 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2562#define __DEVOLATILE(type, var) ((type)(__intcap_t)(__capability volatile void *)(var))
2563#endif
2564# 673 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2565#endif
2566# 674 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2567
2568#ifndef __DEQUALIFY
2569#if !__has_feature(capabilities)
2570#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var))
2571#else
2572# 679 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2573#define __DEQUALIFY(type, var) ((type)(__intcap_t)(__capability const volatile void *)(var))
2574#endif
2575# 681 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2576#endif
2577# 682 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2578
2579/*-
2580 * The following definitions are an extension of the behavior originally
2581 * implemented in <sys/_posix.h>, but with a different level of granularity.
2582 * POSIX.1 requires that the macros we test be defined before any standard
2583 * header file is included.
2584 *
2585 * Here's a quick run-down of the versions:
2586 * defined(_POSIX_SOURCE) 1003.1-1988
2587 * _POSIX_C_SOURCE == 1 1003.1-1990
2588 * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
2589 * _POSIX_C_SOURCE == 199309 1003.1b-1993
2590 * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
2591 * and the omnibus ISO/IEC 9945-1: 1996
2592 * _POSIX_C_SOURCE == 200112 1003.1-2001
2593 * _POSIX_C_SOURCE == 200809 1003.1-2008
2594 *
2595 * In addition, the X/Open Portability Guide, which is now the Single UNIX
2596 * Specification, defines a feature-test macro which indicates the version of
2597 * that specification, and which subsumes _POSIX_C_SOURCE.
2598 *
2599 * Our macros begin with two underscores to avoid namespace screwage.
2600 */
2601
2602/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */
2603#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
2604#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */
2605#define _POSIX_C_SOURCE 199009
2606#endif
2607# 711 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2608
2609/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */
2610#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
2611#undef _POSIX_C_SOURCE
2612#define _POSIX_C_SOURCE 199209
2613#endif
2614# 717 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2615
2616/* Deal with various X/Open Portability Guides and Single UNIX Spec. */
2617#ifdef _XOPEN_SOURCE
2618#if _XOPEN_SOURCE - 0 >= 700
2619#define __XSI_VISIBLE 700
2620#undef _POSIX_C_SOURCE
2621#define _POSIX_C_SOURCE 200809
2622#elif _XOPEN_SOURCE - 0 >= 600
2623# 725 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2624#define __XSI_VISIBLE 600
2625#undef _POSIX_C_SOURCE
2626#define _POSIX_C_SOURCE 200112
2627#elif _XOPEN_SOURCE - 0 >= 500
2628# 729 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2629#define __XSI_VISIBLE 500
2630#undef _POSIX_C_SOURCE
2631#define _POSIX_C_SOURCE 199506
2632#endif
2633# 733 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2634#endif
2635# 734 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2636
2637/*
2638 * Deal with all versions of POSIX. The ordering relative to the tests above is
2639 * important.
2640 */
2641#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
2642#define _POSIX_C_SOURCE 198808
2643#endif
2644# 742 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2645#ifdef _POSIX_C_SOURCE
2646#if _POSIX_C_SOURCE >= 200809
2647#define __POSIX_VISIBLE 200809
2648#define __ISO_C_VISIBLE 1999
2649#elif _POSIX_C_SOURCE >= 200112
2650# 747 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2651#define __POSIX_VISIBLE 200112
2652#define __ISO_C_VISIBLE 1999
2653#elif _POSIX_C_SOURCE >= 199506
2654# 750 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2655#define __POSIX_VISIBLE 199506
2656#define __ISO_C_VISIBLE 1990
2657#elif _POSIX_C_SOURCE >= 199309
2658# 753 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2659#define __POSIX_VISIBLE 199309
2660#define __ISO_C_VISIBLE 1990
2661#elif _POSIX_C_SOURCE >= 199209
2662# 756 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2663#define __POSIX_VISIBLE 199209
2664#define __ISO_C_VISIBLE 1990
2665#elif _POSIX_C_SOURCE >= 199009
2666# 759 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2667#define __POSIX_VISIBLE 199009
2668#define __ISO_C_VISIBLE 1990
2669#else
2670# 762 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2671#define __POSIX_VISIBLE 198808
2672#define __ISO_C_VISIBLE 0
2673#endif /* _POSIX_C_SOURCE */
2674# 765 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2675#else
2676# 766 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2677/*-
2678 * Deal with _ANSI_SOURCE:
2679 * If it is defined, and no other compilation environment is explicitly
2680 * requested, then define our internal feature-test macros to zero. This
2681 * makes no difference to the preprocessor (undefined symbols in preprocessing
2682 * expressions are defined to have value zero), but makes it more convenient for
2683 * a test program to print out the values.
2684 *
2685 * If a program mistakenly defines _ANSI_SOURCE and some other macro such as
2686 * _POSIX_C_SOURCE, we will assume that it wants the broader compilation
2687 * environment (and in fact we will never get here).
2688 */
2689#if defined(_ANSI_SOURCE) /* Hide almost everything. */
2690#define __POSIX_VISIBLE 0
2691#define __XSI_VISIBLE 0
2692#define __BSD_VISIBLE 0
2693#define __ISO_C_VISIBLE 1990
2694#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */
2695# 784 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2696#define __POSIX_VISIBLE 0
2697#define __XSI_VISIBLE 0
2698#define __BSD_VISIBLE 0
2699#define __ISO_C_VISIBLE 1999
2700#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */
2701# 789 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2702#define __POSIX_VISIBLE 0
2703#define __XSI_VISIBLE 0
2704#define __BSD_VISIBLE 0
2705#define __ISO_C_VISIBLE 2011
2706#else /* Default environment: show everything. */
2707# 794 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2708#define __POSIX_VISIBLE 200809
2709#define __XSI_VISIBLE 700
2710#define __BSD_VISIBLE 1
2711#define __ISO_C_VISIBLE 2011
2712#endif
2713# 799 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2714#endif
2715# 800 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2716
2717#if defined(__mips) || defined(__powerpc64__)
2718#define __NO_TLS 1
2719#endif
2720# 804 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2721
2722/*
2723 * Type Safety Checking
2724 *
2725 * Clang provides additional attributes to enable checking type safety
2726 * properties that cannot be enforced by the C type system.
2727 */
2728
2729#if __has_attribute(argument_with_type_tag) && \
2730 __has_attribute(type_tag_for_datatype) && !defined(lint)
2731#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \
2732 __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx)))
2733#define __datatype_type_tag(kind, type) \
2734 __attribute__((__type_tag_for_datatype__(kind, type)))
2735#else
2736# 819 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2737#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx)
2738#define __datatype_type_tag(kind, type)
2739#endif
2740# 822 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2741
2742/*
2743 * Lock annotations.
2744 *
2745 * Clang provides support for doing basic thread-safety tests at
2746 * compile-time, by marking which locks will/should be held when
2747 * entering/leaving a functions.
2748 *
2749 * Furthermore, it is also possible to annotate variables and structure
2750 * members to enforce that they are only accessed when certain locks are
2751 * held.
2752 */
2753
2754#if __has_extension(c_thread_safety_attributes)
2755#define __lock_annotate(x) __attribute__((x))
2756#else
2757# 838 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2758#define __lock_annotate(x)
2759#endif
2760# 840 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2761
2762/* Structure implements a lock. */
2763#define __lockable __lock_annotate(lockable)
2764
2765/* Function acquires an exclusive or shared lock. */
2766#define __locks_exclusive(...) \
2767 __lock_annotate(exclusive_lock_function(__VA_ARGS__))
2768#define __locks_shared(...) \
2769 __lock_annotate(shared_lock_function(__VA_ARGS__))
2770
2771/* Function attempts to acquire an exclusive or shared lock. */
2772#define __trylocks_exclusive(...) \
2773 __lock_annotate(exclusive_trylock_function(__VA_ARGS__))
2774#define __trylocks_shared(...) \
2775 __lock_annotate(shared_trylock_function(__VA_ARGS__))
2776
2777/* Function releases a lock. */
2778#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__))
2779
2780/* Function asserts that an exclusive or shared lock is held. */
2781#define __asserts_exclusive(...) \
2782 __lock_annotate(assert_exclusive_lock(__VA_ARGS__))
2783#define __asserts_shared(...) \
2784 __lock_annotate(assert_shared_lock(__VA_ARGS__))
2785
2786/* Function requires that an exclusive or shared lock is or is not held. */
2787#define __requires_exclusive(...) \
2788 __lock_annotate(exclusive_locks_required(__VA_ARGS__))
2789#define __requires_shared(...) \
2790 __lock_annotate(shared_locks_required(__VA_ARGS__))
2791#define __requires_unlocked(...) \
2792 __lock_annotate(locks_excluded(__VA_ARGS__))
2793
2794/* Function should not be analyzed. */
2795#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis)
2796
2797/* Guard variables and structure members by lock. */
2798#define __guarded_by(x) __lock_annotate(guarded_by(x))
2799#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x))
2800
2801#endif /* !_SYS_CDEFS_H_ */
2802# 881 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/cdefs.h" 3 4
2803# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 2 3 4
2804
2805/* Machine type dependent parameters. */
2806#if 0 /* expanded by -frewrite-includes */
2807#include <machine/endian.h>
2808#endif /* expanded by -frewrite-includes */
2809# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
2810# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 1 3 4
2811/*-
2812 * Copyright (c) 1987, 1991 Regents of the University of California.
2813 * All rights reserved.
2814 *
2815 * Redistribution and use in source and binary forms, with or without
2816 * modification, are permitted provided that the following conditions
2817 * are met:
2818 * 1. Redistributions of source code must retain the above copyright
2819 * notice, this list of conditions and the following disclaimer.
2820 * 2. Redistributions in binary form must reproduce the above copyright
2821 * notice, this list of conditions and the following disclaimer in the
2822 * documentation and/or other materials provided with the distribution.
2823 * 4. Neither the name of the University nor the names of its contributors
2824 * may be used to endorse or promote products derived from this software
2825 * without specific prior written permission.
2826 *
2827 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2828 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2829 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2830 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2831 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2832 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2833 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2834 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2835 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2836 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2837 * SUCH DAMAGE.
2838 *
2839 * @(#)endian.h 7.8 (Berkeley) 4/3/91
2840 * $FreeBSD$
2841 */
2842
2843#ifndef _MACHINE_ENDIAN_H_
2844#define _MACHINE_ENDIAN_H_
2845
2846#if 0 /* expanded by -frewrite-includes */
2847#include <sys/cdefs.h>
2848#endif /* expanded by -frewrite-includes */
2849# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
2850# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
2851#ifndef __ASSEMBLER__
2852#if 0 /* expanded by -frewrite-includes */
2853#include <sys/_types.h>
2854#endif /* expanded by -frewrite-includes */
2855# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
2856# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_types.h" 1 3 4
2857/*-
2858 * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
2859 * All rights reserved.
2860 *
2861 * Redistribution and use in source and binary forms, with or without
2862 * modification, are permitted provided that the following conditions
2863 * are met:
2864 * 1. Redistributions of source code must retain the above copyright
2865 * notice, this list of conditions and the following disclaimer.
2866 * 2. Redistributions in binary form must reproduce the above copyright
2867 * notice, this list of conditions and the following disclaimer in the
2868 * documentation and/or other materials provided with the distribution.
2869 *
2870 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2871 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2872 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2873 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2874 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2875 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2876 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2877 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2878 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2879 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2880 * SUCH DAMAGE.
2881 *
2882 * $FreeBSD$
2883 */
2884
2885#ifndef _SYS__TYPES_H_
2886#define _SYS__TYPES_H_
2887
2888#if 0 /* expanded by -frewrite-includes */
2889#include <sys/cdefs.h>
2890#endif /* expanded by -frewrite-includes */
2891# 32 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_types.h" 3 4
2892# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_types.h" 3 4
2893#if 0 /* expanded by -frewrite-includes */
2894#include <machine/_types.h>
2895#endif /* expanded by -frewrite-includes */
2896# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_types.h" 3 4
2897# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 1 3 4
2898/*-
2899 * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
2900 * Copyright (c) 1990, 1993
2901 * The Regents of the University of California. All rights reserved.
2902 *
2903 * Redistribution and use in source and binary forms, with or without
2904 * modification, are permitted provided that the following conditions
2905 * are met:
2906 * 1. Redistributions of source code must retain the above copyright
2907 * notice, this list of conditions and the following disclaimer.
2908 * 2. Redistributions in binary form must reproduce the above copyright
2909 * notice, this list of conditions and the following disclaimer in the
2910 * documentation and/or other materials provided with the distribution.
2911 * 3. All advertising materials mentioning features or use of this software
2912 * must display the following acknowledgement:
2913 * This product includes software developed by the University of
2914 * California, Berkeley and its contributors.
2915 * 4. Neither the name of the University nor the names of its contributors
2916 * may be used to endorse or promote products derived from this software
2917 * without specific prior written permission.
2918 *
2919 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2920 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2921 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2922 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2923 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2924 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2925 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2926 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2927 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2928 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2929 * SUCH DAMAGE.
2930 *
2931 * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
2932 * From: @(#)types.h 8.3 (Berkeley) 1/5/94
2933 * from: src/sys/i386/include/_types.h,v 1.12 2005/07/02 23:13:31 thompsa
2934 * $FreeBSD$
2935 */
2936
2937#ifndef _MACHINE__TYPES_H_
2938#define _MACHINE__TYPES_H_
2939
2940#ifndef _SYS_CDEFS_H_
2941#error this file needs sys/cdefs.h as a prerequisite
2942#endif
2943# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
2944
2945/*
2946 * Basic types upon which most other types are built.
2947 */
2948typedef signed char __int8_t;
2949typedef unsigned char __uint8_t;
2950typedef short __int16_t;
2951typedef unsigned short __uint16_t;
2952typedef int __int32_t;
2953typedef unsigned int __uint32_t;
2954#ifdef __mips_n64
2955typedef long __int64_t;
2956typedef unsigned long __uint64_t;
2957#else
2958# 60 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
2959#ifndef lint
2960__extension__
2961#endif
2962# 63 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
2963/* LONGLONG */
2964typedef long long __int64_t;
2965#ifndef lint
2966__extension__
2967#endif
2968# 68 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
2969/* LONGLONG */
2970typedef unsigned long long __uint64_t;
2971#endif
2972# 71 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
2973
2974/*
2975 * Standard type definitions.
2976 */
2977typedef __int32_t __clock_t; /* clock()... */
2978typedef double __double_t;
2979typedef float __float_t;
2980#ifdef __mips_n64
2981#ifndef __CHERI_SANDBOX__
2982typedef __int64_t __critical_t;
2983typedef __int64_t __intfptr_t;
2984typedef __int64_t __intptr_t;
2985#else
2986# 84 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
2987typedef __intcap_t __critical_t;
2988typedef __intcap_t __intfptr_t;
2989typedef __intcap_t __intptr_t;
2990#endif
2991# 88 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
2992#else
2993# 89 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
2994typedef __int32_t __critical_t;
2995typedef __int32_t __intfptr_t;
2996typedef __int32_t __intptr_t;
2997#endif
2998# 93 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
2999typedef __int64_t __intmax_t;
3000typedef __int32_t __int_fast8_t;
3001typedef __int32_t __int_fast16_t;
3002typedef __int32_t __int_fast32_t;
3003typedef __int64_t __int_fast64_t;
3004typedef __int8_t __int_least8_t;
3005typedef __int16_t __int_least16_t;
3006typedef __int32_t __int_least32_t;
3007typedef __int64_t __int_least64_t;
3008#if defined(__mips_n64) || defined(__mips_n32)
3009typedef __int64_t __register_t;
3010typedef __int64_t f_register_t;
3011#else
3012# 106 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3013typedef __int32_t __register_t;
3014typedef __int32_t f_register_t;
3015#endif
3016# 109 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3017#ifdef __mips_n64
3018typedef __int64_t __ptrdiff_t;
3019typedef __int64_t __segsz_t;
3020typedef __int64_t __semid_t; /* historically intptr_t */
3021typedef __uint64_t __size_t;
3022typedef __int64_t __ssize_t;
3023#ifndef __CHERI_SANDBOX__
3024typedef __uint64_t __uintfptr_t;
3025typedef __uint64_t __uintptr_t;
3026#else
3027# 119 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3028typedef __uintcap_t __uintfptr_t;
3029typedef __uintcap_t __uintptr_t;
3030#endif
3031# 122 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3032#else
3033# 123 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3034typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
3035typedef __int32_t __segsz_t; /* segment size (in pages) */
3036typedef __int32_t __semid_t; /* historically intptr_t */
3037typedef __uint32_t __size_t; /* sizeof() */
3038typedef __int32_t __ssize_t; /* byte count or error */
3039typedef __uint32_t __uintfptr_t;
3040typedef __uint32_t __uintptr_t;
3041#endif
3042# 131 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3043typedef __int64_t __time_t; /* time()... */
3044typedef __uint64_t __uintmax_t;
3045typedef __uint32_t __uint_fast8_t;
3046typedef __uint32_t __uint_fast16_t;
3047typedef __uint32_t __uint_fast32_t;
3048typedef __uint64_t __uint_fast64_t;
3049typedef __uint8_t __uint_least8_t;
3050typedef __uint16_t __uint_least16_t;
3051typedef __uint32_t __uint_least32_t;
3052typedef __uint64_t __uint_least64_t;
3053#if defined(__mips_n64) || defined(__mips_n32)
3054typedef __uint64_t __u_register_t;
3055#else
3056# 144 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3057typedef __uint32_t __u_register_t;
3058#endif
3059# 146 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3060#ifdef __mips_n64
3061typedef __uint64_t __vm_offset_t;
3062typedef __uint64_t __vm_size_t;
3063#else
3064# 150 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3065typedef __uint32_t __vm_offset_t;
3066typedef __uint32_t __vm_size_t;
3067#endif
3068# 153 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3069#if defined(__mips_n64) || defined(__mips_n32) /* PHYSADDR_64_BIT */
3070typedef __uint64_t __vm_paddr_t;
3071#else
3072# 156 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3073typedef __uint32_t __vm_paddr_t;
3074#endif
3075# 158 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3076
3077typedef __int64_t __vm_ooffset_t;
3078typedef __uint64_t __vm_pindex_t;
3079typedef int ___wchar_t;
3080
3081#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */
3082#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */
3083
3084/*
3085 * Unusual type definitions.
3086 */
3087#ifdef __GNUCLIKE_BUILTIN_VARARGS
3088typedef __builtin_va_list __va_list; /* internally known to gcc */
3089#else
3090# 172 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3091typedef char * __va_list;
3092#endif /* __GNUCLIKE_BUILTIN_VARARGS */
3093# 174 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3094#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \
3095 && !defined(__NO_GNUC_VA_LIST)
3096#define __GNUC_VA_LIST
3097typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
3098#endif
3099# 179 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3100
3101#endif /* !_MACHINE__TYPES_H_ */
3102# 181 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_types.h" 3 4
3103# 34 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_types.h" 2 3 4
3104
3105/*
3106 * Standard type definitions.
3107 */
3108typedef __int32_t __blksize_t; /* file block size */
3109typedef __int64_t __blkcnt_t; /* file block count */
3110typedef __int32_t __clockid_t; /* clock_gettime()... */
3111typedef __uint32_t __fflags_t; /* file flags */
3112typedef __uint64_t __fsblkcnt_t;
3113typedef __uint64_t __fsfilcnt_t;
3114typedef __uint32_t __gid_t;
3115typedef __int64_t __id_t; /* can hold a gid_t, pid_t, or uid_t */
3116typedef __uint32_t __ino_t; /* inode number */
3117typedef long __key_t; /* IPC key (for Sys V IPC) */
3118typedef __int32_t __lwpid_t; /* Thread ID (a.k.a. LWP) */
3119typedef __uint16_t __mode_t; /* permissions */
3120typedef int __accmode_t; /* access permissions */
3121typedef int __nl_item;
3122typedef __uint16_t __nlink_t; /* link count */
3123typedef __int64_t __off_t; /* file offset */
3124typedef __int32_t __pid_t; /* process [group] */
3125typedef __int64_t __rlim_t; /* resource limit - intentionally */
3126 /* signed, because of legacy code */
3127 /* that uses -1 for RLIM_INFINITY */
3128typedef __uint8_t __sa_family_t;
3129typedef __uint32_t __socklen_t;
3130typedef long __suseconds_t; /* microseconds (signed) */
3131typedef struct __timer *__timer_t; /* timer_gettime()... */
3132typedef struct __mq *__mqd_t; /* mq_open()... */
3133typedef __uint32_t __uid_t;
3134typedef unsigned int __useconds_t; /* microseconds (unsigned) */
3135typedef int __cpuwhich_t; /* which parameter for cpuset. */
3136typedef int __cpulevel_t; /* level parameter for cpuset. */
3137typedef int __cpusetid_t; /* cpuset identifier. */
3138
3139/*
3140 * Unusual type definitions.
3141 */
3142/*
3143 * rune_t is declared to be an ``int'' instead of the more natural
3144 * ``unsigned long'' or ``long''. Two things are happening here. It is not
3145 * unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
3146 * it looks like 10646 will be a 31 bit standard. This means that if your
3147 * ints cannot hold 32 bits, you will be in trouble. The reason an int was
3148 * chosen over a long is that the is*() and to*() routines take ints (says
3149 * ANSI C), but they use __ct_rune_t instead of int.
3150 *
3151 * NOTE: rune_t is not covered by ANSI nor other standards, and should not
3152 * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
3153 * rune_t must be the same type. Also, wint_t should be able to hold all
3154 * members of the largest character set plus one extra value (WEOF), and
3155 * must be at least 16 bits.
3156 */
3157typedef int __ct_rune_t; /* arg type for ctype funcs */
3158typedef __ct_rune_t __rune_t; /* rune_t (see above) */
3159typedef __ct_rune_t __wint_t; /* wint_t (see above) */
3160
3161/* Clang already provides these types as built-ins, but only in C++ mode. */
3162#if !defined(__clang__) || !defined(__cplusplus)
3163typedef __uint_least16_t __char16_t;
3164typedef __uint_least32_t __char32_t;
3165#endif
3166# 96 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_types.h" 3 4
3167/* In C++11, char16_t and char32_t are built-in types. */
3168#if defined(__cplusplus) && __cplusplus >= 201103L
3169#define _CHAR16_T_DECLARED
3170#define _CHAR32_T_DECLARED
3171#endif
3172# 101 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_types.h" 3 4
3173
3174typedef __uint32_t __dev_t; /* device number */
3175
3176typedef __uint32_t __fixpt_t; /* fixed point number */
3177
3178/*
3179 * mbstate_t is an opaque object to keep conversion state during multibyte
3180 * stream conversions.
3181 */
3182typedef union {
3183 char __mbstate8[128];
3184 __int64_t _mbstateL; /* for alignment */
3185} __mbstate_t;
3186
3187#endif /* !_SYS__TYPES_H_ */
3188# 116 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_types.h" 3 4
3189# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 2 3 4
3190#endif
3191# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3192
3193#ifdef __cplusplus
3194extern "C" {
3195#endif
3196# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3197
3198/*
3199 * Definitions for byte order, according to byte significance from low
3200 * address to high.
3201 */
3202#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
3203#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
3204#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
3205
3206#ifdef __MIPSEB__
3207#define _BYTE_ORDER _BIG_ENDIAN
3208#else
3209# 56 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3210#define _BYTE_ORDER _LITTLE_ENDIAN
3211#endif /* __MIBSEB__ */
3212# 58 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3213
3214/*
3215 * Deprecated variants that don't have enough underscores to be useful in more
3216 * strict namespaces.
3217 */
3218#if __BSD_VISIBLE
3219#define LITTLE_ENDIAN _LITTLE_ENDIAN
3220#define BIG_ENDIAN _BIG_ENDIAN
3221#define PDP_ENDIAN _PDP_ENDIAN
3222#define BYTE_ORDER _BYTE_ORDER
3223#endif
3224# 69 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3225
3226#ifndef __ASSEMBLER__
3227#if defined(__GNUCLIKE_BUILTIN_CONSTANT_P) && defined(__OPTIMIZE__)
3228#define __is_constant(x) __builtin_constant_p(x)
3229#else
3230# 74 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3231#define __is_constant(x) 0
3232#endif
3233# 76 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3234
3235#define __bswap16_const(x) (((x) >> 8) | (((x) << 8) & 0xff00))
3236#define __bswap32_const(x) (((x) >> 24) | (((x) >> 8) & 0xff00) | \
3237 (((x) << 8) & 0xff0000) | (((x) << 24) & 0xff000000))
3238#define __bswap64_const(x) (((x) >> 56) | (((x) >> 40) & 0xff00) | \
3239 (((x) >> 24) & 0xff0000) | (((x) >> 8) & 0xff000000) | \
3240 (((x) << 8) & ((__uint64_t)0xff << 32)) | \
3241 (((x) << 24) & ((__uint64_t)0xff << 40)) | \
3242 (((x) << 40) & ((__uint64_t)0xff << 48)) | (((x) << 56)))
3243
3244static __inline __uint16_t
3245__bswap16_var(__uint16_t _x)
3246{
3247
3248 return ((_x >> 8) | ((_x << 8) & 0xff00));
3249}
3250
3251static __inline __uint32_t
3252__bswap32_var(__uint32_t _x)
3253{
3254
3255 return ((_x >> 24) | ((_x >> 8) & 0xff00) | ((_x << 8) & 0xff0000) |
3256 ((_x << 24) & 0xff000000));
3257}
3258
3259static __inline __uint64_t
3260__bswap64_var(__uint64_t _x)
3261{
3262
3263 return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) |
3264 ((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) |
3265 ((_x << 24) & ((__uint64_t)0xff << 40)) |
3266 ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56)));
3267}
3268
3269#define __bswap16(x) ((__uint16_t)(__is_constant((x)) ? \
3270 __bswap16_const((__uint16_t)(x)) : __bswap16_var((__uint16_t)(x))))
3271#define __bswap32(x) ((__uint32_t)(__is_constant((x)) ? \
3272 __bswap32_const((__uint32_t)(x)) : __bswap32_var((__uint32_t)(x))))
3273#define __bswap64(x) ((__uint64_t)(__is_constant((x)) ? \
3274 __bswap64_const((__uint64_t)(x)) : __bswap64_var((__uint64_t)(x))))
3275
3276#ifdef __MIPSEB__
3277#define __htonl(x) ((__uint32_t)(x))
3278#define __htons(x) ((__uint16_t)(x))
3279#define __ntohl(x) ((__uint32_t)(x))
3280#define __ntohs(x) ((__uint16_t)(x))
3281/*
3282 * Define the order of 32-bit words in 64-bit words.
3283 */
3284/*
3285 * XXXMIPS: Additional parentheses to make gcc more happy.
3286 */
3287#define _QUAD_HIGHWORD 0
3288#define _QUAD_LOWWORD 1
3289#else
3290# 132 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3291#define _QUAD_HIGHWORD 1
3292#define _QUAD_LOWWORD 0
3293#define __ntohl(x) (__bswap32((x)))
3294#define __ntohs(x) (__bswap16((x)))
3295#define __htonl(x) (__bswap32((x)))
3296#define __htons(x) (__bswap16((x)))
3297#endif /* _MIPSEB */
3298# 139 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3299
3300#endif /* _ASSEMBLER_ */
3301# 141 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3302
3303#ifdef __cplusplus
3304}
3305#endif
3306# 145 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3307
3308#endif /* !_MACHINE_ENDIAN_H_ */
3309# 147 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/endian.h" 3 4
3310# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 2 3 4
3311#if 0 /* expanded by -frewrite-includes */
3312#include <sys/_types.h>
3313#endif /* expanded by -frewrite-includes */
3314# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3315# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3316
3317#if 0 /* expanded by -frewrite-includes */
3318#include <sys/_pthreadtypes.h>
3319#endif /* expanded by -frewrite-includes */
3320# 47 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3321# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_pthreadtypes.h" 1 3 4
3322/*
3323 * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
3324 * Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au>
3325 * All rights reserved.
3326 *
3327 * Redistribution and use in source and binary forms, with or without
3328 * modification, are permitted provided that the following conditions
3329 * are met:
3330 * 1. Redistributions of source code must retain the above copyright
3331 * notice, this list of conditions and the following disclaimer.
3332 * 2. Redistributions in binary form must reproduce the above copyright
3333 * notice, this list of conditions and the following disclaimer in the
3334 * documentation and/or other materials provided with the distribution.
3335 * 3. All advertising materials mentioning features or use of this software
3336 * must display the following acknowledgement:
3337 * This product includes software developed by Chris Provenzano.
3338 * 4. The name of Chris Provenzano may not be used to endorse or promote
3339 * products derived from this software without specific prior written
3340 * permission.
3341 *
3342 * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
3343 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3344 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3345 * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
3346 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
3347 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3348 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3349 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3350 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3351 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3352 * SUCH DAMAGE.
3353 *
3354 * $FreeBSD$
3355 */
3356
3357#ifndef _SYS__PTHREADTYPES_H_
3358#define _SYS__PTHREADTYPES_H_
3359
3360/*
3361 * Forward structure definitions.
3362 *
3363 * These are mostly opaque to the user.
3364 */
3365struct pthread;
3366struct pthread_attr;
3367struct pthread_cond;
3368struct pthread_cond_attr;
3369struct pthread_mutex;
3370struct pthread_mutex_attr;
3371struct pthread_once;
3372struct pthread_rwlock;
3373struct pthread_rwlockattr;
3374struct pthread_barrier;
3375struct pthread_barrier_attr;
3376struct pthread_spinlock;
3377
3378/*
3379 * Primitive system data type definitions required by P1003.1c.
3380 *
3381 * Note that P1003.1c specifies that there are no defined comparison
3382 * or assignment operators for the types pthread_attr_t, pthread_cond_t,
3383 * pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t.
3384 */
3385#ifndef _PTHREAD_T_DECLARED
3386typedef struct pthread *pthread_t;
3387#define _PTHREAD_T_DECLARED
3388#endif
3389# 68 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_pthreadtypes.h" 3 4
3390typedef struct pthread_attr *pthread_attr_t;
3391typedef struct pthread_mutex *pthread_mutex_t;
3392typedef struct pthread_mutex_attr *pthread_mutexattr_t;
3393typedef struct pthread_cond *pthread_cond_t;
3394typedef struct pthread_cond_attr *pthread_condattr_t;
3395typedef int pthread_key_t;
3396typedef struct pthread_once pthread_once_t;
3397typedef struct pthread_rwlock *pthread_rwlock_t;
3398typedef struct pthread_rwlockattr *pthread_rwlockattr_t;
3399typedef struct pthread_barrier *pthread_barrier_t;
3400typedef struct pthread_barrierattr *pthread_barrierattr_t;
3401typedef struct pthread_spinlock *pthread_spinlock_t;
3402
3403/*
3404 * Additional type definitions:
3405 *
3406 * Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for
3407 * use in header symbols.
3408 */
3409typedef void *pthread_addr_t;
3410typedef void *(*pthread_startroutine_t)(void *);
3411
3412/*
3413 * Once definitions.
3414 */
3415struct pthread_once {
3416 int state;
3417 pthread_mutex_t mutex;
3418};
3419
3420#endif /* ! _SYS__PTHREADTYPES_H_ */
3421# 99 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_pthreadtypes.h" 3 4
3422# 48 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 2 3 4
3423
3424#if __BSD_VISIBLE
3425typedef unsigned char u_char;
3426typedef unsigned short u_short;
3427typedef unsigned int u_int;
3428typedef unsigned long u_long;
3429#ifndef _KERNEL
3430typedef unsigned short ushort; /* Sys V compatibility */
3431typedef unsigned int uint; /* Sys V compatibility */
3432#endif
3433# 58 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3434#endif
3435# 59 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3436
3437/*
3438 * XXX POSIX sized integrals that should appear only in <sys/stdint.h>.
3439 */
3440#if 0 /* expanded by -frewrite-includes */
3441#include <sys/_stdint.h>
3442#endif /* expanded by -frewrite-includes */
3443# 63 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3444# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 1 3 4
3445/*-
3446 * Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org>
3447 * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
3448 * All rights reserved.
3449 *
3450 * Redistribution and use in source and binary forms, with or without
3451 * modification, are permitted provided that the following conditions
3452 * are met:
3453 * 1. Redistributions of source code must retain the above copyright
3454 * notice, this list of conditions and the following disclaimer.
3455 * 2. Redistributions in binary form must reproduce the above copyright
3456 * notice, this list of conditions and the following disclaimer in the
3457 * documentation and/or other materials provided with the distribution.
3458 *
3459 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3460 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3461 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3462 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3463 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3464 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3465 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3466 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3467 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3468 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3469 * SUCH DAMAGE.
3470 *
3471 * $FreeBSD$
3472 */
3473
3474#ifndef _SYS__STDINT_H_
3475#define _SYS__STDINT_H_
3476
3477#ifndef _INT8_T_DECLARED
3478typedef __int8_t int8_t;
3479#define _INT8_T_DECLARED
3480#endif
3481# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3482
3483#ifndef _INT16_T_DECLARED
3484typedef __int16_t int16_t;
3485#define _INT16_T_DECLARED
3486#endif
3487# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3488
3489#ifndef _INT32_T_DECLARED
3490typedef __int32_t int32_t;
3491#define _INT32_T_DECLARED
3492#endif
3493# 47 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3494
3495#ifndef _INT64_T_DECLARED
3496typedef __int64_t int64_t;
3497#define _INT64_T_DECLARED
3498#endif
3499# 52 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3500
3501#ifndef _UINT8_T_DECLARED
3502typedef __uint8_t uint8_t;
3503#define _UINT8_T_DECLARED
3504#endif
3505# 57 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3506
3507#ifndef _UINT16_T_DECLARED
3508typedef __uint16_t uint16_t;
3509#define _UINT16_T_DECLARED
3510#endif
3511# 62 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3512
3513#ifndef _UINT32_T_DECLARED
3514typedef __uint32_t uint32_t;
3515#define _UINT32_T_DECLARED
3516#endif
3517# 67 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3518
3519#ifndef _UINT64_T_DECLARED
3520typedef __uint64_t uint64_t;
3521#define _UINT64_T_DECLARED
3522#endif
3523# 72 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3524
3525#ifndef _INTPTR_T_DECLARED
3526typedef __intptr_t intptr_t;
3527#define _INTPTR_T_DECLARED
3528#endif
3529# 77 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3530#ifndef _UINTPTR_T_DECLARED
3531typedef __uintptr_t uintptr_t;
3532#define _UINTPTR_T_DECLARED
3533#endif
3534# 81 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3535
3536#endif /* !_SYS__STDINT_H_ */
3537# 83 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_stdint.h" 3 4
3538# 64 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 2 3 4
3539
3540typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */
3541typedef __uint16_t u_int16_t;
3542typedef __uint32_t u_int32_t;
3543typedef __uint64_t u_int64_t;
3544
3545typedef __uint64_t u_quad_t; /* quads (deprecated) */
3546typedef __int64_t quad_t;
3547typedef quad_t * qaddr_t;
3548
3549typedef char * caddr_t; /* core address */
3550typedef const char * c_caddr_t; /* core address, pointer to const */
3551
3552#ifndef _BLKSIZE_T_DECLARED
3553typedef __blksize_t blksize_t;
3554#define _BLKSIZE_T_DECLARED
3555#endif
3556# 81 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3557
3558typedef __cpuwhich_t cpuwhich_t;
3559typedef __cpulevel_t cpulevel_t;
3560typedef __cpusetid_t cpusetid_t;
3561
3562#ifndef _BLKCNT_T_DECLARED
3563typedef __blkcnt_t blkcnt_t;
3564#define _BLKCNT_T_DECLARED
3565#endif
3566# 90 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3567
3568#ifndef _CLOCK_T_DECLARED
3569typedef __clock_t clock_t;
3570#define _CLOCK_T_DECLARED
3571#endif
3572# 95 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3573
3574#ifndef _CLOCKID_T_DECLARED
3575typedef __clockid_t clockid_t;
3576#define _CLOCKID_T_DECLARED
3577#endif
3578# 100 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3579
3580typedef __critical_t critical_t; /* Critical section value */
3581typedef __int64_t daddr_t; /* disk address */
3582
3583#ifndef _DEV_T_DECLARED
3584typedef __dev_t dev_t; /* device number or struct cdev */
3585#define _DEV_T_DECLARED
3586#endif
3587# 108 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3588
3589#ifndef _FFLAGS_T_DECLARED
3590typedef __fflags_t fflags_t; /* file flags */
3591#define _FFLAGS_T_DECLARED
3592#endif
3593# 113 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3594
3595typedef __fixpt_t fixpt_t; /* fixed point number */
3596
3597#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */
3598typedef __fsblkcnt_t fsblkcnt_t;
3599typedef __fsfilcnt_t fsfilcnt_t;
3600#define _FSBLKCNT_T_DECLARED
3601#endif
3602# 121 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3603
3604#ifndef _GID_T_DECLARED
3605typedef __gid_t gid_t; /* group id */
3606#define _GID_T_DECLARED
3607#endif
3608# 126 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3609
3610#ifndef _IN_ADDR_T_DECLARED
3611typedef __uint32_t in_addr_t; /* base type for internet address */
3612#define _IN_ADDR_T_DECLARED
3613#endif
3614# 131 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3615
3616#ifndef _IN_PORT_T_DECLARED
3617typedef __uint16_t in_port_t;
3618#define _IN_PORT_T_DECLARED
3619#endif
3620# 136 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3621
3622#ifndef _ID_T_DECLARED
3623typedef __id_t id_t; /* can hold a uid_t or pid_t */
3624#define _ID_T_DECLARED
3625#endif
3626# 141 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3627
3628#ifndef _INO_T_DECLARED
3629typedef __ino_t ino_t; /* inode number */
3630#define _INO_T_DECLARED
3631#endif
3632# 146 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3633
3634#ifndef _KEY_T_DECLARED
3635typedef __key_t key_t; /* IPC key (for Sys V IPC) */
3636#define _KEY_T_DECLARED
3637#endif
3638# 151 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3639
3640#ifndef _LWPID_T_DECLARED
3641typedef __lwpid_t lwpid_t; /* Thread ID (a.k.a. LWP) */
3642#define _LWPID_T_DECLARED
3643#endif
3644# 156 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3645
3646#ifndef _MODE_T_DECLARED
3647typedef __mode_t mode_t; /* permissions */
3648#define _MODE_T_DECLARED
3649#endif
3650# 161 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3651
3652#ifndef _ACCMODE_T_DECLARED
3653typedef __accmode_t accmode_t; /* access permissions */
3654#define _ACCMODE_T_DECLARED
3655#endif
3656# 166 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3657
3658#ifndef _NLINK_T_DECLARED
3659typedef __nlink_t nlink_t; /* link count */
3660#define _NLINK_T_DECLARED
3661#endif
3662# 171 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3663
3664#ifndef _OFF_T_DECLARED
3665typedef __off_t off_t; /* file offset */
3666#define _OFF_T_DECLARED
3667#endif
3668# 176 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3669
3670#ifndef _PID_T_DECLARED
3671typedef __pid_t pid_t; /* process id */
3672#define _PID_T_DECLARED
3673#endif
3674# 181 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3675
3676typedef __register_t register_t;
3677
3678#ifndef _RLIM_T_DECLARED
3679typedef __rlim_t rlim_t; /* resource limit */
3680#define _RLIM_T_DECLARED
3681#endif
3682# 188 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3683
3684typedef __int64_t sbintime_t;
3685
3686typedef __segsz_t segsz_t; /* segment size (in pages) */
3687
3688#ifndef _SIZE_T_DECLARED
3689typedef __size_t size_t;
3690#define _SIZE_T_DECLARED
3691#endif
3692# 197 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3693
3694#ifndef _SSIZE_T_DECLARED
3695typedef __ssize_t ssize_t;
3696#define _SSIZE_T_DECLARED
3697#endif
3698# 202 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3699
3700#ifndef _SUSECONDS_T_DECLARED
3701typedef __suseconds_t suseconds_t; /* microseconds (signed) */
3702#define _SUSECONDS_T_DECLARED
3703#endif
3704# 207 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3705
3706#ifndef _TIME_T_DECLARED
3707typedef __time_t time_t;
3708#define _TIME_T_DECLARED
3709#endif
3710# 212 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3711
3712#ifndef _TIMER_T_DECLARED
3713typedef __timer_t timer_t;
3714#define _TIMER_T_DECLARED
3715#endif
3716# 217 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3717
3718#ifndef _MQD_T_DECLARED
3719typedef __mqd_t mqd_t;
3720#define _MQD_T_DECLARED
3721#endif
3722# 222 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3723
3724typedef __u_register_t u_register_t;
3725
3726#ifndef _UID_T_DECLARED
3727typedef __uid_t uid_t; /* user id */
3728#define _UID_T_DECLARED
3729#endif
3730# 229 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3731
3732#ifndef _USECONDS_T_DECLARED
3733typedef __useconds_t useconds_t; /* microseconds (unsigned) */
3734#define _USECONDS_T_DECLARED
3735#endif
3736# 234 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3737
3738#ifndef _CAP_IOCTL_T_DECLARED
3739#define _CAP_IOCTL_T_DECLARED
3740typedef unsigned long cap_ioctl_t;
3741#endif
3742# 239 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3743
3744#ifndef _CAP_RIGHTS_T_DECLARED
3745#define _CAP_RIGHTS_T_DECLARED
3746struct cap_rights;
3747
3748typedef struct cap_rights cap_rights_t;
3749#endif
3750# 246 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3751
3752typedef __vm_offset_t vm_offset_t;
3753typedef __vm_ooffset_t vm_ooffset_t;
3754typedef __vm_paddr_t vm_paddr_t;
3755typedef __vm_pindex_t vm_pindex_t;
3756typedef __vm_size_t vm_size_t;
3757
3758#ifdef _KERNEL
3759typedef int boolean_t;
3760typedef struct device *device_t;
3761typedef __intfptr_t intfptr_t;
3762
3763/*
3764 * XXX this is fixed width for historical reasons. It should have had type
3765 * __int_fast32_t. Fixed-width types should not be used unless binary
3766 * compatibility is essential. Least-width types should be used even less
3767 * since they provide smaller benefits.
3768 *
3769 * XXX should be MD.
3770 *
3771 * XXX this is bogus in -current, but still used for spl*().
3772 */
3773typedef __uint32_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */
3774
3775typedef __uintfptr_t uintfptr_t;
3776typedef __uint64_t uoff_t;
3777typedef char vm_memattr_t; /* memory attribute codes */
3778typedef struct vm_page *vm_page_t;
3779
3780#if !defined(__bool_true_false_are_defined) && !defined(__cplusplus)
3781#define __bool_true_false_are_defined 1
3782#define false 0
3783#define true 1
3784#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER)
3785typedef int _Bool;
3786#endif
3787# 282 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3788typedef _Bool bool;
3789#endif /* !__bool_true_false_are_defined && !__cplusplus */
3790# 284 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3791
3792#define offsetof(type, field) __offsetof(type, field)
3793
3794#endif /* !_KERNEL */
3795# 288 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3796
3797/*
3798 * The following are all things that really shouldn't exist in this header,
3799 * since its purpose is to provide typedefs, not miscellaneous doodads.
3800 */
3801#if __BSD_VISIBLE
3802
3803#if 0 /* expanded by -frewrite-includes */
3804#include <sys/select.h>
3805#endif /* expanded by -frewrite-includes */
3806# 295 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
3807# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 1 3 4
3808/*-
3809 * Copyright (c) 1992, 1993
3810 * The Regents of the University of California. All rights reserved.
3811 *
3812 * Redistribution and use in source and binary forms, with or without
3813 * modification, are permitted provided that the following conditions
3814 * are met:
3815 * 1. Redistributions of source code must retain the above copyright
3816 * notice, this list of conditions and the following disclaimer.
3817 * 2. Redistributions in binary form must reproduce the above copyright
3818 * notice, this list of conditions and the following disclaimer in the
3819 * documentation and/or other materials provided with the distribution.
3820 * 4. Neither the name of the University nor the names of its contributors
3821 * may be used to endorse or promote products derived from this software
3822 * without specific prior written permission.
3823 *
3824 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
3825 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3826 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3827 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
3828 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3829 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3830 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3831 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3832 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3833 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3834 * SUCH DAMAGE.
3835 *
3836 * $FreeBSD$
3837 */
3838
3839#ifndef _SYS_SELECT_H_
3840#define _SYS_SELECT_H_
3841
3842#if 0 /* expanded by -frewrite-includes */
3843#include <sys/cdefs.h>
3844#endif /* expanded by -frewrite-includes */
3845# 35 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
3846# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
3847#if 0 /* expanded by -frewrite-includes */
3848#include <sys/_types.h>
3849#endif /* expanded by -frewrite-includes */
3850# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
3851# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
3852
3853#if 0 /* expanded by -frewrite-includes */
3854#include <sys/_sigset.h>
3855#endif /* expanded by -frewrite-includes */
3856# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
3857# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_sigset.h" 1 3 4
3858/*-
3859 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3860 * The Regents of the University of California. All rights reserved.
3861 * (c) UNIX System Laboratories, Inc.
3862 * All or some portions of this file are derived from material licensed
3863 * to the University of California by American Telephone and Telegraph
3864 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
3865 * the permission of UNIX System Laboratories, Inc.
3866 *
3867 * Redistribution and use in source and binary forms, with or without
3868 * modification, are permitted provided that the following conditions
3869 * are met:
3870 * 1. Redistributions of source code must retain the above copyright
3871 * notice, this list of conditions and the following disclaimer.
3872 * 2. Redistributions in binary form must reproduce the above copyright
3873 * notice, this list of conditions and the following disclaimer in the
3874 * documentation and/or other materials provided with the distribution.
3875 * 4. Neither the name of the University nor the names of its contributors
3876 * may be used to endorse or promote products derived from this software
3877 * without specific prior written permission.
3878 *
3879 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
3880 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3881 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3882 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
3883 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3884 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3885 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3886 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3887 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3888 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3889 * SUCH DAMAGE.
3890 *
3891 * @(#)signal.h 8.4 (Berkeley) 5/4/95
3892 * $FreeBSD$
3893 */
3894
3895#ifndef _SYS__SIGSET_H_
3896#define _SYS__SIGSET_H_
3897
3898/*
3899 * sigset_t macros.
3900 */
3901#define _SIG_WORDS 4
3902#define _SIG_MAXSIG 128
3903#define _SIG_IDX(sig) ((sig) - 1)
3904#define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5)
3905#define _SIG_BIT(sig) (1 << (_SIG_IDX(sig) & 31))
3906#define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0)
3907
3908typedef struct __sigset {
3909 __uint32_t __bits[_SIG_WORDS];
3910} __sigset_t;
3911
3912#if defined(_KERNEL) && defined(COMPAT_43)
3913typedef unsigned int osigset_t;
3914#endif
3915# 58 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_sigset.h" 3 4
3916
3917#endif /* !_SYS__SIGSET_H_ */
3918# 60 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_sigset.h" 3 4
3919# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 2 3 4
3920#if 0 /* expanded by -frewrite-includes */
3921#include <sys/_timeval.h>
3922#endif /* expanded by -frewrite-includes */
3923# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
3924# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timeval.h" 1 3 4
3925/*-
3926 * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
3927 * All rights reserved.
3928 *
3929 * Redistribution and use in source and binary forms, with or without
3930 * modification, are permitted provided that the following conditions
3931 * are met:
3932 * 1. Redistributions of source code must retain the above copyright
3933 * notice, this list of conditions and the following disclaimer.
3934 * 2. Redistributions in binary form must reproduce the above copyright
3935 * notice, this list of conditions and the following disclaimer in the
3936 * documentation and/or other materials provided with the distribution.
3937 *
3938 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3939 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3940 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3941 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3942 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3943 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3944 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3945 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3946 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3947 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3948 * SUCH DAMAGE.
3949 *
3950 * $FreeBSD$
3951 */
3952
3953#ifndef _SYS__TIMEVAL_H_
3954#define _SYS__TIMEVAL_H_
3955
3956#if 0 /* expanded by -frewrite-includes */
3957#include <sys/_types.h>
3958#endif /* expanded by -frewrite-includes */
3959# 32 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timeval.h" 3 4
3960# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timeval.h" 3 4
3961
3962#ifndef _SUSECONDS_T_DECLARED
3963typedef __suseconds_t suseconds_t;
3964#define _SUSECONDS_T_DECLARED
3965#endif
3966# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timeval.h" 3 4
3967
3968#ifndef _TIME_T_DECLARED
3969typedef __time_t time_t;
3970#define _TIME_T_DECLARED
3971#endif
3972# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timeval.h" 3 4
3973
3974/*
3975 * Structure returned by gettimeofday(2) system call, and used in other calls.
3976 */
3977struct timeval {
3978 time_t tv_sec; /* seconds */
3979 suseconds_t tv_usec; /* and microseconds */
3980};
3981
3982#endif /* !_SYS__TIMEVAL_H_ */
3983# 53 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timeval.h" 3 4
3984# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 2 3 4
3985#if 0 /* expanded by -frewrite-includes */
3986#include <sys/timespec.h>
3987#endif /* expanded by -frewrite-includes */
3988# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
3989# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/timespec.h" 1 3 4
3990/*-
3991 * Copyright (c) 1982, 1986, 1993
3992 * The Regents of the University of California. All rights reserved.
3993 *
3994 * Redistribution and use in source and binary forms, with or without
3995 * modification, are permitted provided that the following conditions
3996 * are met:
3997 * 1. Redistributions of source code must retain the above copyright
3998 * notice, this list of conditions and the following disclaimer.
3999 * 2. Redistributions in binary form must reproduce the above copyright
4000 * notice, this list of conditions and the following disclaimer in the
4001 * documentation and/or other materials provided with the distribution.
4002 * 4. Neither the name of the University nor the names of its contributors
4003 * may be used to endorse or promote products derived from this software
4004 * without specific prior written permission.
4005 *
4006 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4007 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4008 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4009 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
4010 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4011 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4012 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4013 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4014 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4015 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4016 * SUCH DAMAGE.
4017 *
4018 * @(#)time.h 8.5 (Berkeley) 5/4/95
4019 * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
4020 * $FreeBSD$
4021 */
4022
4023#ifndef _SYS_TIMESPEC_H_
4024#define _SYS_TIMESPEC_H_
4025
4026#if 0 /* expanded by -frewrite-includes */
4027#include <sys/cdefs.h>
4028#endif /* expanded by -frewrite-includes */
4029# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/timespec.h" 3 4
4030# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/timespec.h" 3 4
4031#if 0 /* expanded by -frewrite-includes */
4032#include <sys/_timespec.h>
4033#endif /* expanded by -frewrite-includes */
4034# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/timespec.h" 3 4
4035# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timespec.h" 1 3 4
4036/*-
4037 * Copyright (c) 1982, 1986, 1993
4038 * The Regents of the University of California. All rights reserved.
4039 *
4040 * Redistribution and use in source and binary forms, with or without
4041 * modification, are permitted provided that the following conditions
4042 * are met:
4043 * 1. Redistributions of source code must retain the above copyright
4044 * notice, this list of conditions and the following disclaimer.
4045 * 2. Redistributions in binary form must reproduce the above copyright
4046 * notice, this list of conditions and the following disclaimer in the
4047 * documentation and/or other materials provided with the distribution.
4048 * 4. Neither the name of the University nor the names of its contributors
4049 * may be used to endorse or promote products derived from this software
4050 * without specific prior written permission.
4051 *
4052 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4053 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4054 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4055 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
4056 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4057 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4058 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4059 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4060 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4061 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4062 * SUCH DAMAGE.
4063 *
4064 * @(#)time.h 8.5 (Berkeley) 5/4/95
4065 * from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
4066 * $FreeBSD$
4067 */
4068
4069#ifndef _SYS__TIMESPEC_H_
4070#define _SYS__TIMESPEC_H_
4071
4072#if 0 /* expanded by -frewrite-includes */
4073#include <sys/_types.h>
4074#endif /* expanded by -frewrite-includes */
4075# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timespec.h" 3 4
4076# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timespec.h" 3 4
4077
4078#ifndef _TIME_T_DECLARED
4079typedef __time_t time_t;
4080#define _TIME_T_DECLARED
4081#endif
4082# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timespec.h" 3 4
4083
4084struct timespec {
4085 time_t tv_sec; /* seconds */
4086 long tv_nsec; /* and nanoseconds */
4087};
4088
4089#endif /* !_SYS__TIMESPEC_H_ */
4090# 50 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_timespec.h" 3 4
4091# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/timespec.h" 2 3 4
4092
4093#if __BSD_VISIBLE
4094#define TIMEVAL_TO_TIMESPEC(tv, ts) \
4095 do { \
4096 (ts)->tv_sec = (tv)->tv_sec; \
4097 (ts)->tv_nsec = (tv)->tv_usec * 1000; \
4098 } while (0)
4099#define TIMESPEC_TO_TIMEVAL(tv, ts) \
4100 do { \
4101 (tv)->tv_sec = (ts)->tv_sec; \
4102 (tv)->tv_usec = (ts)->tv_nsec / 1000; \
4103 } while (0)
4104
4105#endif /* __BSD_VISIBLE */
4106# 53 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/timespec.h" 3 4
4107
4108/*
4109 * Structure defined by POSIX.1b to be like a itimerval, but with
4110 * timespecs. Used in the timer_*() system calls.
4111 */
4112struct itimerspec {
4113 struct timespec it_interval;
4114 struct timespec it_value;
4115};
4116
4117#endif /* _SYS_TIMESPEC_H_ */
4118# 64 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/timespec.h" 3 4
4119# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 2 3 4
4120
4121typedef unsigned long __fd_mask;
4122#if __BSD_VISIBLE
4123typedef __fd_mask fd_mask;
4124#endif
4125# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4126
4127#ifndef _SIGSET_T_DECLARED
4128#define _SIGSET_T_DECLARED
4129typedef __sigset_t sigset_t;
4130#endif
4131# 51 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4132
4133/*
4134 * Select uses bit masks of file descriptors in longs. These macros
4135 * manipulate such bit fields (the filesystem macros use chars).
4136 * FD_SETSIZE may be defined by the user, but the default here should
4137 * be enough for most uses.
4138 */
4139#ifndef FD_SETSIZE
4140#define FD_SETSIZE 1024
4141#endif
4142# 61 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4143
4144#define _NFDBITS (sizeof(__fd_mask) * 8) /* bits per mask */
4145#if __BSD_VISIBLE
4146#define NFDBITS _NFDBITS
4147#endif
4148# 66 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4149
4150#ifndef _howmany
4151#define _howmany(x, y) (((x) + ((y) - 1)) / (y))
4152#endif
4153# 70 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4154
4155typedef struct fd_set {
4156 __fd_mask __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)];
4157} fd_set;
4158#if __BSD_VISIBLE
4159#define fds_bits __fds_bits
4160#endif
4161# 77 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4162
4163#define __fdset_mask(n) ((__fd_mask)1 << ((n) % _NFDBITS))
4164#define FD_CLR(n, p) ((p)->__fds_bits[(n)/_NFDBITS] &= ~__fdset_mask(n))
4165#if __BSD_VISIBLE
4166#define FD_COPY(f, t) (void)(*(t) = *(f))
4167#endif
4168# 83 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4169#define FD_ISSET(n, p) (((p)->__fds_bits[(n)/_NFDBITS] & __fdset_mask(n)) != 0)
4170#define FD_SET(n, p) ((p)->__fds_bits[(n)/_NFDBITS] |= __fdset_mask(n))
4171#define FD_ZERO(p) do { \
4172 fd_set *_p; \
4173 __size_t _n; \
4174 \
4175 _p = (p); \
4176 _n = _howmany(FD_SETSIZE, _NFDBITS); \
4177 while (_n > 0) \
4178 _p->__fds_bits[--_n] = 0; \
4179} while (0)
4180
4181#ifndef _KERNEL
4182
4183__BEGIN_DECLS
4184int pselect(int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict,
4185 const struct timespec *__restrict, const sigset_t *__restrict);
4186#ifndef _SELECT_DECLARED
4187#define _SELECT_DECLARED
4188/* XXX missing restrict type-qualifier */
4189int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
4190#endif
4191# 105 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4192__END_DECLS
4193#endif /* !_KERNEL */
4194# 107 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4195
4196#endif /* _SYS_SELECT_H_ */
4197# 109 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/select.h" 3 4
4198# 296 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 2 3 4
4199
4200#ifdef __POPCNT__
4201#define __bitcount64(x) __builtin_popcountll((__uint64_t)(x))
4202#define __bitcount32(x) __builtin_popcount((__uint32_t)(x))
4203#define __bitcount16(x) __builtin_popcount((__uint16_t)(x))
4204#define __bitcountl(x) __builtin_popcountl((unsigned long)(x))
4205#define __bitcount(x) __builtin_popcount((unsigned int)(x))
4206#else
4207# 304 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4208/*
4209 * Population count algorithm using SWAR approach
4210 * - "SIMD Within A Register".
4211 */
4212static __inline __uint16_t
4213__bitcount16(__uint16_t _x)
4214{
4215
4216 _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1);
4217 _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2);
4218 _x = (_x + (_x >> 4)) & 0x0f0f;
4219 _x = (_x + (_x >> 8)) & 0x00ff;
4220 return (_x);
4221}
4222
4223static __inline __uint32_t
4224__bitcount32(__uint32_t _x)
4225{
4226
4227 _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1);
4228 _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2);
4229 _x = (_x + (_x >> 4)) & 0x0f0f0f0f;
4230 _x = (_x + (_x >> 8));
4231 _x = (_x + (_x >> 16)) & 0x000000ff;
4232 return (_x);
4233}
4234
4235#ifdef __LP64__
4236static __inline __uint64_t
4237__bitcount64(__uint64_t _x)
4238{
4239
4240 _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1);
4241 _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2);
4242 _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f;
4243 _x = (_x + (_x >> 8));
4244 _x = (_x + (_x >> 16));
4245 _x = (_x + (_x >> 32)) & 0x000000ff;
4246 return (_x);
4247}
4248
4249#define __bitcountl(x) __bitcount64((unsigned long)(x))
4250#else
4251# 347 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4252static __inline __uint64_t
4253__bitcount64(__uint64_t _x)
4254{
4255
4256 return (__bitcount32(_x >> 32) + __bitcount32(_x));
4257}
4258
4259#define __bitcountl(x) __bitcount32((unsigned long)(x))
4260#endif
4261# 356 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4262#define __bitcount(x) __bitcount32((unsigned int)(x))
4263#endif
4264# 358 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4265
4266/*
4267 * minor() gives a cookie instead of an index since we don't want to
4268 * change the meanings of bits 0-15 or waste time and space shifting
4269 * bits 16-31 for devices that don't use them.
4270 */
4271#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
4272#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */
4273#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */
4274
4275/*
4276 * These declarations belong elsewhere, but are repeated here and in
4277 * <stdio.h> to give broken programs a better chance of working with
4278 * 64-bit off_t's.
4279 */
4280#ifndef _KERNEL
4281__BEGIN_DECLS
4282#ifndef _FTRUNCATE_DECLARED
4283#define _FTRUNCATE_DECLARED
4284int ftruncate(int, off_t);
4285#endif
4286# 379 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4287#ifndef _LSEEK_DECLARED
4288#define _LSEEK_DECLARED
4289off_t lseek(int, off_t, int);
4290#endif
4291# 383 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4292#ifndef _MMAP_DECLARED
4293#define _MMAP_DECLARED
4294void * mmap(void *, size_t, int, int, int, off_t);
4295#endif
4296# 387 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4297#ifndef _TRUNCATE_DECLARED
4298#define _TRUNCATE_DECLARED
4299int truncate(const char *, off_t);
4300#endif
4301# 391 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4302__END_DECLS
4303#endif /* !_KERNEL */
4304# 393 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4305
4306#endif /* __BSD_VISIBLE */
4307# 395 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4308
4309#endif /* !_SYS_TYPES_H_ */
4310# 397 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/types.h" 3 4
4311# 1611 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h" 2
4312#if 0 /* expanded by -frewrite-includes */
4313# include <sys/param.h>
4314#endif /* expanded by -frewrite-includes */
4315# 1611 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
4316# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 1 3 4
4317/*-
4318 * Copyright (c) 1982, 1986, 1989, 1993
4319 * The Regents of the University of California. All rights reserved.
4320 * (c) UNIX System Laboratories, Inc.
4321 * All or some portions of this file are derived from material licensed
4322 * to the University of California by American Telephone and Telegraph
4323 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
4324 * the permission of UNIX System Laboratories, Inc.
4325 *
4326 * Redistribution and use in source and binary forms, with or without
4327 * modification, are permitted provided that the following conditions
4328 * are met:
4329 * 1. Redistributions of source code must retain the above copyright
4330 * notice, this list of conditions and the following disclaimer.
4331 * 2. Redistributions in binary form must reproduce the above copyright
4332 * notice, this list of conditions and the following disclaimer in the
4333 * documentation and/or other materials provided with the distribution.
4334 * 4. Neither the name of the University nor the names of its contributors
4335 * may be used to endorse or promote products derived from this software
4336 * without specific prior written permission.
4337 *
4338 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4339 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4340 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4341 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
4342 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4343 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4344 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4345 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4346 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4347 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4348 * SUCH DAMAGE.
4349 *
4350 * @(#)param.h 8.3 (Berkeley) 4/4/95
4351 * $FreeBSD$
4352 */
4353
4354#ifndef _SYS_PARAM_H_
4355#define _SYS_PARAM_H_
4356
4357#if 0 /* expanded by -frewrite-includes */
4358#include <sys/_null.h>
4359#endif /* expanded by -frewrite-includes */
4360# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4361# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_null.h" 1 3 4
4362/*-
4363 * Copyright (c) 2003 Marcel Moolenaar
4364 * All rights reserved.
4365 *
4366 * Redistribution and use in source and binary forms, with or without
4367 * modification, are permitted provided that the following conditions
4368 * are met:
4369 *
4370 * 1. Redistributions of source code must retain the above copyright
4371 * notice, this list of conditions and the following disclaimer.
4372 * 2. Redistributions in binary form must reproduce the above copyright
4373 * notice, this list of conditions and the following disclaimer in the
4374 * documentation and/or other materials provided with the distribution.
4375 *
4376 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
4377 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
4378 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
4379 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
4380 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4381 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4382 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4383 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4384 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4385 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4386 *
4387 * $FreeBSD$
4388 */
4389
4390#ifndef NULL
4391
4392#if !defined(__cplusplus)
4393#define NULL ((void *)0)
4394#else
4395# 34 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_null.h" 3 4
4396#if __cplusplus >= 201103L
4397#define NULL nullptr
4398#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
4399# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_null.h" 3 4
4400#define NULL __null
4401#else
4402# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_null.h" 3 4
4403#if defined(__LP64__)
4404#define NULL (0L)
4405#else
4406# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_null.h" 3 4
4407#define NULL 0
4408#endif /* __LP64__ */
4409# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_null.h" 3 4
4410#endif /* __GNUG__ */
4411# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_null.h" 3 4
4412#endif /* !__cplusplus */
4413# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_null.h" 3 4
4414
4415#endif
4416# 48 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_null.h" 3 4
4417# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 2 3 4
4418
4419#define BSD 199506 /* System version (year & month). */
4420#define BSD4_3 1
4421#define BSD4_4 1
4422
4423/*
4424 * __FreeBSD_version numbers are documented in the Porter's Handbook.
4425 * If you bump the version for any reason, you should update the documentation
4426 * there.
4427 * Currently this lives here in the doc/ repository:
4428 *
4429 * head/en_US.ISO8859-1/books/porters-handbook/versions/chapter.xml
4430 *
4431 * scheme is: <major><two digit minor>Rxx
4432 * 'R' is in the range 0 to 4 if this is a release branch or
4433 * x.0-CURRENT before RELENG_*_0 is created, otherwise 'R' is
4434 * in the range 5 to 9.
4435 */
4436#undef __FreeBSD_version
4437#define __FreeBSD_version 1100077 /* Master, propagated to newvers */
4438
4439/*
4440 * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
4441 * which by definition is always true on FreeBSD. This macro is also defined
4442 * on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD.
4443 *
4444 * It is tempting to use this macro in userland code when we want to enable
4445 * kernel-specific routines, and in fact it's fine to do this in code that
4446 * is part of FreeBSD itself. However, be aware that as presence of this
4447 * macro is still not widespread (e.g. older FreeBSD versions, 3rd party
4448 * compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in
4449 * external applications without also checking for __FreeBSD__ as an
4450 * alternative.
4451 */
4452#undef __FreeBSD_kernel__
4453#define __FreeBSD_kernel__
4454
4455#ifdef _KERNEL
4456#define P_OSREL_SIGWAIT 700000
4457#define P_OSREL_SIGSEGV 700004
4458#define P_OSREL_MAP_ANON 800104
4459#define P_OSREL_MAP_FSTRICT 1100036
4460
4461#define P_OSREL_MAJOR(x) ((x) / 100000)
4462#endif
4463# 87 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4464
4465#ifndef LOCORE
4466#if 0 /* expanded by -frewrite-includes */
4467#include <sys/types.h>
4468#endif /* expanded by -frewrite-includes */
4469# 89 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4470# 90 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4471#endif
4472# 91 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4473
4474/*
4475 * Machine-independent constants (some used in following include files).
4476 * Redefined constants are from POSIX 1003.1 limits file.
4477 *
4478 * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
4479 */
4480#if 0 /* expanded by -frewrite-includes */
4481#include <sys/syslimits.h>
4482#endif /* expanded by -frewrite-includes */
4483# 98 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4484# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/syslimits.h" 1 3 4
4485/*-
4486 * Copyright (c) 1988, 1993
4487 * The Regents of the University of California. All rights reserved.
4488 *
4489 * Redistribution and use in source and binary forms, with or without
4490 * modification, are permitted provided that the following conditions
4491 * are met:
4492 * 1. Redistributions of source code must retain the above copyright
4493 * notice, this list of conditions and the following disclaimer.
4494 * 2. Redistributions in binary form must reproduce the above copyright
4495 * notice, this list of conditions and the following disclaimer in the
4496 * documentation and/or other materials provided with the distribution.
4497 * 4. Neither the name of the University nor the names of its contributors
4498 * may be used to endorse or promote products derived from this software
4499 * without specific prior written permission.
4500 *
4501 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4502 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4503 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4504 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
4505 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4506 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4507 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4508 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4509 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4510 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4511 * SUCH DAMAGE.
4512 *
4513 * @(#)syslimits.h 8.1 (Berkeley) 6/2/93
4514 * $FreeBSD$
4515 */
4516
4517#ifndef _SYS_SYSLIMITS_H_
4518#define _SYS_SYSLIMITS_H_
4519
4520#if !defined(_KERNEL) && !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_)
4521#ifndef _SYS_CDEFS_H_
4522#error this file needs sys/cdefs.h as a prerequisite
4523#endif
4524# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/syslimits.h" 3 4
4525#ifdef __CC_SUPPORTS_WARNING
4526#warning "No user-serviceable parts inside."
4527#endif
4528# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/syslimits.h" 3 4
4529#endif
4530# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/syslimits.h" 3 4
4531
4532/*
4533 * Do not add any new variables here. (See the comment at the end of
4534 * the file for why.)
4535 */
4536#define ARG_MAX 262144 /* max bytes for an exec function */
4537#ifndef CHILD_MAX
4538#define CHILD_MAX 40 /* max simultaneous processes */
4539#endif
4540# 53 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/syslimits.h" 3 4
4541#define LINK_MAX 32767 /* max file link count */
4542#define MAX_CANON 255 /* max bytes in term canon input line */
4543#define MAX_INPUT 255 /* max bytes in terminal input */
4544#define NAME_MAX 255 /* max bytes in a file name */
4545#ifndef NGROUPS_MAX
4546#define NGROUPS_MAX 1023 /* max supplemental group id's */
4547#endif
4548# 60 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/syslimits.h" 3 4
4549#ifndef OPEN_MAX
4550#define OPEN_MAX 64 /* max open files per process */
4551#endif
4552# 63 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/syslimits.h" 3 4
4553#define PATH_MAX 1024 /* max bytes in pathname */
4554#define PIPE_BUF 512 /* max bytes for atomic pipe writes */
4555#define IOV_MAX 1024 /* max elements in i/o vector */
4556
4557/*
4558 * We leave the following values undefined to force applications to either
4559 * assume conservative values or call sysconf() to get the current value.
4560 *
4561 * HOST_NAME_MAX
4562 *
4563 * (We should do this for most of the values currently defined here,
4564 * but many programs are not prepared to deal with this yet.)
4565 */
4566#endif
4567# 77 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/syslimits.h" 3 4
4568# 99 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 2 3 4
4569
4570#define MAXCOMLEN 19 /* max command name remembered */
4571#define MAXINTERP PATH_MAX /* max interpreter file name length */
4572#define MAXLOGNAME 33 /* max login name length (incl. NUL) */
4573#define MAXUPRC CHILD_MAX /* max simultaneous processes */
4574#define NCARGS ARG_MAX /* max bytes for an exec function */
4575#define NGROUPS (NGROUPS_MAX+1) /* max number groups */
4576#define NOFILE OPEN_MAX /* max open files per process */
4577#define NOGROUP 65535 /* marker for empty group set member */
4578#define MAXHOSTNAMELEN 256 /* max hostname size */
4579#define SPECNAMELEN 63 /* max length of devicename */
4580
4581/* More types and definitions used throughout the kernel. */
4582#ifdef _KERNEL
4583#if 0 /* expanded by -frewrite-includes */
4584#include <sys/cdefs.h>
4585#endif /* expanded by -frewrite-includes */
4586# 113 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4587# 114 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4588#if 0 /* expanded by -frewrite-includes */
4589#include <sys/errno.h>
4590#endif /* expanded by -frewrite-includes */
4591# 114 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4592# 115 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4593#ifndef LOCORE
4594#if 0 /* expanded by -frewrite-includes */
4595#include <sys/time.h>
4596#endif /* expanded by -frewrite-includes */
4597# 116 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4598# 117 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4599#if 0 /* expanded by -frewrite-includes */
4600#include <sys/priority.h>
4601#endif /* expanded by -frewrite-includes */
4602# 117 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4603# 118 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4604#endif
4605# 119 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4606
4607#ifndef FALSE
4608#define FALSE 0
4609#endif
4610# 123 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4611#ifndef TRUE
4612#define TRUE 1
4613#endif
4614# 126 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4615#endif
4616# 127 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4617
4618#ifndef _KERNEL
4619/* Signals. */
4620#if 0 /* expanded by -frewrite-includes */
4621#include <sys/signal.h>
4622#endif /* expanded by -frewrite-includes */
4623# 130 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
4624# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 1 3 4
4625/*-
4626 * Copyright (c) 1982, 1986, 1989, 1991, 1993
4627 * The Regents of the University of California. All rights reserved.
4628 * (c) UNIX System Laboratories, Inc.
4629 * All or some portions of this file are derived from material licensed
4630 * to the University of California by American Telephone and Telegraph
4631 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
4632 * the permission of UNIX System Laboratories, Inc.
4633 *
4634 * Redistribution and use in source and binary forms, with or without
4635 * modification, are permitted provided that the following conditions
4636 * are met:
4637 * 1. Redistributions of source code must retain the above copyright
4638 * notice, this list of conditions and the following disclaimer.
4639 * 2. Redistributions in binary form must reproduce the above copyright
4640 * notice, this list of conditions and the following disclaimer in the
4641 * documentation and/or other materials provided with the distribution.
4642 * 4. Neither the name of the University nor the names of its contributors
4643 * may be used to endorse or promote products derived from this software
4644 * without specific prior written permission.
4645 *
4646 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4647 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4648 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4649 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
4650 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4651 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4652 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4653 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4654 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4655 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4656 * SUCH DAMAGE.
4657 *
4658 * @(#)signal.h 8.4 (Berkeley) 5/4/95
4659 * $FreeBSD$
4660 */
4661
4662#ifndef _SYS_SIGNAL_H_
4663#define _SYS_SIGNAL_H_
4664
4665#if 0 /* expanded by -frewrite-includes */
4666#include <sys/cdefs.h>
4667#endif /* expanded by -frewrite-includes */
4668# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4669# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4670#if 0 /* expanded by -frewrite-includes */
4671#include <sys/_types.h>
4672#endif /* expanded by -frewrite-includes */
4673# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4674# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4675#if 0 /* expanded by -frewrite-includes */
4676#include <sys/_sigset.h>
4677#endif /* expanded by -frewrite-includes */
4678# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4679# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4680
4681#if 0 /* expanded by -frewrite-includes */
4682#include <machine/_limits.h> /* __MINSIGSTKSZ */
4683#endif /* expanded by -frewrite-includes */
4684# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4685# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_limits.h" 1 3 4
4686/*-
4687 * Copyright (c) 1988, 1993
4688 * The Regents of the University of California. All rights reserved.
4689 *
4690 * Redistribution and use in source and binary forms, with or without
4691 * modification, are permitted provided that the following conditions
4692 * are met:
4693 * 1. Redistributions of source code must retain the above copyright
4694 * notice, this list of conditions and the following disclaimer.
4695 * 2. Redistributions in binary form must reproduce the above copyright
4696 * notice, this list of conditions and the following disclaimer in the
4697 * documentation and/or other materials provided with the distribution.
4698 * 4. Neither the name of the University nor the names of its contributors
4699 * may be used to endorse or promote products derived from this software
4700 * without specific prior written permission.
4701 *
4702 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4703 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4704 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4705 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
4706 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4707 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4708 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4709 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4710 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4711 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4712 * SUCH DAMAGE.
4713 *
4714 * @(#)limits.h 8.3 (Berkeley) 1/4/94
4715 * from: src/sys/i386/include/_limits.h,v 1.27 2005/01/06 22:18:15 imp
4716 * $FreeBSD$
4717 */
4718
4719#ifndef _MACHINE__LIMITS_H_
4720#define _MACHINE__LIMITS_H_
4721
4722/*
4723 * According to ANSI (section 2.2.4.2), the values below must be usable by
4724 * #if preprocessing directives. Additionally, the expression must have the
4725 * same type as would an expression that is an object of the corresponding
4726 * type converted according to the integral promotions. The subtraction for
4727 * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
4728 * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
4729 */
4730
4731#define __CHAR_BIT 8 /* number of bits in a char */
4732
4733#define __SCHAR_MAX 0x7f /* max value for a signed char */
4734#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */
4735
4736#define __UCHAR_MAX 0xff /* max value for an unsigned char */
4737
4738#define __USHRT_MAX 0xffff /* max value for an unsigned short */
4739#define __SHRT_MAX 0x7fff /* max value for a short */
4740#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */
4741
4742#define __UINT_MAX 0xffffffff /* max value for an unsigned int */
4743#define __INT_MAX 0x7fffffff /* max value for an int */
4744#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */
4745
4746#ifdef __mips_n64
4747#define __ULONG_MAX 0xffffffffffffffff
4748#define __LONG_MAX 0x7fffffffffffffff
4749#define __LONG_MIN (-0x7fffffffffffffff - 1)
4750#define __LONG_BIT 64
4751#else
4752# 67 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_limits.h" 3 4
4753#define __ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
4754#define __LONG_MAX 0x7fffffffL /* max value for a long */
4755#define __LONG_MIN (-0x7fffffffL - 1) /* min value for a long */
4756#define __LONG_BIT 32
4757#endif
4758# 72 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_limits.h" 3 4
4759
4760 /* max value for an unsigned long long */
4761#define __ULLONG_MAX 0xffffffffffffffffULL
4762#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */
4763#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */
4764
4765#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */
4766
4767#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */
4768
4769#define __OFF_MAX __LLONG_MAX /* max value for an off_t */
4770#define __OFF_MIN __LLONG_MIN /* min value for an off_t */
4771
4772/* Quads and long longs are the same size. Ensure they stay in sync. */
4773#define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */
4774#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */
4775#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */
4776
4777#define __WORD_BIT 32
4778
4779#define __MINSIGSTKSZ (512 * 4)
4780
4781#endif /* !_MACHINE__LIMITS_H_ */
4782# 95 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_limits.h" 3 4
4783# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 2 3 4
4784#if 0 /* expanded by -frewrite-includes */
4785#include <machine/signal.h> /* sig_atomic_t; trap codes; sigcontext */
4786#endif /* expanded by -frewrite-includes */
4787# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4788# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/signal.h" 1 3 4
4789/* $OpenBSD: signal.h,v 1.2 1999/01/27 04:10:03 imp Exp $ */
4790
4791/*
4792 * Copyright (c) 1992, 1993
4793 * The Regents of the University of California. All rights reserved.
4794 *
4795 * This code is derived from software contributed to Berkeley by
4796 * Ralph Campbell.
4797 *
4798 * Redistribution and use in source and binary forms, with or without
4799 * modification, are permitted provided that the following conditions
4800 * are met:
4801 * 1. Redistributions of source code must retain the above copyright
4802 * notice, this list of conditions and the following disclaimer.
4803 * 2. Redistributions in binary form must reproduce the above copyright
4804 * notice, this list of conditions and the following disclaimer in the
4805 * documentation and/or other materials provided with the distribution.
4806 * 4. Neither the name of the University nor the names of its contributors
4807 * may be used to endorse or promote products derived from this software
4808 * without specific prior written permission.
4809 *
4810 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
4811 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4812 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4813 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
4814 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4815 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4816 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4817 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4818 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
4819 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
4820 * SUCH DAMAGE.
4821 *
4822 * @(#)signal.h 8.1 (Berkeley) 6/10/93
4823 * JNPR: signal.h,v 1.4 2007/01/08 04:58:37 katta
4824 * $FreeBSD$
4825 */
4826
4827#ifndef _MACHINE_SIGNAL_H_
4828#define _MACHINE_SIGNAL_H_
4829
4830#if 0 /* expanded by -frewrite-includes */
4831#include <sys/cdefs.h>
4832#endif /* expanded by -frewrite-includes */
4833# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/signal.h" 3 4
4834# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/signal.h" 3 4
4835#if 0 /* expanded by -frewrite-includes */
4836#include <sys/_sigset.h>
4837#endif /* expanded by -frewrite-includes */
4838# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/signal.h" 3 4
4839# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/signal.h" 3 4
4840
4841/*
4842 * Machine-dependent signal definitions
4843 */
4844
4845typedef int sig_atomic_t;
4846
4847#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
4848/*
4849 * Information pushed on stack when a signal is delivered.
4850 * This is used by the kernel to restore state following
4851 * execution of the signal handler. It is also made available
4852 * to the handler to allow it to restore state properly if
4853 * a non-standard exit is performed.
4854 */
4855
4856struct sigcontext {
4857 /*
4858 * The fields following 'sc_mask' must match the definition
4859 * of struct __mcontext. That way we can support
4860 * struct sigcontext and ucontext_t at the same
4861 * time.
4862 */
4863 __sigset_t sc_mask; /* signal mask to restore */
4864 int sc_onstack; /* sigstack state to restore */
4865 __register_t sc_pc; /* pc at time of signal */
4866 __register_t sc_regs[32]; /* processor regs 0 to 31 */
4867 __register_t mullo, mulhi; /* mullo and mulhi registers... */
4868 int sc_fpused; /* fp has been used */
4869 f_register_t sc_fpregs[33]; /* fp regs 0 to 31 and csr */
4870 __register_t sc_fpc_eir; /* fp exception instruction reg */
4871
4872 /*
4873 * Optional externally referenced storage for coprocessors. Modeled
4874 * on the approach taken for extended FPU state on x86, which leaves
4875 * some ABI concerns but appears to work in practice.
4876 */
4877 __register_t sc_cp2state; /* Pointer to external state. */
4878 __register_t sc_cp2state_len;/* Length of external state. */
4879
4880 /*
4881 * XXXRW: Unfortunately, reserved space in the MIPS sigcontext was
4882 * made an 'int' rather than '__register_t', so embedding new pointers
4883 * changes the 32-bit vs. 64-bit versions of this structure
4884 * differently.
4885 */
4886#if (defined(__mips_n32) || defined(__mips_n64))
4887 int xxx[4]; /* XXX reserved */
4888#else
4889# 93 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/signal.h" 3 4
4890 int xxx[6]; /* XXX reserved */
4891#endif
4892# 95 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/signal.h" 3 4
4893};
4894
4895#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
4896# 98 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/signal.h" 3 4
4897
4898#endif /* !_MACHINE_SIGNAL_H_ */
4899# 100 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/signal.h" 3 4
4900# 47 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 2 3 4
4901
4902/*
4903 * System defined signals.
4904 */
4905#if __POSIX_VISIBLE || __XSI_VISIBLE
4906#define SIGHUP 1 /* hangup */
4907#endif
4908# 54 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4909#define SIGINT 2 /* interrupt */
4910#if __POSIX_VISIBLE || __XSI_VISIBLE
4911#define SIGQUIT 3 /* quit */
4912#endif
4913# 58 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4914#define SIGILL 4 /* illegal instr. (not reset when caught) */
4915#if __XSI_VISIBLE
4916#define SIGTRAP 5 /* trace trap (not reset when caught) */
4917#endif
4918# 62 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4919#define SIGABRT 6 /* abort() */
4920#if __BSD_VISIBLE
4921#define SIGIOT SIGABRT /* compatibility */
4922#define SIGEMT 7 /* EMT instruction */
4923#endif
4924# 67 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4925#define SIGFPE 8 /* floating point exception */
4926#if __POSIX_VISIBLE || __XSI_VISIBLE
4927#define SIGKILL 9 /* kill (cannot be caught or ignored) */
4928#endif
4929# 71 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4930#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
4931#define SIGBUS 10 /* bus error */
4932#endif
4933# 74 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4934#define SIGSEGV 11 /* segmentation violation */
4935#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
4936#define SIGSYS 12 /* non-existent system call invoked */
4937#endif
4938# 78 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4939#if __POSIX_VISIBLE || __XSI_VISIBLE
4940#define SIGPIPE 13 /* write on a pipe with no one to read it */
4941#define SIGALRM 14 /* alarm clock */
4942#endif
4943# 82 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4944#define SIGTERM 15 /* software termination signal from kill */
4945#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
4946#define SIGURG 16 /* urgent condition on IO channel */
4947#endif
4948# 86 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4949#if __POSIX_VISIBLE || __XSI_VISIBLE
4950#define SIGSTOP 17 /* sendable stop signal not from tty */
4951#define SIGTSTP 18 /* stop signal from tty */
4952#define SIGCONT 19 /* continue a stopped process */
4953#define SIGCHLD 20 /* to parent on child stop or exit */
4954#define SIGTTIN 21 /* to readers pgrp upon background tty read */
4955#define SIGTTOU 22 /* like TTIN if (tp->t_local<OSTOP) */
4956#endif
4957# 94 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4958#if __BSD_VISIBLE
4959#define SIGIO 23 /* input/output possible signal */
4960#endif
4961# 97 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4962#if __XSI_VISIBLE
4963#define SIGXCPU 24 /* exceeded CPU time limit */
4964#define SIGXFSZ 25 /* exceeded file size limit */
4965#define SIGVTALRM 26 /* virtual time alarm */
4966#define SIGPROF 27 /* profiling time alarm */
4967#endif
4968# 103 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4969#if __BSD_VISIBLE
4970#define SIGWINCH 28 /* window size changes */
4971#define SIGINFO 29 /* information request */
4972#endif
4973# 107 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4974#if __POSIX_VISIBLE || __XSI_VISIBLE
4975#define SIGUSR1 30 /* user defined signal 1 */
4976#define SIGUSR2 31 /* user defined signal 2 */
4977#endif
4978# 111 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4979#if __BSD_VISIBLE
4980#define SIGTHR 32 /* reserved by thread library. */
4981#define SIGLWP SIGTHR
4982#define SIGLIBRT 33 /* reserved by real-time library. */
4983#define SIGPROT 34 /* in-address space security exception. */
4984#endif
4985# 117 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
4986
4987#define SIGRTMIN 65
4988#define SIGRTMAX 126
4989
4990#define SIG_DFL ((__sighandler_t *)0)
4991#define SIG_IGN ((__sighandler_t *)1)
4992#define SIG_ERR ((__sighandler_t *)-1)
4993/* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */
4994#define SIG_HOLD ((__sighandler_t *)3)
4995
4996/*
4997 * Type of a signal handling function.
4998 *
4999 * Language spec sez signal handlers take exactly one arg, even though we
5000 * actually supply three. Ugh!
5001 *
5002 * We don't try to hide the difference by leaving out the args because
5003 * that would cause warnings about conformant programs. Nonconformant
5004 * programs can avoid the warnings by casting to (__sighandler_t *) or
5005 * sig_t before calling signal() or assigning to sa_handler or sv_handler.
5006 *
5007 * The kernel should reverse the cast before calling the function. It
5008 * has no way to do this, but on most machines 1-arg and 3-arg functions
5009 * have the same calling protocol so there is no problem in practice.
5010 * A bit in sa_flags could be used to specify the number of args.
5011 */
5012typedef void __sighandler_t(int);
5013
5014#if __POSIX_VISIBLE || __XSI_VISIBLE
5015#ifndef _SIGSET_T_DECLARED
5016#define _SIGSET_T_DECLARED
5017typedef __sigset_t sigset_t;
5018#endif
5019# 150 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5020#endif
5021# 151 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5022
5023#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >= 500
5024union sigval {
5025 /* Members as suggested by Annex C of POSIX 1003.1b. */
5026 int sival_int;
5027 void *sival_ptr;
5028 /* 6.0 compatibility */
5029 int sigval_int;
5030 void *sigval_ptr;
5031};
5032#endif
5033# 162 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5034
5035#if __POSIX_VISIBLE >= 199309
5036struct sigevent {
5037 int sigev_notify; /* Notification type */
5038 int sigev_signo; /* Signal number */
5039 union sigval sigev_value; /* Signal value */
5040 union {
5041 __lwpid_t _threadid;
5042 struct {
5043 void (*_function)(union sigval);
5044 void *_attribute; /* pthread_attr_t * */
5045 } _sigev_thread;
5046 unsigned short _kevent_flags;
5047 long __spare__[8];
5048 } _sigev_un;
5049};
5050
5051#if __BSD_VISIBLE
5052#define sigev_notify_kqueue sigev_signo
5053#define sigev_notify_kevent_flags _sigev_un._kevent_flags
5054#define sigev_notify_thread_id _sigev_un._threadid
5055#endif
5056# 184 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5057#define sigev_notify_function _sigev_un._sigev_thread._function
5058#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
5059
5060#define SIGEV_NONE 0 /* No async notification. */
5061#define SIGEV_SIGNAL 1 /* Generate a queued signal. */
5062#define SIGEV_THREAD 2 /* Call back from another pthread. */
5063#if __BSD_VISIBLE
5064#define SIGEV_KEVENT 3 /* Generate a kevent. */
5065#define SIGEV_THREAD_ID 4 /* Send signal to a kernel thread. */
5066#endif
5067# 194 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5068#endif /* __POSIX_VISIBLE >= 199309 */
5069# 195 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5070
5071#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE
5072typedef struct __siginfo {
5073 int si_signo; /* signal number */
5074 int si_errno; /* errno association */
5075 /*
5076 * Cause of signal, one of the SI_ macros or signal-specific
5077 * values, i.e. one of the FPE_... values for SIGFPE. This
5078 * value is equivalent to the second argument to an old-style
5079 * FreeBSD signal handler.
5080 */
5081 int si_code; /* signal code */
5082 __pid_t si_pid; /* sending process */
5083 __uid_t si_uid; /* sender's ruid */
5084 int si_status; /* exit value */
5085 void *si_addr; /* faulting instruction */
5086 union sigval si_value; /* signal value */
5087 union {
5088 struct {
5089 int _trapno;/* machine specific trap code */
5090 } _fault;
5091 struct {
5092 int _timerid;
5093 int _overrun;
5094 } _timer;
5095 struct {
5096 int _mqd;
5097 } _mesgq;
5098 struct {
5099 long _band; /* band event for SIGPOLL */
5100 } _poll; /* was this ever used ? */
5101 struct {
5102 long __spare1__;
5103 int __spare2__[7];
5104 } __spare__;
5105 } _reason;
5106} siginfo_t;
5107
5108#define si_trapno _reason._fault._trapno
5109#define si_timerid _reason._timer._timerid
5110#define si_overrun _reason._timer._overrun
5111#define si_mqd _reason._mesgq._mqd
5112#define si_band _reason._poll._band
5113
5114/** si_code **/
5115/* codes for SIGILL */
5116#define ILL_ILLOPC 1 /* Illegal opcode. */
5117#define ILL_ILLOPN 2 /* Illegal operand. */
5118#define ILL_ILLADR 3 /* Illegal addressing mode. */
5119#define ILL_ILLTRP 4 /* Illegal trap. */
5120#define ILL_PRVOPC 5 /* Privileged opcode. */
5121#define ILL_PRVREG 6 /* Privileged register. */
5122#define ILL_COPROC 7 /* Coprocessor error. */
5123#define ILL_BADSTK 8 /* Internal stack error. */
5124
5125/* codes for SIGBUS */
5126#define BUS_ADRALN 1 /* Invalid address alignment. */
5127#define BUS_ADRERR 2 /* Nonexistent physical address. */
5128#define BUS_OBJERR 3 /* Object-specific hardware error. */
5129
5130/* codes for SIGSEGV */
5131#define SEGV_MAPERR 1 /* Address not mapped to object. */
5132#define SEGV_ACCERR 2 /* Invalid permissions for mapped */
5133 /* object. */
5134
5135/* codes for SIGFPE */
5136#define FPE_INTOVF 1 /* Integer overflow. */
5137#define FPE_INTDIV 2 /* Integer divide by zero. */
5138#define FPE_FLTDIV 3 /* Floating point divide by zero. */
5139#define FPE_FLTOVF 4 /* Floating point overflow. */
5140#define FPE_FLTUND 5 /* Floating point underflow. */
5141#define FPE_FLTRES 6 /* Floating point inexact result. */
5142#define FPE_FLTINV 7 /* Invalid floating point operation. */
5143#define FPE_FLTSUB 8 /* Subscript out of range. */
5144
5145/* codes for SIGTRAP */
5146#define TRAP_BRKPT 1 /* Process breakpoint. */
5147#define TRAP_TRACE 2 /* Process trace trap. */
5148#define TRAP_DTRACE 3 /* DTrace induced trap. */
5149
5150/* codes for SIGCHLD */
5151#define CLD_EXITED 1 /* Child has exited */
5152#define CLD_KILLED 2 /* Child has terminated abnormally but */
5153 /* did not create a core file */
5154#define CLD_DUMPED 3 /* Child has terminated abnormally and */
5155 /* created a core file */
5156#define CLD_TRAPPED 4 /* Traced child has trapped */
5157#define CLD_STOPPED 5 /* Child has stopped */
5158#define CLD_CONTINUED 6 /* Stopped child has continued */
5159
5160/* codes for SIGPOLL */
5161#define POLL_IN 1 /* Data input available */
5162#define POLL_OUT 2 /* Output buffers available */
5163#define POLL_MSG 3 /* Input message available */
5164#define POLL_ERR 4 /* I/O Error */
5165#define POLL_PRI 5 /* High priority input available */
5166#define POLL_HUP 6 /* Device disconnected */
5167
5168#endif
5169# 294 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5170
5171#if __POSIX_VISIBLE || __XSI_VISIBLE
5172struct __siginfo;
5173
5174/*
5175 * Signal vector "template" used in sigaction call.
5176 */
5177struct sigaction {
5178 union {
5179 void (*__sa_handler)(int);
5180 void (*__sa_sigaction)(int, struct __siginfo *, void *);
5181 } __sigaction_u; /* signal handler */
5182 int sa_flags; /* see signal options below */
5183 sigset_t sa_mask; /* signal mask to apply */
5184};
5185
5186#define sa_handler __sigaction_u.__sa_handler
5187#endif
5188# 312 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5189
5190#if __XSI_VISIBLE
5191/* If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. */
5192#define sa_sigaction __sigaction_u.__sa_sigaction
5193#endif
5194# 317 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5195
5196#if __POSIX_VISIBLE || __XSI_VISIBLE
5197#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
5198#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */
5199# 321 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5200
5201#if __XSI_VISIBLE
5202#define SA_ONSTACK 0x0001 /* take signal on signal stack */
5203#define SA_RESTART 0x0002 /* restart system call on signal return */
5204#define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */
5205#define SA_NODEFER 0x0010 /* don't mask the signal we're delivering */
5206#define SA_NOCLDWAIT 0x0020 /* don't keep zombies around */
5207#define SA_SIGINFO 0x0040 /* signal handler with SA_SIGINFO args */
5208#endif
5209# 330 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5210
5211#if __BSD_VISIBLE
5212#define NSIG 35 /* number of old signals (counting 0) */
5213#endif
5214# 334 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5215
5216#if __POSIX_VISIBLE || __XSI_VISIBLE
5217#define SI_NOINFO 0 /* No signal info besides si_signo. */
5218#define SI_USER 0x10001 /* Signal sent by kill(). */
5219#define SI_QUEUE 0x10002 /* Signal sent by the sigqueue(). */
5220#define SI_TIMER 0x10003 /* Signal generated by expiration of */
5221 /* a timer set by timer_settime(). */
5222#define SI_ASYNCIO 0x10004 /* Signal generated by completion of */
5223 /* an asynchronous I/O request.*/
5224#define SI_MESGQ 0x10005 /* Signal generated by arrival of a */
5225 /* message on an empty message queue. */
5226#define SI_KERNEL 0x10006
5227#define SI_LWP 0x10007 /* Signal sent by thr_kill */
5228#endif
5229# 348 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5230#if __BSD_VISIBLE
5231#define SI_UNDEFINED 0
5232#endif
5233# 351 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5234
5235#if __BSD_VISIBLE
5236typedef __sighandler_t *sig_t; /* type of pointer to a signal function */
5237typedef void __siginfohandler_t(int, struct __siginfo *, void *);
5238#endif
5239# 356 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5240
5241#if __XSI_VISIBLE
5242/*
5243 * Structure used in sigaltstack call.
5244 */
5245#if __BSD_VISIBLE
5246typedef struct sigaltstack {
5247#else
5248# 364 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5249typedef struct {
5250#endif
5251# 366 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5252 char *ss_sp; /* signal stack base */
5253 __size_t ss_size; /* signal stack length */
5254 int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */
5255} stack_t;
5256
5257#define SS_ONSTACK 0x0001 /* take signal on alternate stack */
5258#define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */
5259#define MINSIGSTKSZ __MINSIGSTKSZ /* minimum stack size */
5260#define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */
5261#endif
5262# 376 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5263
5264#if __BSD_VISIBLE
5265/*
5266 * 4.3 compatibility:
5267 * Signal vector "template" used in sigvec call.
5268 */
5269struct sigvec {
5270 __sighandler_t *sv_handler; /* signal handler */
5271 int sv_mask; /* signal mask to apply */
5272 int sv_flags; /* see signal options below */
5273};
5274
5275#define SV_ONSTACK SA_ONSTACK
5276#define SV_INTERRUPT SA_RESTART /* same bit, opposite sense */
5277#define SV_RESETHAND SA_RESETHAND
5278#define SV_NODEFER SA_NODEFER
5279#define SV_NOCLDSTOP SA_NOCLDSTOP
5280#define SV_SIGINFO SA_SIGINFO
5281#define sv_onstack sv_flags /* isn't compatibility wonderful! */
5282#endif
5283# 396 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5284
5285/* Keep this in one place only */
5286#if defined(_KERNEL) && defined(COMPAT_43) && \
5287 !defined(__i386__)
5288struct osigcontext {
5289 int _not_used;
5290};
5291#endif
5292# 404 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5293
5294#if __XSI_VISIBLE
5295/*
5296 * Structure used in sigstack call.
5297 */
5298struct sigstack {
5299 /* XXX ss_sp's type should be `void *'. */
5300 char *ss_sp; /* signal stack pointer */
5301 int ss_onstack; /* current status */
5302};
5303#endif
5304# 415 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5305
5306#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112
5307/*
5308 * Macro for converting signal number to a mask suitable for
5309 * sigblock().
5310 */
5311#define sigmask(m) (1 << ((m)-1))
5312#endif
5313# 423 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5314
5315#if __BSD_VISIBLE
5316#define BADSIG SIG_ERR
5317#endif
5318# 427 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5319
5320#if __POSIX_VISIBLE || __XSI_VISIBLE
5321/*
5322 * Flags for sigprocmask:
5323 */
5324#define SIG_BLOCK 1 /* block specified signal set */
5325#define SIG_UNBLOCK 2 /* unblock specified signal set */
5326#define SIG_SETMASK 3 /* set specified signal set */
5327#endif
5328# 436 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5329
5330/*
5331 * For historical reasons; programs expect signal's return value to be
5332 * defined by <sys/signal.h>.
5333 */
5334__BEGIN_DECLS
5335__sighandler_t *signal(int, __sighandler_t *);
5336__END_DECLS
5337
5338#endif /* !_SYS_SIGNAL_H_ */
5339# 446 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/signal.h" 3 4
5340# 131 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 2 3 4
5341#endif
5342# 132 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5343
5344/* Machine type dependent parameters. */
5345#if 0 /* expanded by -frewrite-includes */
5346#include <machine/param.h>
5347#endif /* expanded by -frewrite-includes */
5348# 134 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5349# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 1 3 4
5350/* $OpenBSD: param.h,v 1.11 1998/08/30 22:05:35 millert Exp $ */
5351
5352/*-
5353 * Copyright (c) 1988 University of Utah.
5354 * Copyright (c) 1992, 1993
5355 * The Regents of the University of California. All rights reserved.
5356 *
5357 * This code is derived from software contributed to Berkeley by
5358 * the Systems Programming Group of the University of Utah Computer
5359 * Science Department and Ralph Campbell.
5360 *
5361 * Redistribution and use in source and binary forms, with or without
5362 * modification, are permitted provided that the following conditions
5363 * are met:
5364 * 1. Redistributions of source code must retain the above copyright
5365 * notice, this list of conditions and the following disclaimer.
5366 * 2. Redistributions in binary form must reproduce the above copyright
5367 * notice, this list of conditions and the following disclaimer in the
5368 * documentation and/or other materials provided with the distribution.
5369 * 4. Neither the name of the University nor the names of its contributors
5370 * may be used to endorse or promote products derived from this software
5371 * without specific prior written permission.
5372 *
5373 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5374 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5375 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5376 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
5377 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5378 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5379 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5380 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5381 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5382 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5383 * SUCH DAMAGE.
5384 *
5385 * from: Utah Hdr: machparam.h 1.11 89/08/14
5386 * from: @(#)param.h 8.1 (Berkeley) 6/10/93
5387 * JNPR: param.h,v 1.6.2.1 2007/09/10 07:49:36 girish
5388 * $FreeBSD$
5389 */
5390
5391#ifndef _MIPS_INCLUDE_PARAM_H_
5392#define _MIPS_INCLUDE_PARAM_H_
5393
5394#if 0 /* expanded by -frewrite-includes */
5395#include <machine/_align.h>
5396#endif /* expanded by -frewrite-includes */
5397# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5398# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_align.h" 1 3 4
5399/* $OpenBSD: param.h,v 1.11 1998/08/30 22:05:35 millert Exp $ */
5400
5401/*-
5402 * Copyright (c) 1988 University of Utah.
5403 * Copyright (c) 1992, 1993
5404 * The Regents of the University of California. All rights reserved.
5405 *
5406 * This code is derived from software contributed to Berkeley by
5407 * the Systems Programming Group of the University of Utah Computer
5408 * Science Department and Ralph Campbell.
5409 *
5410 * Redistribution and use in source and binary forms, with or without
5411 * modification, are permitted provided that the following conditions
5412 * are met:
5413 * 1. Redistributions of source code must retain the above copyright
5414 * notice, this list of conditions and the following disclaimer.
5415 * 2. Redistributions in binary form must reproduce the above copyright
5416 * notice, this list of conditions and the following disclaimer in the
5417 * documentation and/or other materials provided with the distribution.
5418 * 4. Neither the name of the University nor the names of its contributors
5419 * may be used to endorse or promote products derived from this software
5420 * without specific prior written permission.
5421 *
5422 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5423 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5424 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5425 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
5426 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5427 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5428 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5429 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5430 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5431 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5432 * SUCH DAMAGE.
5433 *
5434 * from: Utah Hdr: machparam.h 1.11 89/08/14
5435 * from: @(#)param.h 8.1 (Berkeley) 6/10/93
5436 * JNPR: param.h,v 1.6.2.1 2007/09/10 07:49:36 girish
5437 * $FreeBSD$
5438 */
5439
5440#ifndef _MIPS_INCLUDE__ALIGN_H_
5441#define _MIPS_INCLUDE__ALIGN_H_
5442
5443/*
5444 * Round p (pointer or byte index) up to a correctly-aligned value for all
5445 * data types (int, long, ...). The result is u_long and must be cast to
5446 * any desired pointer type.
5447 *
5448 * XXXCHERI: Changed '7' to 'sizeof(void *) - 1', but likely we also need
5449 * to change (u_long) below to (uintptr_t)?
5450 */
5451#define _ALIGNBYTES (sizeof(void *) - 1)
5452#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
5453
5454#endif /* !_MIPS_INCLUDE__ALIGN_H_ */
5455# 57 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_align.h" 3 4
5456# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 2 3 4
5457
5458#if 0 /* expanded by -frewrite-includes */
5459#include <sys/cdefs.h>
5460#endif /* expanded by -frewrite-includes */
5461# 47 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5462# 48 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5463#ifdef _KERNEL
5464#ifndef _LOCORE
5465#if 0 /* expanded by -frewrite-includes */
5466#include <machine/cpu.h>
5467#endif /* expanded by -frewrite-includes */
5468# 50 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5469# 51 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5470#endif
5471# 52 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5472#endif
5473# 53 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5474
5475#define __PCI_REROUTE_INTERRUPT
5476
5477#ifndef MACHINE
5478#define MACHINE "mips"
5479#endif
5480# 59 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5481#ifndef MACHINE_ARCH
5482#if _BYTE_ORDER == _BIG_ENDIAN
5483#ifdef __mips_n64
5484#define MACHINE_ARCH "mips64"
5485#ifndef MACHINE_ARCH32
5486#define MACHINE_ARCH32 "mips"
5487#endif
5488# 66 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5489#elif defined(__mips_n32)
5490# 67 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5491#define MACHINE_ARCH "mipsn32"
5492#else
5493# 69 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5494#define MACHINE_ARCH "mips"
5495#endif
5496# 71 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5497#else
5498# 72 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5499#ifdef __mips_n64
5500#define MACHINE_ARCH "mips64el"
5501#ifndef MACHINE_ARCH32
5502#define MACHINE_ARCH32 "mipsel"
5503#endif
5504# 77 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5505#elif defined(__mips_n32)
5506# 78 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5507#define MACHINE_ARCH "mipsn32el"
5508#else
5509# 80 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5510#define MACHINE_ARCH "mipsel"
5511#endif
5512# 82 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5513#endif
5514# 83 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5515#endif
5516# 84 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5517
5518/*
5519 * OBJFORMAT_NAMES is a comma-separated list of the object formats
5520 * that are supported on the architecture.
5521 */
5522#define OBJFORMAT_NAMES "elf"
5523#define OBJFORMAT_DEFAULT "elf"
5524
5525#define MID_MACHINE 0 /* None but has to be defined */
5526
5527#ifdef SMP
5528#define MAXSMPCPU 32
5529#ifndef MAXCPU
5530#define MAXCPU MAXSMPCPU
5531#endif
5532# 99 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5533#else
5534# 100 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5535#define MAXSMPCPU 1
5536#define MAXCPU 1
5537#endif
5538# 103 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5539
5540#ifndef MAXMEMDOM
5541#define MAXMEMDOM 1
5542#endif
5543# 107 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5544
5545/*
5546 * Round p (pointer or byte index) up to a correctly-aligned value for all
5547 * data types (int, long, ...). The result is u_int and must be cast to
5548 * any desired pointer type.
5549 */
5550
5551#define ALIGNBYTES _ALIGNBYTES
5552#define ALIGN(p) _ALIGN(p)
5553/*
5554 * ALIGNED_POINTER is a boolean macro that checks whether an address
5555 * is valid to fetch data elements of type t from on this architecture.
5556 * This does not reflect the optimal alignment, just the possibility
5557 * (within reasonable limits).
5558 */
5559#define ALIGNED_POINTER(p, t) ((((unsigned long)(p)) & (sizeof (t) - 1)) == 0)
5560
5561/*
5562 * CACHE_LINE_SIZE is the compile-time maximum cache line size for an
5563 * architecture. It should be used with appropriate caution.
5564 */
5565#define CACHE_LINE_SHIFT 6
5566#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT)
5567
5568#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */
5569#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */
5570#define PAGE_MASK (PAGE_SIZE-1)
5571
5572#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
5573#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
5574
5575#if defined(__mips_n32) || defined(__mips_n64) /* PHYSADDR_64_BIT */
5576#define NPTEPGSHIFT 9 /* LOG2(NPTEPG) */
5577#else
5578# 141 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5579#define NPTEPGSHIFT 10 /* LOG2(NPTEPG) */
5580#endif
5581# 143 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5582
5583#ifdef __mips_n64
5584#define NPDEPGSHIFT 9 /* LOG2(NPTEPG) */
5585#define SEGSHIFT (PAGE_SHIFT + NPTEPGSHIFT + NPDEPGSHIFT)
5586#define NBSEG (1ul << SEGSHIFT)
5587#define PDRSHIFT (PAGE_SHIFT + NPTEPGSHIFT)
5588#define PDRMASK ((1 << PDRSHIFT) - 1)
5589#else
5590# 151 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5591#define NPDEPGSHIFT 10 /* LOG2(NPTEPG) */
5592#define SEGSHIFT (PAGE_SHIFT + NPTEPGSHIFT)
5593#define NBSEG (1 << SEGSHIFT) /* bytes/segment */
5594#define PDRSHIFT SEGSHIFT /* alias for SEG in 32 bit */
5595#define PDRMASK ((1 << PDRSHIFT) - 1)
5596#endif
5597# 157 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5598#define NBPDR (1 << PDRSHIFT) /* bytes/pagedir */
5599#define SEGMASK (NBSEG - 1) /* byte offset into segment */
5600
5601#define MAXPAGESIZES 1 /* max supported pagesizes */
5602
5603#define MAXDUMPPGS 1 /* xxx: why is this only one? */
5604
5605#ifdef KSTACK_LARGE_PAGE
5606/*
5607 * For a large kernel stack page the KSTACK_SIZE needs to be a page size
5608 * supported by the hardware (e.g. 16K).
5609 */
5610#define KSTACK_SIZE (1 << 14) /* Single 16K page */
5611#define KSTACK_PAGE_SIZE KSTACK_SIZE
5612#define KSTACK_PAGE_MASK (KSTACK_PAGE_SIZE - 1)
5613#define KSTACK_PAGES (KSTACK_SIZE / PAGE_SIZE)
5614#define KSTACK_TLBMASK_MASK ((KSTACK_PAGE_MASK >> (TLBMASK_SHIFT - 1)) \
5615 << TLBMASK_SHIFT)
5616#define KSTACK_GUARD_PAGES ((KSTACK_PAGE_SIZE * 2) / PAGE_SIZE)
5617
5618#else /* ! KSTACK_LARGE_PAGE */
5619# 178 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5620
5621/*
5622 * The kernel stack needs to be aligned on a (PAGE_SIZE * 2) boundary.
5623 */
5624#define KSTACK_PAGES 2 /* kernel stack */
5625#define KSTACK_SIZE (KSTACK_PAGES * PAGE_SIZE)
5626#define KSTACK_PAGE_SIZE PAGE_SIZE
5627#define KSTACK_PAGE_MASK (PAGE_SIZE - 1)
5628#define KSTACK_GUARD_PAGES 2 /* pages of kstack guard; 0 disables */
5629#endif /* ! KSTACK_LARGE_PAGE */
5630# 188 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5631
5632/*
5633 * Mach derived conversion macros
5634 */
5635#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK)
5636#define trunc_page(x) ((x) & ~PAGE_MASK)
5637#define round_2mpage(x) (((x) + PDRMASK) & ~PDRMASK)
5638#define trunc_2mpage(x) ((x) & ~PDRMASK)
5639
5640#define atop(x) ((x) >> PAGE_SHIFT)
5641#define ptoa(x) ((x) << PAGE_SHIFT)
5642
5643#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
5644
5645#ifdef _KERNEL
5646#define NO_FUEWORD 1
5647#endif
5648# 205 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5649
5650#endif /* !_MIPS_INCLUDE_PARAM_H_ */
5651# 207 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/param.h" 3 4
5652# 135 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 2 3 4
5653#ifndef _KERNEL
5654#if 0 /* expanded by -frewrite-includes */
5655#include <sys/limits.h>
5656#endif /* expanded by -frewrite-includes */
5657# 136 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5658# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 1 3 4
5659/*-
5660 * Copyright (c) 1988, 1993
5661 * The Regents of the University of California. All rights reserved.
5662 *
5663 * Redistribution and use in source and binary forms, with or without
5664 * modification, are permitted provided that the following conditions
5665 * are met:
5666 * 1. Redistributions of source code must retain the above copyright
5667 * notice, this list of conditions and the following disclaimer.
5668 * 2. Redistributions in binary form must reproduce the above copyright
5669 * notice, this list of conditions and the following disclaimer in the
5670 * documentation and/or other materials provided with the distribution.
5671 * 4. Neither the name of the University nor the names of its contributors
5672 * may be used to endorse or promote products derived from this software
5673 * without specific prior written permission.
5674 *
5675 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
5676 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5677 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
5678 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
5679 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5680 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
5681 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
5682 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
5683 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5684 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5685 * SUCH DAMAGE.
5686 *
5687 * $FreeBSD$
5688 */
5689
5690#ifndef _SYS_LIMITS_H_
5691#define _SYS_LIMITS_H_
5692
5693#if 0 /* expanded by -frewrite-includes */
5694#include <sys/cdefs.h>
5695#endif /* expanded by -frewrite-includes */
5696# 35 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5697# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5698#if 0 /* expanded by -frewrite-includes */
5699#include <machine/_limits.h>
5700#endif /* expanded by -frewrite-includes */
5701# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5702# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5703
5704#define CHAR_BIT __CHAR_BIT /* number of bits in a char */
5705
5706#define SCHAR_MAX __SCHAR_MAX /* max value for a signed char */
5707#define SCHAR_MIN __SCHAR_MIN /* min value for a signed char */
5708
5709#define UCHAR_MAX __UCHAR_MAX /* max value for an unsigned char */
5710
5711#ifdef __CHAR_UNSIGNED__
5712#define CHAR_MAX UCHAR_MAX /* max value for a char */
5713#define CHAR_MIN 0 /* min value for a char */
5714#else
5715# 49 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5716#define CHAR_MAX SCHAR_MAX
5717#define CHAR_MIN SCHAR_MIN
5718#endif
5719# 52 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5720
5721#define USHRT_MAX __USHRT_MAX /* max value for an unsigned short */
5722#define SHRT_MAX __SHRT_MAX /* max value for a short */
5723#define SHRT_MIN __SHRT_MIN /* min value for a short */
5724
5725#define UINT_MAX __UINT_MAX /* max value for an unsigned int */
5726#define INT_MAX __INT_MAX /* max value for an int */
5727#define INT_MIN __INT_MIN /* min value for an int */
5728
5729#define ULONG_MAX __ULONG_MAX /* max for an unsigned long */
5730#define LONG_MAX __LONG_MAX /* max for a long */
5731#define LONG_MIN __LONG_MIN /* min for a long */
5732
5733#ifdef __LONG_LONG_SUPPORTED
5734#define ULLONG_MAX __ULLONG_MAX /* max for an unsigned long long */
5735#define LLONG_MAX __LLONG_MAX /* max for a long long */
5736#define LLONG_MIN __LLONG_MIN /* min for a long long */
5737#endif
5738# 70 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5739
5740#if __POSIX_VISIBLE || __XSI_VISIBLE
5741#define SSIZE_MAX __SSIZE_MAX /* max value for an ssize_t */
5742#endif
5743# 74 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5744
5745#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
5746#define SIZE_T_MAX __SIZE_T_MAX /* max value for a size_t */
5747
5748#define OFF_MAX __OFF_MAX /* max value for an off_t */
5749#define OFF_MIN __OFF_MIN /* min value for an off_t */
5750#endif
5751# 81 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5752
5753#if __BSD_VISIBLE
5754#define GID_MAX UINT_MAX /* max value for a gid_t */
5755#define UID_MAX UINT_MAX /* max value for a uid_t */
5756
5757#define UQUAD_MAX (__UQUAD_MAX) /* max value for a uquad_t */
5758#define QUAD_MAX (__QUAD_MAX) /* max value for a quad_t */
5759#define QUAD_MIN (__QUAD_MIN) /* min value for a quad_t */
5760#endif
5761# 90 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5762
5763#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
5764#define LONG_BIT __LONG_BIT
5765#define WORD_BIT __WORD_BIT
5766#endif
5767# 95 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5768
5769#if __POSIX_VISIBLE
5770#define MQ_PRIO_MAX 64
5771#endif
5772# 99 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5773
5774#endif /* !_SYS_LIMITS_H_ */
5775# 101 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/limits.h" 3 4
5776# 137 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 2 3 4
5777#endif
5778# 138 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5779
5780#ifndef DEV_BSHIFT
5781#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
5782#endif
5783# 142 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5784#define DEV_BSIZE (1<<DEV_BSHIFT)
5785
5786#ifndef BLKDEV_IOSIZE
5787#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */
5788#endif
5789# 147 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5790#ifndef DFLTPHYS
5791#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */
5792#endif
5793# 150 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5794#ifndef MAXPHYS
5795#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
5796#endif
5797# 153 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5798#ifndef MAXDUMPPGS
5799#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE)
5800#endif
5801# 156 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5802
5803/*
5804 * Constants related to network buffer management.
5805 * MCLBYTES must be no larger than PAGE_SIZE.
5806 */
5807#ifndef MSIZE
5808#define MSIZE 256 /* size of an mbuf */
5809#endif
5810# 164 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5811
5812#ifndef MCLSHIFT
5813#define MCLSHIFT 11 /* convert bytes to mbuf clusters */
5814#endif /* MCLSHIFT */
5815# 168 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5816
5817#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */
5818
5819#if PAGE_SIZE < 2048
5820#define MJUMPAGESIZE MCLBYTES
5821#elif PAGE_SIZE <= 8192
5822# 174 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5823#define MJUMPAGESIZE PAGE_SIZE
5824#else
5825# 176 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5826#define MJUMPAGESIZE (8 * 1024)
5827#endif
5828# 178 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5829
5830#define MJUM9BYTES (9 * 1024) /* jumbo cluster 9k */
5831#define MJUM16BYTES (16 * 1024) /* jumbo cluster 16k */
5832
5833/*
5834 * Some macros for units conversion
5835 */
5836
5837/* clicks to bytes */
5838#ifndef ctob
5839#define ctob(x) ((x)<<PAGE_SHIFT)
5840#endif
5841# 190 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5842
5843/* bytes to clicks */
5844#ifndef btoc
5845#define btoc(x) (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT)
5846#endif
5847# 195 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5848
5849/*
5850 * btodb() is messy and perhaps slow because `bytes' may be an off_t. We
5851 * want to shift an unsigned type to avoid sign extension and we don't
5852 * want to widen `bytes' unnecessarily. Assume that the result fits in
5853 * a daddr_t.
5854 */
5855#ifndef btodb
5856#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
5857 (sizeof (bytes) > sizeof(long) \
5858 ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \
5859 : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT))
5860#endif
5861# 208 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5862
5863#ifndef dbtob
5864#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
5865 ((off_t)(db) << DEV_BSHIFT)
5866#endif
5867# 213 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5868
5869#define PRIMASK 0x0ff
5870#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
5871#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */
5872
5873#define NZERO 0 /* default "nice" */
5874
5875#define NBBY 8 /* number of bits in a byte */
5876#define NBPW sizeof(int) /* number of bytes per word (integer) */
5877
5878#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
5879
5880#define NODEV (dev_t)(-1) /* non-existent device */
5881
5882/*
5883 * File system parameters and macros.
5884 *
5885 * MAXBSIZE - Filesystems are made out of blocks of at most MAXBSIZE bytes
5886 * per block. MAXBSIZE may be made larger without effecting
5887 * any existing filesystems as long as it does not exceed MAXPHYS,
5888 * and may be made smaller at the risk of not being able to use
5889 * filesystems which require a block size exceeding MAXBSIZE.
5890 *
5891 * MAXBCACHEBUF - Maximum size of a buffer in the buffer cache. This must
5892 * be >= MAXBSIZE and can be set differently for different
5893 * architectures by defining it in <machine/param.h>.
5894 * Making this larger allows NFS to do larger reads/writes.
5895 *
5896 * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the
5897 * minimum KVM memory reservation the kernel is willing to make.
5898 * Filesystems can of course request smaller chunks. Actual
5899 * backing memory uses a chunk size of a page (PAGE_SIZE).
5900 * The default value here can be overridden on a per-architecture
5901 * basis by defining it in <machine/param.h>. This should
5902 * probably be done to increase its value, when MAXBCACHEBUF is
5903 * defined as a larger value in <machine/param.h>.
5904 *
5905 * If you make BKVASIZE too small you risk seriously fragmenting
5906 * the buffer KVM map which may slow things down a bit. If you
5907 * make it too big the kernel will not be able to optimally use
5908 * the KVM memory reserved for the buffer cache and will wind
5909 * up with too-few buffers.
5910 *
5911 * The default is 16384, roughly 2x the block size used by a
5912 * normal UFS filesystem.
5913 */
5914#define MAXBSIZE 65536 /* must be power of 2 */
5915#ifndef MAXBCACHEBUF
5916#define MAXBCACHEBUF MAXBSIZE /* must be a power of 2 >= MAXBSIZE */
5917#endif
5918# 263 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5919#ifndef BKVASIZE
5920#define BKVASIZE 16384 /* must be power of 2 */
5921#endif
5922# 266 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5923#define BKVAMASK (BKVASIZE-1)
5924
5925/*
5926 * MAXPATHLEN defines the longest permissible path length after expanding
5927 * symbolic links. It is used to allocate a temporary buffer from the buffer
5928 * pool in which to do the name expansion, hence should be a power of two,
5929 * and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the
5930 * maximum number of symbolic links that may be expanded in a path name.
5931 * It should be set high enough to allow all legitimate uses, but halt
5932 * infinite loops reasonably quickly.
5933 */
5934#define MAXPATHLEN PATH_MAX
5935#define MAXSYMLINKS 32
5936
5937/* Bit map related macros. */
5938#define setbit(a,i) (((unsigned char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY))
5939#define clrbit(a,i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY)))
5940#define isset(a,i) \
5941 (((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY)))
5942#define isclr(a,i) \
5943 ((((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
5944
5945/* Macros for counting and rounding. */
5946#ifndef howmany
5947#define howmany(x, y) (((x)+((y)-1))/(y))
5948#endif
5949# 292 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5950#define nitems(x) (sizeof((x)) / sizeof((x)[0]))
5951#define rounddown(x, y) (((x)/(y))*(y))
5952#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */
5953#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
5954#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
5955#define powerof2(x) ((((x)-1)&(x))==0)
5956
5957/* Macros for min/max. */
5958#define MIN(a,b) (((a)<(b))?(a):(b))
5959#define MAX(a,b) (((a)>(b))?(a):(b))
5960
5961#ifdef _KERNEL
5962/*
5963 * Basic byte order function prototypes for non-inline functions.
5964 */
5965#ifndef LOCORE
5966#ifndef _BYTEORDER_PROTOTYPED
5967#define _BYTEORDER_PROTOTYPED
5968__BEGIN_DECLS
5969__uint32_t htonl(__uint32_t);
5970__uint16_t htons(__uint16_t);
5971__uint32_t ntohl(__uint32_t);
5972__uint16_t ntohs(__uint16_t);
5973__END_DECLS
5974#endif
5975# 317 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5976#endif
5977# 318 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5978
5979#ifndef lint
5980#ifndef _BYTEORDER_FUNC_DEFINED
5981#define _BYTEORDER_FUNC_DEFINED
5982#define htonl(x) __htonl(x)
5983#define htons(x) __htons(x)
5984#define ntohl(x) __ntohl(x)
5985#define ntohs(x) __ntohs(x)
5986#endif /* !_BYTEORDER_FUNC_DEFINED */
5987# 327 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5988#endif /* lint */
5989# 328 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5990#endif /* _KERNEL */
5991# 329 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
5992
5993/*
5994 * Scale factor for scaled integers used to count %cpu time and load avgs.
5995 *
5996 * The number of CPU `tick's that map to a unique `%age' can be expressed
5997 * by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that
5998 * can be calculated (assuming 32 bits) can be closely approximated using
5999 * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15).
6000 *
6001 * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age',
6002 * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024.
6003 */
6004#define FSHIFT 11 /* bits to right of fixed binary point */
6005#define FSCALE (1<<FSHIFT)
6006
6007#define dbtoc(db) /* calculates devblks to pages */ \
6008 ((db + (ctodb(1) - 1)) >> (PAGE_SHIFT - DEV_BSHIFT))
6009
6010#define ctodb(db) /* calculates pages to devblks */ \
6011 ((db) << (PAGE_SHIFT - DEV_BSHIFT))
6012
6013/*
6014 * Old spelling of __containerof().
6015 */
6016#define member2struct(s, m, x) \
6017 ((struct s *)(void *)((char *)(x) - offsetof(struct s, m)))
6018
6019/*
6020 * Access a variable length array that has been declared as a fixed
6021 * length array.
6022 */
6023#define __PAST_END(array, offset) (((__typeof__(*(array)) *)(array))[offset])
6024
6025#endif /* _SYS_PARAM_H_ */
6026# 363 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/param.h" 3 4
6027# 1612 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h" 2
6028# if BYTE_ORDER == BIG_ENDIAN
6029# define WORDS_BIGENDIAN 1
6030# endif
6031# 1615 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
6032#endif
6033# 1616 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
6034
6035
6036
6037
6038/* Set this to the default system lead string for telnetd
6039 * can contain %-escapes: %s=sysname, %m=machine, %r=os-release
6040 * %v=os-version, %t=tty, %h=hostname, %d=date and time
6041 */
6042/* #undef USE_IM */
6043
6044/* Used with login -p */
6045/* #undef LOGIN_ARGS */
6046
6047/* set this to a sensible login */
6048#ifndef LOGIN_PATH
6049#define LOGIN_PATH BINDIR "/login"
6050#endif
6051# 1633 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/config.h"
6052
6053# 37 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
6054
6055#ifdef HAVE_SYS_TYPES_H
6056#if 0 /* expanded by -frewrite-includes */
6057#include <sys/types.h>
6058#endif /* expanded by -frewrite-includes */
6059# 39 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
6060# 40 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
6061#endif
6062# 41 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
6063#ifdef HAVE_SYS_SELECT_H
6064#if 0 /* expanded by -frewrite-includes */
6065#include <sys/select.h>
6066#endif /* expanded by -frewrite-includes */
6067# 42 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
6068# 43 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
6069#endif
6070# 44 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
6071
6072#if 0 /* expanded by -frewrite-includes */
6073#include <stdio.h>
6074#endif /* expanded by -frewrite-includes */
6075# 45 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
6076# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 1 3 4
6077/*-
6078 * Copyright (c) 1990, 1993
6079 * The Regents of the University of California. All rights reserved.
6080 *
6081 * This code is derived from software contributed to Berkeley by
6082 * Chris Torek.
6083 *
6084 * Redistribution and use in source and binary forms, with or without
6085 * modification, are permitted provided that the following conditions
6086 * are met:
6087 * 1. Redistributions of source code must retain the above copyright
6088 * notice, this list of conditions and the following disclaimer.
6089 * 2. Redistributions in binary form must reproduce the above copyright
6090 * notice, this list of conditions and the following disclaimer in the
6091 * documentation and/or other materials provided with the distribution.
6092 * 3. Neither the name of the University nor the names of its contributors
6093 * may be used to endorse or promote products derived from this software
6094 * without specific prior written permission.
6095 *
6096 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
6097 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6098 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
6099 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
6100 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
6101 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
6102 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
6103 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
6104 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
6105 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
6106 * SUCH DAMAGE.
6107 *
6108 * @(#)stdio.h 8.5 (Berkeley) 4/29/95
6109 * $FreeBSD$
6110 */
6111
6112#ifndef _STDIO_H_
6113#define _STDIO_H_
6114
6115#if 0 /* expanded by -frewrite-includes */
6116#include <sys/cdefs.h>
6117#endif /* expanded by -frewrite-includes */
6118# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6119# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6120#if 0 /* expanded by -frewrite-includes */
6121#include <sys/_null.h>
6122#endif /* expanded by -frewrite-includes */
6123# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6124# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6125#if 0 /* expanded by -frewrite-includes */
6126#include <sys/_types.h>
6127#endif /* expanded by -frewrite-includes */
6128# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6129# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6130
6131typedef __off_t fpos_t;
6132
6133#ifndef _SIZE_T_DECLARED
6134typedef __size_t size_t;
6135#define _SIZE_T_DECLARED
6136#endif
6137# 49 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6138
6139#if __POSIX_VISIBLE >= 200809
6140#ifndef _OFF_T_DECLARED
6141#define _OFF_T_DECLARED
6142typedef __off_t off_t;
6143#endif
6144# 55 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6145#ifndef _SSIZE_T_DECLARED
6146#define _SSIZE_T_DECLARED
6147typedef __ssize_t ssize_t;
6148#endif
6149# 59 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6150#endif
6151# 60 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6152
6153#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
6154#ifndef _VA_LIST_DECLARED
6155typedef __va_list va_list;
6156#define _VA_LIST_DECLARED
6157#endif
6158# 66 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6159#endif
6160# 67 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6161
6162#define _FSTDIO /* Define for new stdio with functions. */
6163
6164/*
6165 * NB: to fit things in six character monocase externals, the stdio
6166 * code uses the prefix `__s' for stdio objects, typically followed
6167 * by a three-character attempt at a mnemonic.
6168 */
6169
6170/* stdio buffers */
6171struct __sbuf {
6172 unsigned char *_base;
6173 int _size;
6174};
6175
6176/*
6177 * stdio state variables.
6178 *
6179 * The following always hold:
6180 *
6181 * if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
6182 * _lbfsize is -_bf._size, else _lbfsize is 0
6183 * if _flags&__SRD, _w is 0
6184 * if _flags&__SWR, _r is 0
6185 *
6186 * This ensures that the getc and putc macros (or inline functions) never
6187 * try to write or read from a file that is in `read' or `write' mode.
6188 * (Moreover, they can, and do, automatically switch from read mode to
6189 * write mode, and back, on "r+" and "w+" files.)
6190 *
6191 * _lbfsize is used only to make the inline line-buffered output stream
6192 * code as compact as possible.
6193 *
6194 * _ub, _up, and _ur are used when ungetc() pushes back more characters
6195 * than fit in the current _bf, or when ungetc() pushes back a character
6196 * that does not match the previous one in _bf. When this happens,
6197 * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
6198 * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
6199 *
6200 * Certain members of __sFILE are accessed directly via macros or
6201 * inline functions. To preserve ABI compat, these members must not
6202 * be disturbed. These members are marked below with (*).
6203 */
6204struct __sFILE {
6205 unsigned char *_p; /* (*) current position in (some) buffer */
6206 int _r; /* (*) read space left for getc() */
6207 int _w; /* (*) write space left for putc() */
6208 short _flags; /* (*) flags, below; this FILE is free if 0 */
6209 short _file; /* (*) fileno, if Unix descriptor, else -1 */
6210 struct __sbuf _bf; /* (*) the buffer (at least 1 byte, if !NULL) */
6211 int _lbfsize; /* (*) 0 or -_bf._size, for inline putc */
6212
6213 /* operations */
6214 void *_cookie; /* (*) cookie passed to io functions */
6215 int (*_close)(void *);
6216 int (*_read)(void *, char *, int);
6217 fpos_t (*_seek)(void *, fpos_t, int);
6218 int (*_write)(void *, const char *, int);
6219
6220 /* separate buffer for long sequences of ungetc() */
6221 struct __sbuf _ub; /* ungetc buffer */
6222 unsigned char *_up; /* saved _p when _p is doing ungetc data */
6223 int _ur; /* saved _r when _r is counting ungetc data */
6224
6225 /* tricks to meet minimum requirements even when malloc() fails */
6226 unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
6227 unsigned char _nbuf[1]; /* guarantee a getc() buffer */
6228
6229 /* separate buffer for fgetln() when line crosses buffer boundary */
6230 struct __sbuf _lb; /* buffer for fgetln() */
6231
6232 /* Unix stdio files get aligned to block boundaries on fseek() */
6233 int _blksize; /* stat.st_blksize (may be != _bf._size) */
6234 fpos_t _offset; /* current lseek offset */
6235
6236 struct pthread_mutex *_fl_mutex; /* used for MT-safety */
6237 struct pthread *_fl_owner; /* current owner */
6238 int _fl_count; /* recursive lock count */
6239 int _orientation; /* orientation for fwide() */
6240 __mbstate_t _mbstate; /* multibyte conversion state */
6241};
6242#ifndef _STDFILE_DECLARED
6243#define _STDFILE_DECLARED
6244typedef struct __sFILE FILE;
6245#endif
6246# 152 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6247#ifndef _STDSTREAM_DECLARED
6248__BEGIN_DECLS
6249extern FILE *__stdinp;
6250extern FILE *__stdoutp;
6251extern FILE *__stderrp;
6252__END_DECLS
6253#define _STDSTREAM_DECLARED
6254#endif
6255# 160 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6256
6257#define __SLBF 0x0001 /* line buffered */
6258#define __SNBF 0x0002 /* unbuffered */
6259#define __SRD 0x0004 /* OK to read */
6260#define __SWR 0x0008 /* OK to write */
6261 /* RD and WR are never simultaneously asserted */
6262#define __SRW 0x0010 /* open for reading & writing */
6263#define __SEOF 0x0020 /* found EOF */
6264#define __SERR 0x0040 /* found error */
6265#define __SMBF 0x0080 /* _bf._base is from malloc */
6266#define __SAPP 0x0100 /* fdopen()ed in append mode */
6267#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
6268#define __SOPT 0x0400 /* do fseek() optimization */
6269#define __SNPT 0x0800 /* do not do fseek() optimization */
6270#define __SOFF 0x1000 /* set iff _offset is in fact correct */
6271#define __SMOD 0x2000 /* true => fgetln modified _p text */
6272#define __SALC 0x4000 /* allocate string space dynamically */
6273#define __SIGN 0x8000 /* ignore this file in _fwalk */
6274
6275/*
6276 * The following three definitions are for ANSI C, which took them
6277 * from System V, which brilliantly took internal interface macros and
6278 * made them official arguments to setvbuf(), without renaming them.
6279 * Hence, these ugly _IOxxx names are *supposed* to appear in user code.
6280 *
6281 * Although numbered as their counterparts above, the implementation
6282 * does not rely on this.
6283 */
6284#define _IOFBF 0 /* setvbuf should set fully buffered */
6285#define _IOLBF 1 /* setvbuf should set line buffered */
6286#define _IONBF 2 /* setvbuf should set unbuffered */
6287
6288#define BUFSIZ 1024 /* size of buffer used by setbuf */
6289#define EOF (-1)
6290
6291/*
6292 * FOPEN_MAX is a minimum maximum, and is the number of streams that
6293 * stdio can provide without attempting to allocate further resources
6294 * (which could fail). Do not use this for anything.
6295 */
6296 /* must be == _POSIX_STREAM_MAX <limits.h> */
6297#ifndef FOPEN_MAX
6298#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */
6299#endif
6300# 204 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6301#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
6302
6303/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
6304#if __XSI_VISIBLE
6305#define P_tmpdir "/tmp/"
6306#endif
6307# 210 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6308#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
6309#define TMP_MAX 308915776
6310
6311#ifndef SEEK_SET
6312#define SEEK_SET 0 /* set file offset to offset */
6313#endif
6314# 216 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6315#ifndef SEEK_CUR
6316#define SEEK_CUR 1 /* set file offset to current plus offset */
6317#endif
6318# 219 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6319#ifndef SEEK_END
6320#define SEEK_END 2 /* set file offset to EOF plus offset */
6321#endif
6322# 222 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6323
6324#define stdin __stdinp
6325#define stdout __stdoutp
6326#define stderr __stderrp
6327
6328__BEGIN_DECLS
6329#ifdef _XLOCALE_H_
6330#if 0 /* expanded by -frewrite-includes */
6331#include <xlocale/_stdio.h>
6332#endif /* expanded by -frewrite-includes */
6333# 229 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6334# 230 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6335#endif
6336# 231 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6337/*
6338 * Functions defined in ANSI C standard.
6339 */
6340void clearerr(FILE *);
6341int fclose(FILE *);
6342int feof(FILE *);
6343int ferror(FILE *);
6344int fflush(FILE *);
6345int fgetc(FILE *);
6346int fgetpos(FILE * __restrict, fpos_t * __restrict);
6347char *fgets(char * __restrict, int, FILE * __restrict);
6348FILE *fopen(const char * __restrict, const char * __restrict);
6349int fprintf(FILE * __restrict, const char * __restrict, ...);
6350int fputc(int, FILE *);
6351int fputs(const char * __restrict, FILE * __restrict);
6352size_t fread(void * __restrict, size_t, size_t, FILE * __restrict);
6353FILE *freopen(const char * __restrict, const char * __restrict, FILE * __restrict);
6354int fscanf(FILE * __restrict, const char * __restrict, ...);
6355int fseek(FILE *, long, int);
6356int fsetpos(FILE *, const fpos_t *);
6357long ftell(FILE *);
6358size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict);
6359int getc(FILE *);
6360int getchar(void);
6361char *gets(char *);
6362void perror(const char *);
6363int printf(const char * __restrict, ...);
6364int putc(int, FILE *);
6365int putchar(int);
6366int puts(const char *);
6367int remove(const char *);
6368int rename(const char *, const char *);
6369void rewind(FILE *);
6370int scanf(const char * __restrict, ...);
6371void setbuf(FILE * __restrict, char * __restrict);
6372int setvbuf(FILE * __restrict, char * __restrict, int, size_t);
6373int sprintf(char * __restrict, const char * __restrict, ...);
6374int sscanf(const char * __restrict, const char * __restrict, ...);
6375FILE *tmpfile(void);
6376char *tmpnam(char *);
6377int ungetc(int, FILE *);
6378int vfprintf(FILE * __restrict, const char * __restrict,
6379 __va_list);
6380int vprintf(const char * __restrict, __va_list);
6381int vsprintf(char * __restrict, const char * __restrict,
6382 __va_list);
6383
6384#if __ISO_C_VISIBLE >= 1999
6385int snprintf(char * __restrict, size_t, const char * __restrict,
6386 ...) __printflike(3, 4);
6387int vfscanf(FILE * __restrict, const char * __restrict, __va_list)
6388 __scanflike(2, 0);
6389int vscanf(const char * __restrict, __va_list) __scanflike(1, 0);
6390int vsnprintf(char * __restrict, size_t, const char * __restrict,
6391 __va_list) __printflike(3, 0);
6392int vsscanf(const char * __restrict, const char * __restrict, __va_list)
6393 __scanflike(2, 0);
6394#endif
6395# 289 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6396
6397/*
6398 * Functions defined in all versions of POSIX 1003.1.
6399 */
6400#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506)
6401#define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */
6402#endif
6403# 296 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6404
6405#if __POSIX_VISIBLE
6406#define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */
6407
6408char *ctermid(char *);
6409FILE *fdopen(int, const char *);
6410int fileno(FILE *);
6411#endif /* __POSIX_VISIBLE */
6412# 304 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6413
6414#if __POSIX_VISIBLE >= 199209
6415int pclose(FILE *);
6416FILE *popen(const char *, const char *);
6417#endif
6418# 309 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6419
6420#if __POSIX_VISIBLE >= 199506
6421int ftrylockfile(FILE *);
6422void flockfile(FILE *);
6423void funlockfile(FILE *);
6424
6425/*
6426 * These are normally used through macros as defined below, but POSIX
6427 * requires functions as well.
6428 */
6429int getc_unlocked(FILE *);
6430int getchar_unlocked(void);
6431int putc_unlocked(int, FILE *);
6432int putchar_unlocked(int);
6433#endif
6434# 324 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6435#if __BSD_VISIBLE
6436void clearerr_unlocked(FILE *);
6437int feof_unlocked(FILE *);
6438int ferror_unlocked(FILE *);
6439int fileno_unlocked(FILE *);
6440#endif
6441# 330 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6442
6443#if __POSIX_VISIBLE >= 200112
6444int fseeko(FILE *, __off_t, int);
6445__off_t ftello(FILE *);
6446#endif
6447# 335 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6448
6449#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600
6450int getw(FILE *);
6451int putw(int, FILE *);
6452#endif /* BSD or X/Open before issue 6 */
6453# 340 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6454
6455#if __XSI_VISIBLE
6456char *tempnam(const char *, const char *);
6457#endif
6458# 344 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6459
6460#if __POSIX_VISIBLE >= 200809
6461FILE *fmemopen(void * __restrict, size_t, const char * __restrict);
6462ssize_t getdelim(char ** __restrict, size_t * __restrict, int,
6463 FILE * __restrict);
6464FILE *open_memstream(char **, size_t *);
6465int renameat(int, const char *, int, const char *);
6466int vdprintf(int, const char * __restrict, __va_list);
6467
6468/*
6469 * Every programmer and his dog wrote functions called getline() and dprintf()
6470 * before POSIX.1-2008 came along and decided to usurp the names, so we
6471 * don't prototype them by default unless one of the following is true:
6472 * a) the app has requested them specifically by defining _WITH_GETLINE or
6473 * _WITH_DPRINTF, respectively
6474 * b) the app has requested a POSIX.1-2008 environment via _POSIX_C_SOURCE
6475 * c) the app defines a GNUism such as _BSD_SOURCE or _GNU_SOURCE
6476 */
6477#ifndef _WITH_GETLINE
6478#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
6479#define _WITH_GETLINE
6480#elif defined(_POSIX_C_SOURCE)
6481# 366 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6482#if _POSIX_C_SOURCE >= 200809
6483#define _WITH_GETLINE
6484#endif
6485# 369 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6486#endif
6487# 370 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6488#endif
6489# 371 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6490
6491#ifdef _WITH_GETLINE
6492ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict);
6493#endif
6494# 375 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6495
6496#ifndef _WITH_DPRINTF
6497#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
6498#define _WITH_DPRINTF
6499#elif defined(_POSIX_C_SOURCE)
6500# 380 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6501#if _POSIX_C_SOURCE >= 200809
6502#define _WITH_DPRINTF
6503#endif
6504# 383 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6505#endif
6506# 384 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6507#endif
6508# 385 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6509
6510#ifdef _WITH_DPRINTF
6511int (dprintf)(int, const char * __restrict, ...);
6512#endif
6513# 389 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6514
6515#endif /* __POSIX_VISIBLE >= 200809 */
6516# 391 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6517
6518/*
6519 * Routines that are purely local.
6520 */
6521#if __BSD_VISIBLE
6522int asprintf(char **, const char *, ...) __printflike(2, 3);
6523char *ctermid_r(char *);
6524void fcloseall(void);
6525int fdclose(FILE *, int *);
6526char *fgetln(FILE *, size_t *);
6527const char *fmtcheck(const char *, const char *) __format_arg(2);
6528int fpurge(FILE *);
6529void setbuffer(FILE *, char *, int);
6530int setlinebuf(FILE *);
6531int vasprintf(char **, const char *, __va_list)
6532 __printflike(2, 0);
6533
6534/*
6535 * The system error table contains messages for the first sys_nerr
6536 * positive errno values. Use strerror() or strerror_r() from <string.h>
6537 * instead.
6538 */
6539extern const int sys_nerr;
6540extern const char * const sys_errlist[];
6541
6542/*
6543 * Stdio function-access interface.
6544 */
6545FILE *funopen(const void *,
6546 int (*)(void *, char *, int),
6547 int (*)(void *, const char *, int),
6548 fpos_t (*)(void *, fpos_t, int),
6549 int (*)(void *));
6550#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
6551#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
6552
6553/*
6554 * Portability hacks. See <sys/types.h>.
6555 */
6556#ifndef _FTRUNCATE_DECLARED
6557#define _FTRUNCATE_DECLARED
6558int ftruncate(int, __off_t);
6559#endif
6560# 434 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6561#ifndef _LSEEK_DECLARED
6562#define _LSEEK_DECLARED
6563__off_t lseek(int, __off_t, int);
6564#endif
6565# 438 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6566#ifndef _MMAP_DECLARED
6567#define _MMAP_DECLARED
6568void *mmap(void *, size_t, int, int, int, __off_t);
6569#endif
6570# 442 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6571#ifndef _TRUNCATE_DECLARED
6572#define _TRUNCATE_DECLARED
6573int truncate(const char *, __off_t);
6574#endif
6575# 446 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6576#endif /* __BSD_VISIBLE */
6577# 447 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6578
6579/*
6580 * Functions internal to the implementation.
6581 */
6582int __srget(FILE *);
6583int __swbuf(int, FILE *);
6584
6585/*
6586 * The __sfoo macros are here so that we can
6587 * define function versions in the C library.
6588 */
6589#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
6590#if defined(__GNUC__) && defined(__STDC__)
6591static __inline int __sputc(int _c, FILE *_p) {
6592 if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
6593 return (*_p->_p++ = _c);
6594 else
6595 return (__swbuf(_c, _p));
6596}
6597#else
6598# 467 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6599/*
6600 * This has been tuned to generate reasonable code on the vax using pcc.
6601 */
6602#define __sputc(c, p) \
6603 (--(p)->_w < 0 ? \
6604 (p)->_w >= (p)->_lbfsize ? \
6605 (*(p)->_p = (c)), *(p)->_p != '\n' ? \
6606 (int)*(p)->_p++ : \
6607 __swbuf('\n', p) : \
6608 __swbuf((int)(c), p) : \
6609 (*(p)->_p = (c), (int)*(p)->_p++))
6610#endif
6611# 479 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6612
6613extern int __isthreaded;
6614
6615#ifndef __cplusplus
6616
6617#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
6618#define __sferror(p) (((p)->_flags & __SERR) != 0)
6619#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
6620#define __sfileno(p) ((p)->_file)
6621
6622
6623#define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p))
6624#define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p))
6625#define clearerr(p) (!__isthreaded ? __sclearerr(p) : (clearerr)(p))
6626
6627#if __POSIX_VISIBLE
6628#define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p))
6629#endif
6630# 497 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6631
6632#define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp))
6633#define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp))
6634
6635#define getchar() getc(stdin)
6636#define putchar(x) putc(x, stdout)
6637
6638#if __BSD_VISIBLE
6639/*
6640 * See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12
6641 * B.8.2.7 for the rationale behind the *_unlocked() macros.
6642 */
6643#define feof_unlocked(p) __sfeof(p)
6644#define ferror_unlocked(p) __sferror(p)
6645#define clearerr_unlocked(p) __sclearerr(p)
6646#define fileno_unlocked(p) __sfileno(p)
6647#endif
6648# 514 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6649#if __POSIX_VISIBLE >= 199506
6650#define getc_unlocked(fp) __sgetc(fp)
6651#define putc_unlocked(x, fp) __sputc(x, fp)
6652
6653#define getchar_unlocked() getc_unlocked(stdin)
6654#define putchar_unlocked(x) putc_unlocked(x, stdout)
6655#endif
6656# 521 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6657#endif /* __cplusplus */
6658# 522 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6659
6660__END_DECLS
6661#endif /* !_STDIO_H_ */
6662# 525 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdio.h" 3 4
6663# 46 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
6664#if 0 /* expanded by -frewrite-includes */
6665#include <stdlib.h>
6666#endif /* expanded by -frewrite-includes */
6667# 46 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
6668# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 1 3 4
6669/*-
6670 * Copyright (c) 1990, 1993
6671 * The Regents of the University of California. All rights reserved.
6672 *
6673 * Redistribution and use in source and binary forms, with or without
6674 * modification, are permitted provided that the following conditions
6675 * are met:
6676 * 1. Redistributions of source code must retain the above copyright
6677 * notice, this list of conditions and the following disclaimer.
6678 * 2. Redistributions in binary form must reproduce the above copyright
6679 * notice, this list of conditions and the following disclaimer in the
6680 * documentation and/or other materials provided with the distribution.
6681 * 3. Neither the name of the University nor the names of its contributors
6682 * may be used to endorse or promote products derived from this software
6683 * without specific prior written permission.
6684 *
6685 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
6686 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
6687 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
6688 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
6689 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
6690 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
6691 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
6692 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
6693 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
6694 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
6695 * SUCH DAMAGE.
6696 *
6697 * @(#)stdlib.h 8.5 (Berkeley) 5/19/95
6698 * $FreeBSD$
6699 */
6700
6701#ifndef _STDLIB_H_
6702#define _STDLIB_H_
6703
6704#if 0 /* expanded by -frewrite-includes */
6705#include <sys/cdefs.h>
6706#endif /* expanded by -frewrite-includes */
6707# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6708# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6709#if 0 /* expanded by -frewrite-includes */
6710#include <sys/_null.h>
6711#endif /* expanded by -frewrite-includes */
6712# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6713# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6714#if 0 /* expanded by -frewrite-includes */
6715#include <sys/_types.h>
6716#endif /* expanded by -frewrite-includes */
6717# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6718# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6719
6720#if __BSD_VISIBLE
6721#ifndef _RUNE_T_DECLARED
6722typedef __rune_t rune_t;
6723#define _RUNE_T_DECLARED
6724#endif
6725# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6726#endif
6727# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6728
6729#ifndef _SIZE_T_DECLARED
6730typedef __size_t size_t;
6731#define _SIZE_T_DECLARED
6732#endif
6733# 51 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6734
6735#ifndef __cplusplus
6736#ifndef _WCHAR_T_DECLARED
6737typedef ___wchar_t wchar_t;
6738#define _WCHAR_T_DECLARED
6739#endif
6740# 57 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6741#endif
6742# 58 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6743
6744typedef struct {
6745 int quot; /* quotient */
6746 int rem; /* remainder */
6747} div_t;
6748
6749typedef struct {
6750 long quot;
6751 long rem;
6752} ldiv_t;
6753
6754#define EXIT_FAILURE 1
6755#define EXIT_SUCCESS 0
6756
6757#define RAND_MAX 0x7ffffffd
6758
6759__BEGIN_DECLS
6760#ifdef _XLOCALE_H_
6761#if 0 /* expanded by -frewrite-includes */
6762#include <xlocale/_stdlib.h>
6763#endif /* expanded by -frewrite-includes */
6764# 76 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6765# 77 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6766#endif
6767# 78 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6768extern int __mb_cur_max;
6769extern int ___mb_cur_max(void);
6770#define MB_CUR_MAX (___mb_cur_max())
6771
6772_Noreturn void abort(void);
6773int abs(int) __pure2;
6774int atexit(void (*)(void));
6775double atof(const char *);
6776int atoi(const char *);
6777long atol(const char *);
6778void *bsearch(const void *, const void *, size_t,
6779 size_t, int (*)(const void *, const void *));
6780void *calloc(size_t, size_t) __malloc_like __result_use_check
6781 __alloc_size(1) __alloc_size(2);
6782div_t div(int, int) __pure2;
6783_Noreturn void exit(int);
6784void free(void *);
6785char *getenv(const char *);
6786long labs(long) __pure2;
6787ldiv_t ldiv(long, long) __pure2;
6788void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1);
6789int mblen(const char *, size_t);
6790size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t);
6791int mbtowc(wchar_t * __restrict, const char * __restrict, size_t);
6792void qsort(void *, size_t, size_t,
6793 int (*)(const void *, const void *));
6794int rand(void);
6795void *realloc(void *, size_t) __result_use_check __alloc_size(2);
6796void srand(unsigned);
6797double strtod(const char * __restrict, char ** __restrict);
6798float strtof(const char * __restrict, char ** __restrict);
6799long strtol(const char * __restrict, char ** __restrict, int);
6800long double
6801 strtold(const char * __restrict, char ** __restrict);
6802unsigned long
6803 strtoul(const char * __restrict, char ** __restrict, int);
6804int system(const char *);
6805int wctomb(char *, wchar_t);
6806size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t);
6807
6808/*
6809 * Functions added in C99 which we make conditionally available in the
6810 * BSD^C89 namespace if the compiler supports `long long'.
6811 * The #if test is more complicated than it ought to be because
6812 * __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long'
6813 * is not supported in the compilation environment (which therefore means
6814 * that it can't really be ISO C99).
6815 *
6816 * (The only other extension made by C99 in thie header is _Exit().)
6817 */
6818#if __ISO_C_VISIBLE >= 1999
6819#ifdef __LONG_LONG_SUPPORTED
6820/* LONGLONG */
6821typedef struct {
6822 long long quot;
6823 long long rem;
6824} lldiv_t;
6825
6826/* LONGLONG */
6827long long
6828 atoll(const char *);
6829/* LONGLONG */
6830long long
6831 llabs(long long) __pure2;
6832/* LONGLONG */
6833lldiv_t lldiv(long long, long long) __pure2;
6834/* LONGLONG */
6835long long
6836 strtoll(const char * __restrict, char ** __restrict, int);
6837/* LONGLONG */
6838unsigned long long
6839 strtoull(const char * __restrict, char ** __restrict, int);
6840#endif /* __LONG_LONG_SUPPORTED */
6841# 151 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6842
6843_Noreturn void _Exit(int);
6844#endif /* __ISO_C_VISIBLE >= 1999 */
6845# 154 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6846
6847/*
6848 * If we're in a mode greater than C99, expose C11 functions.
6849 */
6850#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
6851void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
6852 __alloc_size(2);
6853int at_quick_exit(void (*)(void));
6854_Noreturn void
6855 quick_exit(int);
6856#endif /* __ISO_C_VISIBLE >= 2011 */
6857# 165 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6858/*
6859 * Extensions made by POSIX relative to C.
6860 */
6861#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE
6862char *realpath(const char * __restrict, char * __restrict);
6863#endif
6864# 171 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6865#if __POSIX_VISIBLE >= 199506
6866int rand_r(unsigned *); /* (TSF) */
6867#endif
6868# 174 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6869#if __POSIX_VISIBLE >= 200112
6870int posix_memalign(void **, size_t, size_t) __nonnull(1) __alloc_align(2)
6871 __alloc_size(3); /* (ADV) */
6872int setenv(const char *, const char *, int);
6873int unsetenv(const char *);
6874#endif
6875# 180 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6876
6877#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE
6878int getsubopt(char **, char *const *, char **);
6879#ifndef _MKDTEMP_DECLARED
6880char *mkdtemp(char *);
6881#define _MKDTEMP_DECLARED
6882#endif
6883# 187 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6884#ifndef _MKSTEMP_DECLARED
6885int mkstemp(char *);
6886#define _MKSTEMP_DECLARED
6887#endif
6888# 191 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6889#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */
6890# 192 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6891
6892/*
6893 * The only changes to the XSI namespace in revision 6 were the deletion
6894 * of the ttyslot() and valloc() functions, which FreeBSD never declared
6895 * in this header. For revision 7, ecvt(), fcvt(), and gcvt(), which
6896 * FreeBSD also does not have, and mktemp(), are to be deleted.
6897 */
6898#if __XSI_VISIBLE
6899/* XXX XSI requires pollution from <sys/wait.h> here. We'd rather not. */
6900long a64l(const char *);
6901double drand48(void);
6902/* char *ecvt(double, int, int * __restrict, int * __restrict); */
6903double erand48(unsigned short[3]);
6904/* char *fcvt(double, int, int * __restrict, int * __restrict); */
6905/* char *gcvt(double, int, int * __restrict, int * __restrict); */
6906int grantpt(int);
6907char *initstate(unsigned long /* XSI requires u_int */, char *, long);
6908long jrand48(unsigned short[3]);
6909char *l64a(long);
6910void lcong48(unsigned short[7]);
6911long lrand48(void);
6912#if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600)
6913char *mktemp(char *);
6914#define _MKTEMP_DECLARED
6915#endif
6916# 217 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6917long mrand48(void);
6918long nrand48(unsigned short[3]);
6919int posix_openpt(int);
6920char *ptsname(int);
6921int putenv(char *);
6922long random(void);
6923unsigned short
6924 *seed48(unsigned short[3]);
6925#ifndef _SETKEY_DECLARED
6926int setkey(const char *);
6927#define _SETKEY_DECLARED
6928#endif
6929# 229 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6930char *setstate(/* const */ char *);
6931void srand48(long);
6932void srandom(unsigned long);
6933int unlockpt(int);
6934#endif /* __XSI_VISIBLE */
6935# 234 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6936
6937#if __BSD_VISIBLE
6938extern const char *malloc_conf;
6939extern void (*malloc_message)(void *, const char *);
6940
6941/*
6942 * The alloca() function can't be implemented in C, and on some
6943 * platforms it can't be implemented at all as a callable function.
6944 * The GNU C compiler provides a built-in alloca() which we can use;
6945 * in all other cases, provide a prototype, mainly to pacify various
6946 * incarnations of lint. On platforms where alloca() is not in libc,
6947 * programs which use it will fail to link when compiled with non-GNU
6948 * compilers.
6949 */
6950#if __GNUC__ >= 2 || defined(__INTEL_COMPILER)
6951#undef alloca /* some GNU bits try to get cute and define this on their own */
6952#define alloca(sz) __builtin_alloca(sz)
6953#elif defined(lint)
6954# 252 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6955void *alloca(size_t);
6956#endif
6957# 254 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6958
6959void abort2(const char *, int, void **) __dead2;
6960__uint32_t
6961 arc4random(void);
6962void arc4random_addrandom(unsigned char *, int);
6963void arc4random_buf(void *, size_t);
6964void arc4random_stir(void);
6965__uint32_t
6966 arc4random_uniform(__uint32_t);
6967#ifdef __BLOCKS__
6968int atexit_b(void (^)(void));
6969void *bsearch_b(const void *, const void *, size_t,
6970 size_t, int (^)(const void *, const void *));
6971#endif
6972# 268 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
6973char *getbsize(int *, long *);
6974 /* getcap(3) functions */
6975char *cgetcap(char *, const char *, int);
6976int cgetclose(void);
6977int cgetent(char **, char **, const char *);
6978int cgetfirst(char **, char **);
6979int cgetmatch(const char *, const char *);
6980int cgetnext(char **, char **);
6981int cgetnum(char *, const char *, long *);
6982int cgetset(const char *);
6983int cgetstr(char *, const char *, char **);
6984int cgetustr(char *, const char *, char **);
6985
6986int daemon(int, int);
6987char *devname(__dev_t, __mode_t);
6988char *devname_r(__dev_t, __mode_t, char *, int);
6989char *fdevname(int);
6990char *fdevname_r(int, char *, int);
6991int getloadavg(double [], int);
6992const char *
6993 getprogname(void);
6994
6995int heapsort(void *, size_t, size_t, int (*)(const void *, const void *));
6996#ifdef __BLOCKS__
6997int heapsort_b(void *, size_t, size_t, int (^)(const void *, const void *));
6998void qsort_b(void *, size_t, size_t,
6999 int (^)(const void *, const void *));
7000#endif
7001# 296 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
7002int l64a_r(long, char *, int);
7003int mergesort(void *, size_t, size_t, int (*)(const void *, const void *));
7004#ifdef __BLOCKS__
7005int mergesort_b(void *, size_t, size_t, int (^)(const void *, const void *));
7006#endif
7007# 301 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
7008int mkostemp(char *, int);
7009int mkostemps(char *, int, int);
7010void qsort_r(void *, size_t, size_t, void *,
7011 int (*)(void *, const void *, const void *));
7012int radixsort(const unsigned char **, int, const unsigned char *,
7013 unsigned);
7014void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2)
7015 __alloc_size(3);
7016void *reallocf(void *, size_t) __alloc_size(2);
7017int rpmatch(const char *);
7018void setprogname(const char *);
7019int sradixsort(const unsigned char **, int, const unsigned char *,
7020 unsigned);
7021void sranddev(void);
7022void srandomdev(void);
7023long long
7024 strtonum(const char *, long long, long long, const char **);
7025
7026/* Deprecated interfaces, to be removed in FreeBSD 6.0. */
7027__int64_t
7028 strtoq(const char *, char **, int);
7029__uint64_t
7030 strtouq(const char *, char **, int);
7031
7032#if __has_feature(capabilities)
7033long strtol_c(__capability const char * __restrict,
7034 __capability char ** __restrict, int);
7035long double
7036 strtold_c(__capability const char * __restrict,
7037 __capability char ** __restrict);
7038#endif
7039# 332 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
7040
7041extern char *suboptarg; /* getsubopt(3) external variable */
7042#endif /* __BSD_VISIBLE */
7043# 335 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
7044__END_DECLS
7045
7046#endif /* !_STDLIB_H_ */
7047# 338 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdlib.h" 3 4
7048# 47 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
7049#if 0 /* expanded by -frewrite-includes */
7050#include <string.h>
7051#endif /* expanded by -frewrite-includes */
7052# 47 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
7053# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 1 3 4
7054/*-
7055 * Copyright (c) 1990, 1993
7056 * The Regents of the University of California. All rights reserved.
7057 *
7058 * Redistribution and use in source and binary forms, with or without
7059 * modification, are permitted provided that the following conditions
7060 * are met:
7061 * 1. Redistributions of source code must retain the above copyright
7062 * notice, this list of conditions and the following disclaimer.
7063 * 2. Redistributions in binary form must reproduce the above copyright
7064 * notice, this list of conditions and the following disclaimer in the
7065 * documentation and/or other materials provided with the distribution.
7066 * 3. Neither the name of the University nor the names of its contributors
7067 * may be used to endorse or promote products derived from this software
7068 * without specific prior written permission.
7069 *
7070 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
7071 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7072 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7073 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
7074 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7075 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7076 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7077 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7078 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7079 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7080 * SUCH DAMAGE.
7081 *
7082 * @(#)string.h 8.1 (Berkeley) 6/2/93
7083 * $FreeBSD$
7084 */
7085
7086#ifndef _STRING_H_
7087#define _STRING_H_
7088
7089#if 0 /* expanded by -frewrite-includes */
7090#include <sys/cdefs.h>
7091#endif /* expanded by -frewrite-includes */
7092# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7093# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7094#if 0 /* expanded by -frewrite-includes */
7095#include <sys/_null.h>
7096#endif /* expanded by -frewrite-includes */
7097# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7098# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7099#if 0 /* expanded by -frewrite-includes */
7100#include <sys/_types.h>
7101#endif /* expanded by -frewrite-includes */
7102# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7103# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7104
7105/*
7106 * Prototype functions which were historically defined in <string.h>, but
7107 * are required by POSIX to be prototyped in <strings.h>.
7108 */
7109#if __BSD_VISIBLE
7110#if 0 /* expanded by -frewrite-includes */
7111#include <strings.h>
7112#endif /* expanded by -frewrite-includes */
7113# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7114# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 1 3 4
7115/*-
7116 * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
7117 * All rights reserved.
7118 *
7119 * Redistribution and use in source and binary forms, with or without
7120 * modification, are permitted provided that the following conditions
7121 * are met:
7122 * 1. Redistributions of source code must retain the above copyright
7123 * notice, this list of conditions and the following disclaimer.
7124 * 2. Redistributions in binary form must reproduce the above copyright
7125 * notice, this list of conditions and the following disclaimer in the
7126 * documentation and/or other materials provided with the distribution.
7127 *
7128 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
7129 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7130 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7131 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
7132 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7133 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7134 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7135 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7136 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7137 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7138 * SUCH DAMAGE.
7139 *
7140 * $FreeBSD$
7141 */
7142
7143#ifndef _STRINGS_H_
7144#define _STRINGS_H_
7145
7146#if 0 /* expanded by -frewrite-includes */
7147#include <sys/cdefs.h>
7148#endif /* expanded by -frewrite-includes */
7149# 32 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7150# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7151#if 0 /* expanded by -frewrite-includes */
7152#include <sys/_types.h>
7153#endif /* expanded by -frewrite-includes */
7154# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7155# 34 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7156
7157#ifndef _SIZE_T_DECLARED
7158typedef __size_t size_t;
7159#define _SIZE_T_DECLARED
7160#endif
7161# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7162
7163__BEGIN_DECLS
7164#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
7165int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */
7166void bcopy(const void *, void *, size_t); /* LEGACY */
7167void bzero(void *, size_t); /* LEGACY */
7168#endif
7169# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7170#if __BSD_VISIBLE
7171void explicit_bzero(void *, size_t);
7172#endif
7173# 49 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7174#if __XSI_VISIBLE
7175int ffs(int) __pure2;
7176#endif
7177# 52 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7178#if __BSD_VISIBLE
7179int ffsl(long) __pure2;
7180int ffsll(long long) __pure2;
7181int fls(int) __pure2;
7182int flsl(long) __pure2;
7183int flsll(long long) __pure2;
7184#endif
7185# 59 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7186#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
7187char *index(const char *, int) __pure; /* LEGACY */
7188char *rindex(const char *, int) __pure; /* LEGACY */
7189#endif
7190# 63 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7191int strcasecmp(const char *, const char *) __pure;
7192int strncasecmp(const char *, const char *, size_t) __pure;
7193
7194#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
7195#if 0 /* expanded by -frewrite-includes */
7196#include <xlocale/_strings.h>
7197#endif /* expanded by -frewrite-includes */
7198# 67 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7199# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_strings.h" 1 3 4
7200/*-
7201 * Copyright (c) 2011, 2012 The FreeBSD Foundation
7202 * All rights reserved.
7203 *
7204 * Redistribution and use in source and binary forms, with or without
7205 * modification, are permitted provided that the following conditions
7206 * are met:
7207 * 1. Redistributions of source code must retain the above copyright
7208 * notice, this list of conditions and the following disclaimer.
7209 * 2. Redistributions in binary form must reproduce the above copyright
7210 * notice, this list of conditions and the following disclaimer in the
7211 * documentation and/or other materials provided with the distribution.
7212 *
7213 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
7214 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7215 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7216 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
7217 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7218 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7219 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7220 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7221 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7222 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7223 * SUCH DAMAGE.
7224 *
7225 * $FreeBSD$
7226 */
7227
7228#ifndef _LOCALE_T_DEFINED
7229#define _LOCALE_T_DEFINED
7230typedef struct _xlocale *locale_t;
7231#endif
7232# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_strings.h" 3 4
7233
7234/*
7235 * This file is included from both strings.h and xlocale.h. We need to expose
7236 * the declarations unconditionally if we are included from xlocale.h, but only
7237 * if we are in POSIX2008 mode if included from string.h.
7238 */
7239
7240#ifndef _XLOCALE_STRINGS1_H
7241#define _XLOCALE_STRINGS1_H
7242
7243/*
7244 * POSIX2008 functions
7245 */
7246int strcasecmp_l(const char *, const char *, locale_t);
7247int strncasecmp_l(const char *, const char *, size_t, locale_t);
7248#endif /* _XLOCALE_STRINGS1_H */
7249# 49 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_strings.h" 3 4
7250# 68 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 2 3 4
7251#endif
7252# 69 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7253__END_DECLS
7254
7255#endif /* _STRINGS_H_ */
7256# 72 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/strings.h" 3 4
7257# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 2 3 4
7258#endif
7259# 47 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7260
7261#ifndef _SIZE_T_DECLARED
7262typedef __size_t size_t;
7263#define _SIZE_T_DECLARED
7264#endif
7265# 52 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7266
7267__BEGIN_DECLS
7268#if __XSI_VISIBLE >= 600
7269void *memccpy(void * __restrict, const void * __restrict, int, size_t);
7270#endif
7271# 57 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7272void *memchr(const void *, int, size_t) __pure;
7273#if __BSD_VISIBLE
7274void *memrchr(const void *, int, size_t) __pure;
7275#endif
7276# 61 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7277int memcmp(const void *, const void *, size_t) __pure;
7278void *memcpy(void * __restrict, const void * __restrict, size_t);
7279#if __BSD_VISIBLE
7280void *memmem(const void *, size_t, const void *, size_t) __pure;
7281#endif
7282# 66 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7283void *memmove(void *, const void *, size_t);
7284void *memset(void *, int, size_t);
7285#if __POSIX_VISIBLE >= 200809
7286char *stpcpy(char * __restrict, const char * __restrict);
7287char *stpncpy(char * __restrict, const char * __restrict, size_t);
7288#endif
7289# 72 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7290#if __BSD_VISIBLE
7291char *strcasestr(const char *, const char *) __pure;
7292#endif
7293# 75 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7294char *strcat(char * __restrict, const char * __restrict);
7295char *strchr(const char *, int) __pure;
7296#if __BSD_VISIBLE
7297char *strchrnul(const char*, int) __pure;
7298#endif
7299# 80 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7300int strcmp(const char *, const char *) __pure;
7301int strcoll(const char *, const char *);
7302char *strcpy(char * __restrict, const char * __restrict);
7303size_t strcspn(const char *, const char *) __pure;
7304#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
7305char *strdup(const char *) __malloc_like;
7306#endif
7307# 87 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7308char *strerror(int);
7309#if __POSIX_VISIBLE >= 200112
7310int strerror_r(int, char *, size_t);
7311#endif
7312# 91 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7313#if __BSD_VISIBLE
7314size_t strlcat(char * __restrict, const char * __restrict, size_t);
7315size_t strlcpy(char * __restrict, const char * __restrict, size_t);
7316#endif
7317# 95 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7318size_t strlen(const char *) __pure;
7319#if __BSD_VISIBLE
7320void strmode(int, char *);
7321#endif
7322# 99 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7323char *strncat(char * __restrict, const char * __restrict, size_t);
7324int strncmp(const char *, const char *, size_t) __pure;
7325char *strncpy(char * __restrict, const char * __restrict, size_t);
7326#if __POSIX_VISIBLE >= 200809
7327char *strndup(const char *, size_t) __malloc_like;
7328size_t strnlen(const char *, size_t) __pure;
7329#endif
7330# 106 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7331#if __BSD_VISIBLE
7332char *strnstr(const char *, const char *, size_t) __pure;
7333#endif
7334# 109 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7335char *strpbrk(const char *, const char *) __pure;
7336char *strrchr(const char *, int) __pure;
7337#if __BSD_VISIBLE
7338char *strsep(char **, const char *);
7339#endif
7340# 114 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7341#if __POSIX_VISIBLE >= 200809
7342char *strsignal(int);
7343#endif
7344# 117 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7345size_t strspn(const char *, const char *) __pure;
7346char *strstr(const char *, const char *) __pure;
7347char *strtok(char * __restrict, const char * __restrict);
7348#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500
7349char *strtok_r(char *, const char *, char **);
7350#endif
7351# 123 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7352size_t strxfrm(char * __restrict, const char * __restrict, size_t);
7353#if __BSD_VISIBLE
7354
7355#ifndef _SWAB_DECLARED
7356#define _SWAB_DECLARED
7357
7358#ifndef _SSIZE_T_DECLARED
7359typedef __ssize_t ssize_t;
7360#define _SSIZE_T_DECLARED
7361#endif /* _SIZE_T_DECLARED */
7362# 133 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7363
7364void swab(const void * __restrict, void * __restrict, ssize_t);
7365#endif /* _SWAB_DECLARED */
7366# 136 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7367
7368#if __has_feature(capabilities)
7369__capability const void *
7370 memchr_c_const(__capability const void *, int, size_t) __pure;
7371__capability void
7372 *memchr_c(__capability const void *, int, size_t) __pure;
7373int memcmp_c(__capability const void *, __capability const void *, size_t)
7374 __pure;
7375__capability void
7376 *memcpy_c(__capability void * __restrict,
7377 __capability const void * __restrict, size_t);
7378void *memcpy_c_fromcap(void * __restrict,
7379 __capability const void * __restrict, size_t);
7380__capability void
7381 *memcpy_c_tocap(__capability void * __restrict,
7382 const void * __restrict, size_t);
7383__capability void
7384 *memmove_c(__capability void * __restrict,
7385 __capability const void * __restrict, size_t);
7386__capability void
7387 *memset_c(__capability void *, int, size_t);
7388
7389__capability char
7390 *strchr_c(__capability const char *, int) __pure;
7391int strcmp_c(__capability const char *,
7392 __capability const char *s2) __pure;
7393__capability char
7394 *strcpy_c(__capability char * __restrict,
7395 __capability const char * __restrict);
7396int strncmp_c(__capability const char *, __capability const char *,
7397 size_t) __pure;
7398__capability char
7399*strncpy_c(__capability char * __restrict, __capability const char * __restrict,
7400 size_t);
7401char *strncpy_c_fromcap(char * __restrict,
7402 __capability const char * __restrict, size_t);
7403__capability char
7404 *strncpy_c_tocap(__capability char * __restrict,
7405 const char * __restrict, size_t);
7406size_t strnlen_c(__capability const char *, size_t) __pure;
7407#endif
7408# 177 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7409
7410#endif /* __BSD_VISIBLE */
7411# 179 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7412
7413#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
7414#if 0 /* expanded by -frewrite-includes */
7415#include <xlocale/_string.h>
7416#endif /* expanded by -frewrite-includes */
7417# 181 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7418# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_string.h" 1 3 4
7419/*-
7420 * Copyright (c) 2011, 2012 The FreeBSD Foundation
7421 * All rights reserved.
7422 *
7423 * Redistribution and use in source and binary forms, with or without
7424 * modification, are permitted provided that the following conditions
7425 * are met:
7426 * 1. Redistributions of source code must retain the above copyright
7427 * notice, this list of conditions and the following disclaimer.
7428 * 2. Redistributions in binary form must reproduce the above copyright
7429 * notice, this list of conditions and the following disclaimer in the
7430 * documentation and/or other materials provided with the distribution.
7431 *
7432 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
7433 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7434 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7435 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
7436 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7437 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7438 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7439 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7440 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7441 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7442 * SUCH DAMAGE.
7443 *
7444 * $FreeBSD$
7445 */
7446
7447#ifndef _LOCALE_T_DEFINED
7448#define _LOCALE_T_DEFINED
7449typedef struct _xlocale *locale_t;
7450#endif
7451# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_string.h" 3 4
7452
7453/*
7454 * This file is included from both string.h and xlocale.h. We need to expose
7455 * the declarations unconditionally if we are included from xlocale.h, but only
7456 * if we are in POSIX2008 mode if included from string.h.
7457 */
7458
7459#ifndef _XLOCALE_STRING1_H
7460#define _XLOCALE_STRING1_H
7461
7462/*
7463 * POSIX2008 functions
7464 */
7465int strcoll_l(const char *, const char *, locale_t);
7466size_t strxfrm_l(char *, const char *, size_t, locale_t);
7467#endif /* _XLOCALE_STRING1_H */
7468# 49 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_string.h" 3 4
7469
7470/*
7471 * xlocale extensions
7472 */
7473#ifdef _XLOCALE_H_
7474#ifndef _XLOCALE_STRING2_H
7475#define _XLOCALE_STRING2_H
7476char *strcasestr_l(const char *, const char *, locale_t);
7477
7478#endif /* _XLOCALE_STRING2_H */
7479# 59 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_string.h" 3 4
7480#endif /* _XLOCALE_H_ */
7481# 60 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_string.h" 3 4
7482# 182 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 2 3 4
7483#endif
7484# 183 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7485__END_DECLS
7486
7487#endif /* _STRING_H_ */
7488# 186 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/string.h" 3 4
7489# 48 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
7490#if 0 /* expanded by -frewrite-includes */
7491#include <errno.h>
7492#endif /* expanded by -frewrite-includes */
7493# 48 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
7494# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 1 3 4
7495/*-
7496 * Copyright (c) 1982, 1986, 1989, 1993
7497 * The Regents of the University of California. All rights reserved.
7498 * (c) UNIX System Laboratories, Inc.
7499 * All or some portions of this file are derived from material licensed
7500 * to the University of California by American Telephone and Telegraph
7501 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
7502 * the permission of UNIX System Laboratories, Inc.
7503 *
7504 * Redistribution and use in source and binary forms, with or without
7505 * modification, are permitted provided that the following conditions
7506 * are met:
7507 * 1. Redistributions of source code must retain the above copyright
7508 * notice, this list of conditions and the following disclaimer.
7509 * 2. Redistributions in binary form must reproduce the above copyright
7510 * notice, this list of conditions and the following disclaimer in the
7511 * documentation and/or other materials provided with the distribution.
7512 * 4. Neither the name of the University nor the names of its contributors
7513 * may be used to endorse or promote products derived from this software
7514 * without specific prior written permission.
7515 *
7516 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
7517 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7518 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7519 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
7520 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7521 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7522 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7523 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7524 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7525 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7526 * SUCH DAMAGE.
7527 *
7528 * @(#)errno.h 8.5 (Berkeley) 1/21/94
7529 * $FreeBSD$
7530 */
7531
7532#ifndef _SYS_ERRNO_H_
7533#define _SYS_ERRNO_H_
7534
7535#ifndef _KERNEL
7536#if 0 /* expanded by -frewrite-includes */
7537#include <sys/cdefs.h>
7538#endif /* expanded by -frewrite-includes */
7539# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7540# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7541__BEGIN_DECLS
7542int * __error(void);
7543__END_DECLS
7544#define errno (* __error())
7545#endif
7546# 48 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7547
7548#define EPERM 1 /* Operation not permitted */
7549#define ENOENT 2 /* No such file or directory */
7550#define ESRCH 3 /* No such process */
7551#define EINTR 4 /* Interrupted system call */
7552#define EIO 5 /* Input/output error */
7553#define ENXIO 6 /* Device not configured */
7554#define E2BIG 7 /* Argument list too long */
7555#define ENOEXEC 8 /* Exec format error */
7556#define EBADF 9 /* Bad file descriptor */
7557#define ECHILD 10 /* No child processes */
7558#define EDEADLK 11 /* Resource deadlock avoided */
7559 /* 11 was EAGAIN */
7560#define ENOMEM 12 /* Cannot allocate memory */
7561#define EACCES 13 /* Permission denied */
7562#define EFAULT 14 /* Bad address */
7563#ifndef _POSIX_SOURCE
7564#define ENOTBLK 15 /* Block device required */
7565#endif
7566# 67 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7567#define EBUSY 16 /* Device busy */
7568#define EEXIST 17 /* File exists */
7569#define EXDEV 18 /* Cross-device link */
7570#define ENODEV 19 /* Operation not supported by device */
7571#define ENOTDIR 20 /* Not a directory */
7572#define EISDIR 21 /* Is a directory */
7573#define EINVAL 22 /* Invalid argument */
7574#define ENFILE 23 /* Too many open files in system */
7575#define EMFILE 24 /* Too many open files */
7576#define ENOTTY 25 /* Inappropriate ioctl for device */
7577#ifndef _POSIX_SOURCE
7578#define ETXTBSY 26 /* Text file busy */
7579#endif
7580# 80 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7581#define EFBIG 27 /* File too large */
7582#define ENOSPC 28 /* No space left on device */
7583#define ESPIPE 29 /* Illegal seek */
7584#define EROFS 30 /* Read-only filesystem */
7585#define EMLINK 31 /* Too many links */
7586#define EPIPE 32 /* Broken pipe */
7587
7588/* math software */
7589#define EDOM 33 /* Numerical argument out of domain */
7590#define ERANGE 34 /* Result too large */
7591
7592/* non-blocking and interrupt i/o */
7593#define EAGAIN 35 /* Resource temporarily unavailable */
7594#ifndef _POSIX_SOURCE
7595#define EWOULDBLOCK EAGAIN /* Operation would block */
7596#define EINPROGRESS 36 /* Operation now in progress */
7597#define EALREADY 37 /* Operation already in progress */
7598
7599/* ipc/network software -- argument errors */
7600#define ENOTSOCK 38 /* Socket operation on non-socket */
7601#define EDESTADDRREQ 39 /* Destination address required */
7602#define EMSGSIZE 40 /* Message too long */
7603#define EPROTOTYPE 41 /* Protocol wrong type for socket */
7604#define ENOPROTOOPT 42 /* Protocol not available */
7605#define EPROTONOSUPPORT 43 /* Protocol not supported */
7606#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
7607#define EOPNOTSUPP 45 /* Operation not supported */
7608#define ENOTSUP EOPNOTSUPP /* Operation not supported */
7609#define EPFNOSUPPORT 46 /* Protocol family not supported */
7610#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
7611#define EADDRINUSE 48 /* Address already in use */
7612#define EADDRNOTAVAIL 49 /* Can't assign requested address */
7613
7614/* ipc/network software -- operational errors */
7615#define ENETDOWN 50 /* Network is down */
7616#define ENETUNREACH 51 /* Network is unreachable */
7617#define ENETRESET 52 /* Network dropped connection on reset */
7618#define ECONNABORTED 53 /* Software caused connection abort */
7619#define ECONNRESET 54 /* Connection reset by peer */
7620#define ENOBUFS 55 /* No buffer space available */
7621#define EISCONN 56 /* Socket is already connected */
7622#define ENOTCONN 57 /* Socket is not connected */
7623#define ESHUTDOWN 58 /* Can't send after socket shutdown */
7624#define ETOOMANYREFS 59 /* Too many references: can't splice */
7625#define ETIMEDOUT 60 /* Operation timed out */
7626#define ECONNREFUSED 61 /* Connection refused */
7627
7628#define ELOOP 62 /* Too many levels of symbolic links */
7629#endif /* _POSIX_SOURCE */
7630# 129 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7631#define ENAMETOOLONG 63 /* File name too long */
7632
7633/* should be rearranged */
7634#ifndef _POSIX_SOURCE
7635#define EHOSTDOWN 64 /* Host is down */
7636#define EHOSTUNREACH 65 /* No route to host */
7637#endif /* _POSIX_SOURCE */
7638# 136 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7639#define ENOTEMPTY 66 /* Directory not empty */
7640
7641/* quotas & mush */
7642#ifndef _POSIX_SOURCE
7643#define EPROCLIM 67 /* Too many processes */
7644#define EUSERS 68 /* Too many users */
7645#define EDQUOT 69 /* Disc quota exceeded */
7646
7647/* Network File System */
7648#define ESTALE 70 /* Stale NFS file handle */
7649#define EREMOTE 71 /* Too many levels of remote in path */
7650#define EBADRPC 72 /* RPC struct is bad */
7651#define ERPCMISMATCH 73 /* RPC version wrong */
7652#define EPROGUNAVAIL 74 /* RPC prog. not avail */
7653#define EPROGMISMATCH 75 /* Program version wrong */
7654#define EPROCUNAVAIL 76 /* Bad procedure for program */
7655#endif /* _POSIX_SOURCE */
7656# 153 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7657
7658#define ENOLCK 77 /* No locks available */
7659#define ENOSYS 78 /* Function not implemented */
7660
7661#ifndef _POSIX_SOURCE
7662#define EFTYPE 79 /* Inappropriate file type or format */
7663#define EAUTH 80 /* Authentication error */
7664#define ENEEDAUTH 81 /* Need authenticator */
7665#define EIDRM 82 /* Identifier removed */
7666#define ENOMSG 83 /* No message of desired type */
7667#define EOVERFLOW 84 /* Value too large to be stored in data type */
7668#define ECANCELED 85 /* Operation canceled */
7669#define EILSEQ 86 /* Illegal byte sequence */
7670#define ENOATTR 87 /* Attribute not found */
7671
7672#define EDOOFUS 88 /* Programming error */
7673#endif /* _POSIX_SOURCE */
7674# 170 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7675
7676#define EBADMSG 89 /* Bad message */
7677#define EMULTIHOP 90 /* Multihop attempted */
7678#define ENOLINK 91 /* Link has been severed */
7679#define EPROTO 92 /* Protocol error */
7680
7681#ifndef _POSIX_SOURCE
7682#define ENOTCAPABLE 93 /* Capabilities insufficient */
7683#define ECAPMODE 94 /* Not permitted in capability mode */
7684#define ENOTRECOVERABLE 95 /* State not recoverable */
7685#define EOWNERDEAD 96 /* Previous owner died */
7686#define EPROT 97 /* Memory protection violation */
7687#define ENOMETHOD 98 /* Undefined object-capability method */
7688#endif /* _POSIX_SOURCE */
7689# 184 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7690
7691#ifndef _POSIX_SOURCE
7692#define ELAST 98 /* Must be equal largest errno */
7693#endif /* _POSIX_SOURCE */
7694# 188 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7695
7696#ifdef _KERNEL
7697/* pseudo-errors returned inside kernel to modify return to process */
7698#define ERESTART (-1) /* restart syscall */
7699#define EJUSTRETURN (-2) /* don't modify regs, just return */
7700#define ENOIOCTL (-3) /* ioctl not handled by this layer */
7701#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */
7702#endif
7703# 196 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7704
7705#endif
7706# 198 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/errno.h" 3 4
7707# 49 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
7708#if 0 /* expanded by -frewrite-includes */
7709#include <limits.h>
7710#endif /* expanded by -frewrite-includes */
7711# 49 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
7712# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 1 3 4
7713/*-
7714 * Copyright (c) 1988, 1993
7715 * The Regents of the University of California. All rights reserved.
7716 *
7717 * Redistribution and use in source and binary forms, with or without
7718 * modification, are permitted provided that the following conditions
7719 * are met:
7720 * 1. Redistributions of source code must retain the above copyright
7721 * notice, this list of conditions and the following disclaimer.
7722 * 2. Redistributions in binary form must reproduce the above copyright
7723 * notice, this list of conditions and the following disclaimer in the
7724 * documentation and/or other materials provided with the distribution.
7725 * 3. Neither the name of the University nor the names of its contributors
7726 * may be used to endorse or promote products derived from this software
7727 * without specific prior written permission.
7728 *
7729 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
7730 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7731 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7732 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
7733 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7734 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7735 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7736 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7737 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7738 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7739 * SUCH DAMAGE.
7740 *
7741 * @(#)limits.h 8.2 (Berkeley) 1/4/94
7742 * $FreeBSD$
7743 */
7744
7745#ifndef _LIMITS_H_
7746#define _LIMITS_H_
7747
7748#if 0 /* expanded by -frewrite-includes */
7749#include <sys/cdefs.h>
7750#endif /* expanded by -frewrite-includes */
7751# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7752# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7753
7754#if __POSIX_VISIBLE
7755#define _POSIX_ARG_MAX 4096
7756#define _POSIX_LINK_MAX 8
7757#define _POSIX_MAX_CANON 255
7758#define _POSIX_MAX_INPUT 255
7759#define _POSIX_NAME_MAX 14
7760#define _POSIX_PIPE_BUF 512
7761#define _POSIX_SSIZE_MAX 32767
7762#define _POSIX_STREAM_MAX 8
7763
7764#if __POSIX_VISIBLE >= 200112
7765#define _POSIX_CHILD_MAX 25
7766#define _POSIX_NGROUPS_MAX 8
7767#define _POSIX_OPEN_MAX 20
7768#define _POSIX_PATH_MAX 256
7769#define _POSIX_TZNAME_MAX 6
7770#else
7771# 55 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7772#define _POSIX_CHILD_MAX 6
7773#define _POSIX_NGROUPS_MAX 0
7774#define _POSIX_OPEN_MAX 16
7775#define _POSIX_PATH_MAX 255
7776#define _POSIX_TZNAME_MAX 3
7777#endif
7778# 61 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7779
7780#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */
7781#define BC_DIM_MAX 2048 /* max array elements in bc(1) */
7782#define BC_SCALE_MAX 99 /* max scale value in bc(1) */
7783#define BC_STRING_MAX 1000 /* max const string length in bc(1) */
7784#define COLL_WEIGHTS_MAX 0 /* max weights for order keyword */
7785#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */
7786#define LINE_MAX 2048 /* max bytes in an input line */
7787#define RE_DUP_MAX 255 /* max RE's in interval notation */
7788
7789#define _POSIX2_BC_BASE_MAX 99
7790#define _POSIX2_BC_DIM_MAX 2048
7791#define _POSIX2_BC_SCALE_MAX 99
7792#define _POSIX2_BC_STRING_MAX 1000
7793#define _POSIX2_EQUIV_CLASS_MAX 2
7794#define _POSIX2_EXPR_NEST_MAX 32
7795#define _POSIX2_LINE_MAX 2048
7796#define _POSIX2_RE_DUP_MAX 255
7797#endif
7798# 80 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7799
7800#if __POSIX_VISIBLE >= 199309
7801#define _POSIX_AIO_LISTIO_MAX 2
7802#define _POSIX_AIO_MAX 1
7803#define _POSIX_DELAYTIMER_MAX 32
7804#define _POSIX_MQ_OPEN_MAX 8
7805#define _POSIX_MQ_PRIO_MAX 32
7806#define _POSIX_RTSIG_MAX 8
7807#define _POSIX_SEM_NSEMS_MAX 256
7808#define _POSIX_SEM_VALUE_MAX 32767
7809#define _POSIX_SIGQUEUE_MAX 32
7810#define _POSIX_TIMER_MAX 32
7811
7812#define _POSIX_CLOCKRES_MIN 20000000
7813#endif
7814# 95 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7815
7816#if __POSIX_VISIBLE >= 199506
7817#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
7818#define _POSIX_THREAD_KEYS_MAX 128
7819#define _POSIX_THREAD_THREADS_MAX 64
7820#endif
7821# 101 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7822
7823#if __POSIX_VISIBLE >= 200112
7824#define _POSIX_HOST_NAME_MAX 255
7825#define _POSIX_LOGIN_NAME_MAX 9
7826#define _POSIX_SS_REPL_MAX 4
7827#define _POSIX_SYMLINK_MAX 255
7828#define _POSIX_SYMLOOP_MAX 8
7829#define _POSIX_TRACE_EVENT_NAME_MAX 30
7830#define _POSIX_TRACE_NAME_MAX 8
7831#define _POSIX_TRACE_SYS_MAX 8
7832#define _POSIX_TRACE_USER_EVENT_MAX 32
7833#define _POSIX_TTY_NAME_MAX 9
7834#define _POSIX2_CHARCLASS_NAME_MAX 14
7835#define _POSIX2_COLL_WEIGHTS_MAX 2
7836
7837#define _POSIX_RE_DUP_MAX _POSIX2_RE_DUP_MAX
7838#endif
7839# 118 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7840
7841#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
7842#define NL_ARGMAX 99 /* max # of position args for printf */
7843#define NL_MSGMAX 32767
7844#define NL_SETMAX 255
7845#define NL_TEXTMAX 2048
7846#endif
7847# 125 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7848
7849#if __XSI_VISIBLE
7850#define _XOPEN_IOV_MAX 16
7851#define _XOPEN_NAME_MAX 255
7852#define _XOPEN_PATH_MAX 1024
7853#define PASS_MAX 128 /* _PASSWORD_LEN from <pwd.h> */
7854
7855#define NL_LANGMAX 31 /* max LANG name length */
7856#define NL_NMAX 1
7857#endif
7858# 135 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7859
7860#define MB_LEN_MAX 6 /* 31-bit UTF-8 */
7861
7862#if 0 /* expanded by -frewrite-includes */
7863#include <sys/limits.h>
7864#endif /* expanded by -frewrite-includes */
7865# 138 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7866# 139 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7867
7868#if __POSIX_VISIBLE
7869#if 0 /* expanded by -frewrite-includes */
7870#include <sys/syslimits.h>
7871#endif /* expanded by -frewrite-includes */
7872# 141 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7873# 142 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7874#endif
7875# 143 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7876
7877#endif /* !_LIMITS_H_ */
7878# 145 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/limits.h" 3 4
7879# 50 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
7880
7881#ifdef HAVE_UNISTD_H
7882#if 0 /* expanded by -frewrite-includes */
7883#include <unistd.h>
7884#endif /* expanded by -frewrite-includes */
7885# 52 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
7886# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 1 3 4
7887/*-
7888 * Copyright (c) 1991, 1993, 1994
7889 * The Regents of the University of California. All rights reserved.
7890 *
7891 * Redistribution and use in source and binary forms, with or without
7892 * modification, are permitted provided that the following conditions
7893 * are met:
7894 * 1. Redistributions of source code must retain the above copyright
7895 * notice, this list of conditions and the following disclaimer.
7896 * 2. Redistributions in binary form must reproduce the above copyright
7897 * notice, this list of conditions and the following disclaimer in the
7898 * documentation and/or other materials provided with the distribution.
7899 * 3. Neither the name of the University nor the names of its contributors
7900 * may be used to endorse or promote products derived from this software
7901 * without specific prior written permission.
7902 *
7903 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
7904 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7905 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7906 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
7907 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7908 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7909 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7910 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7911 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7912 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7913 * SUCH DAMAGE.
7914 *
7915 * @(#)unistd.h 8.12 (Berkeley) 4/27/95
7916 * $FreeBSD$
7917 */
7918
7919#ifndef _UNISTD_H_
7920#define _UNISTD_H_
7921
7922#if 0 /* expanded by -frewrite-includes */
7923#include <sys/cdefs.h>
7924#endif /* expanded by -frewrite-includes */
7925# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
7926# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
7927#if 0 /* expanded by -frewrite-includes */
7928#include <sys/types.h> /* XXX adds too much pollution. */
7929#endif /* expanded by -frewrite-includes */
7930# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
7931# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
7932#if 0 /* expanded by -frewrite-includes */
7933#include <sys/unistd.h>
7934#endif /* expanded by -frewrite-includes */
7935# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
7936# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 1 3 4
7937/*-
7938 * Copyright (c) 1989, 1993
7939 * The Regents of the University of California. All rights reserved.
7940 *
7941 * Redistribution and use in source and binary forms, with or without
7942 * modification, are permitted provided that the following conditions
7943 * are met:
7944 * 1. Redistributions of source code must retain the above copyright
7945 * notice, this list of conditions and the following disclaimer.
7946 * 2. Redistributions in binary form must reproduce the above copyright
7947 * notice, this list of conditions and the following disclaimer in the
7948 * documentation and/or other materials provided with the distribution.
7949 * 4. Neither the name of the University nor the names of its contributors
7950 * may be used to endorse or promote products derived from this software
7951 * without specific prior written permission.
7952 *
7953 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
7954 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7955 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7956 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
7957 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7958 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
7959 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
7960 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
7961 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
7962 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7963 * SUCH DAMAGE.
7964 *
7965 * @(#)unistd.h 8.2 (Berkeley) 1/7/94
7966 * $FreeBSD$
7967 */
7968
7969#ifndef _SYS_UNISTD_H_
7970#define _SYS_UNISTD_H_
7971
7972#if 0 /* expanded by -frewrite-includes */
7973#include <sys/cdefs.h>
7974#endif /* expanded by -frewrite-includes */
7975# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
7976# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
7977
7978/*
7979 * POSIX options and option groups we unconditionally do or don't
7980 * implement. Those options which are implemented (or not) entirely
7981 * in user mode are defined in <unistd.h>. Please keep this list in
7982 * alphabetical order.
7983 *
7984 * Anything which is defined as zero below **must** have an
7985 * implementation for the corresponding sysconf() which is able to
7986 * determine conclusively whether or not the feature is supported.
7987 * Anything which is defined as other than -1 below **must** have
7988 * complete headers, types, and function declarations as specified by
7989 * the POSIX standard; however, if the relevant sysconf() function
7990 * returns -1, the functions may be stubbed out.
7991 */
7992#define _POSIX_ADVISORY_INFO 200112L
7993#define _POSIX_ASYNCHRONOUS_IO 0
7994#define _POSIX_CHOWN_RESTRICTED 1
7995#define _POSIX_CLOCK_SELECTION (-1)
7996#define _POSIX_CPUTIME 200112L
7997#define _POSIX_FSYNC 200112L
7998#define _POSIX_IPV6 0
7999#define _POSIX_JOB_CONTROL 1
8000#define _POSIX_MAPPED_FILES 200112L
8001#define _POSIX_MEMLOCK (-1)
8002#define _POSIX_MEMLOCK_RANGE 200112L
8003#define _POSIX_MEMORY_PROTECTION 200112L
8004#define _POSIX_MESSAGE_PASSING 200112L
8005#define _POSIX_MONOTONIC_CLOCK 200112L
8006#define _POSIX_NO_TRUNC 1
8007#define _POSIX_PRIORITIZED_IO (-1)
8008#define _POSIX_PRIORITY_SCHEDULING 200112L
8009#define _POSIX_RAW_SOCKETS 200112L
8010#define _POSIX_REALTIME_SIGNALS 200112L
8011#define _POSIX_SEMAPHORES 200112L
8012#define _POSIX_SHARED_MEMORY_OBJECTS 200112L
8013#define _POSIX_SPORADIC_SERVER (-1)
8014#define _POSIX_SYNCHRONIZED_IO (-1)
8015#define _POSIX_TIMEOUTS 200112L
8016#define _POSIX_TIMERS 200112L
8017#define _POSIX_TYPED_MEMORY_OBJECTS (-1)
8018#define _POSIX_VDISABLE 0xff
8019
8020#if __XSI_VISIBLE
8021#define _XOPEN_SHM 1
8022#define _XOPEN_STREAMS (-1)
8023#endif
8024# 84 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8025
8026/*
8027 * Although we have saved user/group IDs, we do not use them in setuid
8028 * as described in POSIX 1003.1, because the feature does not work for
8029 * root. We use the saved IDs in seteuid/setegid, which are not currently
8030 * part of the POSIX 1003.1 specification. XXX revisit for 1003.1-2001
8031 * as this is now mandatory.
8032 */
8033#ifdef _NOT_AVAILABLE
8034#define _POSIX_SAVED_IDS 1 /* saved set-user-ID and set-group-ID */
8035#endif
8036# 95 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8037
8038/* Define the POSIX.1 version we target for compliance. */
8039#define _POSIX_VERSION 200112L
8040
8041/* access function */
8042#define F_OK 0 /* test for existence of file */
8043#define X_OK 0x01 /* test for execute or search permission */
8044#define W_OK 0x02 /* test for write permission */
8045#define R_OK 0x04 /* test for read permission */
8046
8047/* whence values for lseek(2) */
8048#ifndef SEEK_SET
8049#define SEEK_SET 0 /* set file offset to offset */
8050#define SEEK_CUR 1 /* set file offset to current plus offset */
8051#define SEEK_END 2 /* set file offset to EOF plus offset */
8052#endif
8053# 111 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8054#if __BSD_VISIBLE
8055#define SEEK_DATA 3 /* set file offset to next data past offset */
8056#define SEEK_HOLE 4 /* set file offset to next hole past offset */
8057#endif
8058# 115 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8059
8060#ifndef _POSIX_SOURCE
8061/* whence values for lseek(2); renamed by POSIX 1003.1 */
8062#define L_SET SEEK_SET
8063#define L_INCR SEEK_CUR
8064#define L_XTND SEEK_END
8065#endif
8066# 122 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8067
8068/* configurable pathname variables */
8069#define _PC_LINK_MAX 1
8070#define _PC_MAX_CANON 2
8071#define _PC_MAX_INPUT 3
8072#define _PC_NAME_MAX 4
8073#define _PC_PATH_MAX 5
8074#define _PC_PIPE_BUF 6
8075#define _PC_CHOWN_RESTRICTED 7
8076#define _PC_NO_TRUNC 8
8077#define _PC_VDISABLE 9
8078
8079#if __POSIX_VISIBLE >= 199309
8080#define _PC_ASYNC_IO 53
8081#define _PC_PRIO_IO 54
8082#define _PC_SYNC_IO 55
8083#endif
8084# 139 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8085
8086#if __POSIX_VISIBLE >= 200112
8087#define _PC_ALLOC_SIZE_MIN 10
8088#define _PC_FILESIZEBITS 12
8089#define _PC_REC_INCR_XFER_SIZE 14
8090#define _PC_REC_MAX_XFER_SIZE 15
8091#define _PC_REC_MIN_XFER_SIZE 16
8092#define _PC_REC_XFER_ALIGN 17
8093#define _PC_SYMLINK_MAX 18
8094#endif
8095# 149 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8096
8097#if __BSD_VISIBLE
8098#define _PC_ACL_EXTENDED 59
8099#define _PC_ACL_PATH_MAX 60
8100#define _PC_CAP_PRESENT 61
8101#define _PC_INF_PRESENT 62
8102#define _PC_MAC_PRESENT 63
8103#define _PC_ACL_NFS4 64
8104#endif
8105# 158 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8106
8107/* From OpenSolaris, used by SEEK_DATA/SEEK_HOLE. */
8108#define _PC_MIN_HOLE_SIZE 21
8109
8110#if __BSD_VISIBLE
8111/*
8112 * rfork() options.
8113 *
8114 * XXX currently, some operations without RFPROC set are not supported.
8115 */
8116#define RFNAMEG (1<<0) /* UNIMPL new plan9 `name space' */
8117#define RFENVG (1<<1) /* UNIMPL copy plan9 `env space' */
8118#define RFFDG (1<<2) /* copy fd table */
8119#define RFNOTEG (1<<3) /* UNIMPL create new plan9 `note group' */
8120#define RFPROC (1<<4) /* change child (else changes curproc) */
8121#define RFMEM (1<<5) /* share `address space' */
8122#define RFNOWAIT (1<<6) /* give child to init */
8123#define RFCNAMEG (1<<10) /* UNIMPL zero plan9 `name space' */
8124#define RFCENVG (1<<11) /* UNIMPL zero plan9 `env space' */
8125#define RFCFDG (1<<12) /* close all fds, zero fd table */
8126#define RFTHREAD (1<<13) /* enable kernel thread support */
8127#define RFSIGSHARE (1<<14) /* share signal handlers */
8128#define RFLINUXTHPN (1<<16) /* do linux clone exit parent notification */
8129#define RFSTOPPED (1<<17) /* leave child in a stopped state */
8130#define RFHIGHPID (1<<18) /* use a pid higher than 10 (idleproc) */
8131#define RFTSIGZMB (1<<19) /* select signal for exit parent notification */
8132#define RFTSIGSHIFT 20 /* selected signal number is in bits 20-27 */
8133#define RFTSIGMASK 0xFF
8134#define RFTSIGNUM(flags) (((flags) >> RFTSIGSHIFT) & RFTSIGMASK)
8135#define RFTSIGFLAGS(signum) ((signum) << RFTSIGSHIFT)
8136#define RFPROCDESC (1<<28) /* return a process descriptor */
8137#define RFPPWAIT (1<<31) /* parent sleeps until child exits (vfork) */
8138#define RFFLAGS (RFFDG | RFPROC | RFMEM | RFNOWAIT | RFCFDG | \
8139 RFTHREAD | RFSIGSHARE | RFLINUXTHPN | RFSTOPPED | RFHIGHPID | RFTSIGZMB | \
8140 RFPROCDESC | RFPPWAIT)
8141#define RFKERNELONLY (RFSTOPPED | RFHIGHPID | RFPPWAIT | RFPROCDESC)
8142
8143#endif /* __BSD_VISIBLE */
8144# 196 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8145
8146#endif /* !_SYS_UNISTD_H_ */
8147# 198 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/unistd.h" 3 4
8148# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 2 3 4
8149#if 0 /* expanded by -frewrite-includes */
8150#include <sys/_null.h>
8151#endif /* expanded by -frewrite-includes */
8152# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8153# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8154#if 0 /* expanded by -frewrite-includes */
8155#include <sys/_types.h>
8156#endif /* expanded by -frewrite-includes */
8157# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8158# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8159
8160#ifndef _GID_T_DECLARED
8161typedef __gid_t gid_t;
8162#define _GID_T_DECLARED
8163#endif
8164# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8165
8166#ifndef _OFF_T_DECLARED
8167typedef __off_t off_t;
8168#define _OFF_T_DECLARED
8169#endif
8170# 51 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8171
8172#ifndef _PID_T_DECLARED
8173typedef __pid_t pid_t;
8174#define _PID_T_DECLARED
8175#endif
8176# 56 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8177
8178#ifndef _SIZE_T_DECLARED
8179typedef __size_t size_t;
8180#define _SIZE_T_DECLARED
8181#endif
8182# 61 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8183
8184#ifndef _SSIZE_T_DECLARED
8185typedef __ssize_t ssize_t;
8186#define _SSIZE_T_DECLARED
8187#endif
8188# 66 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8189
8190#ifndef _UID_T_DECLARED
8191typedef __uid_t uid_t;
8192#define _UID_T_DECLARED
8193#endif
8194# 71 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8195
8196#ifndef _USECONDS_T_DECLARED
8197typedef __useconds_t useconds_t;
8198#define _USECONDS_T_DECLARED
8199#endif
8200# 76 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8201
8202#define STDIN_FILENO 0 /* standard input file descriptor */
8203#define STDOUT_FILENO 1 /* standard output file descriptor */
8204#define STDERR_FILENO 2 /* standard error file descriptor */
8205
8206#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
8207#define F_ULOCK 0 /* unlock locked section */
8208#define F_LOCK 1 /* lock a section for exclusive use */
8209#define F_TLOCK 2 /* test and lock a section for exclusive use */
8210#define F_TEST 3 /* test a section for locks by other procs */
8211#endif
8212# 87 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8213
8214/*
8215 * POSIX options and option groups we unconditionally do or don't
8216 * implement. This list includes those options which are exclusively
8217 * implemented (or not) in user mode. Please keep this list in
8218 * alphabetical order.
8219 *
8220 * Anything which is defined as zero below **must** have an
8221 * implementation for the corresponding sysconf() which is able to
8222 * determine conclusively whether or not the feature is supported.
8223 * Anything which is defined as other than -1 below **must** have
8224 * complete headers, types, and function declarations as specified by
8225 * the POSIX standard; however, if the relevant sysconf() function
8226 * returns -1, the functions may be stubbed out.
8227 */
8228#define _POSIX_BARRIERS 200112L
8229#define _POSIX_CPUTIME 200112L
8230#define _POSIX_READER_WRITER_LOCKS 200112L
8231#define _POSIX_REGEXP 1
8232#define _POSIX_SHELL 1
8233#define _POSIX_SPAWN 200112L
8234#define _POSIX_SPIN_LOCKS 200112L
8235#define _POSIX_THREAD_ATTR_STACKADDR 200112L
8236#define _POSIX_THREAD_ATTR_STACKSIZE 200112L
8237#define _POSIX_THREAD_CPUTIME 200112L
8238#define _POSIX_THREAD_PRIO_INHERIT 200112L
8239#define _POSIX_THREAD_PRIO_PROTECT 200112L
8240#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L
8241#define _POSIX_THREAD_PROCESS_SHARED -1
8242#define _POSIX_THREAD_SAFE_FUNCTIONS -1
8243#define _POSIX_THREAD_SPORADIC_SERVER -1
8244#define _POSIX_THREADS 200112L
8245#define _POSIX_TRACE -1
8246#define _POSIX_TRACE_EVENT_FILTER -1
8247#define _POSIX_TRACE_INHERIT -1
8248#define _POSIX_TRACE_LOG -1
8249#define _POSIX2_C_BIND 200112L /* mandatory */
8250#define _POSIX2_C_DEV -1 /* need c99 utility */
8251#define _POSIX2_CHAR_TERM 1
8252#define _POSIX2_FORT_DEV -1 /* need fort77 utility */
8253#define _POSIX2_FORT_RUN 200112L
8254#define _POSIX2_LOCALEDEF -1
8255#define _POSIX2_PBS -1
8256#define _POSIX2_PBS_ACCOUNTING -1
8257#define _POSIX2_PBS_CHECKPOINT -1
8258#define _POSIX2_PBS_LOCATE -1
8259#define _POSIX2_PBS_MESSAGE -1
8260#define _POSIX2_PBS_TRACK -1
8261#define _POSIX2_SW_DEV -1 /* XXX ??? */
8262#define _POSIX2_UPE 200112L
8263#define _V6_ILP32_OFF32 -1
8264#define _V6_ILP32_OFFBIG 0
8265#define _V6_LP64_OFF64 0
8266#define _V6_LPBIG_OFFBIG -1
8267
8268#if __XSI_VISIBLE
8269#define _XOPEN_CRYPT -1 /* XXX ??? */
8270#define _XOPEN_ENH_I18N -1 /* mandatory in XSI */
8271#define _XOPEN_LEGACY -1
8272#define _XOPEN_REALTIME -1
8273#define _XOPEN_REALTIME_THREADS -1
8274#define _XOPEN_UNIX -1
8275#endif
8276# 150 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8277
8278/* Define the POSIX.2 version we target for compliance. */
8279#define _POSIX2_VERSION 199212L
8280
8281/*
8282 * POSIX-style system configuration variable accessors (for the
8283 * sysconf function). The kernel does not directly implement the
8284 * sysconf() interface; rather, a C library stub translates references
8285 * to sysconf() into calls to sysctl() using a giant switch statement.
8286 * Those that are marked `user' are implemented entirely in the C
8287 * library and never query the kernel. pathconf() is implemented
8288 * directly by the kernel so those are not defined here.
8289 */
8290#define _SC_ARG_MAX 1
8291#define _SC_CHILD_MAX 2
8292#define _SC_CLK_TCK 3
8293#define _SC_NGROUPS_MAX 4
8294#define _SC_OPEN_MAX 5
8295#define _SC_JOB_CONTROL 6
8296#define _SC_SAVED_IDS 7
8297#define _SC_VERSION 8
8298#define _SC_BC_BASE_MAX 9 /* user */
8299#define _SC_BC_DIM_MAX 10 /* user */
8300#define _SC_BC_SCALE_MAX 11 /* user */
8301#define _SC_BC_STRING_MAX 12 /* user */
8302#define _SC_COLL_WEIGHTS_MAX 13 /* user */
8303#define _SC_EXPR_NEST_MAX 14 /* user */
8304#define _SC_LINE_MAX 15 /* user */
8305#define _SC_RE_DUP_MAX 16 /* user */
8306#define _SC_2_VERSION 17 /* user */
8307#define _SC_2_C_BIND 18 /* user */
8308#define _SC_2_C_DEV 19 /* user */
8309#define _SC_2_CHAR_TERM 20 /* user */
8310#define _SC_2_FORT_DEV 21 /* user */
8311#define _SC_2_FORT_RUN 22 /* user */
8312#define _SC_2_LOCALEDEF 23 /* user */
8313#define _SC_2_SW_DEV 24 /* user */
8314#define _SC_2_UPE 25 /* user */
8315#define _SC_STREAM_MAX 26 /* user */
8316#define _SC_TZNAME_MAX 27 /* user */
8317
8318#if __POSIX_VISIBLE >= 199309
8319#define _SC_ASYNCHRONOUS_IO 28
8320#define _SC_MAPPED_FILES 29
8321#define _SC_MEMLOCK 30
8322#define _SC_MEMLOCK_RANGE 31
8323#define _SC_MEMORY_PROTECTION 32
8324#define _SC_MESSAGE_PASSING 33
8325#define _SC_PRIORITIZED_IO 34
8326#define _SC_PRIORITY_SCHEDULING 35
8327#define _SC_REALTIME_SIGNALS 36
8328#define _SC_SEMAPHORES 37
8329#define _SC_FSYNC 38
8330#define _SC_SHARED_MEMORY_OBJECTS 39
8331#define _SC_SYNCHRONIZED_IO 40
8332#define _SC_TIMERS 41
8333#define _SC_AIO_LISTIO_MAX 42
8334#define _SC_AIO_MAX 43
8335#define _SC_AIO_PRIO_DELTA_MAX 44
8336#define _SC_DELAYTIMER_MAX 45
8337#define _SC_MQ_OPEN_MAX 46
8338#define _SC_PAGESIZE 47
8339#define _SC_RTSIG_MAX 48
8340#define _SC_SEM_NSEMS_MAX 49
8341#define _SC_SEM_VALUE_MAX 50
8342#define _SC_SIGQUEUE_MAX 51
8343#define _SC_TIMER_MAX 52
8344#endif
8345# 218 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8346
8347#if __POSIX_VISIBLE >= 200112
8348#define _SC_2_PBS 59 /* user */
8349#define _SC_2_PBS_ACCOUNTING 60 /* user */
8350#define _SC_2_PBS_CHECKPOINT 61 /* user */
8351#define _SC_2_PBS_LOCATE 62 /* user */
8352#define _SC_2_PBS_MESSAGE 63 /* user */
8353#define _SC_2_PBS_TRACK 64 /* user */
8354#define _SC_ADVISORY_INFO 65
8355#define _SC_BARRIERS 66 /* user */
8356#define _SC_CLOCK_SELECTION 67
8357#define _SC_CPUTIME 68
8358#define _SC_FILE_LOCKING 69
8359#define _SC_GETGR_R_SIZE_MAX 70 /* user */
8360#define _SC_GETPW_R_SIZE_MAX 71 /* user */
8361#define _SC_HOST_NAME_MAX 72
8362#define _SC_LOGIN_NAME_MAX 73
8363#define _SC_MONOTONIC_CLOCK 74
8364#define _SC_MQ_PRIO_MAX 75
8365#define _SC_READER_WRITER_LOCKS 76 /* user */
8366#define _SC_REGEXP 77 /* user */
8367#define _SC_SHELL 78 /* user */
8368#define _SC_SPAWN 79 /* user */
8369#define _SC_SPIN_LOCKS 80 /* user */
8370#define _SC_SPORADIC_SERVER 81
8371#define _SC_THREAD_ATTR_STACKADDR 82 /* user */
8372#define _SC_THREAD_ATTR_STACKSIZE 83 /* user */
8373#define _SC_THREAD_CPUTIME 84 /* user */
8374#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 /* user */
8375#define _SC_THREAD_KEYS_MAX 86 /* user */
8376#define _SC_THREAD_PRIO_INHERIT 87 /* user */
8377#define _SC_THREAD_PRIO_PROTECT 88 /* user */
8378#define _SC_THREAD_PRIORITY_SCHEDULING 89 /* user */
8379#define _SC_THREAD_PROCESS_SHARED 90 /* user */
8380#define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */
8381#define _SC_THREAD_SPORADIC_SERVER 92 /* user */
8382#define _SC_THREAD_STACK_MIN 93 /* user */
8383#define _SC_THREAD_THREADS_MAX 94 /* user */
8384#define _SC_TIMEOUTS 95 /* user */
8385#define _SC_THREADS 96 /* user */
8386#define _SC_TRACE 97 /* user */
8387#define _SC_TRACE_EVENT_FILTER 98 /* user */
8388#define _SC_TRACE_INHERIT 99 /* user */
8389#define _SC_TRACE_LOG 100 /* user */
8390#define _SC_TTY_NAME_MAX 101 /* user */
8391#define _SC_TYPED_MEMORY_OBJECTS 102
8392#define _SC_V6_ILP32_OFF32 103 /* user */
8393#define _SC_V6_ILP32_OFFBIG 104 /* user */
8394#define _SC_V6_LP64_OFF64 105 /* user */
8395#define _SC_V6_LPBIG_OFFBIG 106 /* user */
8396#define _SC_IPV6 118
8397#define _SC_RAW_SOCKETS 119
8398#define _SC_SYMLOOP_MAX 120
8399#endif
8400# 272 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8401
8402#if __XSI_VISIBLE
8403#define _SC_ATEXIT_MAX 107 /* user */
8404#define _SC_IOV_MAX 56
8405#define _SC_PAGE_SIZE _SC_PAGESIZE
8406#define _SC_XOPEN_CRYPT 108 /* user */
8407#define _SC_XOPEN_ENH_I18N 109 /* user */
8408#define _SC_XOPEN_LEGACY 110 /* user */
8409#define _SC_XOPEN_REALTIME 111
8410#define _SC_XOPEN_REALTIME_THREADS 112
8411#define _SC_XOPEN_SHM 113
8412#define _SC_XOPEN_STREAMS 114
8413#define _SC_XOPEN_UNIX 115
8414#define _SC_XOPEN_VERSION 116
8415#define _SC_XOPEN_XCU_VERSION 117 /* user */
8416#endif
8417# 288 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8418
8419#if __BSD_VISIBLE
8420#define _SC_NPROCESSORS_CONF 57
8421#define _SC_NPROCESSORS_ONLN 58
8422#define _SC_CPUSET_SIZE 122
8423#endif
8424# 294 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8425
8426/* Extensions found in Solaris and Linux. */
8427#define _SC_PHYS_PAGES 121
8428
8429/* Keys for the confstr(3) function. */
8430#if __POSIX_VISIBLE >= 199209
8431#define _CS_PATH 1 /* default value of PATH */
8432#endif
8433# 302 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8434
8435#if __POSIX_VISIBLE >= 200112
8436#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2
8437#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3
8438#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4
8439#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5
8440#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6
8441#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7
8442#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8
8443#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9
8444#define _CS_POSIX_V6_LP64_OFF64_LIBS 10
8445#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11
8446#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12
8447#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13
8448#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14
8449#endif
8450# 318 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8451
8452__BEGIN_DECLS
8453/* 1003.1-1990 */
8454void _exit(int) __dead2;
8455int access(const char *, int);
8456unsigned int alarm(unsigned int);
8457int chdir(const char *);
8458int chown(const char *, uid_t, gid_t);
8459int close(int);
8460void closefrom(int);
8461int dup(int);
8462int dup2(int, int);
8463int execl(const char *, const char *, ...) __sentinel;
8464int execle(const char *, const char *, ...);
8465int execlp(const char *, const char *, ...) __sentinel;
8466int execv(const char *, char * const *);
8467int execve(const char *, char * const *, char * const *);
8468int execvp(const char *, char * const *);
8469pid_t fork(void);
8470long fpathconf(int, int);
8471char *getcwd(char *, size_t);
8472gid_t getegid(void);
8473uid_t geteuid(void);
8474gid_t getgid(void);
8475int getgroups(int, gid_t []);
8476char *getlogin(void);
8477pid_t getpgrp(void);
8478pid_t getpid(void);
8479pid_t getppid(void);
8480uid_t getuid(void);
8481int isatty(int);
8482int link(const char *, const char *);
8483#ifndef _LSEEK_DECLARED
8484#define _LSEEK_DECLARED
8485off_t lseek(int, off_t, int);
8486#endif
8487# 354 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8488long pathconf(const char *, int);
8489int pause(void);
8490int pipe(int *);
8491ssize_t read(int, void *, size_t);
8492int rmdir(const char *);
8493int setgid(gid_t);
8494int setpgid(pid_t, pid_t);
8495pid_t setsid(void);
8496int setuid(uid_t);
8497unsigned int sleep(unsigned int);
8498long sysconf(int);
8499pid_t tcgetpgrp(int);
8500int tcsetpgrp(int, pid_t);
8501char *ttyname(int);
8502int ttyname_r(int, char *, size_t);
8503int unlink(const char *);
8504ssize_t write(int, const void *, size_t);
8505
8506/* 1003.2-1992 */
8507#if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE
8508size_t confstr(int, char *, size_t);
8509#ifndef _GETOPT_DECLARED
8510#define _GETOPT_DECLARED
8511int getopt(int, char * const [], const char *);
8512
8513extern char *optarg; /* getopt(3) external variables */
8514extern int optind, opterr, optopt;
8515#endif /* _GETOPT_DECLARED */
8516# 382 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8517#endif
8518# 383 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8519
8520/* ISO/IEC 9945-1: 1996 */
8521#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE
8522int fsync(int);
8523
8524/*
8525 * ftruncate() was in the POSIX Realtime Extension (it's used for shared
8526 * memory), but truncate() was not.
8527 */
8528#ifndef _FTRUNCATE_DECLARED
8529#define _FTRUNCATE_DECLARED
8530int ftruncate(int, off_t);
8531#endif
8532# 396 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8533#endif
8534# 397 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8535
8536#if __POSIX_VISIBLE >= 199506
8537int getlogin_r(char *, int);
8538#endif
8539# 401 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8540
8541/* 1003.1-2001 */
8542#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
8543int fchown(int, uid_t, gid_t);
8544ssize_t readlink(const char * __restrict, char * __restrict, size_t);
8545#endif
8546# 407 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8547#if __POSIX_VISIBLE >= 200112
8548int gethostname(char *, size_t);
8549int setegid(gid_t);
8550int seteuid(uid_t);
8551#endif
8552# 412 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8553
8554/* 1003.1-2008 */
8555#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE
8556int getsid(pid_t _pid);
8557int fchdir(int);
8558int getpgid(pid_t _pid);
8559int lchown(const char *, uid_t, gid_t);
8560ssize_t pread(int, void *, size_t, off_t);
8561ssize_t pwrite(int, const void *, size_t, off_t);
8562
8563/* See comment at ftruncate() above. */
8564#ifndef _TRUNCATE_DECLARED
8565#define _TRUNCATE_DECLARED
8566int truncate(const char *, off_t);
8567#endif
8568# 427 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8569#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */
8570# 428 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8571
8572#if __POSIX_VISIBLE >= 200809
8573int faccessat(int, const char *, int, int);
8574int fchownat(int, const char *, uid_t, gid_t, int);
8575int fexecve(int, char *const [], char *const []);
8576int linkat(int, const char *, int, const char *, int);
8577ssize_t readlinkat(int, const char * __restrict, char * __restrict, size_t);
8578int symlinkat(const char *, int, const char *);
8579int unlinkat(int, const char *, int);
8580#endif /* __POSIX_VISIBLE >= 200809 */
8581# 438 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8582
8583/*
8584 * symlink() was originally in POSIX.1a, which was withdrawn after
8585 * being overtaken by events (1003.1-2001). It was in XPG4.2, and of
8586 * course has been in BSD since 4.2.
8587 */
8588#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402
8589int symlink(const char * __restrict, const char * __restrict);
8590#endif
8591# 447 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8592
8593/* X/Open System Interfaces */
8594#if __XSI_VISIBLE
8595char *crypt(const char *, const char *);
8596/* char *ctermid(char *); */ /* XXX ??? */
8597int encrypt(char *, int);
8598long gethostid(void);
8599int lockf(int, int, off_t);
8600int nice(int);
8601int setregid(gid_t, gid_t);
8602int setreuid(uid_t, uid_t);
8603
8604#ifndef _SWAB_DECLARED
8605#define _SWAB_DECLARED
8606void swab(const void * __restrict, void * __restrict, ssize_t);
8607#endif /* _SWAB_DECLARED */
8608# 463 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8609
8610void sync(void);
8611
8612#endif /* __XSI_VISIBLE */
8613# 467 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8614
8615#if (__XSI_VISIBLE && __XSI_VISIBLE <= 500) || __BSD_VISIBLE
8616int brk(const void *);
8617int chroot(const char *);
8618int getdtablesize(void);
8619int getpagesize(void) __pure2;
8620char *getpass(const char *);
8621void *sbrk(intptr_t);
8622#endif
8623# 476 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8624
8625#if (__XSI_VISIBLE && __XSI_VISIBLE <= 600) || __BSD_VISIBLE
8626char *getwd(char *); /* obsoleted by getcwd() */
8627useconds_t
8628 ualarm(useconds_t, useconds_t);
8629int usleep(useconds_t);
8630pid_t vfork(void) __returns_twice;
8631#endif
8632# 484 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8633
8634#if __BSD_VISIBLE
8635struct timeval; /* select(2) */
8636int acct(const char *);
8637int async_daemon(void);
8638int check_utility_compat(const char *);
8639const char *
8640 crypt_get_format(void);
8641int crypt_set_format(const char *);
8642int des_cipher(const char *, char *, long, int);
8643int des_setkey(const char *key);
8644int dup3(int, int, int);
8645int eaccess(const char *, int);
8646void endusershell(void);
8647int exect(const char *, char * const *, char * const *);
8648int execvP(const char *, const char *, char * const *);
8649int feature_present(const char *);
8650char *fflagstostr(u_long);
8651int getdomainname(char *, int);
8652int getgrouplist(const char *, gid_t, gid_t *, int *);
8653int getloginclass(char *, size_t);
8654mode_t getmode(const void *, mode_t);
8655int getosreldate(void);
8656int getpeereid(int, uid_t *, gid_t *);
8657int getresgid(gid_t *, gid_t *, gid_t *);
8658int getresuid(uid_t *, uid_t *, uid_t *);
8659char *getusershell(void);
8660int initgroups(const char *, gid_t);
8661int iruserok(unsigned long, int, const char *, const char *);
8662int iruserok_sa(const void *, int, int, const char *, const char *);
8663int issetugid(void);
8664void __FreeBSD_libc_enter_restricted_mode(void);
8665long lpathconf(const char *, int);
8666#ifndef _MKDTEMP_DECLARED
8667char *mkdtemp(char *);
8668#define _MKDTEMP_DECLARED
8669#endif
8670# 521 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8671#ifndef _MKNOD_DECLARED
8672int mknod(const char *, mode_t, dev_t);
8673#define _MKNOD_DECLARED
8674#endif
8675# 525 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8676#ifndef _MKSTEMP_DECLARED
8677int mkstemp(char *);
8678#define _MKSTEMP_DECLARED
8679#endif
8680# 529 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8681int mkstemps(char *, int);
8682#ifndef _MKTEMP_DECLARED
8683char *mktemp(char *);
8684#define _MKTEMP_DECLARED
8685#endif
8686# 534 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8687int nfssvc(int, void *);
8688int nlm_syscall(int, int, int, char **);
8689int pipe2(int *, int);
8690int profil(char *, size_t, vm_offset_t, int);
8691int rcmd(char **, int, const char *, const char *, const char *, int *);
8692int rcmd_af(char **, int, const char *,
8693 const char *, const char *, int *, int);
8694int rcmdsh(char **, int, const char *,
8695 const char *, const char *, const char *);
8696char *re_comp(const char *);
8697int re_exec(const char *);
8698int reboot(int);
8699int revoke(const char *);
8700pid_t rfork(int);
8701pid_t rfork_thread(int, void *, int (*)(void *), void *);
8702int rresvport(int *);
8703int rresvport_af(int *, int);
8704int ruserok(const char *, int, const char *, const char *);
8705#if __BSD_VISIBLE
8706#ifndef _SELECT_DECLARED
8707#define _SELECT_DECLARED
8708int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
8709#endif
8710# 557 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8711#endif
8712# 558 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8713int setdomainname(const char *, int);
8714int setgroups(int, const gid_t *);
8715void sethostid(long);
8716int sethostname(const char *, int);
8717#ifndef _SETKEY_DECLARED
8718int setkey(const char *);
8719#define _SETKEY_DECLARED
8720#endif
8721# 566 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8722int setlogin(const char *);
8723int setloginclass(const char *);
8724void *setmode(const char *);
8725int setpgrp(pid_t, pid_t); /* obsoleted by setpgid() */
8726void setproctitle(const char *_fmt, ...) __printf0like(1, 2);
8727int setresgid(gid_t, gid_t, gid_t);
8728int setresuid(uid_t, uid_t, uid_t);
8729int setrgid(gid_t);
8730int setruid(uid_t);
8731void setusershell(void);
8732int strtofflags(char **, u_long *, u_long *);
8733int swapon(const char *);
8734int swapoff(const char *);
8735int syscall(int, ...);
8736off_t __syscall(quad_t, ...);
8737int undelete(const char *);
8738int unwhiteout(const char *);
8739void *valloc(size_t); /* obsoleted by malloc() */
8740
8741#ifndef _OPTRESET_DECLARED
8742#define _OPTRESET_DECLARED
8743extern int optreset; /* getopt(3) external variable */
8744#endif
8745# 589 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8746
8747#if __has_feature(capabilities)
8748ssize_t write_c(int, __capability const void *, size_t);
8749#endif
8750# 593 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8751#endif /* __BSD_VISIBLE */
8752# 594 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8753__END_DECLS
8754
8755#endif /* !_UNISTD_H_ */
8756# 597 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/unistd.h" 3 4
8757# 53 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
8758#endif
8759# 54 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
8760
8761#if 0 /* expanded by -frewrite-includes */
8762#include "heimqueue.h"
8763#endif /* expanded by -frewrite-includes */
8764# 55 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
8765# 1 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimqueue.h" 1
8766/* $NetBSD: queue.h,v 1.38 2004/04/18 14:12:05 lukem Exp $ */
8767/* $Id$ */
8768
8769/*
8770 * Copyright (c) 1991, 1993
8771 * The Regents of the University of California. All rights reserved.
8772 *
8773 * Redistribution and use in source and binary forms, with or without
8774 * modification, are permitted provided that the following conditions
8775 * are met:
8776 * 1. Redistributions of source code must retain the above copyright
8777 * notice, this list of conditions and the following disclaimer.
8778 * 2. Redistributions in binary form must reproduce the above copyright
8779 * notice, this list of conditions and the following disclaimer in the
8780 * documentation and/or other materials provided with the distribution.
8781 * 3. Neither the name of the University nor the names of its contributors
8782 * may be used to endorse or promote products derived from this software
8783 * without specific prior written permission.
8784 *
8785 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
8786 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8787 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8788 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
8789 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8790 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8791 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8792 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8793 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8794 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8795 * SUCH DAMAGE.
8796 *
8797 * @(#)queue.h 8.5 (Berkeley) 8/20/94
8798 */
8799
8800#ifndef _HEIM_QUEUE_H_
8801#define _HEIM_QUEUE_H_
8802
8803/*
8804 * Tail queue definitions.
8805 */
8806#define HEIM_TAILQ_HEAD(name, type) \
8807struct name { \
8808 struct type *tqh_first; /* first element */ \
8809 struct type **tqh_last; /* addr of last next element */ \
8810}
8811
8812#define HEIM_TAILQ_HEAD_INITIALIZER(head) \
8813 { NULL, &(head).tqh_first }
8814#define HEIM_TAILQ_ENTRY(type) \
8815struct { \
8816 struct type *tqe_next; /* next element */ \
8817 struct type **tqe_prev; /* address of previous next element */ \
8818}
8819
8820/*
8821 * Tail queue functions.
8822 */
8823#if defined(_KERNEL) && defined(QUEUEDEBUG)
8824#define QUEUEDEBUG_HEIM_TAILQ_INSERT_HEAD(head, elm, field) \
8825 if ((head)->tqh_first && \
8826 (head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \
8827 panic("HEIM_TAILQ_INSERT_HEAD %p %s:%d", (head), __FILE__, __LINE__);
8828#define QUEUEDEBUG_HEIM_TAILQ_INSERT_TAIL(head, elm, field) \
8829 if (*(head)->tqh_last != NULL) \
8830 panic("HEIM_TAILQ_INSERT_TAIL %p %s:%d", (head), __FILE__, __LINE__);
8831#define QUEUEDEBUG_HEIM_TAILQ_OP(elm, field) \
8832 if ((elm)->field.tqe_next && \
8833 (elm)->field.tqe_next->field.tqe_prev != \
8834 &(elm)->field.tqe_next) \
8835 panic("HEIM_TAILQ_* forw %p %s:%d", (elm), __FILE__, __LINE__);\
8836 if (*(elm)->field.tqe_prev != (elm)) \
8837 panic("HEIM_TAILQ_* back %p %s:%d", (elm), __FILE__, __LINE__);
8838#define QUEUEDEBUG_HEIM_TAILQ_PREREMOVE(head, elm, field) \
8839 if ((elm)->field.tqe_next == NULL && \
8840 (head)->tqh_last != &(elm)->field.tqe_next) \
8841 panic("HEIM_TAILQ_PREREMOVE head %p elm %p %s:%d", \
8842 (head), (elm), __FILE__, __LINE__);
8843#define QUEUEDEBUG_HEIM_TAILQ_POSTREMOVE(elm, field) \
8844 (elm)->field.tqe_next = (void *)1L; \
8845 (elm)->field.tqe_prev = (void *)1L;
8846#else
8847# 82 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimqueue.h"
8848#define QUEUEDEBUG_HEIM_TAILQ_INSERT_HEAD(head, elm, field)
8849#define QUEUEDEBUG_HEIM_TAILQ_INSERT_TAIL(head, elm, field)
8850#define QUEUEDEBUG_HEIM_TAILQ_OP(elm, field)
8851#define QUEUEDEBUG_HEIM_TAILQ_PREREMOVE(head, elm, field)
8852#define QUEUEDEBUG_HEIM_TAILQ_POSTREMOVE(elm, field)
8853#endif
8854# 88 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimqueue.h"
8855
8856#define HEIM_TAILQ_INIT(head) do { \
8857 (head)->tqh_first = NULL; \
8858 (head)->tqh_last = &(head)->tqh_first; \
8859} while (/*CONSTCOND*/0)
8860
8861#define HEIM_TAILQ_INSERT_HEAD(head, elm, field) do { \
8862 QUEUEDEBUG_HEIM_TAILQ_INSERT_HEAD((head), (elm), field) \
8863 if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
8864 (head)->tqh_first->field.tqe_prev = \
8865 &(elm)->field.tqe_next; \
8866 else \
8867 (head)->tqh_last = &(elm)->field.tqe_next; \
8868 (head)->tqh_first = (elm); \
8869 (elm)->field.tqe_prev = &(head)->tqh_first; \
8870} while (/*CONSTCOND*/0)
8871
8872#define HEIM_TAILQ_INSERT_TAIL(head, elm, field) do { \
8873 QUEUEDEBUG_HEIM_TAILQ_INSERT_TAIL((head), (elm), field) \
8874 (elm)->field.tqe_next = NULL; \
8875 (elm)->field.tqe_prev = (head)->tqh_last; \
8876 *(head)->tqh_last = (elm); \
8877 (head)->tqh_last = &(elm)->field.tqe_next; \
8878} while (/*CONSTCOND*/0)
8879
8880#define HEIM_TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
8881 QUEUEDEBUG_HEIM_TAILQ_OP((listelm), field) \
8882 if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
8883 (elm)->field.tqe_next->field.tqe_prev = \
8884 &(elm)->field.tqe_next; \
8885 else \
8886 (head)->tqh_last = &(elm)->field.tqe_next; \
8887 (listelm)->field.tqe_next = (elm); \
8888 (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
8889} while (/*CONSTCOND*/0)
8890
8891#define HEIM_TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
8892 QUEUEDEBUG_HEIM_TAILQ_OP((listelm), field) \
8893 (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
8894 (elm)->field.tqe_next = (listelm); \
8895 *(listelm)->field.tqe_prev = (elm); \
8896 (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
8897} while (/*CONSTCOND*/0)
8898
8899#define HEIM_TAILQ_REMOVE(head, elm, field) do { \
8900 QUEUEDEBUG_HEIM_TAILQ_PREREMOVE((head), (elm), field) \
8901 QUEUEDEBUG_HEIM_TAILQ_OP((elm), field) \
8902 if (((elm)->field.tqe_next) != NULL) \
8903 (elm)->field.tqe_next->field.tqe_prev = \
8904 (elm)->field.tqe_prev; \
8905 else \
8906 (head)->tqh_last = (elm)->field.tqe_prev; \
8907 *(elm)->field.tqe_prev = (elm)->field.tqe_next; \
8908 QUEUEDEBUG_HEIM_TAILQ_POSTREMOVE((elm), field); \
8909} while (/*CONSTCOND*/0)
8910
8911#define HEIM_TAILQ_FOREACH(var, head, field) \
8912 for ((var) = ((head)->tqh_first); \
8913 (var); \
8914 (var) = ((var)->field.tqe_next))
8915
8916#define HEIM_TAILQ_FOREACH_REVERSE(var, head, headname, field) \
8917 for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
8918 (var); \
8919 (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
8920
8921/*
8922 * Tail queue access methods.
8923 */
8924#define HEIM_TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
8925#define HEIM_TAILQ_FIRST(head) ((head)->tqh_first)
8926#define HEIM_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
8927
8928#define HEIM_TAILQ_LAST(head, headname) \
8929 (*(((struct headname *)((head)->tqh_last))->tqh_last))
8930#define HEIM_TAILQ_PREV(elm, headname, field) \
8931 (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
8932
8933
8934#endif /* !_HEIM_QUEUE_H_ */
8935# 168 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimqueue.h"
8936# 56 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
8937#if 0 /* expanded by -frewrite-includes */
8938#include "heim_threads.h"
8939#endif /* expanded by -frewrite-includes */
8940# 56 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
8941# 1 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h" 1
8942/*
8943 * Copyright (c) 2003 Kungliga Tekniska Högskolan
8944 * (Royal Institute of Technology, Stockholm, Sweden).
8945 * All rights reserved.
8946 *
8947 * Redistribution and use in source and binary forms, with or without
8948 * modification, are permitted provided that the following conditions
8949 * are met:
8950 *
8951 * 1. Redistributions of source code must retain the above copyright
8952 * notice, this list of conditions and the following disclaimer.
8953 *
8954 * 2. Redistributions in binary form must reproduce the above copyright
8955 * notice, this list of conditions and the following disclaimer in the
8956 * documentation and/or other materials provided with the distribution.
8957 *
8958 * 3. Neither the name of the Institute nor the names of its contributors
8959 * may be used to endorse or promote products derived from this software
8960 * without specific prior written permission.
8961 *
8962 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
8963 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
8964 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8965 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
8966 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
8967 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
8968 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
8969 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
8970 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
8971 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8972 * SUCH DAMAGE.
8973 */
8974
8975/* $Id$ */
8976
8977/*
8978 * Provide wrapper macros for thread synchronization primitives so we
8979 * can use native thread functions for those operating system that
8980 * supports it.
8981 *
8982 * This is so libkrb5.so (or more importantly, libgssapi.so) can have
8983 * thread support while the program that that dlopen(3)s the library
8984 * don't need to be linked to libpthread.
8985 */
8986
8987#ifndef HEIM_THREADS_H
8988#define HEIM_THREADS_H 1
8989
8990/* assume headers already included */
8991
8992#if defined(__NetBSD__) && __NetBSD_Version__ >= 106120000 && __NetBSD_Version__< 299001200 && defined(ENABLE_PTHREAD_SUPPORT)
8993
8994/*
8995 * NetBSD have a thread lib that we can use that part of libc that
8996 * works regardless if application are linked to pthreads or not.
8997 * NetBSD newer then 2.99.11 just use pthread.h, and the same thing
8998 * will happen.
8999 */
9000#if 0 /* expanded by -frewrite-includes */
9001#include <threadlib.h>
9002#endif /* expanded by -frewrite-includes */
9003# 59 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
9004# 60 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
9005
9006#define HEIMDAL_MUTEX mutex_t
9007#define HEIMDAL_MUTEX_INITIALIZER MUTEX_INITIALIZER
9008#define HEIMDAL_MUTEX_init(m) mutex_init(m, NULL)
9009#define HEIMDAL_MUTEX_lock(m) mutex_lock(m)
9010#define HEIMDAL_MUTEX_unlock(m) mutex_unlock(m)
9011#define HEIMDAL_MUTEX_destroy(m) mutex_destroy(m)
9012
9013#define HEIMDAL_RWLOCK rwlock_t
9014#define HEIMDAL_RWLOCK_INITIALIZER RWLOCK_INITIALIZER
9015#define HEIMDAL_RWLOCK_init(l) rwlock_init(l, NULL)
9016#define HEIMDAL_RWLOCK_rdlock(l) rwlock_rdlock(l)
9017#define HEIMDAL_RWLOCK_wrlock(l) rwlock_wrlock(l)
9018#define HEIMDAL_RWLOCK_tryrdlock(l) rwlock_tryrdlock(l)
9019#define HEIMDAL_RWLOCK_trywrlock(l) rwlock_trywrlock(l)
9020#define HEIMDAL_RWLOCK_unlock(l) rwlock_unlock(l)
9021#define HEIMDAL_RWLOCK_destroy(l) rwlock_destroy(l)
9022
9023#define HEIMDAL_thread_key thread_key_t
9024#define HEIMDAL_key_create(k,d,r) do { r = thr_keycreate(k,d); } while(0)
9025#define HEIMDAL_setspecific(k,s,r) do { r = thr_setspecific(k,s); } while(0)
9026#define HEIMDAL_getspecific(k) thr_getspecific(k)
9027#define HEIMDAL_key_delete(k) thr_keydelete(k)
9028
9029#elif defined(ENABLE_PTHREAD_SUPPORT) && (!defined(__NetBSD__) || __NetBSD_Version__ >= 299001200)
9030# 85 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
9031
9032#if 0 /* expanded by -frewrite-includes */
9033#include <pthread.h>
9034#endif /* expanded by -frewrite-includes */
9035# 86 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
9036# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 1 3 4
9037/*
9038 * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
9039 * Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au>
9040 * All rights reserved.
9041 *
9042 * Redistribution and use in source and binary forms, with or without
9043 * modification, are permitted provided that the following conditions
9044 * are met:
9045 * 1. Redistributions of source code must retain the above copyright
9046 * notice, this list of conditions and the following disclaimer.
9047 * 2. Redistributions in binary form must reproduce the above copyright
9048 * notice, this list of conditions and the following disclaimer in the
9049 * documentation and/or other materials provided with the distribution.
9050 * 3. All advertising materials mentioning features or use of this software
9051 * must display the following acknowledgement:
9052 * This product includes software developed by Chris Provenzano.
9053 * 4. The name of Chris Provenzano may not be used to endorse or promote
9054 * products derived from this software without specific prior written
9055 * permission.
9056 *
9057 * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND
9058 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9059 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9060 * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY
9061 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
9062 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
9063 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
9064 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9065 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9066 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9067 * SUCH DAMAGE.
9068 *
9069 * $FreeBSD$
9070 */
9071#ifndef _PTHREAD_H_
9072#define _PTHREAD_H_
9073
9074/*
9075 * Header files.
9076 */
9077#if 0 /* expanded by -frewrite-includes */
9078#include <sys/cdefs.h>
9079#endif /* expanded by -frewrite-includes */
9080# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9081# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9082#if 0 /* expanded by -frewrite-includes */
9083#include <sys/_pthreadtypes.h>
9084#endif /* expanded by -frewrite-includes */
9085# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9086# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9087#if 0 /* expanded by -frewrite-includes */
9088#include <machine/_limits.h>
9089#endif /* expanded by -frewrite-includes */
9090# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9091# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9092#if 0 /* expanded by -frewrite-includes */
9093#include <machine/_types.h>
9094#endif /* expanded by -frewrite-includes */
9095# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9096# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9097#if 0 /* expanded by -frewrite-includes */
9098#include <sys/_sigset.h>
9099#endif /* expanded by -frewrite-includes */
9100# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9101# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9102#if 0 /* expanded by -frewrite-includes */
9103#include <sched.h>
9104#endif /* expanded by -frewrite-includes */
9105# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9106# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 1 3 4
9107/*-
9108 * Copyright (c) 1996, 1997
9109 * HD Associates, Inc. All rights reserved.
9110 *
9111 * Redistribution and use in source and binary forms, with or without
9112 * modification, are permitted provided that the following conditions
9113 * are met:
9114 * 1. Redistributions of source code must retain the above copyright
9115 * notice, this list of conditions and the following disclaimer.
9116 * 2. Redistributions in binary form must reproduce the above copyright
9117 * notice, this list of conditions and the following disclaimer in the
9118 * documentation and/or other materials provided with the distribution.
9119 * 3. All advertising materials mentioning features or use of this software
9120 * must display the following acknowledgement:
9121 * This product includes software developed by HD Associates, Inc
9122 * and Jukka Antero Ukkonen.
9123 * 4. Neither the name of the author nor the names of any co-contributors
9124 * may be used to endorse or promote products derived from this software
9125 * without specific prior written permission.
9126 *
9127 * THIS SOFTWARE IS PROVIDED BY HD ASSOCIATES AND CONTRIBUTORS ``AS IS'' AND
9128 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9129 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9130 * ARE DISCLAIMED. IN NO EVENT SHALL HD ASSOCIATES OR CONTRIBUTORS BE LIABLE
9131 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9132 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9133 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9134 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9135 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9136 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9137 * SUCH DAMAGE.
9138 */
9139
9140/*-
9141 * Copyright (c) 2002-2008, Jeffrey Roberson <jeff@freebsd.org>
9142 * All rights reserved.
9143 *
9144 * Redistribution and use in source and binary forms, with or without
9145 * modification, are permitted provided that the following conditions
9146 * are met:
9147 * 1. Redistributions of source code must retain the above copyright
9148 * notice unmodified, this list of conditions, and the following
9149 * disclaimer.
9150 * 2. Redistributions in binary form must reproduce the above copyright
9151 * notice, this list of conditions and the following disclaimer in the
9152 * documentation and/or other materials provided with the distribution.
9153 *
9154 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
9155 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
9156 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
9157 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
9158 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
9159 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
9160 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
9161 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
9162 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
9163 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9164 *
9165 * $FreeBSD$
9166 */
9167
9168#ifndef _SCHED_H_
9169#define _SCHED_H_
9170
9171#ifdef _KERNEL
9172/*
9173 * General scheduling info.
9174 *
9175 * sched_load:
9176 * Total runnable non-ithread threads in the system.
9177 *
9178 * sched_runnable:
9179 * Runnable threads for this processor.
9180 */
9181int sched_load(void);
9182int sched_rr_interval(void);
9183int sched_runnable(void);
9184
9185/*
9186 * Proc related scheduling hooks.
9187 */
9188void sched_exit(struct proc *p, struct thread *childtd);
9189void sched_fork(struct thread *td, struct thread *childtd);
9190void sched_fork_exit(struct thread *td);
9191void sched_class(struct thread *td, int class);
9192void sched_nice(struct proc *p, int nice);
9193
9194/*
9195 * Threads are switched in and out, block on resources, have temporary
9196 * priorities inherited from their procs, and use up cpu time.
9197 */
9198void sched_exit_thread(struct thread *td, struct thread *child);
9199void sched_fork_thread(struct thread *td, struct thread *child);
9200void sched_lend_prio(struct thread *td, u_char prio);
9201void sched_lend_user_prio(struct thread *td, u_char pri);
9202fixpt_t sched_pctcpu(struct thread *td);
9203void sched_prio(struct thread *td, u_char prio);
9204void sched_sleep(struct thread *td, int prio);
9205void sched_switch(struct thread *td, struct thread *newtd, int flags);
9206void sched_throw(struct thread *td);
9207void sched_unlend_prio(struct thread *td, u_char prio);
9208void sched_user_prio(struct thread *td, u_char prio);
9209void sched_userret(struct thread *td);
9210void sched_wakeup(struct thread *td);
9211void sched_preempt(struct thread *td);
9212#ifdef RACCT
9213#ifdef SCHED_4BSD
9214fixpt_t sched_pctcpu_delta(struct thread *td);
9215#endif
9216# 110 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9217#endif
9218# 111 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9219
9220/*
9221 * Threads are moved on and off of run queues
9222 */
9223void sched_add(struct thread *td, int flags);
9224void sched_clock(struct thread *td);
9225void sched_rem(struct thread *td);
9226void sched_tick(int cnt);
9227void sched_relinquish(struct thread *td);
9228struct thread *sched_choose(void);
9229void sched_idletd(void *);
9230
9231/*
9232 * Binding makes cpu affinity permanent while pinning is used to temporarily
9233 * hold a thread on a particular CPU.
9234 */
9235void sched_bind(struct thread *td, int cpu);
9236static __inline void sched_pin(void);
9237void sched_unbind(struct thread *td);
9238static __inline void sched_unpin(void);
9239int sched_is_bound(struct thread *td);
9240void sched_affinity(struct thread *td);
9241
9242/*
9243 * These procedures tell the process data structure allocation code how
9244 * many bytes to actually allocate.
9245 */
9246int sched_sizeof_proc(void);
9247int sched_sizeof_thread(void);
9248
9249/*
9250 * This routine provides a consistent thread name for use with KTR graphing
9251 * functions.
9252 */
9253char *sched_tdname(struct thread *td);
9254#ifdef KTR
9255void sched_clear_tdname(struct thread *td);
9256#endif
9257# 149 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9258
9259static __inline void
9260sched_pin(void)
9261{
9262 curthread->td_pinned++;
9263 __compiler_membar();
9264}
9265
9266static __inline void
9267sched_unpin(void)
9268{
9269 __compiler_membar();
9270 curthread->td_pinned--;
9271}
9272
9273/* sched_add arguments (formerly setrunqueue) */
9274#define SRQ_BORING 0x0000 /* No special circumstances. */
9275#define SRQ_YIELDING 0x0001 /* We are yielding (from mi_switch). */
9276#define SRQ_OURSELF 0x0002 /* It is ourself (from mi_switch). */
9277#define SRQ_INTR 0x0004 /* It is probably urgent. */
9278#define SRQ_PREEMPTED 0x0008 /* has been preempted.. be kind */
9279#define SRQ_BORROWING 0x0010 /* Priority updated due to prio_lend */
9280
9281/* Scheduler stats. */
9282#ifdef SCHED_STATS
9283DPCPU_DECLARE(long, sched_switch_stats[SWT_COUNT]);
9284
9285#define SCHED_STAT_DEFINE_VAR(name, ptr, descr) \
9286static void name ## _add_proc(void *dummy __unused) \
9287{ \
9288 \
9289 SYSCTL_ADD_PROC(NULL, \
9290 SYSCTL_STATIC_CHILDREN(_kern_sched_stats), OID_AUTO, \
9291 #name, CTLTYPE_LONG|CTLFLAG_RD|CTLFLAG_MPSAFE, \
9292 ptr, 0, sysctl_dpcpu_long, "LU", descr); \
9293} \
9294SYSINIT(name, SI_SUB_LAST, SI_ORDER_MIDDLE, name ## _add_proc, NULL);
9295
9296#define SCHED_STAT_DEFINE(name, descr) \
9297 DPCPU_DEFINE(unsigned long, name); \
9298 SCHED_STAT_DEFINE_VAR(name, &DPCPU_NAME(name), descr)
9299/*
9300 * Sched stats are always incremented in critical sections so no atomic
9301 * is necesssary to increment them.
9302 */
9303#define SCHED_STAT_INC(var) DPCPU_GET(var)++;
9304#else
9305# 196 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9306#define SCHED_STAT_DEFINE_VAR(name, descr, ptr)
9307#define SCHED_STAT_DEFINE(name, descr)
9308#define SCHED_STAT_INC(var) (void)0
9309#endif
9310# 200 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9311
9312/*
9313 * Fixup scheduler state for proc0 and thread0
9314 */
9315void schedinit(void);
9316#endif /* _KERNEL */
9317# 206 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9318
9319/* POSIX 1003.1b Process Scheduling */
9320
9321/*
9322 * POSIX scheduling policies
9323 */
9324#define SCHED_FIFO 1
9325#define SCHED_OTHER 2
9326#define SCHED_RR 3
9327
9328struct sched_param {
9329 int sched_priority;
9330};
9331
9332/*
9333 * POSIX scheduling declarations for userland.
9334 */
9335#ifndef _KERNEL
9336#if 0 /* expanded by -frewrite-includes */
9337#include <sys/cdefs.h>
9338#endif /* expanded by -frewrite-includes */
9339# 224 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9340# 225 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9341#if 0 /* expanded by -frewrite-includes */
9342#include <sys/_types.h>
9343#endif /* expanded by -frewrite-includes */
9344# 225 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9345# 226 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9346
9347#ifndef _PID_T_DECLARED
9348typedef __pid_t pid_t;
9349#define _PID_T_DECLARED
9350#endif
9351# 231 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9352
9353struct timespec;
9354
9355__BEGIN_DECLS
9356int sched_get_priority_max(int);
9357int sched_get_priority_min(int);
9358int sched_getparam(pid_t, struct sched_param *);
9359int sched_getscheduler(pid_t);
9360int sched_rr_get_interval(pid_t, struct timespec *);
9361int sched_setparam(pid_t, const struct sched_param *);
9362int sched_setscheduler(pid_t, int, const struct sched_param *);
9363int sched_yield(void);
9364__END_DECLS
9365
9366#endif
9367# 246 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9368#endif /* !_SCHED_H_ */
9369# 247 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sched.h" 3 4
9370# 47 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 2 3 4
9371#if 0 /* expanded by -frewrite-includes */
9372#include <time.h>
9373#endif /* expanded by -frewrite-includes */
9374# 47 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9375# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 1 3 4
9376/*
9377 * Copyright (c) 1989, 1993
9378 * The Regents of the University of California. All rights reserved.
9379 * (c) UNIX System Laboratories, Inc.
9380 * All or some portions of this file are derived from material licensed
9381 * to the University of California by American Telephone and Telegraph
9382 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
9383 * the permission of UNIX System Laboratories, Inc.
9384 *
9385 * Redistribution and use in source and binary forms, with or without
9386 * modification, are permitted provided that the following conditions
9387 * are met:
9388 * 1. Redistributions of source code must retain the above copyright
9389 * notice, this list of conditions and the following disclaimer.
9390 * 2. Redistributions in binary form must reproduce the above copyright
9391 * notice, this list of conditions and the following disclaimer in the
9392 * documentation and/or other materials provided with the distribution.
9393 * 3. Neither the name of the University nor the names of its contributors
9394 * may be used to endorse or promote products derived from this software
9395 * without specific prior written permission.
9396 *
9397 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
9398 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9399 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9400 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
9401 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9402 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9403 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9404 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9405 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9406 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9407 * SUCH DAMAGE.
9408 *
9409 * @(#)time.h 8.3 (Berkeley) 1/21/94
9410 */
9411
9412/*
9413 * $FreeBSD$
9414 */
9415
9416#ifndef _TIME_H_
9417#define _TIME_H_
9418
9419#if 0 /* expanded by -frewrite-includes */
9420#include <sys/cdefs.h>
9421#endif /* expanded by -frewrite-includes */
9422# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9423# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9424#if 0 /* expanded by -frewrite-includes */
9425#include <sys/_null.h>
9426#endif /* expanded by -frewrite-includes */
9427# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9428# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9429#if 0 /* expanded by -frewrite-includes */
9430#include <sys/_types.h>
9431#endif /* expanded by -frewrite-includes */
9432# 46 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9433# 47 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9434
9435#if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE
9436/*
9437 * Frequency of the clock ticks reported by times(). Deprecated - use
9438 * sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.)
9439 */
9440#define CLK_TCK 128
9441#endif
9442# 55 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9443
9444/* Frequency of the clock ticks reported by clock(). */
9445#define CLOCKS_PER_SEC 128
9446
9447#ifndef _CLOCK_T_DECLARED
9448typedef __clock_t clock_t;
9449#define _CLOCK_T_DECLARED
9450#endif
9451# 63 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9452
9453#ifndef _TIME_T_DECLARED
9454typedef __time_t time_t;
9455#define _TIME_T_DECLARED
9456#endif
9457# 68 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9458
9459#ifndef _SIZE_T_DECLARED
9460typedef __size_t size_t;
9461#define _SIZE_T_DECLARED
9462#endif
9463# 73 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9464
9465#if __POSIX_VISIBLE >= 199309
9466/*
9467 * New in POSIX 1003.1b-1993.
9468 */
9469#ifndef _CLOCKID_T_DECLARED
9470typedef __clockid_t clockid_t;
9471#define _CLOCKID_T_DECLARED
9472#endif
9473# 82 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9474
9475#ifndef _TIMER_T_DECLARED
9476typedef __timer_t timer_t;
9477#define _TIMER_T_DECLARED
9478#endif
9479# 87 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9480
9481#if 0 /* expanded by -frewrite-includes */
9482#include <sys/timespec.h>
9483#endif /* expanded by -frewrite-includes */
9484# 88 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9485# 89 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9486#endif /* __POSIX_VISIBLE >= 199309 */
9487# 90 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9488
9489#if __POSIX_VISIBLE >= 200112
9490#ifndef _PID_T_DECLARED
9491typedef __pid_t pid_t;
9492#define _PID_T_DECLARED
9493#endif
9494# 96 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9495#endif
9496# 97 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9497
9498/* These macros are also in sys/time.h. */
9499#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112
9500#define CLOCK_REALTIME 0
9501#ifdef __BSD_VISIBLE
9502#define CLOCK_VIRTUAL 1
9503#define CLOCK_PROF 2
9504#endif
9505# 105 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9506#define CLOCK_MONOTONIC 4
9507#define CLOCK_UPTIME 5 /* FreeBSD-specific. */
9508#define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */
9509#define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */
9510#define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */
9511#define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */
9512#define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */
9513#define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */
9514#define CLOCK_SECOND 13 /* FreeBSD-specific. */
9515#define CLOCK_THREAD_CPUTIME_ID 14
9516#define CLOCK_PROCESS_CPUTIME_ID 15
9517#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */
9518# 117 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9519
9520#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112
9521#if __BSD_VISIBLE
9522#define TIMER_RELTIME 0x0 /* relative timer */
9523#endif
9524# 122 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9525#define TIMER_ABSTIME 0x1 /* absolute timer */
9526#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */
9527# 124 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9528
9529struct tm {
9530 int tm_sec; /* seconds after the minute [0-60] */
9531 int tm_min; /* minutes after the hour [0-59] */
9532 int tm_hour; /* hours since midnight [0-23] */
9533 int tm_mday; /* day of the month [1-31] */
9534 int tm_mon; /* months since January [0-11] */
9535 int tm_year; /* years since 1900 */
9536 int tm_wday; /* days since Sunday [0-6] */
9537 int tm_yday; /* days since January 1 [0-365] */
9538 int tm_isdst; /* Daylight Savings Time flag */
9539 long tm_gmtoff; /* offset from UTC in seconds */
9540 char *tm_zone; /* timezone abbreviation */
9541};
9542
9543#if __POSIX_VISIBLE
9544extern char *tzname[];
9545#endif
9546# 142 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9547
9548__BEGIN_DECLS
9549char *asctime(const struct tm *);
9550clock_t clock(void);
9551char *ctime(const time_t *);
9552double difftime(time_t, time_t);
9553/* XXX missing: getdate() */
9554struct tm *gmtime(const time_t *);
9555struct tm *localtime(const time_t *);
9556time_t mktime(struct tm *);
9557size_t strftime(char * __restrict, size_t, const char * __restrict,
9558 const struct tm * __restrict);
9559time_t time(time_t *);
9560#if __POSIX_VISIBLE >= 200112
9561struct sigevent;
9562int timer_create(clockid_t, struct sigevent *__restrict, timer_t *__restrict);
9563int timer_delete(timer_t);
9564int timer_gettime(timer_t, struct itimerspec *);
9565int timer_getoverrun(timer_t);
9566int timer_settime(timer_t, int, const struct itimerspec *__restrict,
9567 struct itimerspec *__restrict);
9568#endif
9569# 164 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9570#if __POSIX_VISIBLE
9571void tzset(void);
9572#endif
9573# 167 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9574
9575#if __POSIX_VISIBLE >= 199309
9576int clock_getres(clockid_t, struct timespec *);
9577int clock_gettime(clockid_t, struct timespec *);
9578int clock_settime(clockid_t, const struct timespec *);
9579/* XXX missing: clock_nanosleep() */
9580int nanosleep(const struct timespec *, struct timespec *);
9581#endif /* __POSIX_VISIBLE >= 199309 */
9582# 175 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9583
9584#if __POSIX_VISIBLE >= 200112
9585int clock_getcpuclockid(pid_t, clockid_t *);
9586#endif
9587# 179 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9588
9589#if __POSIX_VISIBLE >= 199506
9590char *asctime_r(const struct tm *, char *);
9591char *ctime_r(const time_t *, char *);
9592struct tm *gmtime_r(const time_t *, struct tm *);
9593struct tm *localtime_r(const time_t *, struct tm *);
9594#endif
9595# 186 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9596
9597#if __XSI_VISIBLE
9598char *strptime(const char * __restrict, const char * __restrict,
9599 struct tm * __restrict);
9600#endif
9601# 191 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9602
9603#if __BSD_VISIBLE
9604char *timezone(int, int); /* XXX XSI conflict */
9605void tzsetwall(void);
9606time_t timelocal(struct tm * const);
9607time_t timegm(struct tm * const);
9608#endif /* __BSD_VISIBLE */
9609# 198 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9610
9611#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
9612#if 0 /* expanded by -frewrite-includes */
9613#include <xlocale/_time.h>
9614#endif /* expanded by -frewrite-includes */
9615# 200 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9616# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_time.h" 1 3 4
9617/*-
9618 * Copyright (c) 2011, 2012 The FreeBSD Foundation
9619 * All rights reserved.
9620 *
9621 * This software was developed by David Chisnall under sponsorship from
9622 * the FreeBSD Foundation.
9623 *
9624 * Redistribution and use in source and binary forms, with or without
9625 * modification, are permitted provided that the following conditions
9626 * are met:
9627 * 1. Redistributions of source code must retain the above copyright
9628 * notice, this list of conditions and the following disclaimer.
9629 * 2. Redistributions in binary form must reproduce the above copyright
9630 * notice, this list of conditions and the following disclaimer in the
9631 * documentation and/or other materials provided with the distribution.
9632 *
9633 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
9634 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9635 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9636 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9637 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
9638 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
9639 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
9640 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
9641 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
9642 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
9643 * SUCH DAMAGE.
9644 *
9645 * $FreeBSD$
9646 */
9647
9648#ifndef _LOCALE_T_DEFINED
9649#define _LOCALE_T_DEFINED
9650typedef struct _xlocale *locale_t;
9651#endif
9652# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_time.h" 3 4
9653
9654/*
9655 * This file is included from both locale.h and xlocale.h. We need to expose
9656 * the declarations unconditionally if we are included from xlocale.h, but only
9657 * if we are in POSIX2008 mode if included from locale.h.
9658 */
9659#ifndef _XLOCALE_LOCALE1_H
9660#define _XLOCALE_LOCALE1_H
9661
9662size_t strftime_l(char * __restrict, size_t, const char * __restrict,
9663 const struct tm * __restrict, locale_t) __strftimelike(3, 0);
9664
9665#endif /* _XLOCALE_LOCALE1_H */
9666# 49 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_time.h" 3 4
9667
9668#ifdef _XLOCALE_H_
9669#ifndef _XLOCALE_LOCALE2_H
9670#define _XLOCALE_LOCALE2_H
9671
9672char *strptime_l(const char * __restrict, const char * __restrict,
9673 struct tm * __restrict, locale_t);
9674
9675#endif /* _XLOCALE_LOCALE2_H */
9676# 58 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_time.h" 3 4
9677#endif /* _XLOCALE_H_ */
9678# 59 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/xlocale/_time.h" 3 4
9679# 201 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 2 3 4
9680#endif
9681# 202 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9682__END_DECLS
9683
9684#endif /* !_TIME_H_ */
9685# 205 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/time.h" 3 4
9686# 48 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 2 3 4
9687
9688/*
9689 * Run-time invariant values:
9690 */
9691#define PTHREAD_DESTRUCTOR_ITERATIONS 4
9692#define PTHREAD_KEYS_MAX 256
9693#define PTHREAD_STACK_MIN __MINSIGSTKSZ
9694#define PTHREAD_THREADS_MAX __ULONG_MAX
9695#define PTHREAD_BARRIER_SERIAL_THREAD -1
9696
9697/*
9698 * Flags for threads and thread attributes.
9699 */
9700#define PTHREAD_DETACHED 0x1
9701#define PTHREAD_SCOPE_SYSTEM 0x2
9702#define PTHREAD_INHERIT_SCHED 0x4
9703#define PTHREAD_NOFLOAT 0x8
9704
9705#define PTHREAD_CREATE_DETACHED PTHREAD_DETACHED
9706#define PTHREAD_CREATE_JOINABLE 0
9707#define PTHREAD_SCOPE_PROCESS 0
9708#define PTHREAD_EXPLICIT_SCHED 0
9709
9710/*
9711 * Flags for read/write lock attributes
9712 */
9713#define PTHREAD_PROCESS_PRIVATE 0
9714#define PTHREAD_PROCESS_SHARED 1
9715
9716/*
9717 * Flags for cancelling threads
9718 */
9719#define PTHREAD_CANCEL_ENABLE 0
9720#define PTHREAD_CANCEL_DISABLE 1
9721#define PTHREAD_CANCEL_DEFERRED 0
9722#define PTHREAD_CANCEL_ASYNCHRONOUS 2
9723#define PTHREAD_CANCELED ((void *) 1)
9724
9725/*
9726 * Flags for once initialization.
9727 */
9728#define PTHREAD_NEEDS_INIT 0
9729#define PTHREAD_DONE_INIT 1
9730
9731/*
9732 * Static once initialization values.
9733 */
9734#define PTHREAD_ONCE_INIT { PTHREAD_NEEDS_INIT, NULL }
9735
9736/*
9737 * Static initialization values.
9738 */
9739#define PTHREAD_MUTEX_INITIALIZER NULL
9740#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP ((pthread_mutex_t)1)
9741#define PTHREAD_COND_INITIALIZER NULL
9742#define PTHREAD_RWLOCK_INITIALIZER NULL
9743
9744/*
9745 * Default attribute arguments (draft 4, deprecated).
9746 */
9747#ifndef PTHREAD_KERNEL
9748#define pthread_condattr_default NULL
9749#define pthread_mutexattr_default NULL
9750#define pthread_attr_default NULL
9751#endif
9752# 113 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9753
9754#define PTHREAD_PRIO_NONE 0
9755#define PTHREAD_PRIO_INHERIT 1
9756#define PTHREAD_PRIO_PROTECT 2
9757
9758/*
9759 * Mutex types (Single UNIX Specification, Version 2, 1997).
9760 *
9761 * Note that a mutex attribute with one of the following types:
9762 *
9763 * PTHREAD_MUTEX_NORMAL
9764 * PTHREAD_MUTEX_RECURSIVE
9765 *
9766 * will deviate from POSIX specified semantics.
9767 */
9768enum pthread_mutextype {
9769 PTHREAD_MUTEX_ERRORCHECK = 1, /* Default POSIX mutex */
9770 PTHREAD_MUTEX_RECURSIVE = 2, /* Recursive mutex */
9771 PTHREAD_MUTEX_NORMAL = 3, /* No error checking */
9772 PTHREAD_MUTEX_ADAPTIVE_NP = 4, /* Adaptive mutex, spins briefly before blocking on lock */
9773 PTHREAD_MUTEX_TYPE_MAX
9774};
9775
9776#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK
9777
9778struct _pthread_cleanup_info {
9779 __uintptr_t pthread_cleanup_pad[8];
9780};
9781
9782/*
9783 * Thread function prototype definitions:
9784 */
9785__BEGIN_DECLS
9786int pthread_atfork(void (*)(void), void (*)(void), void (*)(void));
9787int pthread_attr_destroy(pthread_attr_t *) __nonnull(1);
9788int pthread_attr_getstack(const pthread_attr_t * __restrict,
9789 void ** __restrict, size_t * __restrict)
9790 __nonnull_all;
9791int pthread_attr_getstacksize(const pthread_attr_t *, size_t *)
9792 __nonnull_all;
9793int pthread_attr_getguardsize(const pthread_attr_t *, size_t *);
9794int pthread_attr_getstackaddr(const pthread_attr_t *, void **);
9795int pthread_attr_getdetachstate(const pthread_attr_t *, int *)
9796 __nonnull_all;
9797int pthread_attr_init(pthread_attr_t *) __nonnull(1);
9798int pthread_attr_setstacksize(pthread_attr_t *, size_t)
9799 __nonnull(1);
9800int pthread_attr_setguardsize(pthread_attr_t *, size_t)
9801 __nonnull(1);
9802int pthread_attr_setstack(pthread_attr_t *, void *, size_t)
9803 __nonnull(1);
9804int pthread_attr_setstackaddr(pthread_attr_t *, void *);
9805int pthread_attr_setdetachstate(pthread_attr_t *, int) __nonnull(1);
9806int pthread_barrier_destroy(pthread_barrier_t *);
9807int pthread_barrier_init(pthread_barrier_t *,
9808 const pthread_barrierattr_t *, unsigned);
9809int pthread_barrier_wait(pthread_barrier_t *);
9810int pthread_barrierattr_destroy(pthread_barrierattr_t *);
9811int pthread_barrierattr_getpshared(const pthread_barrierattr_t *,
9812 int *);
9813int pthread_barrierattr_init(pthread_barrierattr_t *) __nonnull(1);
9814int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);
9815
9816#define pthread_cleanup_push(cleanup_routine, cleanup_arg) \
9817 { \
9818 struct _pthread_cleanup_info __cleanup_info__; \
9819 __pthread_cleanup_push_imp(cleanup_routine, cleanup_arg,\
9820 &__cleanup_info__); \
9821 {
9822
9823#define pthread_cleanup_pop(execute) \
9824 (void)0; \
9825 } \
9826 __pthread_cleanup_pop_imp(execute); \
9827 }
9828
9829int pthread_condattr_destroy(pthread_condattr_t *) __nonnull(1);
9830int pthread_condattr_getclock(const pthread_condattr_t *,
9831 clockid_t *) __nonnull_all;
9832int pthread_condattr_getpshared(const pthread_condattr_t *, int *)
9833 __nonnull_all;
9834int pthread_condattr_init(pthread_condattr_t *) __nonnull(1);
9835int pthread_condattr_setclock(pthread_condattr_t *, clockid_t)
9836 __nonnull(1);
9837int pthread_condattr_setpshared(pthread_condattr_t *, int)
9838 __nonnull(1);
9839int pthread_cond_broadcast(pthread_cond_t *)
9840 __nonnull(1);
9841int pthread_cond_destroy(pthread_cond_t *)
9842 __nonnull(1);
9843int pthread_cond_init(pthread_cond_t *,
9844 const pthread_condattr_t *) __nonnull(1);
9845int pthread_cond_signal(pthread_cond_t *) __nonnull(1);
9846int pthread_cond_timedwait(pthread_cond_t *,
9847 pthread_mutex_t *__mutex, const struct timespec *)
9848 __nonnull_all __requires_exclusive(*__mutex);
9849int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex)
9850 __nonnull_all __requires_exclusive(*__mutex);
9851int pthread_create(pthread_t *, const pthread_attr_t *,
9852 void *(*) (void *), void *) __nonnull(1) __nonnull(3);
9853int pthread_detach(pthread_t);
9854int pthread_equal(pthread_t, pthread_t);
9855void pthread_exit(void *) __dead2;
9856void *pthread_getspecific(pthread_key_t);
9857int pthread_getcpuclockid(pthread_t, clockid_t *) __nonnull(2);
9858int pthread_join(pthread_t, void **);
9859int pthread_key_create(pthread_key_t *,
9860 void (*) (void *)) __nonnull(1);
9861int pthread_key_delete(pthread_key_t);
9862int pthread_mutexattr_init(pthread_mutexattr_t *) __nonnull(1);
9863int pthread_mutexattr_destroy(pthread_mutexattr_t *) __nonnull(1);
9864int pthread_mutexattr_getpshared(const pthread_mutexattr_t *,
9865 int *) __nonnull_all;
9866int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *)
9867 __nonnull_all;
9868int pthread_mutexattr_settype(pthread_mutexattr_t *, int)
9869 __nonnull(1);
9870int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int)
9871 __nonnull(1);
9872int pthread_mutex_destroy(pthread_mutex_t *__mutex)
9873 __nonnull(1) __requires_unlocked(*__mutex);
9874int pthread_mutex_init(pthread_mutex_t *__mutex,
9875 const pthread_mutexattr_t *)
9876 __nonnull(1) __requires_unlocked(*__mutex);
9877int pthread_mutex_lock(pthread_mutex_t *__mutex)
9878 __nonnull(1) __locks_exclusive(*__mutex);
9879int pthread_mutex_trylock(pthread_mutex_t *__mutex)
9880 __nonnull(1) __trylocks_exclusive(0, *__mutex);
9881int pthread_mutex_timedlock(pthread_mutex_t *__mutex,
9882 const struct timespec *)
9883 __nonnull_all __trylocks_exclusive(0, *__mutex);
9884int pthread_mutex_unlock(pthread_mutex_t *__mutex)
9885 __nonnull(1) __unlocks(*__mutex);
9886int pthread_once(pthread_once_t *, void (*) (void)) __nonnull_all;
9887int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock)
9888 __nonnull(1) __requires_unlocked(*__rwlock);
9889int pthread_rwlock_init(pthread_rwlock_t *__rwlock,
9890 const pthread_rwlockattr_t *)
9891 __nonnull(1) __requires_unlocked(*__rwlock);
9892int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock)
9893 __nonnull(1) __locks_shared(*__rwlock);
9894int pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock,
9895 const struct timespec *)
9896 __nonnull_all __trylocks_shared(0, *__rwlock);
9897int pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock,
9898 const struct timespec *)
9899 __nonnull_all __trylocks_exclusive(0, *__rwlock);
9900int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock)
9901 __nonnull(1) __trylocks_shared(0, *__rwlock);
9902int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock)
9903 __nonnull(1) __trylocks_exclusive(0, *__rwlock);
9904int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock)
9905 __nonnull(1) __unlocks(*__rwlock);
9906int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock)
9907 __nonnull(1) __locks_exclusive(*__rwlock);
9908int pthread_rwlockattr_destroy(pthread_rwlockattr_t *)
9909 __nonnull(1);
9910int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *,
9911 int *);
9912int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *,
9913 int *) __nonnull_all;
9914int pthread_rwlockattr_init(pthread_rwlockattr_t *)
9915 __nonnull(1);
9916int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *, int);
9917int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int)
9918 __nonnull(1);
9919pthread_t pthread_self(void);
9920int pthread_setspecific(pthread_key_t, const void *);
9921
9922int pthread_spin_init(pthread_spinlock_t *__spin, int)
9923 __requires_unlocked(*__spin);
9924int pthread_spin_destroy(pthread_spinlock_t *__spin)
9925 __requires_unlocked(*__spin);
9926int pthread_spin_lock(pthread_spinlock_t *__spin)
9927 __locks_exclusive(*__spin);
9928int pthread_spin_trylock(pthread_spinlock_t *__spin)
9929 __trylocks_exclusive(0, *__spin);
9930int pthread_spin_unlock(pthread_spinlock_t *__spin)
9931 __unlocks(*__spin);
9932int pthread_cancel(pthread_t);
9933int pthread_setcancelstate(int, int *);
9934int pthread_setcanceltype(int, int *);
9935void pthread_testcancel(void);
9936
9937#if __BSD_VISIBLE
9938int pthread_getprio(pthread_t);
9939int pthread_setprio(pthread_t, int);
9940void pthread_yield(void);
9941#endif
9942# 302 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9943
9944int pthread_mutexattr_getprioceiling(pthread_mutexattr_t *,
9945 int *);
9946int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *,
9947 int);
9948int pthread_mutex_getprioceiling(pthread_mutex_t *, int *);
9949int pthread_mutex_setprioceiling(pthread_mutex_t *, int, int *);
9950
9951int pthread_mutexattr_getprotocol(pthread_mutexattr_t *, int *);
9952int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
9953
9954int pthread_attr_getinheritsched(const pthread_attr_t *, int *);
9955int pthread_attr_getschedparam(const pthread_attr_t *,
9956 struct sched_param *) __nonnull_all;
9957int pthread_attr_getschedpolicy(const pthread_attr_t *, int *)
9958 __nonnull_all;
9959int pthread_attr_getscope(const pthread_attr_t *, int *)
9960 __nonnull_all;
9961int pthread_attr_setinheritsched(pthread_attr_t *, int);
9962int pthread_attr_setschedparam(pthread_attr_t *,
9963 const struct sched_param *) __nonnull(1) __nonnull(2);
9964int pthread_attr_setschedpolicy(pthread_attr_t *, int) __nonnull(1);
9965int pthread_attr_setscope(pthread_attr_t *, int) __nonnull(1);
9966int pthread_getschedparam(pthread_t pthread, int *,
9967 struct sched_param *) __nonnull(2) __nonnull(3);
9968int pthread_setschedparam(pthread_t, int,
9969 const struct sched_param *) __nonnull(3);
9970#if __XSI_VISIBLE
9971int pthread_getconcurrency(void);
9972int pthread_setconcurrency(int);
9973#endif
9974# 333 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9975
9976void __pthread_cleanup_push_imp(void (*)(void *), void *,
9977 struct _pthread_cleanup_info *);
9978void __pthread_cleanup_pop_imp(int);
9979__END_DECLS
9980
9981#endif
9982# 340 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/pthread.h" 3 4
9983# 87 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h" 2
9984
9985#define HEIMDAL_MUTEX pthread_mutex_t
9986#define HEIMDAL_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
9987#define HEIMDAL_MUTEX_init(m) pthread_mutex_init(m, NULL)
9988#define HEIMDAL_MUTEX_lock(m) pthread_mutex_lock(m)
9989#define HEIMDAL_MUTEX_unlock(m) pthread_mutex_unlock(m)
9990#define HEIMDAL_MUTEX_destroy(m) pthread_mutex_destroy(m)
9991
9992#define HEIMDAL_RWLOCK rwlock_t
9993#define HEIMDAL_RWLOCK_INITIALIZER RWLOCK_INITIALIZER
9994#define HEIMDAL_RWLOCK_init(l) pthread_rwlock_init(l, NULL)
9995#define HEIMDAL_RWLOCK_rdlock(l) pthread_rwlock_rdlock(l)
9996#define HEIMDAL_RWLOCK_wrlock(l) pthread_rwlock_wrlock(l)
9997#define HEIMDAL_RWLOCK_tryrdlock(l) pthread_rwlock_tryrdlock(l)
9998#define HEIMDAL_RWLOCK_trywrlock(l) pthread_rwlock_trywrlock(l)
9999#define HEIMDAL_RWLOCK_unlock(l) pthread_rwlock_unlock(l)
10000#define HEIMDAL_RWLOCK_destroy(l) pthread_rwlock_destroy(l)
10001
10002#define HEIMDAL_thread_key pthread_key_t
10003#define HEIMDAL_key_create(k,d,r) do { r = pthread_key_create(k,d); } while(0)
10004#define HEIMDAL_setspecific(k,s,r) do { r = pthread_setspecific(k,s); } while(0)
10005#define HEIMDAL_getspecific(k) pthread_getspecific(k)
10006#define HEIMDAL_key_delete(k) pthread_key_delete(k)
10007
10008#elif defined(HEIMDAL_DEBUG_THREADS)
10009# 112 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
10010
10011/* no threads support, just do consistency checks */
10012#if 0 /* expanded by -frewrite-includes */
10013#include <stdlib.h>
10014#endif /* expanded by -frewrite-includes */
10015# 114 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
10016# 115 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
10017
10018#define HEIMDAL_MUTEX int
10019#define HEIMDAL_MUTEX_INITIALIZER 0
10020#define HEIMDAL_MUTEX_init(m) do { (*(m)) = 0; } while(0)
10021#define HEIMDAL_MUTEX_lock(m) do { if ((*(m))++ != 0) abort(); } while(0)
10022#define HEIMDAL_MUTEX_unlock(m) do { if ((*(m))-- != 1) abort(); } while(0)
10023#define HEIMDAL_MUTEX_destroy(m) do {if ((*(m)) != 0) abort(); } while(0)
10024
10025#define HEIMDAL_RWLOCK rwlock_t int
10026#define HEIMDAL_RWLOCK_INITIALIZER 0
10027#define HEIMDAL_RWLOCK_init(l) do { } while(0)
10028#define HEIMDAL_RWLOCK_rdlock(l) do { } while(0)
10029#define HEIMDAL_RWLOCK_wrlock(l) do { } while(0)
10030#define HEIMDAL_RWLOCK_tryrdlock(l) do { } while(0)
10031#define HEIMDAL_RWLOCK_trywrlock(l) do { } while(0)
10032#define HEIMDAL_RWLOCK_unlock(l) do { } while(0)
10033#define HEIMDAL_RWLOCK_destroy(l) do { } while(0)
10034
10035#define HEIMDAL_internal_thread_key 1
10036
10037#else /* no thread support, no debug case */
10038# 136 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
10039
10040#define HEIMDAL_MUTEX int
10041#define HEIMDAL_MUTEX_INITIALIZER 0
10042#define HEIMDAL_MUTEX_init(m) do { (void)(m); } while(0)
10043#define HEIMDAL_MUTEX_lock(m) do { (void)(m); } while(0)
10044#define HEIMDAL_MUTEX_unlock(m) do { (void)(m); } while(0)
10045#define HEIMDAL_MUTEX_destroy(m) do { (void)(m); } while(0)
10046
10047#define HEIMDAL_RWLOCK rwlock_t int
10048#define HEIMDAL_RWLOCK_INITIALIZER 0
10049#define HEIMDAL_RWLOCK_init(l) do { } while(0)
10050#define HEIMDAL_RWLOCK_rdlock(l) do { } while(0)
10051#define HEIMDAL_RWLOCK_wrlock(l) do { } while(0)
10052#define HEIMDAL_RWLOCK_tryrdlock(l) do { } while(0)
10053#define HEIMDAL_RWLOCK_trywrlock(l) do { } while(0)
10054#define HEIMDAL_RWLOCK_unlock(l) do { } while(0)
10055#define HEIMDAL_RWLOCK_destroy(l) do { } while(0)
10056
10057#define HEIMDAL_internal_thread_key 1
10058
10059#endif /* no thread support */
10060# 157 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
10061
10062#ifdef HEIMDAL_internal_thread_key
10063
10064typedef struct heim_thread_key {
10065 void *value;
10066 void (*destructor)(void *);
10067} heim_thread_key;
10068
10069#define HEIMDAL_thread_key heim_thread_key
10070#define HEIMDAL_key_create(k,d,r) \
10071 do { (k)->value = NULL; (k)->destructor = (d); r = 0; } while(0)
10072#define HEIMDAL_setspecific(k,s,r) do { (k).value = s ; r = 0; } while(0)
10073#define HEIMDAL_getspecific(k) ((k).value)
10074#define HEIMDAL_key_delete(k) do { (*(k).destructor)((k).value); } while(0)
10075
10076#undef HEIMDAL_internal_thread_key
10077#endif /* HEIMDAL_internal_thread_key */
10078# 174 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
10079
10080#endif /* HEIM_THREADS_H */
10081# 176 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/include/heim_threads.h"
10082# 57 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
10083#if 0 /* expanded by -frewrite-includes */
10084#include "heimbase.h"
10085#endif /* expanded by -frewrite-includes */
10086# 57 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
10087# 1 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h" 1
10088/*
10089 * Copyright (c) 2010 Kungliga Tekniska Högskolan
10090 * (Royal Institute of Technology, Stockholm, Sweden).
10091 * All rights reserved.
10092 *
10093 * Portions Copyright (c) 2010 Apple Inc. All rights reserved.
10094 *
10095 * Redistribution and use in source and binary forms, with or without
10096 * modification, are permitted provided that the following conditions
10097 * are met:
10098 *
10099 * 1. Redistributions of source code must retain the above copyright
10100 * notice, this list of conditions and the following disclaimer.
10101 *
10102 * 2. Redistributions in binary form must reproduce the above copyright
10103 * notice, this list of conditions and the following disclaimer in the
10104 * documentation and/or other materials provided with the distribution.
10105 *
10106 * 3. Neither the name of the Institute nor the names of its contributors
10107 * may be used to endorse or promote products derived from this software
10108 * without specific prior written permission.
10109 *
10110 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
10111 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10112 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10113 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
10114 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10115 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10116 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10117 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10118 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10119 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10120 * SUCH DAMAGE.
10121 */
10122
10123#ifndef HEIM_BASE_H
10124#define HEIM_BASE_H 1
10125
10126#if 0 /* expanded by -frewrite-includes */
10127#include <sys/types.h>
10128#endif /* expanded by -frewrite-includes */
10129# 39 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
10130# 40 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
10131#if 0 /* expanded by -frewrite-includes */
10132#include <krb5-types.h>
10133#endif /* expanded by -frewrite-includes */
10134# 40 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
10135# 1 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h" 1
10136/*
10137 * generic krb5-types.h for cross compiling, assume system is posix/sus
10138 */
10139
10140/* $FreeBSD$ */
10141
10142#ifndef __krb5_types_h__
10143#define __krb5_types_h__
10144
10145#if 0 /* expanded by -frewrite-includes */
10146#include <inttypes.h>
10147#endif /* expanded by -frewrite-includes */
10148# 10 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
10149# 1 "/home/rnw24/sdk/sdk/bin/../lib/clang/3.8.0/include/inttypes.h" 1 3 4
10150/*===---- inttypes.h - Standard header for integer printf macros ----------===*\
10151 *
10152 * Permission is hereby granted, free of charge, to any person obtaining a copy
10153 * of this software and associated documentation files (the "Software"), to deal
10154 * in the Software without restriction, including without limitation the rights
10155 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10156 * copies of the Software, and to permit persons to whom the Software is
10157 * furnished to do so, subject to the following conditions:
10158 *
10159 * The above copyright notice and this permission notice shall be included in
10160 * all copies or substantial portions of the Software.
10161 *
10162 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10163 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10164 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
10165 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
10166 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
10167 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
10168 * THE SOFTWARE.
10169 *
10170\*===----------------------------------------------------------------------===*/
10171
10172#ifndef __CLANG_INTTYPES_H
10173#define __CLANG_INTTYPES_H
10174
10175#if 0 /* expanded by -frewrite-includes */
10176#include_next <inttypes.h>
10177#endif /* expanded by -frewrite-includes */
10178# 26 "/home/rnw24/sdk/sdk/bin/../lib/clang/3.8.0/include/inttypes.h" 3 4
10179# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 1 3 4
10180/*-
10181 * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
10182 * All rights reserved.
10183 *
10184 * Redistribution and use in source and binary forms, with or without
10185 * modification, are permitted provided that the following conditions
10186 * are met:
10187 * 1. Redistributions of source code must retain the above copyright
10188 * notice, this list of conditions and the following disclaimer.
10189 * 2. Redistributions in binary form must reproduce the above copyright
10190 * notice, this list of conditions and the following disclaimer in the
10191 * documentation and/or other materials provided with the distribution.
10192 *
10193 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
10194 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10195 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10196 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10197 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10198 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10199 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10200 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10201 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10202 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10203 * SUCH DAMAGE.
10204 *
10205 * $FreeBSD$
10206 */
10207
10208#ifndef _INTTYPES_H_
10209#define _INTTYPES_H_
10210
10211#if 0 /* expanded by -frewrite-includes */
10212#include <machine/_inttypes.h>
10213#endif /* expanded by -frewrite-includes */
10214# 32 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 3 4
10215# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_inttypes.h" 1 3 4
10216/*-
10217 * Copyright (c) 2001 The NetBSD Foundation, Inc.
10218 * All rights reserved.
10219 *
10220 * This code is derived from software contributed to The NetBSD Foundation
10221 * by Klaus Klein.
10222 *
10223 * Redistribution and use in source and binary forms, with or without
10224 * modification, are permitted provided that the following conditions
10225 * are met:
10226 * 1. Redistributions of source code must retain the above copyright
10227 * notice, this list of conditions and the following disclaimer.
10228 * 2. Redistributions in binary form must reproduce the above copyright
10229 * notice, this list of conditions and the following disclaimer in the
10230 * documentation and/or other materials provided with the distribution.
10231 *
10232 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
10233 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
10234 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10235 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
10236 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
10237 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
10238 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
10239 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
10240 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10241 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
10242 * POSSIBILITY OF SUCH DAMAGE.
10243 *
10244 * From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $
10245 * from: src/sys/i386/include/_inttypes.h,v 1.2 2002/06/30 05:48:02 mike
10246 * $FreeBSD$
10247 */
10248
10249#ifndef _MACHINE_INTTYPES_H_
10250#define _MACHINE_INTTYPES_H_
10251
10252/*
10253 * Macros for format specifiers.
10254 */
10255
10256#ifdef __mips_n64
10257#define __PRI64 "l"
10258#define __PRIptr "l"
10259#else
10260# 45 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_inttypes.h" 3 4
10261#define __PRI64 "ll"
10262#define __PRIptr
10263#endif
10264# 48 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_inttypes.h" 3 4
10265
10266/* fprintf(3) macros for signed integers. */
10267
10268#define PRId8 "d" /* int8_t */
10269#define PRId16 "d" /* int16_t */
10270#define PRId32 "d" /* int32_t */
10271#define PRId64 __PRI64"d" /* int64_t */
10272#define PRIdLEAST8 "d" /* int_least8_t */
10273#define PRIdLEAST16 "d" /* int_least16_t */
10274#define PRIdLEAST32 "d" /* int_least32_t */
10275#define PRIdLEAST64 __PRI64"d" /* int_least64_t */
10276#define PRIdFAST8 "d" /* int_fast8_t */
10277#define PRIdFAST16 "d" /* int_fast16_t */
10278#define PRIdFAST32 "d" /* int_fast32_t */
10279#define PRIdFAST64 __PRI64"d" /* int_fast64_t */
10280#define PRIdMAX "jd" /* intmax_t */
10281#define PRIdPTR __PRIptr"d" /* intptr_t */
10282
10283#define PRIi8 "i" /* int8_t */
10284#define PRIi16 "i" /* int16_t */
10285#define PRIi32 "i" /* int32_t */
10286#define PRIi64 __PRI64"i" /* int64_t */
10287#define PRIiLEAST8 "i" /* int_least8_t */
10288#define PRIiLEAST16 "i" /* int_least16_t */
10289#define PRIiLEAST32 "i" /* int_least32_t */
10290#define PRIiLEAST64 __PRI64"i" /* int_least64_t */
10291#define PRIiFAST8 "i" /* int_fast8_t */
10292#define PRIiFAST16 "i" /* int_fast16_t */
10293#define PRIiFAST32 "i" /* int_fast32_t */
10294#define PRIiFAST64 __PRI64"i" /* int_fast64_t */
10295#define PRIiMAX "ji" /* intmax_t */
10296#define PRIiPTR __PRIptr"i" /* intptr_t */
10297
10298/* fprintf(3) macros for unsigned integers. */
10299
10300#define PRIo8 "o" /* uint8_t */
10301#define PRIo16 "o" /* uint16_t */
10302#define PRIo32 "o" /* uint32_t */
10303#define PRIo64 __PRI64"o" /* uint64_t */
10304#define PRIoLEAST8 "o" /* uint_least8_t */
10305#define PRIoLEAST16 "o" /* uint_least16_t */
10306#define PRIoLEAST32 "o" /* uint_least32_t */
10307#define PRIoLEAST64 __PRI64"o" /* uint_least64_t */
10308#define PRIoFAST8 "o" /* uint_fast8_t */
10309#define PRIoFAST16 "o" /* uint_fast16_t */
10310#define PRIoFAST32 "o" /* uint_fast32_t */
10311#define PRIoFAST64 __PRI64"o" /* uint_fast64_t */
10312#define PRIoMAX "jo" /* uintmax_t */
10313#define PRIoPTR __PRIptr"o" /* uintptr_t */
10314
10315#define PRIu8 "u" /* uint8_t */
10316#define PRIu16 "u" /* uint16_t */
10317#define PRIu32 "u" /* uint32_t */
10318#define PRIu64 __PRI64"u" /* uint64_t */
10319#define PRIuLEAST8 "u" /* uint_least8_t */
10320#define PRIuLEAST16 "u" /* uint_least16_t */
10321#define PRIuLEAST32 "u" /* uint_least32_t */
10322#define PRIuLEAST64 __PRI64"u" /* uint_least64_t */
10323#define PRIuFAST8 "u" /* uint_fast8_t */
10324#define PRIuFAST16 "u" /* uint_fast16_t */
10325#define PRIuFAST32 "u" /* uint_fast32_t */
10326#define PRIuFAST64 __PRI64"u" /* uint_fast64_t */
10327#define PRIuMAX "ju" /* uintmax_t */
10328#define PRIuPTR __PRIptr"u" /* uintptr_t */
10329
10330#define PRIx8 "x" /* uint8_t */
10331#define PRIx16 "x" /* uint16_t */
10332#define PRIx32 "x" /* uint32_t */
10333#define PRIx64 __PRI64"x" /* uint64_t */
10334#define PRIxLEAST8 "x" /* uint_least8_t */
10335#define PRIxLEAST16 "x" /* uint_least16_t */
10336#define PRIxLEAST32 "x" /* uint_least32_t */
10337#define PRIxLEAST64 __PRI64"x" /* uint_least64_t */
10338#define PRIxFAST8 "x" /* uint_fast8_t */
10339#define PRIxFAST16 "x" /* uint_fast16_t */
10340#define PRIxFAST32 "x" /* uint_fast32_t */
10341#define PRIxFAST64 __PRI64"x" /* uint_fast64_t */
10342#define PRIxMAX "jx" /* uintmax_t */
10343#define PRIxPTR __PRIptr"x" /* uintptr_t */
10344
10345#define PRIX8 "X" /* uint8_t */
10346#define PRIX16 "X" /* uint16_t */
10347#define PRIX32 "X" /* uint32_t */
10348#define PRIX64 __PRI64"X" /* uint64_t */
10349#define PRIXLEAST8 "X" /* uint_least8_t */
10350#define PRIXLEAST16 "X" /* uint_least16_t */
10351#define PRIXLEAST32 "X" /* uint_least32_t */
10352#define PRIXLEAST64 __PRI64"X" /* uint_least64_t */
10353#define PRIXFAST8 "X" /* uint_fast8_t */
10354#define PRIXFAST16 "X" /* uint_fast16_t */
10355#define PRIXFAST32 "X" /* uint_fast32_t */
10356#define PRIXFAST64 __PRI64"X" /* uint_fast64_t */
10357#define PRIXMAX "jX" /* uintmax_t */
10358#define PRIXPTR __PRIptr"X" /* uintptr_t */
10359
10360/* fscanf(3) macros for signed integers. */
10361
10362#define SCNd8 "hhd" /* int8_t */
10363#define SCNd16 "hd" /* int16_t */
10364#define SCNd32 "d" /* int32_t */
10365#define SCNd64 __PRI64"d" /* int64_t */
10366#define SCNdLEAST8 "hhd" /* int_least8_t */
10367#define SCNdLEAST16 "hd" /* int_least16_t */
10368#define SCNdLEAST32 "d" /* int_least32_t */
10369#define SCNdLEAST64 __PRI64"d" /* int_least64_t */
10370#define SCNdFAST8 "d" /* int_fast8_t */
10371#define SCNdFAST16 "d" /* int_fast16_t */
10372#define SCNdFAST32 "d" /* int_fast32_t */
10373#define SCNdFAST64 __PRI64"d" /* int_fast64_t */
10374#define SCNdMAX "jd" /* intmax_t */
10375#define SCNdPTR __PRIptr"d" /* intptr_t */
10376
10377#define SCNi8 "hhi" /* int8_t */
10378#define SCNi16 "hi" /* int16_t */
10379#define SCNi32 "i" /* int32_t */
10380#define SCNi64 __PRI64"i" /* int64_t */
10381#define SCNiLEAST8 "hhi" /* int_least8_t */
10382#define SCNiLEAST16 "hi" /* int_least16_t */
10383#define SCNiLEAST32 "i" /* int_least32_t */
10384#define SCNiLEAST64 __PRI64"i" /* int_least64_t */
10385#define SCNiFAST8 "i" /* int_fast8_t */
10386#define SCNiFAST16 "i" /* int_fast16_t */
10387#define SCNiFAST32 "i" /* int_fast32_t */
10388#define SCNiFAST64 __PRI64"i" /* int_fast64_t */
10389#define SCNiMAX "ji" /* intmax_t */
10390#define SCNiPTR __PRIptr"i" /* intptr_t */
10391
10392/* fscanf(3) macros for unsigned integers. */
10393
10394#define SCNo8 "hho" /* uint8_t */
10395#define SCNo16 "ho" /* uint16_t */
10396#define SCNo32 "o" /* uint32_t */
10397#define SCNo64 __PRI64"o" /* uint64_t */
10398#define SCNoLEAST8 "hho" /* uint_least8_t */
10399#define SCNoLEAST16 "ho" /* uint_least16_t */
10400#define SCNoLEAST32 "o" /* uint_least32_t */
10401#define SCNoLEAST64 __PRI64"o" /* uint_least64_t */
10402#define SCNoFAST8 "o" /* uint_fast8_t */
10403#define SCNoFAST16 "o" /* uint_fast16_t */
10404#define SCNoFAST32 "o" /* uint_fast32_t */
10405#define SCNoFAST64 __PRI64"o" /* uint_fast64_t */
10406#define SCNoMAX "jo" /* uintmax_t */
10407#define SCNoPTR __PRIptr"o" /* uintptr_t */
10408
10409#define SCNu8 "hhu" /* uint8_t */
10410#define SCNu16 "hu" /* uint16_t */
10411#define SCNu32 "u" /* uint32_t */
10412#define SCNu64 __PRI64"u" /* uint64_t */
10413#define SCNuLEAST8 "hhu" /* uint_least8_t */
10414#define SCNuLEAST16 "hu" /* uint_least16_t */
10415#define SCNuLEAST32 "u" /* uint_least32_t */
10416#define SCNuLEAST64 __PRI64"u" /* uint_least64_t */
10417#define SCNuFAST8 "u" /* uint_fast8_t */
10418#define SCNuFAST16 "u" /* uint_fast16_t */
10419#define SCNuFAST32 "u" /* uint_fast32_t */
10420#define SCNuFAST64 __PRI64"u" /* uint_fast64_t */
10421#define SCNuMAX "ju" /* uintmax_t */
10422#define SCNuPTR __PRIptr"u" /* uintptr_t */
10423
10424#define SCNx8 "hhx" /* uint8_t */
10425#define SCNx16 "hx" /* uint16_t */
10426#define SCNx32 "x" /* uint32_t */
10427#define SCNx64 __PRI64"x" /* uint64_t */
10428#define SCNxLEAST8 "hhx" /* uint_least8_t */
10429#define SCNxLEAST16 "hx" /* uint_least16_t */
10430#define SCNxLEAST32 "x" /* uint_least32_t */
10431#define SCNxLEAST64 __PRI64"x" /* uint_least64_t */
10432#define SCNxFAST8 "x" /* uint_fast8_t */
10433#define SCNxFAST16 "x" /* uint_fast16_t */
10434#define SCNxFAST32 "x" /* uint_fast32_t */
10435#define SCNxFAST64 __PRI64"x" /* uint_fast64_t */
10436#define SCNxMAX "jx" /* uintmax_t */
10437#define SCNxPTR __PRIptr"x" /* uintptr_t */
10438
10439#endif /* !_MACHINE_INTTYPES_H_ */
10440# 223 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_inttypes.h" 3 4
10441# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 2 3 4
10442#if 0 /* expanded by -frewrite-includes */
10443#include <sys/stdint.h>
10444#endif /* expanded by -frewrite-includes */
10445# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 3 4
10446# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 1 3 4
10447/*-
10448 * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
10449 * All rights reserved.
10450 *
10451 * Redistribution and use in source and binary forms, with or without
10452 * modification, are permitted provided that the following conditions
10453 * are met:
10454 * 1. Redistributions of source code must retain the above copyright
10455 * notice, this list of conditions and the following disclaimer.
10456 * 2. Redistributions in binary form must reproduce the above copyright
10457 * notice, this list of conditions and the following disclaimer in the
10458 * documentation and/or other materials provided with the distribution.
10459 *
10460 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
10461 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10462 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10463 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
10464 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10465 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10466 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10467 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10468 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10469 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10470 * SUCH DAMAGE.
10471 *
10472 * $FreeBSD$
10473 */
10474
10475#ifndef _SYS_STDINT_H_
10476#define _SYS_STDINT_H_
10477
10478#if 0 /* expanded by -frewrite-includes */
10479#include <sys/cdefs.h>
10480#endif /* expanded by -frewrite-includes */
10481# 32 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10482# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10483#if 0 /* expanded by -frewrite-includes */
10484#include <sys/_types.h>
10485#endif /* expanded by -frewrite-includes */
10486# 33 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10487# 34 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10488
10489#if 0 /* expanded by -frewrite-includes */
10490#include <machine/_stdint.h>
10491#endif /* expanded by -frewrite-includes */
10492# 35 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10493# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 1 3 4
10494/*-
10495 * Copyright (c) 2001, 2002 Mike Barcroft <mike@FreeBSD.org>
10496 * Copyright (c) 2001 The NetBSD Foundation, Inc.
10497 * All rights reserved.
10498 *
10499 * This code is derived from software contributed to The NetBSD Foundation
10500 * by Klaus Klein.
10501 *
10502 * Redistribution and use in source and binary forms, with or without
10503 * modification, are permitted provided that the following conditions
10504 * are met:
10505 * 1. Redistributions of source code must retain the above copyright
10506 * notice, this list of conditions and the following disclaimer.
10507 * 2. Redistributions in binary form must reproduce the above copyright
10508 * notice, this list of conditions and the following disclaimer in the
10509 * documentation and/or other materials provided with the distribution.
10510 * 3. All advertising materials mentioning features or use of this software
10511 * must display the following acknowledgement:
10512 * This product includes software developed by the NetBSD
10513 * Foundation, Inc. and its contributors.
10514 * 4. Neither the name of The NetBSD Foundation nor the names of its
10515 * contributors may be used to endorse or promote products derived
10516 * from this software without specific prior written permission.
10517 *
10518 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
10519 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
10520 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
10521 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
10522 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
10523 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
10524 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
10525 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
10526 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
10527 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
10528 * POSSIBILITY OF SUCH DAMAGE.
10529 *
10530 * from: src/sys/i386/include/_stdint.h,v 1.2 2004/05/18 16:04:57 stefanf
10531 * $FreeBSD$
10532 */
10533
10534#ifndef _MACHINE__STDINT_H_
10535#define _MACHINE__STDINT_H_
10536
10537#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
10538
10539#define INT8_C(c) (c)
10540#define INT16_C(c) (c)
10541#define INT32_C(c) (c)
10542
10543#define UINT8_C(c) (c)
10544#define UINT16_C(c) (c)
10545#define UINT32_C(c) (c ## U)
10546
10547#ifdef __mips_n64
10548#define INT64_C(c) (c ## L)
10549#define UINT64_C(c) (c ## UL)
10550#else
10551# 58 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10552#define INT64_C(c) (c ## LL)
10553#define UINT64_C(c) (c ## ULL)
10554#endif
10555# 61 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10556
10557#define INTMAX_C(c) INT64_C(c)
10558#define UINTMAX_C(c) UINT64_C(c)
10559
10560#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */
10561# 66 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10562
10563#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
10564
10565#ifndef __INT64_C
10566#ifdef __mips_n64
10567#define __INT64_C(c) (c ## L)
10568#define __UINT64_C(c) (c ## UL)
10569#else
10570# 74 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10571#define __INT64_C(c) (c ## LL)
10572#define __UINT64_C(c) (c ## ULL)
10573#endif
10574# 77 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10575#endif
10576# 78 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10577
10578/*
10579 * ISO/IEC 9899:1999
10580 * 7.18.2.1 Limits of exact-width integer types
10581 */
10582/* Minimum values of exact-width signed integer types. */
10583#define INT8_MIN (-0x7f-1)
10584#define INT16_MIN (-0x7fff-1)
10585#define INT32_MIN (-0x7fffffff-1)
10586#define INT64_MIN (-__INT64_C(0x7fffffffffffffff)-1)
10587
10588/* Maximum values of exact-width signed integer types. */
10589#define INT8_MAX 0x7f
10590#define INT16_MAX 0x7fff
10591#define INT32_MAX 0x7fffffff
10592#define INT64_MAX __INT64_C(0x7fffffffffffffff)
10593
10594/* Maximum values of exact-width unsigned integer types. */
10595#define UINT8_MAX 0xff
10596#define UINT16_MAX 0xffff
10597#define UINT32_MAX 0xffffffff
10598#define UINT64_MAX __UINT64_C(0xffffffffffffffff)
10599
10600/*
10601 * ISO/IEC 9899:1999
10602 * 7.18.2.2 Limits of minimum-width integer types
10603 */
10604/* Minimum values of minimum-width signed integer types. */
10605#define INT_LEAST8_MIN INT8_MIN
10606#define INT_LEAST16_MIN INT16_MIN
10607#define INT_LEAST32_MIN INT32_MIN
10608#define INT_LEAST64_MIN INT64_MIN
10609
10610/* Maximum values of minimum-width signed integer types. */
10611#define INT_LEAST8_MAX INT8_MAX
10612#define INT_LEAST16_MAX INT16_MAX
10613#define INT_LEAST32_MAX INT32_MAX
10614#define INT_LEAST64_MAX INT64_MAX
10615
10616/* Maximum values of minimum-width unsigned integer types. */
10617#define UINT_LEAST8_MAX UINT8_MAX
10618#define UINT_LEAST16_MAX UINT16_MAX
10619#define UINT_LEAST32_MAX UINT32_MAX
10620#define UINT_LEAST64_MAX UINT64_MAX
10621
10622/*
10623 * ISO/IEC 9899:1999
10624 * 7.18.2.3 Limits of fastest minimum-width integer types
10625 */
10626/* Minimum values of fastest minimum-width signed integer types. */
10627#define INT_FAST8_MIN INT32_MIN
10628#define INT_FAST16_MIN INT32_MIN
10629#define INT_FAST32_MIN INT32_MIN
10630#define INT_FAST64_MIN INT64_MIN
10631
10632/* Maximum values of fastest minimum-width signed integer types. */
10633#define INT_FAST8_MAX INT32_MAX
10634#define INT_FAST16_MAX INT32_MAX
10635#define INT_FAST32_MAX INT32_MAX
10636#define INT_FAST64_MAX INT64_MAX
10637
10638/* Maximum values of fastest minimum-width unsigned integer types. */
10639#define UINT_FAST8_MAX UINT32_MAX
10640#define UINT_FAST16_MAX UINT32_MAX
10641#define UINT_FAST32_MAX UINT32_MAX
10642#define UINT_FAST64_MAX UINT64_MAX
10643
10644/*
10645 * ISO/IEC 9899:1999
10646 * 7.18.2.4 Limits of integer types capable of holding object pointers
10647 */
10648#ifdef __mips_n64
10649#define INTPTR_MIN INT64_MIN
10650#define INTPTR_MAX INT64_MAX
10651#define UINTPTR_MAX UINT64_MAX
10652#else
10653# 154 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10654#define INTPTR_MIN INT32_MIN
10655#define INTPTR_MAX INT32_MAX
10656#define UINTPTR_MAX UINT32_MAX
10657#endif
10658# 158 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10659
10660/*
10661 * ISO/IEC 9899:1999
10662 * 7.18.2.5 Limits of greatest-width integer types
10663 */
10664#define INTMAX_MIN INT64_MIN
10665#define INTMAX_MAX INT64_MAX
10666#define UINTMAX_MAX UINT64_MAX
10667
10668/*
10669 * ISO/IEC 9899:1999
10670 * 7.18.3 Limits of other integer types
10671 */
10672#ifdef __mips_n64
10673/* Limits of ptrdiff_t. */
10674#define PTRDIFF_MIN INT64_MIN
10675#define PTRDIFF_MAX INT64_MAX
10676
10677/* Limit of size_t. */
10678#define SIZE_MAX UINT64_MAX
10679#else
10680# 179 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10681/* Limits of ptrdiff_t. */
10682#define PTRDIFF_MIN INT32_MIN
10683#define PTRDIFF_MAX INT32_MAX
10684
10685/* Limit of size_t. */
10686#define SIZE_MAX UINT32_MAX
10687#endif
10688# 186 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10689
10690/* Limits of sig_atomic_t. */
10691#define SIG_ATOMIC_MIN INT32_MIN
10692#define SIG_ATOMIC_MAX INT32_MAX
10693
10694/* Limits of wint_t. */
10695#define WINT_MIN INT32_MIN
10696#define WINT_MAX INT32_MAX
10697
10698#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
10699# 196 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10700
10701#endif /* !_MACHINE__STDINT_H_ */
10702# 198 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/machine/_stdint.h" 3 4
10703# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 2 3 4
10704#if 0 /* expanded by -frewrite-includes */
10705#include <sys/_stdint.h>
10706#endif /* expanded by -frewrite-includes */
10707# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10708# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10709
10710typedef __int_least8_t int_least8_t;
10711typedef __int_least16_t int_least16_t;
10712typedef __int_least32_t int_least32_t;
10713typedef __int_least64_t int_least64_t;
10714
10715typedef __uint_least8_t uint_least8_t;
10716typedef __uint_least16_t uint_least16_t;
10717typedef __uint_least32_t uint_least32_t;
10718typedef __uint_least64_t uint_least64_t;
10719
10720typedef __int_fast8_t int_fast8_t;
10721typedef __int_fast16_t int_fast16_t;
10722typedef __int_fast32_t int_fast32_t;
10723typedef __int_fast64_t int_fast64_t;
10724
10725typedef __uint_fast8_t uint_fast8_t;
10726typedef __uint_fast16_t uint_fast16_t;
10727typedef __uint_fast32_t uint_fast32_t;
10728typedef __uint_fast64_t uint_fast64_t;
10729
10730#ifndef _INTMAX_T_DECLARED
10731typedef __intmax_t intmax_t;
10732#define _INTMAX_T_DECLARED
10733#endif
10734# 62 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10735#ifndef _UINTMAX_T_DECLARED
10736typedef __uintmax_t uintmax_t;
10737#define _UINTMAX_T_DECLARED
10738#endif
10739# 66 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10740
10741/* GNU and Darwin define this and people seem to think it's portable */
10742#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX)
10743#define __WORDSIZE 64
10744#else
10745# 71 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10746#define __WORDSIZE 32
10747#endif
10748# 73 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10749
10750/* Limits of wchar_t. */
10751#define WCHAR_MIN __WCHAR_MIN
10752#define WCHAR_MAX __WCHAR_MAX
10753
10754#endif /* !_SYS_STDINT_H_ */
10755# 79 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/stdint.h" 3 4
10756# 34 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 2 3 4
10757
10758#ifndef __cplusplus
10759#ifndef _WCHAR_T_DECLARED
10760typedef ___wchar_t wchar_t;
10761#define _WCHAR_T_DECLARED
10762#endif
10763# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 3 4
10764#endif
10765# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 3 4
10766
10767typedef struct {
10768 intmax_t quot; /* Quotient. */
10769 intmax_t rem; /* Remainder. */
10770} imaxdiv_t;
10771
10772__BEGIN_DECLS
10773#ifdef _XLOCALE_H_
10774#if 0 /* expanded by -frewrite-includes */
10775#include <xlocale/_inttypes.h>
10776#endif /* expanded by -frewrite-includes */
10777# 49 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 3 4
10778# 50 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 3 4
10779#endif
10780# 51 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 3 4
10781intmax_t imaxabs(intmax_t) __pure2;
10782imaxdiv_t imaxdiv(intmax_t, intmax_t) __pure2;
10783
10784intmax_t strtoimax(const char * __restrict, char ** __restrict, int);
10785uintmax_t strtoumax(const char * __restrict, char ** __restrict, int);
10786intmax_t wcstoimax(const wchar_t * __restrict,
10787 wchar_t ** __restrict, int);
10788uintmax_t wcstoumax(const wchar_t * __restrict,
10789 wchar_t ** __restrict, int);
10790__END_DECLS
10791
10792#endif /* !_INTTYPES_H_ */
10793# 63 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/inttypes.h" 3 4
10794# 27 "/home/rnw24/sdk/sdk/bin/../lib/clang/3.8.0/include/inttypes.h" 2 3 4
10795
10796#if defined(_MSC_VER) && _MSC_VER < 1900
10797/* MSVC headers define int32_t as int, but PRIx32 as "lx" instead of "x".
10798 * This triggers format warnings, so fix it up here. */
10799#undef PRId32
10800#undef PRIdLEAST32
10801#undef PRIdFAST32
10802#undef PRIi32
10803#undef PRIiLEAST32
10804#undef PRIiFAST32
10805#undef PRIo32
10806#undef PRIoLEAST32
10807#undef PRIoFAST32
10808#undef PRIu32
10809#undef PRIuLEAST32
10810#undef PRIuFAST32
10811#undef PRIx32
10812#undef PRIxLEAST32
10813#undef PRIxFAST32
10814#undef PRIX32
10815#undef PRIXLEAST32
10816#undef PRIXFAST32
10817
10818#undef SCNd32
10819#undef SCNdLEAST32
10820#undef SCNdFAST32
10821#undef SCNi32
10822#undef SCNiLEAST32
10823#undef SCNiFAST32
10824#undef SCNo32
10825#undef SCNoLEAST32
10826#undef SCNoFAST32
10827#undef SCNu32
10828#undef SCNuLEAST32
10829#undef SCNuFAST32
10830#undef SCNx32
10831#undef SCNxLEAST32
10832#undef SCNxFAST32
10833
10834#define PRId32 "d"
10835#define PRIdLEAST32 "d"
10836#define PRIdFAST32 "d"
10837#define PRIi32 "i"
10838#define PRIiLEAST32 "i"
10839#define PRIiFAST32 "i"
10840#define PRIo32 "o"
10841#define PRIoLEAST32 "o"
10842#define PRIoFAST32 "o"
10843#define PRIu32 "u"
10844#define PRIuLEAST32 "u"
10845#define PRIuFAST32 "u"
10846#define PRIx32 "x"
10847#define PRIxLEAST32 "x"
10848#define PRIxFAST32 "x"
10849#define PRIX32 "X"
10850#define PRIXLEAST32 "X"
10851#define PRIXFAST32 "X"
10852
10853#define SCNd32 "d"
10854#define SCNdLEAST32 "d"
10855#define SCNdFAST32 "d"
10856#define SCNi32 "i"
10857#define SCNiLEAST32 "i"
10858#define SCNiFAST32 "i"
10859#define SCNo32 "o"
10860#define SCNoLEAST32 "o"
10861#define SCNoFAST32 "o"
10862#define SCNu32 "u"
10863#define SCNuLEAST32 "u"
10864#define SCNuFAST32 "u"
10865#define SCNx32 "x"
10866#define SCNxLEAST32 "x"
10867#define SCNxFAST32 "x"
10868#endif
10869# 101 "/home/rnw24/sdk/sdk/bin/../lib/clang/3.8.0/include/inttypes.h" 3 4
10870
10871#endif /* __CLANG_INTTYPES_H */
10872# 103 "/home/rnw24/sdk/sdk/bin/../lib/clang/3.8.0/include/inttypes.h" 3 4
10873# 11 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h" 2
10874#if 0 /* expanded by -frewrite-includes */
10875#include <sys/types.h>
10876#endif /* expanded by -frewrite-includes */
10877# 11 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
10878# 12 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
10879#if 0 /* expanded by -frewrite-includes */
10880#include <sys/socket.h>
10881#endif /* expanded by -frewrite-includes */
10882# 12 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
10883# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 1 3 4
10884/*-
10885 * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
10886 * The Regents of the University of California. All rights reserved.
10887 *
10888 * Redistribution and use in source and binary forms, with or without
10889 * modification, are permitted provided that the following conditions
10890 * are met:
10891 * 1. Redistributions of source code must retain the above copyright
10892 * notice, this list of conditions and the following disclaimer.
10893 * 2. Redistributions in binary form must reproduce the above copyright
10894 * notice, this list of conditions and the following disclaimer in the
10895 * documentation and/or other materials provided with the distribution.
10896 * 4. Neither the name of the University nor the names of its contributors
10897 * may be used to endorse or promote products derived from this software
10898 * without specific prior written permission.
10899 *
10900 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
10901 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10902 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10903 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
10904 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10905 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10906 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10907 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10908 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10909 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10910 * SUCH DAMAGE.
10911 *
10912 * @(#)socket.h 8.4 (Berkeley) 2/21/94
10913 * $FreeBSD$
10914 */
10915
10916#ifndef _SYS_SOCKET_H_
10917#define _SYS_SOCKET_H_
10918
10919#if 0 /* expanded by -frewrite-includes */
10920#include <sys/cdefs.h>
10921#endif /* expanded by -frewrite-includes */
10922# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
10923# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
10924#if 0 /* expanded by -frewrite-includes */
10925#include <sys/_types.h>
10926#endif /* expanded by -frewrite-includes */
10927# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
10928# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
10929#if 0 /* expanded by -frewrite-includes */
10930#include <sys/_iovec.h>
10931#endif /* expanded by -frewrite-includes */
10932# 38 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
10933# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_iovec.h" 1 3 4
10934/*-
10935 * Copyright (c) 1982, 1986, 1993, 1994
10936 * The Regents of the University of California. All rights reserved.
10937 *
10938 * Redistribution and use in source and binary forms, with or without
10939 * modification, are permitted provided that the following conditions
10940 * are met:
10941 * 1. Redistributions of source code must retain the above copyright
10942 * notice, this list of conditions and the following disclaimer.
10943 * 2. Redistributions in binary form must reproduce the above copyright
10944 * notice, this list of conditions and the following disclaimer in the
10945 * documentation and/or other materials provided with the distribution.
10946 * 4. Neither the name of the University nor the names of its contributors
10947 * may be used to endorse or promote products derived from this software
10948 * without specific prior written permission.
10949 *
10950 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
10951 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
10952 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
10953 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
10954 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10955 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
10956 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
10957 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
10958 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
10959 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
10960 * SUCH DAMAGE.
10961 *
10962 * @(#)uio.h 8.5 (Berkeley) 2/22/94
10963 * $FreeBSD$
10964 */
10965
10966#ifndef _SYS__IOVEC_H_
10967#define _SYS__IOVEC_H_
10968
10969#if 0 /* expanded by -frewrite-includes */
10970#include <sys/_types.h>
10971#endif /* expanded by -frewrite-includes */
10972# 36 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_iovec.h" 3 4
10973# 37 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_iovec.h" 3 4
10974
10975#ifndef _SIZE_T_DECLARED
10976typedef __size_t size_t;
10977#define _SIZE_T_DECLARED
10978#endif
10979# 42 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_iovec.h" 3 4
10980
10981struct iovec {
10982 void *iov_base; /* Base address. */
10983 size_t iov_len; /* Length. */
10984};
10985
10986#endif /* !_SYS__IOVEC_H_ */
10987# 49 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_iovec.h" 3 4
10988# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 2 3 4
10989#if 0 /* expanded by -frewrite-includes */
10990#include <machine/_align.h>
10991#endif /* expanded by -frewrite-includes */
10992# 39 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
10993# 40 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
10994
10995/*
10996 * Definitions related to sockets: types, address families, options.
10997 */
10998
10999/*
11000 * Data types.
11001 */
11002#if __BSD_VISIBLE
11003#ifndef _GID_T_DECLARED
11004typedef __gid_t gid_t;
11005#define _GID_T_DECLARED
11006#endif
11007# 53 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11008
11009#ifndef _OFF_T_DECLARED
11010typedef __off_t off_t;
11011#define _OFF_T_DECLARED
11012#endif
11013# 58 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11014
11015#ifndef _PID_T_DECLARED
11016typedef __pid_t pid_t;
11017#define _PID_T_DECLARED
11018#endif
11019# 63 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11020#endif
11021# 64 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11022
11023#ifndef _SA_FAMILY_T_DECLARED
11024typedef __sa_family_t sa_family_t;
11025#define _SA_FAMILY_T_DECLARED
11026#endif
11027# 69 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11028
11029#ifndef _SOCKLEN_T_DECLARED
11030typedef __socklen_t socklen_t;
11031#define _SOCKLEN_T_DECLARED
11032#endif
11033# 74 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11034
11035#ifndef _SSIZE_T_DECLARED
11036typedef __ssize_t ssize_t;
11037#define _SSIZE_T_DECLARED
11038#endif
11039# 79 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11040
11041#if __BSD_VISIBLE
11042#ifndef _UID_T_DECLARED
11043typedef __uid_t uid_t;
11044#define _UID_T_DECLARED
11045#endif
11046# 85 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11047#endif
11048# 86 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11049
11050#ifndef _UINT32_T_DECLARED
11051typedef __uint32_t uint32_t;
11052#define _UINT32_T_DECLARED
11053#endif
11054# 91 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11055
11056#ifndef _UINTPTR_T_DECLARED
11057typedef __uintptr_t uintptr_t;
11058#define _UINTPTR_T_DECLARED
11059#endif
11060# 96 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11061
11062/*
11063 * Types
11064 */
11065#define SOCK_STREAM 1 /* stream socket */
11066#define SOCK_DGRAM 2 /* datagram socket */
11067#define SOCK_RAW 3 /* raw-protocol interface */
11068#if __BSD_VISIBLE
11069#define SOCK_RDM 4 /* reliably-delivered message */
11070#endif
11071# 106 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11072#define SOCK_SEQPACKET 5 /* sequenced packet stream */
11073
11074#if __BSD_VISIBLE
11075/*
11076 * Creation flags, OR'ed into socket() and socketpair() type argument.
11077 */
11078#define SOCK_CLOEXEC 0x10000000
11079#define SOCK_NONBLOCK 0x20000000
11080#endif
11081# 115 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11082
11083/*
11084 * Option flags per-socket.
11085 */
11086#define SO_DEBUG 0x0001 /* turn on debugging info recording */
11087#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */
11088#define SO_REUSEADDR 0x0004 /* allow local address reuse */
11089#define SO_KEEPALIVE 0x0008 /* keep connections alive */
11090#define SO_DONTROUTE 0x0010 /* just use interface addresses */
11091#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */
11092#if __BSD_VISIBLE
11093#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
11094#endif
11095# 128 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11096#define SO_LINGER 0x0080 /* linger on close if data present */
11097#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
11098#if __BSD_VISIBLE
11099#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */
11100#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */
11101#define SO_NOSIGPIPE 0x0800 /* no SIGPIPE from EPIPE */
11102#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */
11103#define SO_BINTIME 0x2000 /* timestamp received dgram traffic */
11104#endif
11105# 137 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11106#define SO_NO_OFFLOAD 0x4000 /* socket cannot be offloaded */
11107#define SO_NO_DDP 0x8000 /* disable direct data placement */
11108
11109/*
11110 * Additional options, not kept in so_options.
11111 */
11112#define SO_SNDBUF 0x1001 /* send buffer size */
11113#define SO_RCVBUF 0x1002 /* receive buffer size */
11114#define SO_SNDLOWAT 0x1003 /* send low-water mark */
11115#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
11116#define SO_SNDTIMEO 0x1005 /* send timeout */
11117#define SO_RCVTIMEO 0x1006 /* receive timeout */
11118#define SO_ERROR 0x1007 /* get error status and clear */
11119#define SO_TYPE 0x1008 /* get socket type */
11120#if __BSD_VISIBLE
11121#define SO_LABEL 0x1009 /* socket's MAC label */
11122#define SO_PEERLABEL 0x1010 /* socket's peer's MAC label */
11123#define SO_LISTENQLIMIT 0x1011 /* socket's backlog limit */
11124#define SO_LISTENQLEN 0x1012 /* socket's complete queue length */
11125#define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */
11126#define SO_SETFIB 0x1014 /* use this FIB to route */
11127#define SO_USER_COOKIE 0x1015 /* user cookie (dummynet etc.) */
11128#define SO_PROTOCOL 0x1016 /* get socket protocol (Linux name) */
11129#define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */
11130#endif
11131# 162 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11132
11133/*
11134 * Space reserved for new socket options added by third-party vendors.
11135 * This range applies to all socket option levels. New socket options
11136 * in FreeBSD should always use an option value less than SO_VENDOR.
11137 */
11138#if __BSD_VISIBLE
11139#define SO_VENDOR 0x80000000
11140#endif
11141# 171 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11142
11143/*
11144 * Structure used for manipulating linger option.
11145 */
11146struct linger {
11147 int l_onoff; /* option on/off */
11148 int l_linger; /* linger time */
11149};
11150
11151#if __BSD_VISIBLE
11152struct accept_filter_arg {
11153 char af_name[16];
11154 char af_arg[256-16];
11155};
11156#endif
11157# 186 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11158
11159/*
11160 * Level number for (get/set)sockopt() to apply to socket itself.
11161 */
11162#define SOL_SOCKET 0xffff /* options for socket level */
11163
11164/*
11165 * Address families.
11166 */
11167#define AF_UNSPEC 0 /* unspecified */
11168#if __BSD_VISIBLE
11169#define AF_LOCAL AF_UNIX /* local to host (pipes, portals) */
11170#endif
11171# 199 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11172#define AF_UNIX 1 /* standardized name for AF_LOCAL */
11173#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
11174#if __BSD_VISIBLE
11175#define AF_IMPLINK 3 /* arpanet imp addresses */
11176#define AF_PUP 4 /* pup protocols: e.g. BSP */
11177#define AF_CHAOS 5 /* mit CHAOS protocols */
11178#define AF_NETBIOS 6 /* SMB protocols */
11179#define AF_ISO 7 /* ISO protocols */
11180#define AF_OSI AF_ISO
11181#define AF_ECMA 8 /* European computer manufacturers */
11182#define AF_DATAKIT 9 /* datakit protocols */
11183#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
11184#define AF_SNA 11 /* IBM SNA */
11185#define AF_DECnet 12 /* DECnet */
11186#define AF_DLI 13 /* DEC Direct data link interface */
11187#define AF_LAT 14 /* LAT */
11188#define AF_HYLINK 15 /* NSC Hyperchannel */
11189#define AF_APPLETALK 16 /* Apple Talk */
11190#define AF_ROUTE 17 /* Internal Routing Protocol */
11191#define AF_LINK 18 /* Link layer interface */
11192#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */
11193#define AF_COIP 20 /* connection-oriented IP, aka ST II */
11194#define AF_CNT 21 /* Computer Network Technology */
11195#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */
11196#define AF_IPX 23 /* Novell Internet Protocol */
11197#define AF_SIP 24 /* Simple Internet Protocol */
11198#define pseudo_AF_PIP 25 /* Help Identify PIP packets */
11199#define AF_ISDN 26 /* Integrated Services Digital Network*/
11200#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */
11201#define pseudo_AF_KEY 27 /* Internal key-management function */
11202#endif
11203# 230 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11204#define AF_INET6 28 /* IPv6 */
11205#if __BSD_VISIBLE
11206#define AF_NATM 29 /* native ATM access */
11207#define AF_ATM 30 /* ATM */
11208#define pseudo_AF_HDRCMPLT 31 /* Used by BPF to not rewrite headers
11209 * in interface output routine
11210 */
11211#define AF_NETGRAPH 32 /* Netgraph sockets */
11212#define AF_SLOW 33 /* 802.3ad slow protocol */
11213#define AF_SCLUSTER 34 /* Sitara cluster protocol */
11214#define AF_ARP 35
11215#define AF_BLUETOOTH 36 /* Bluetooth sockets */
11216#define AF_IEEE80211 37 /* IEEE 802.11 protocol */
11217#define AF_INET_SDP 40 /* OFED Socket Direct Protocol ipv4 */
11218#define AF_INET6_SDP 42 /* OFED Socket Direct Protocol ipv6 */
11219#define AF_MAX 42
11220/*
11221 * When allocating a new AF_ constant, please only allocate
11222 * even numbered constants for FreeBSD until 134 as odd numbered AF_
11223 * constants 39-133 are now reserved for vendors.
11224 */
11225#define AF_VENDOR00 39
11226#define AF_VENDOR01 41
11227#define AF_VENDOR02 43
11228#define AF_VENDOR03 45
11229#define AF_VENDOR04 47
11230#define AF_VENDOR05 49
11231#define AF_VENDOR06 51
11232#define AF_VENDOR07 53
11233#define AF_VENDOR08 55
11234#define AF_VENDOR09 57
11235#define AF_VENDOR10 59
11236#define AF_VENDOR11 61
11237#define AF_VENDOR12 63
11238#define AF_VENDOR13 65
11239#define AF_VENDOR14 67
11240#define AF_VENDOR15 69
11241#define AF_VENDOR16 71
11242#define AF_VENDOR17 73
11243#define AF_VENDOR18 75
11244#define AF_VENDOR19 77
11245#define AF_VENDOR20 79
11246#define AF_VENDOR21 81
11247#define AF_VENDOR22 83
11248#define AF_VENDOR23 85
11249#define AF_VENDOR24 87
11250#define AF_VENDOR25 89
11251#define AF_VENDOR26 91
11252#define AF_VENDOR27 93
11253#define AF_VENDOR28 95
11254#define AF_VENDOR29 97
11255#define AF_VENDOR30 99
11256#define AF_VENDOR31 101
11257#define AF_VENDOR32 103
11258#define AF_VENDOR33 105
11259#define AF_VENDOR34 107
11260#define AF_VENDOR35 109
11261#define AF_VENDOR36 111
11262#define AF_VENDOR37 113
11263#define AF_VENDOR38 115
11264#define AF_VENDOR39 117
11265#define AF_VENDOR40 119
11266#define AF_VENDOR41 121
11267#define AF_VENDOR42 123
11268#define AF_VENDOR43 125
11269#define AF_VENDOR44 127
11270#define AF_VENDOR45 129
11271#define AF_VENDOR46 131
11272#define AF_VENDOR47 133
11273#endif
11274# 300 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11275
11276/*
11277 * Structure used by kernel to store most
11278 * addresses.
11279 */
11280struct sockaddr {
11281 unsigned char sa_len; /* total length */
11282 sa_family_t sa_family; /* address family */
11283 char sa_data[14]; /* actually longer; address value */
11284};
11285#if __BSD_VISIBLE
11286#define SOCK_MAXADDRLEN 255 /* longest possible addresses */
11287
11288/*
11289 * Structure used by kernel to pass protocol
11290 * information in raw sockets.
11291 */
11292struct sockproto {
11293 unsigned short sp_family; /* address family */
11294 unsigned short sp_protocol; /* protocol */
11295};
11296#endif
11297# 322 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11298
11299#if 0 /* expanded by -frewrite-includes */
11300#include <sys/_sockaddr_storage.h>
11301#endif /* expanded by -frewrite-includes */
11302# 323 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11303# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_sockaddr_storage.h" 1 3 4
11304/*-
11305 * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
11306 * The Regents of the University of California. All rights reserved.
11307 *
11308 * Redistribution and use in source and binary forms, with or without
11309 * modification, are permitted provided that the following conditions
11310 * are met:
11311 * 1. Redistributions of source code must retain the above copyright
11312 * notice, this list of conditions and the following disclaimer.
11313 * 2. Redistributions in binary form must reproduce the above copyright
11314 * notice, this list of conditions and the following disclaimer in the
11315 * documentation and/or other materials provided with the distribution.
11316 * 4. Neither the name of the University nor the names of its contributors
11317 * may be used to endorse or promote products derived from this software
11318 * without specific prior written permission.
11319 *
11320 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
11321 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11322 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11323 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
11324 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11325 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11326 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
11327 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
11328 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
11329 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
11330 * SUCH DAMAGE.
11331 *
11332 * @(#)socket.h 8.4 (Berkeley) 2/21/94
11333 * $FreeBSD$
11334 */
11335
11336#ifndef _SYS__SOCKADDR_STORAGE_H_
11337#define _SYS__SOCKADDR_STORAGE_H_
11338
11339/*
11340 * RFC 2553: protocol-independent placeholder for socket addresses
11341 */
11342#define _SS_MAXSIZE 128U
11343#define _SS_ALIGNSIZE (sizeof(__int64_t))
11344#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) - \
11345 sizeof(sa_family_t))
11346#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) - \
11347 sizeof(sa_family_t) - _SS_PAD1SIZE - _SS_ALIGNSIZE)
11348
11349struct sockaddr_storage {
11350 unsigned char ss_len; /* address length */
11351 sa_family_t ss_family; /* address family */
11352 char __ss_pad1[_SS_PAD1SIZE];
11353 __int64_t __ss_align; /* force desired struct alignment */
11354 char __ss_pad2[_SS_PAD2SIZE];
11355};
11356
11357#endif /* !_SYS__SOCKADDR_STORAGE_H_ */
11358# 55 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/_sockaddr_storage.h" 3 4
11359# 324 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 2 3 4
11360
11361#if __BSD_VISIBLE
11362/*
11363 * Protocol families, same as address families for now.
11364 */
11365#define PF_UNSPEC AF_UNSPEC
11366#define PF_LOCAL AF_LOCAL
11367#define PF_UNIX PF_LOCAL /* backward compatibility */
11368#define PF_INET AF_INET
11369#define PF_IMPLINK AF_IMPLINK
11370#define PF_PUP AF_PUP
11371#define PF_CHAOS AF_CHAOS
11372#define PF_NETBIOS AF_NETBIOS
11373#define PF_ISO AF_ISO
11374#define PF_OSI AF_ISO
11375#define PF_ECMA AF_ECMA
11376#define PF_DATAKIT AF_DATAKIT
11377#define PF_CCITT AF_CCITT
11378#define PF_SNA AF_SNA
11379#define PF_DECnet AF_DECnet
11380#define PF_DLI AF_DLI
11381#define PF_LAT AF_LAT
11382#define PF_HYLINK AF_HYLINK
11383#define PF_APPLETALK AF_APPLETALK
11384#define PF_ROUTE AF_ROUTE
11385#define PF_LINK AF_LINK
11386#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */
11387#define PF_COIP AF_COIP
11388#define PF_CNT AF_CNT
11389#define PF_SIP AF_SIP
11390#define PF_IPX AF_IPX
11391#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */
11392#define PF_PIP pseudo_AF_PIP
11393#define PF_ISDN AF_ISDN
11394#define PF_KEY pseudo_AF_KEY
11395#define PF_INET6 AF_INET6
11396#define PF_NATM AF_NATM
11397#define PF_ATM AF_ATM
11398#define PF_NETGRAPH AF_NETGRAPH
11399#define PF_SLOW AF_SLOW
11400#define PF_SCLUSTER AF_SCLUSTER
11401#define PF_ARP AF_ARP
11402#define PF_BLUETOOTH AF_BLUETOOTH
11403#define PF_IEEE80211 AF_IEEE80211
11404#define PF_INET_SDP AF_INET_SDP
11405#define PF_INET6_SDP AF_INET6_SDP
11406
11407#define PF_MAX AF_MAX
11408
11409/*
11410 * Definitions for network related sysctl, CTL_NET.
11411 *
11412 * Second level is protocol family.
11413 * Third level is protocol number.
11414 *
11415 * Further levels are defined by the individual families.
11416 */
11417
11418/*
11419 * PF_ROUTE - Routing table
11420 *
11421 * Three additional levels are defined:
11422 * Fourth: address family, 0 is wildcard
11423 * Fifth: type of info, defined below
11424 * Sixth: flag(s) to mask with for NET_RT_FLAGS
11425 */
11426#define NET_RT_DUMP 1 /* dump; may limit to a.f. */
11427#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */
11428#define NET_RT_IFLIST 3 /* survey interface list */
11429#define NET_RT_IFMALIST 4 /* return multicast address list */
11430#define NET_RT_IFLISTL 5 /* Survey interface list, using 'l'en
11431 * versions of msghdr structs. */
11432#endif /* __BSD_VISIBLE */
11433# 397 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11434
11435/*
11436 * Maximum queue length specifiable by listen.
11437 */
11438#define SOMAXCONN 128
11439
11440/*
11441 * Message header for recvmsg and sendmsg calls.
11442 * Used value-result for recvmsg, value only for sendmsg.
11443 */
11444struct msghdr {
11445 void *msg_name; /* optional address */
11446 socklen_t msg_namelen; /* size of address */
11447 struct iovec *msg_iov; /* scatter/gather array */
11448 int msg_iovlen; /* # elements in msg_iov */
11449 void *msg_control; /* ancillary data, see below */
11450 socklen_t msg_controllen; /* ancillary data buffer len */
11451 int msg_flags; /* flags on received message */
11452};
11453
11454#define MSG_OOB 0x1 /* process out-of-band data */
11455#define MSG_PEEK 0x2 /* peek at incoming message */
11456#define MSG_DONTROUTE 0x4 /* send without using routing tables */
11457#define MSG_EOR 0x8 /* data completes record */
11458#define MSG_TRUNC 0x10 /* data discarded before delivery */
11459#define MSG_CTRUNC 0x20 /* control data lost before delivery */
11460#define MSG_WAITALL 0x40 /* wait for full request or error */
11461#if __POSIX_VISIBLE >= 200809
11462#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */
11463#endif
11464# 427 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11465#if __BSD_VISIBLE
11466#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */
11467#define MSG_EOF 0x100 /* data completes connection */
11468#define MSG_NOTIFICATION 0x2000 /* SCTP notification */
11469#define MSG_NBIO 0x4000 /* FIONBIO mode, used by fifofs */
11470#define MSG_COMPAT 0x8000 /* used in sendit() */
11471#define MSG_CMSG_CLOEXEC 0x40000 /* make received fds close-on-exec */
11472#endif
11473# 435 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11474#ifdef _KERNEL
11475#define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */
11476#endif
11477# 438 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11478
11479/*
11480 * Header for ancillary data objects in msg_control buffer.
11481 * Used for additional information with/about a datagram
11482 * not expressible by flags. The format is a sequence
11483 * of message elements headed by cmsghdr structures.
11484 */
11485struct cmsghdr {
11486 socklen_t cmsg_len; /* data byte count, including hdr */
11487 int cmsg_level; /* originating protocol */
11488 int cmsg_type; /* protocol-specific type */
11489/* followed by u_char cmsg_data[]; */
11490};
11491
11492#if __BSD_VISIBLE
11493/*
11494 * While we may have more groups than this, the cmsgcred struct must
11495 * be able to fit in an mbuf and we have historically supported a
11496 * maximum of 16 groups.
11497*/
11498#define CMGROUP_MAX 16
11499
11500/*
11501 * Credentials structure, used to verify the identity of a peer
11502 * process that has sent us a message. This is allocated by the
11503 * peer process but filled in by the kernel. This prevents the
11504 * peer from lying about its identity. (Note that cmcred_groups[0]
11505 * is the effective GID.)
11506 */
11507struct cmsgcred {
11508 pid_t cmcred_pid; /* PID of sending process */
11509 uid_t cmcred_uid; /* real UID of sending process */
11510 uid_t cmcred_euid; /* effective UID of sending process */
11511 gid_t cmcred_gid; /* real GID of sending process */
11512 short cmcred_ngroups; /* number or groups */
11513 gid_t cmcred_groups[CMGROUP_MAX]; /* groups */
11514};
11515
11516/*
11517 * Socket credentials.
11518 */
11519struct sockcred {
11520 uid_t sc_uid; /* real user id */
11521 uid_t sc_euid; /* effective user id */
11522 gid_t sc_gid; /* real group id */
11523 gid_t sc_egid; /* effective group id */
11524 int sc_ngroups; /* number of supplemental groups */
11525 gid_t sc_groups[1]; /* variable length */
11526};
11527
11528/*
11529 * Compute size of a sockcred structure with groups.
11530 */
11531#define SOCKCREDSIZE(ngrps) \
11532 (sizeof(struct sockcred) + (sizeof(gid_t) * ((ngrps) - 1)))
11533
11534#endif /* __BSD_VISIBLE */
11535# 495 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11536
11537/* given pointer to struct cmsghdr, return pointer to data */
11538#define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \
11539 _ALIGN(sizeof(struct cmsghdr)))
11540
11541/* given pointer to struct cmsghdr, return pointer to next cmsghdr */
11542#define CMSG_NXTHDR(mhdr, cmsg) \
11543 ((char *)(cmsg) == NULL ? CMSG_FIRSTHDR(mhdr) : \
11544 ((char *)(cmsg) + _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len) + \
11545 _ALIGN(sizeof(struct cmsghdr)) > \
11546 (char *)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \
11547 (struct cmsghdr *)0 : \
11548 (struct cmsghdr *)(void *)((char *)(cmsg) + \
11549 _ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len)))
11550
11551/*
11552 * RFC 2292 requires to check msg_controllen, in case that the kernel returns
11553 * an empty list for some reasons.
11554 */
11555#define CMSG_FIRSTHDR(mhdr) \
11556 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
11557 (struct cmsghdr *)(mhdr)->msg_control : \
11558 (struct cmsghdr *)NULL)
11559
11560#if __BSD_VISIBLE
11561/* RFC 2292 additions */
11562#define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(l))
11563#define CMSG_LEN(l) (_ALIGN(sizeof(struct cmsghdr)) + (l))
11564#endif
11565# 524 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11566
11567#ifdef _KERNEL
11568#define CMSG_ALIGN(n) _ALIGN(n)
11569#endif
11570# 528 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11571
11572/* "Socket"-level control message types: */
11573#define SCM_RIGHTS 0x01 /* access rights (array of int) */
11574#if __BSD_VISIBLE
11575#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */
11576#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */
11577#define SCM_BINTIME 0x04 /* timestamp (struct bintime) */
11578#endif
11579# 536 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11580
11581#if __BSD_VISIBLE
11582/*
11583 * 4.3 compat sockaddr, move to compat file later
11584 */
11585struct osockaddr {
11586 unsigned short sa_family; /* address family */
11587 char sa_data[14]; /* up to 14 bytes of direct address */
11588};
11589
11590/*
11591 * 4.3-compat message header (move to compat file later).
11592 */
11593struct omsghdr {
11594 char *msg_name; /* optional address */
11595 int msg_namelen; /* size of address */
11596 struct iovec *msg_iov; /* scatter/gather array */
11597 int msg_iovlen; /* # elements in msg_iov */
11598 char *msg_accrights; /* access rights sent/received */
11599 int msg_accrightslen;
11600};
11601#endif
11602# 558 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11603
11604/*
11605 * howto arguments for shutdown(2), specified by Posix.1g.
11606 */
11607#define SHUT_RD 0 /* shut down the reading side */
11608#define SHUT_WR 1 /* shut down the writing side */
11609#define SHUT_RDWR 2 /* shut down both sides */
11610
11611#if __BSD_VISIBLE
11612/* for SCTP */
11613/* we cheat and use the SHUT_XX defines for these */
11614#define PRU_FLUSH_RD SHUT_RD
11615#define PRU_FLUSH_WR SHUT_WR
11616#define PRU_FLUSH_RDWR SHUT_RDWR
11617#endif
11618# 573 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11619
11620
11621#if __BSD_VISIBLE
11622/*
11623 * sendfile(2) header/trailer struct
11624 */
11625struct sf_hdtr {
11626 struct iovec *headers; /* pointer to an array of header struct iovec's */
11627 int hdr_cnt; /* number of header iovec's */
11628 struct iovec *trailers; /* pointer to an array of trailer struct iovec's */
11629 int trl_cnt; /* number of trailer iovec's */
11630};
11631
11632/*
11633 * Sendfile-specific flag(s)
11634 */
11635#define SF_NODISKIO 0x00000001
11636#define SF_MNOWAIT 0x00000002
11637#define SF_SYNC 0x00000004
11638
11639#ifdef _KERNEL
11640#define SFK_COMPAT 0x00000001
11641#endif /* _KERNEL */
11642# 596 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11643#endif /* __BSD_VISIBLE */
11644# 597 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11645
11646#ifndef _KERNEL
11647
11648#if 0 /* expanded by -frewrite-includes */
11649#include <sys/cdefs.h>
11650#endif /* expanded by -frewrite-includes */
11651# 600 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11652# 601 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11653
11654__BEGIN_DECLS
11655int accept(int, struct sockaddr * __restrict, socklen_t * __restrict);
11656int bind(int, const struct sockaddr *, socklen_t);
11657int connect(int, const struct sockaddr *, socklen_t);
11658#if __BSD_VISIBLE
11659int accept4(int, struct sockaddr * __restrict, socklen_t * __restrict, int);
11660int bindat(int, int, const struct sockaddr *, socklen_t);
11661int connectat(int, int, const struct sockaddr *, socklen_t);
11662#endif
11663# 611 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11664int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict);
11665int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict);
11666int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict);
11667int listen(int, int);
11668ssize_t recv(int, void *, size_t, int);
11669ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict, socklen_t * __restrict);
11670ssize_t recvmsg(int, struct msghdr *, int);
11671ssize_t send(int, const void *, size_t, int);
11672ssize_t sendto(int, const void *,
11673 size_t, int, const struct sockaddr *, socklen_t);
11674ssize_t sendmsg(int, const struct msghdr *, int);
11675#if __BSD_VISIBLE
11676int sendfile(int, int, off_t, size_t, struct sf_hdtr *, off_t *, int);
11677int setfib(int);
11678#endif
11679# 626 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11680int setsockopt(int, int, int, const void *, socklen_t);
11681int shutdown(int, int);
11682int sockatmark(int);
11683int socket(int, int, int);
11684int socketpair(int, int, int, int *);
11685__END_DECLS
11686
11687#endif /* !_KERNEL */
11688# 634 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11689
11690#ifdef _KERNEL
11691struct socket;
11692
11693struct tcpcb *so_sototcpcb(struct socket *so);
11694struct inpcb *so_sotoinpcb(struct socket *so);
11695struct sockbuf *so_sockbuf_snd(struct socket *);
11696struct sockbuf *so_sockbuf_rcv(struct socket *);
11697
11698int so_state_get(const struct socket *);
11699void so_state_set(struct socket *, int);
11700
11701int so_options_get(const struct socket *);
11702void so_options_set(struct socket *, int);
11703
11704int so_error_get(const struct socket *);
11705void so_error_set(struct socket *, int);
11706
11707int so_linger_get(const struct socket *);
11708void so_linger_set(struct socket *, int);
11709
11710struct protosw *so_protosw_get(const struct socket *);
11711void so_protosw_set(struct socket *, struct protosw *);
11712
11713void so_sorwakeup_locked(struct socket *so);
11714void so_sowwakeup_locked(struct socket *so);
11715
11716void so_sorwakeup(struct socket *so);
11717void so_sowwakeup(struct socket *so);
11718
11719void so_lock(struct socket *so);
11720void so_unlock(struct socket *so);
11721
11722void so_listeners_apply_all(struct socket *so, void (*func)(struct socket *, void *), void *arg);
11723
11724#endif
11725# 670 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11726
11727
11728#endif /* !_SYS_SOCKET_H_ */
11729# 673 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/sys/socket.h" 3 4
11730# 13 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h" 2
11731
11732typedef socklen_t krb5_socklen_t;
11733#if 0 /* expanded by -frewrite-includes */
11734#include <unistd.h>
11735#endif /* expanded by -frewrite-includes */
11736# 15 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11737# 16 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11738typedef ssize_t krb5_ssize_t;
11739
11740#if !defined(__has_extension)
11741#define __has_extension(x) 0
11742#endif
11743# 21 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11744
11745#define KRB5TYPES_REQUIRE_GNUC(m,n,p) \
11746 (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100) + __GNUC_PATCHLEVEL__) >= \
11747 (((m) * 10000) + ((n) * 100) + (p)))
11748
11749
11750#ifndef HEIMDAL_DEPRECATED
11751#if __has_extension(deprecated) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
11752#define HEIMDAL_DEPRECATED __attribute__((deprecated))
11753#elif defined(_MSC_VER) && (_MSC_VER>1200)
11754# 31 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11755#define HEIMDAL_DEPRECATED __declspec(deprecated)
11756#else
11757# 33 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11758#define HEIMDAL_DEPRECATED
11759#endif
11760# 35 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11761#endif
11762# 36 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11763
11764#ifndef HEIMDAL_PRINTF_ATTRIBUTE
11765#if __has_extension(format) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
11766#define HEIMDAL_PRINTF_ATTRIBUTE(x) __attribute__((format x))
11767#else
11768# 41 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11769#define HEIMDAL_PRINTF_ATTRIBUTE(x)
11770#endif
11771# 43 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11772#endif
11773# 44 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11774
11775#ifndef HEIMDAL_NORETURN_ATTRIBUTE
11776#if __has_extension(noreturn) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
11777#define HEIMDAL_NORETURN_ATTRIBUTE __attribute__((noreturn))
11778#else
11779# 49 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11780#define HEIMDAL_NORETURN_ATTRIBUTE
11781#endif
11782# 51 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11783#endif
11784# 52 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11785
11786#ifndef HEIMDAL_UNUSED_ATTRIBUTE
11787#if __has_extension(unused) || KRB5TYPES_REQUIRE_GNUC(3,1,0)
11788#define HEIMDAL_UNUSED_ATTRIBUTE __attribute__((unused))
11789#else
11790# 57 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11791#define HEIMDAL_UNUSED_ATTRIBUTE
11792#endif
11793# 59 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11794#endif
11795# 60 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11796
11797typedef int krb5_socket_t;
11798
11799#endif /* __krb5_types_h__ */
11800# 64 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../include/krb5-types.h"
11801# 41 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h" 2
11802#if 0 /* expanded by -frewrite-includes */
11803#include <stdarg.h>
11804#endif /* expanded by -frewrite-includes */
11805# 41 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
11806# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 1 3 4
11807/*
11808 * JNPR: stdarg.h,v 1.3 2006/09/15 12:52:34 katta
11809 * $FreeBSD$
11810 */
11811
11812#ifndef _MACHINE_STDARG_H_
11813#define _MACHINE_STDARG_H_
11814#if 0 /* expanded by -frewrite-includes */
11815#include <sys/cdefs.h>
11816#endif /* expanded by -frewrite-includes */
11817# 8 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11818# 9 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11819#if 0 /* expanded by -frewrite-includes */
11820#include <sys/_types.h>
11821#endif /* expanded by -frewrite-includes */
11822# 9 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11823# 10 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11824
11825
11826#if __GNUC__ >= 3
11827
11828#ifndef _VA_LIST_DECLARED
11829#define _VA_LIST_DECLARED
11830typedef __va_list va_list;
11831#endif
11832# 18 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11833#define va_start(v,l) __builtin_va_start((v),l)
11834#define va_end __builtin_va_end
11835#define va_arg __builtin_va_arg
11836#define va_copy __builtin_va_copy
11837
11838#else /* __GNUC__ */
11839# 24 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11840
11841
11842/* ---------------------------------------- */
11843/* VARARGS for MIPS/GNU CC */
11844/* ---------------------------------------- */
11845
11846#if 0 /* expanded by -frewrite-includes */
11847#include <machine/endian.h>
11848#endif /* expanded by -frewrite-includes */
11849# 30 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11850# 31 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11851
11852/* These macros implement varargs for GNU C--either traditional or ANSI. */
11853
11854/* Define __gnuc_va_list. */
11855
11856#ifndef __GNUC_VA_LIST
11857#define __GNUC_VA_LIST
11858
11859typedef char * __gnuc_va_list;
11860typedef __gnuc_va_list va_list;
11861
11862#endif /* ! __GNUC_VA_LIST */
11863# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11864
11865/* If this is for internal libc use, don't define anything but
11866 __gnuc_va_list. */
11867
11868#ifndef _VA_MIPS_H_ENUM
11869#define _VA_MIPS_H_ENUM
11870enum {
11871 __no_type_class = -1,
11872 __void_type_class,
11873 __integer_type_class,
11874 __char_type_class,
11875 __enumeral_type_class,
11876 __boolean_type_class,
11877 __pointer_type_class,
11878 __reference_type_class,
11879 __offset_type_class,
11880 __real_type_class,
11881 __complex_type_class,
11882 __function_type_class,
11883 __method_type_class,
11884 __record_type_class,
11885 __union_type_class,
11886 __array_type_class,
11887 __string_type_class,
11888 __set_type_class,
11889 __file_type_class,
11890 __lang_type_class
11891};
11892#endif
11893# 72 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11894
11895/* In GCC version 2, we want an ellipsis at the end of the declaration
11896 of the argument list. GCC version 1 can't parse it. */
11897
11898#if __GNUC__ > 1
11899#define __va_ellipsis ...
11900#else
11901# 79 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11902#define __va_ellipsis
11903#endif
11904# 81 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11905
11906
11907#define va_start(__AP, __LASTARG) \
11908 (__AP = (__gnuc_va_list) __builtin_next_arg (__LASTARG))
11909
11910#define va_end(__AP) ((void)0)
11911
11912
11913/* We cast to void * and then to TYPE * because this avoids
11914 a warning about increasing the alignment requirement. */
11915/* The __mips64 cases are reversed from the 32 bit cases, because the standard
11916 32 bit calling convention left-aligns all parameters smaller than a word,
11917 whereas the __mips64 calling convention does not (and hence they are
11918 right aligned). */
11919
11920#ifdef __mips64
11921
11922#define __va_rounded_size(__TYPE) (((sizeof (__TYPE) + 8 - 1) / 8) * 8)
11923
11924#define __va_reg_size 8
11925
11926#if defined(__MIPSEB__) || (BYTE_ORDER == BIG_ENDIAN)
11927#define va_arg(__AP, __type) \
11928 ((__type *) (void *) (__AP = (char *) \
11929 ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
11930 + __va_rounded_size (__type))))[-1]
11931#else /* ! __MIPSEB__ && !BYTE_ORDER == BIG_ENDIAN */
11932# 108 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11933#define va_arg(__AP, __type) \
11934 ((__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
11935 + __va_rounded_size (__type))), \
11936 *(__type *) (void *) (__AP - __va_rounded_size (__type)))
11937#endif /* ! __MIPSEB__ && !BYTE_ORDER == BIG_ENDIAN */
11938# 113 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11939
11940#else /* ! __mips64 */
11941# 115 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11942
11943#define __va_rounded_size(__TYPE) \
11944 (((sizeof (__TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
11945
11946#define __va_reg_size 4
11947
11948#if defined(__MIPSEB__) || (BYTE_ORDER == BIG_ENDIAN)
11949/* For big-endian machines. */
11950#define va_arg(__AP, __type) \
11951 ((__AP = (char *) ((__alignof__ (__type) > 4 \
11952 ? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \
11953 : ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \
11954 + __va_rounded_size (__type))), \
11955 *(__type *) (void *) (__AP - __va_rounded_size (__type)))
11956#else /* ! __MIPSEB__ && !BYTE_ORDER == BIG_ENDIAN */
11957# 130 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11958/* For little-endian machines. */
11959#define va_arg(__AP, __type) \
11960 ((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4 \
11961 ? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \
11962 : ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \
11963 + __va_rounded_size(__type))))[-1]
11964#endif /* ! __MIPSEB__ && !BYTE_ORDER == BIG_ENDIAN */
11965# 137 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11966#endif /* ! __mips64 */
11967# 138 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11968
11969/* Copy __gnuc_va_list into another variable of this type. */
11970#define __va_copy(dest, src) (dest) = (src)
11971#define va_copy(dest, src) (dest) = (src)
11972
11973#endif /* __GNUC__ */
11974# 144 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11975#endif /* _MACHINE_STDARG_H_ */
11976# 145 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdarg.h" 3 4
11977# 42 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h" 2
11978#if 0 /* expanded by -frewrite-includes */
11979#include <stdbool.h>
11980#endif /* expanded by -frewrite-includes */
11981# 42 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
11982# 1 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdbool.h" 1 3 4
11983/*
11984 * Copyright (c) 2000 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org>
11985 * All rights reserved.
11986 *
11987 * Redistribution and use in source and binary forms, with or without
11988 * modification, are permitted provided that the following conditions
11989 * are met:
11990 * 1. Redistributions of source code must retain the above copyright
11991 * notice, this list of conditions and the following disclaimer.
11992 * 2. Redistributions in binary form must reproduce the above copyright
11993 * notice, this list of conditions and the following disclaimer in the
11994 * documentation and/or other materials provided with the distribution.
11995 *
11996 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
11997 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
11998 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
11999 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
12000 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12001 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12002 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12003 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12004 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12005 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12006 * SUCH DAMAGE.
12007 *
12008 * $FreeBSD$
12009 */
12010
12011#ifndef __bool_true_false_are_defined
12012#define __bool_true_false_are_defined 1
12013
12014#ifndef __cplusplus
12015
12016#define false 0
12017#define true 1
12018
12019#define bool _Bool
12020#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER)
12021typedef int _Bool;
12022#endif
12023# 41 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdbool.h" 3 4
12024
12025#endif /* !__cplusplus */
12026# 43 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdbool.h" 3 4
12027#endif /* __bool_true_false_are_defined */
12028# 44 "/home/rnw24/obj/mips.mips64/home/rnw24/git/cheribsd/tmp/usr/include/stdbool.h" 3 4
12029# 43 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h" 2
12030
12031typedef void * heim_object_t;
12032typedef unsigned int heim_tid_t;
12033typedef heim_object_t heim_bool_t;
12034typedef heim_object_t heim_null_t;
12035#define HEIM_BASE_ONCE_INIT 0
12036typedef long heim_base_once_t; /* XXX arch dependant */
12037
12038#if !defined(__has_extension)
12039#define __has_extension(x) 0
12040#endif
12041# 54 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
12042
12043#define HEIM_REQUIRE_GNUC(m,n,p) \
12044 (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100) + __GNUC_PATCHLEVEL__) >= \
12045 (((m) * 10000) + ((n) * 100) + (p)))
12046
12047
12048#if __has_extension(__builtin_expect) || HEIM_REQUIRE_GNUC(3,0,0)
12049#define heim_builtin_expect(_op,_res) __builtin_expect(_op,_res)
12050#else
12051# 63 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
12052#define heim_builtin_expect(_op,_res) (_op)
12053#endif
12054# 65 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
12055
12056
12057void * heim_retain(heim_object_t);
12058void heim_release(heim_object_t);
12059
12060typedef void (*heim_type_dealloc)(void *);
12061
12062void *
12063heim_alloc(size_t size, const char *name, heim_type_dealloc dealloc);
12064
12065heim_tid_t
12066heim_get_tid(heim_object_t object);
12067
12068int
12069heim_cmp(heim_object_t a, heim_object_t b);
12070
12071unsigned long
12072heim_get_hash(heim_object_t ptr);
12073
12074void
12075heim_base_once_f(heim_base_once_t *, void *, void (*)(void *));
12076
12077void
12078heim_abort(const char *fmt, ...)
12079 HEIMDAL_NORETURN_ATTRIBUTE
12080 HEIMDAL_PRINTF_ATTRIBUTE((printf, 1, 2));
12081
12082void
12083heim_abortv(const char *fmt, va_list ap)
12084 HEIMDAL_NORETURN_ATTRIBUTE
12085 HEIMDAL_PRINTF_ATTRIBUTE((printf, 1, 0));
12086
12087#define heim_assert(e,t) \
12088 (heim_builtin_expect(!(e), 0) ? heim_abort(t ":" #e) : (void)0)
12089
12090/*
12091 *
12092 */
12093
12094heim_null_t
12095heim_null_create(void);
12096
12097heim_bool_t
12098heim_bool_create(int);
12099
12100int
12101heim_bool_val(heim_bool_t);
12102
12103/*
12104 * Array
12105 */
12106
12107typedef struct heim_array_data *heim_array_t;
12108
12109heim_array_t heim_array_create(void);
12110heim_tid_t heim_array_get_type_id(void);
12111
12112typedef void (*heim_array_iterator_f_t)(heim_object_t, void *);
12113
12114int heim_array_append_value(heim_array_t, heim_object_t);
12115void heim_array_iterate_f(heim_array_t, heim_array_iterator_f_t, void *);
12116#ifdef __BLOCKS__
12117void heim_array_iterate(heim_array_t, void (^)(heim_object_t));
12118#endif
12119# 129 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
12120size_t heim_array_get_length(heim_array_t);
12121heim_object_t
12122 heim_array_copy_value(heim_array_t, size_t);
12123void heim_array_delete_value(heim_array_t, size_t);
12124#ifdef __BLOCKS__
12125void heim_array_filter(heim_array_t, int (^)(heim_object_t));
12126#endif
12127# 136 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
12128
12129/*
12130 * Dict
12131 */
12132
12133typedef struct heim_dict_data *heim_dict_t;
12134
12135heim_dict_t heim_dict_create(size_t size);
12136heim_tid_t heim_dict_get_type_id(void);
12137
12138typedef void (*heim_dict_iterator_f_t)(heim_object_t, heim_object_t, void *);
12139
12140int heim_dict_add_value(heim_dict_t, heim_object_t, heim_object_t);
12141void heim_dict_iterate_f(heim_dict_t, heim_dict_iterator_f_t, void *);
12142#ifdef __BLOCKS__
12143void heim_dict_iterate(heim_dict_t, void (^)(heim_object_t, heim_object_t));
12144#endif
12145# 153 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
12146
12147heim_object_t
12148 heim_dict_copy_value(heim_dict_t, heim_object_t);
12149void heim_dict_delete_key(heim_dict_t, heim_object_t);
12150
12151/*
12152 * String
12153 */
12154
12155typedef struct heim_string_data *heim_string_t;
12156
12157heim_string_t heim_string_create(const char *);
12158heim_tid_t heim_string_get_type_id(void);
12159const char * heim_string_get_utf8(heim_string_t);
12160
12161/*
12162 * Number
12163 */
12164
12165typedef struct heim_number_data *heim_number_t;
12166
12167heim_number_t heim_number_create(int);
12168heim_tid_t heim_number_get_type_id(void);
12169int heim_number_get_int(heim_number_t);
12170
12171/*
12172 *
12173 */
12174
12175typedef struct heim_auto_release * heim_auto_release_t;
12176
12177heim_auto_release_t heim_auto_release_create(void);
12178void heim_auto_release_drain(heim_auto_release_t);
12179void heim_auto_release(heim_object_t);
12180
12181#endif /* HEIM_BASE_H */
12182# 189 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbase.h"
12183# 58 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
12184#if 0 /* expanded by -frewrite-includes */
12185#include "heimbasepriv.h"
12186#endif /* expanded by -frewrite-includes */
12187# 58 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
12188# 1 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/heimbasepriv.h" 1
12189/*
12190 * Copyright (c) 2010 Kungliga Tekniska Högskolan
12191 * (Royal Institute of Technology, Stockholm, Sweden).
12192 * All rights reserved.
12193 *
12194 * Portions Copyright (c) 2010 Apple Inc. All rights reserved.
12195 *
12196 * Redistribution and use in source and binary forms, with or without
12197 * modification, are permitted provided that the following conditions
12198 * are met:
12199 *
12200 * 1. Redistributions of source code must retain the above copyright
12201 * notice, this list of conditions and the following disclaimer.
12202 *
12203 * 2. Redistributions in binary form must reproduce the above copyright
12204 * notice, this list of conditions and the following disclaimer in the
12205 * documentation and/or other materials provided with the distribution.
12206 *
12207 * 3. Neither the name of the Institute nor the names of its contributors
12208 * may be used to endorse or promote products derived from this software
12209 * without specific prior written permission.
12210 *
12211 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
12212 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
12213 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
12214 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
12215 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
12216 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
12217 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12218 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
12219 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
12220 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
12221 * SUCH DAMAGE.
12222 */
12223
12224typedef void (*heim_type_init)(void *);
12225typedef heim_object_t (*heim_type_copy)(void *);
12226typedef int (*heim_type_cmp)(void *, void *);
12227typedef unsigned long (*heim_type_hash)(void *);
12228
12229typedef struct heim_type_data *heim_type_t;
12230
12231enum {
12232 HEIM_TID_NUMBER = 0,
12233 HEIM_TID_NULL = 1,
12234 HEIM_TID_BOOL = 2,
12235 HEIM_TID_TAGGED_UNUSED2 = 3,
12236 HEIM_TID_TAGGED_UNUSED3 = 4,
12237 HEIM_TID_TAGGED_UNUSED4 = 5,
12238 HEIM_TID_TAGGED_UNUSED5 = 6,
12239 HEIM_TID_TAGGED_UNUSED6 = 7,
12240 HEIM_TID_MEMORY = 128,
12241 HEIM_TID_ARRAY = 129,
12242 HEIM_TID_DICT = 130,
12243 HEIM_TID_STRING = 131,
12244 HEIM_TID_AUTORELEASE = 132,
12245 HEIM_TID_USER = 255
12246
12247};
12248
12249struct heim_type_data {
12250 heim_tid_t tid;
12251 const char *name;
12252 heim_type_init init;
12253 heim_type_dealloc dealloc;
12254 heim_type_copy copy;
12255 heim_type_cmp cmp;
12256 heim_type_hash hash;
12257};
12258
12259heim_type_t _heim_get_isa(heim_object_t);
12260
12261heim_type_t
12262_heim_create_type(const char *name,
12263 heim_type_init init,
12264 heim_type_dealloc dealloc,
12265 heim_type_copy copy,
12266 heim_type_cmp cmp,
12267 heim_type_hash hash);
12268
12269heim_object_t
12270_heim_alloc_object(heim_type_t type, size_t size);
12271
12272heim_tid_t
12273_heim_type_get_tid(heim_type_t type);
12274
12275/* tagged tid */
12276extern struct heim_type_data _heim_null_object;
12277extern struct heim_type_data _heim_bool_object;
12278extern struct heim_type_data _heim_number_object;
12279extern struct heim_type_data _heim_string_object;
12280# 59 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h" 2
12281
12282#ifdef HAVE_DISPATCH_DISPATCH_H
12283#if 0 /* expanded by -frewrite-includes */
12284#include <dispatch/dispatch.h>
12285#endif /* expanded by -frewrite-includes */
12286# 61 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
12287# 62 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
12288#endif
12289# 63 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
12290
12291#if defined(__GNUC__) && defined(HAVE___SYNC_ADD_AND_FETCH)
12292
12293#define heim_base_atomic_inc(x) __sync_add_and_fetch((x), 1)
12294#define heim_base_atomic_dec(x) __sync_sub_and_fetch((x), 1)
12295#define heim_base_atomic_type unsigned int
12296#define heim_base_atomic_max UINT_MAX
12297
12298#define heim_base_exchange_pointer(t,v) __sync_lock_test_and_set((t), (v))
12299
12300#elif defined(_WIN32)
12301# 74 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
12302
12303#define heim_base_atomic_inc(x) InterlockedIncrement(x)
12304#define heim_base_atomic_dec(x) InterlockedDecrement(x)
12305#define heim_base_atomic_type LONG
12306#define heim_base_atomic_max MAXLONG
12307
12308#define heim_base_exchange_pointer(t,v) InterlockedExchangePointer((t),(v))
12309
12310#else
12311# 83 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
12312
12313#define HEIM_BASE_NEED_ATOMIC_MUTEX 1
12314extern HEIMDAL_MUTEX _heim_base_mutex;
12315
12316#define heim_base_atomic_type unsigned int
12317
12318static inline heim_base_atomic_type
12319heim_base_atomic_inc(heim_base_atomic_type *x)
12320{
12321 heim_base_atomic_type t;
12322 HEIMDAL_MUTEX_lock(&_heim_base_mutex);
12323 t = ++(*x);
12324 HEIMDAL_MUTEX_unlock(&_heim_base_mutex);
12325 return t;
12326}
12327
12328static inline heim_base_atomic_type
12329heim_base_atomic_dec(heim_base_atomic_type *x)
12330{
12331 heim_base_atomic_type t;
12332 HEIMDAL_MUTEX_lock(&_heim_base_mutex);
12333 t = --(*x);
12334 HEIMDAL_MUTEX_unlock(&_heim_base_mutex);
12335 return t;
12336}
12337
12338#define heim_base_atomic_max UINT_MAX
12339
12340#endif
12341# 112 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/baselocl.h"
12342
12343/* tagged strings/object/XXX */
12344#define heim_base_is_tagged(x) (((uintptr_t)(x)) & 0x3)
12345
12346#define heim_base_is_tagged_object(x) ((((uintptr_t)(x)) & 0x3) == 1)
12347#define heim_base_make_tagged_object(x, tid) \
12348 ((heim_object_t)((((uintptr_t)(x)) << 5) | ((tid) << 2) | 0x1))
12349#define heim_base_tagged_object_tid(x) ((((uintptr_t)(x)) & 0x1f) >> 2)
12350#define heim_base_tagged_object_value(x) (((uintptr_t)(x)) >> 5)
12351
12352/*
12353 *
12354 */
12355
12356#undef HEIMDAL_NORETURN_ATTRIBUTE
12357#define HEIMDAL_NORETURN_ATTRIBUTE
12358#undef HEIMDAL_PRINTF_ATTRIBUTE
12359#define HEIMDAL_PRINTF_ATTRIBUTE(x)
12360# 37 "/home/rnw24/git/cheribsd/kerberos5/lib/libheimbase/../../../crypto/heimdal/base/null.c" 2
12361
12362struct heim_type_data _heim_null_object = {
12363 HEIM_TID_NULL,
12364 "null-object",
12365 NULL,
12366 NULL,
12367 NULL,
12368 NULL,
12369 NULL
12370};
12371
12372heim_null_t
12373heim_null_create(void)
12374{
12375 return heim_base_make_tagged_object(0, HEIM_TID_NULL);
12376}