github.com/afumu/libc@v0.0.6/signal/signal_openbsd_arm64.go (about)

     1  // Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_openbsd_arm64.go -pkgname signal', DO NOT EDIT.
     2  
     3  package signal
     4  
     5  import (
     6  	"math"
     7  	"reflect"
     8  	"sync/atomic"
     9  	"unsafe"
    10  )
    11  
    12  var _ = math.Pi
    13  var _ reflect.Kind
    14  var _ atomic.Value
    15  var _ unsafe.Pointer
    16  
    17  const (
    18  	BIG_ENDIAN               = 4321   // endian.h:45:1:
    19  	BUS_ADRALN               = 1      // siginfo.h:83:1:
    20  	BUS_ADRERR               = 2      // siginfo.h:84:1:
    21  	BUS_OBJERR               = 3      // siginfo.h:85:1:
    22  	BYTE_ORDER               = 1234   // endian.h:47:1:
    23  	CLD_CONTINUED            = 6      // siginfo.h:105:1:
    24  	CLD_DUMPED               = 3      // siginfo.h:102:1:
    25  	CLD_EXITED               = 1      // siginfo.h:100:1:
    26  	CLD_KILLED               = 2      // siginfo.h:101:1:
    27  	CLD_STOPPED              = 5      // siginfo.h:104:1:
    28  	CLD_TRAPPED              = 4      // siginfo.h:103:1:
    29  	CLK_TCK                  = 100    // time.h:68:1:
    30  	CLOCKS_PER_SEC           = 100    // time.h:71:1:
    31  	CLOCK_BOOTTIME           = 6      // _time.h:40:1:
    32  	CLOCK_MONOTONIC          = 3      // _time.h:37:1:
    33  	CLOCK_PROCESS_CPUTIME_ID = 2      // _time.h:36:1:
    34  	CLOCK_REALTIME           = 0      // _time.h:35:1:
    35  	CLOCK_THREAD_CPUTIME_ID  = 4      // _time.h:38:1:
    36  	CLOCK_UPTIME             = 5      // _time.h:39:1:
    37  	DST_AUST                 = 2      // time.h:78:1:
    38  	DST_CAN                  = 6      // time.h:82:1:
    39  	DST_EET                  = 5      // time.h:81:1:
    40  	DST_MET                  = 4      // time.h:80:1:
    41  	DST_NONE                 = 0      // time.h:76:1:
    42  	DST_USA                  = 1      // time.h:77:1:
    43  	DST_WET                  = 3      // time.h:79:1:
    44  	EMT_TAGOVF               = 1      // siginfo.h:66:1:
    45  	FD_SETSIZE               = 1024   // select.h:62:1:
    46  	FPE_FLTDIV               = 3      // siginfo.h:71:1:
    47  	FPE_FLTINV               = 7      // siginfo.h:75:1:
    48  	FPE_FLTOVF               = 4      // siginfo.h:72:1:
    49  	FPE_FLTRES               = 6      // siginfo.h:74:1:
    50  	FPE_FLTSUB               = 8      // siginfo.h:76:1:
    51  	FPE_FLTUND               = 5      // siginfo.h:73:1:
    52  	FPE_INTDIV               = 1      // siginfo.h:69:1:
    53  	FPE_INTOVF               = 2      // siginfo.h:70:1:
    54  	ILL_BADSTK               = 8      // siginfo.h:63:1:
    55  	ILL_COPROC               = 7      // siginfo.h:62:1:
    56  	ILL_ILLADR               = 3      // siginfo.h:58:1:
    57  	ILL_ILLOPC               = 1      // siginfo.h:56:1:
    58  	ILL_ILLOPN               = 2      // siginfo.h:57:1:
    59  	ILL_ILLTRP               = 4      // siginfo.h:59:1:
    60  	ILL_PRVOPC               = 5      // siginfo.h:60:1:
    61  	ILL_PRVREG               = 6      // siginfo.h:61:1:
    62  	ITIMER_PROF              = 2      // time.h:146:1:
    63  	ITIMER_REAL              = 0      // time.h:144:1:
    64  	ITIMER_VIRTUAL           = 1      // time.h:145:1:
    65  	LITTLE_ENDIAN            = 1234   // endian.h:44:1:
    66  	MINSIGSTKSZ              = 12288  // signal.h:183:1:
    67  	NBBY                     = 8      // select.h:111:1:
    68  	NSIG                     = 33     // signal.h:48:1:
    69  	NSIGBUS                  = 3      // siginfo.h:86:1:
    70  	NSIGCLD                  = 6      // siginfo.h:106:1:
    71  	NSIGEMT                  = 1      // siginfo.h:67:1:
    72  	NSIGFPE                  = 8      // siginfo.h:77:1:
    73  	NSIGILL                  = 8      // siginfo.h:64:1:
    74  	NSIGSEGV                 = 2      // siginfo.h:81:1:
    75  	NSIGTRAP                 = 2      // siginfo.h:95:1:
    76  	PDP_ENDIAN               = 3412   // endian.h:46:1:
    77  	SA_NOCLDSTOP             = 0x0008 // signal.h:132:1:
    78  	SA_NOCLDWAIT             = 0x0020 // signal.h:130:1:
    79  	SA_NODEFER               = 0x0010 // signal.h:129:1:
    80  	SA_ONSTACK               = 0x0001 // signal.h:126:1:
    81  	SA_RESETHAND             = 0x0004 // signal.h:128:1:
    82  	SA_RESTART               = 0x0002 // signal.h:127:1:
    83  	SA_SIGINFO               = 0x0040 // signal.h:134:1:
    84  	SEGV_ACCERR              = 2      // siginfo.h:80:1:
    85  	SEGV_MAPERR              = 1      // siginfo.h:79:1:
    86  	SIGABRT                  = 6      // signal.h:56:1:
    87  	SIGALRM                  = 14     // signal.h:67:1:
    88  	SIGBUS                   = 10     // signal.h:63:1:
    89  	SIGCHLD                  = 20     // signal.h:73:1:
    90  	SIGCONT                  = 19     // signal.h:72:1:
    91  	SIGEMT                   = 7      // signal.h:59:1:
    92  	SIGFPE                   = 8      // signal.h:61:1:
    93  	SIGHUP                   = 1      // signal.h:51:1:
    94  	SIGILL                   = 4      // signal.h:54:1:
    95  	SIGINFO                  = 29     // signal.h:85:1:
    96  	SIGINT                   = 2      // signal.h:52:1:
    97  	SIGIO                    = 23     // signal.h:77:1:
    98  	SIGIOT                   = 6      // signal.h:58:1:
    99  	SIGKILL                  = 9      // signal.h:62:1:
   100  	SIGPIPE                  = 13     // signal.h:66:1:
   101  	SIGPROF                  = 27     // signal.h:82:1:
   102  	SIGQUIT                  = 3      // signal.h:53:1:
   103  	SIGSEGV                  = 11     // signal.h:64:1:
   104  	SIGSTKSZ                 = 28672  // signal.h:185:1:
   105  	SIGSTOP                  = 17     // signal.h:70:1:
   106  	SIGSYS                   = 12     // signal.h:65:1:
   107  	SIGTERM                  = 15     // signal.h:68:1:
   108  	SIGTHR                   = 32     // signal.h:90:1:
   109  	SIGTRAP                  = 5      // signal.h:55:1:
   110  	SIGTSTP                  = 18     // signal.h:71:1:
   111  	SIGTTIN                  = 21     // signal.h:74:1:
   112  	SIGTTOU                  = 22     // signal.h:75:1:
   113  	SIGURG                   = 16     // signal.h:69:1:
   114  	SIGUSR1                  = 30     // signal.h:87:1:
   115  	SIGUSR2                  = 31     // signal.h:88:1:
   116  	SIGVTALRM                = 26     // signal.h:81:1:
   117  	SIGWINCH                 = 28     // signal.h:84:1:
   118  	SIGXCPU                  = 24     // signal.h:79:1:
   119  	SIGXFSZ                  = 25     // signal.h:80:1:
   120  	SIG_BLOCK                = 1      // signal.h:140:1:
   121  	SIG_SETMASK              = 3      // signal.h:142:1:
   122  	SIG_UNBLOCK              = 2      // signal.h:141:1:
   123  	SI_LWP                   = -1     // siginfo.h:47:1:
   124  	SI_MAXSZ                 = 128    // siginfo.h:127:1:
   125  	SI_NOINFO                = 32767  // siginfo.h:45:1:
   126  	SI_QUEUE                 = -2     // siginfo.h:48:1:
   127  	SI_TIMER                 = -3     // siginfo.h:49:1:
   128  	SI_USER                  = 0      // siginfo.h:46:1:
   129  	SS_DISABLE               = 0x0004 // signal.h:182:1:
   130  	SS_ONSTACK               = 0x0001 // signal.h:181:1:
   131  	SV_INTERRUPT             = 2      // signal.h:158:1:
   132  	SV_ONSTACK               = 1      // signal.h:157:1:
   133  	SV_RESETHAND             = 4      // signal.h:159:1:
   134  	TIMER_ABSTIME            = 0x1    // _time.h:62:1:
   135  	TIMER_RELTIME            = 0x0    // _time.h:61:1:
   136  	TIME_UTC                 = 1      // time.h:179:1:
   137  	TRAP_BRKPT               = 1      // siginfo.h:93:1:
   138  	TRAP_TRACE               = 2      // siginfo.h:94:1:
   139  	X_BIG_ENDIAN             = 4321   // _endian.h:43:1:
   140  	X_BYTE_ORDER             = 1234   // endian.h:60:1:
   141  	X_CLOCKID_T_DEFINED_     = 0      // types.h:162:1:
   142  	X_CLOCK_T_DEFINED_       = 0      // types.h:157:1:
   143  	X_FILE_OFFSET_BITS       = 64     // <builtin>:25:1:
   144  	X_INT16_T_DEFINED_       = 0      // types.h:84:1:
   145  	X_INT32_T_DEFINED_       = 0      // types.h:94:1:
   146  	X_INT64_T_DEFINED_       = 0      // types.h:104:1:
   147  	X_INT8_T_DEFINED_        = 0      // types.h:74:1:
   148  	X_LITTLE_ENDIAN          = 1234   // _endian.h:42:1:
   149  	X_LOCALE_T_DEFINED_      = 0      // time.h:106:1:
   150  	X_LP64                   = 1      // <predefined>:1:1:
   151  	X_MACHINE_CDEFS_H_       = 0      // cdefs.h:4:1:
   152  	X_MACHINE_ENDIAN_H_      = 0      // endian.h:20:1:
   153  	X_MACHINE_SIGNAL_H_      = 0      // signal.h:37:1:
   154  	X_MACHINE__TYPES_H_      = 0      // _types.h:35:1:
   155  	X_MAX_PAGE_SHIFT         = 12     // _types.h:57:1:
   156  	X_NSIG                   = 33     // signal.h:45:1:
   157  	X_OFF_T_DEFINED_         = 0      // types.h:192:1:
   158  	X_PDP_ENDIAN             = 3412   // _endian.h:44:1:
   159  	X_PID_T_DEFINED_         = 0      // types.h:167:1:
   160  	X_QUAD_HIGHWORD          = 1      // _endian.h:95:1:
   161  	X_QUAD_LOWWORD           = 0      // _endian.h:96:1:
   162  	X_RET_PROTECTOR          = 1      // <predefined>:2:1:
   163  	X_SELECT_DEFINED_        = 0      // select.h:126:1:
   164  	X_SIGSET_T_DEFINED_      = 0      // signal.h:103:1:
   165  	X_SIZE_T_DEFINED_        = 0      // types.h:172:1:
   166  	X_SSIZE_T_DEFINED_       = 0      // types.h:177:1:
   167  	X_STACKALIGNBYTES        = 15     // _types.h:54:1:
   168  	X_SYS_CDEFS_H_           = 0      // cdefs.h:39:1:
   169  	X_SYS_ENDIAN_H_          = 0      // endian.h:38:1:
   170  	X_SYS_SELECT_H_          = 0      // select.h:35:1:
   171  	X_SYS_SIGINFO_H          = 0      // siginfo.h:29:1:
   172  	X_SYS_SIGNAL_H_          = 0      // signal.h:41:1:
   173  	X_SYS_TIME_H_            = 0      // time.h:36:1:
   174  	X_SYS_TYPES_H_           = 0      // types.h:41:1:
   175  	X_SYS__ENDIAN_H_         = 0      // _endian.h:34:1:
   176  	X_SYS__TIME_H_           = 0      // _time.h:33:1:
   177  	X_SYS__TYPES_H_          = 0      // _types.h:35:1:
   178  	X_TIMER_T_DEFINED_       = 0      // types.h:187:1:
   179  	X_TIMESPEC_DECLARED      = 0      // select.h:48:1:
   180  	X_TIMEVAL_DECLARED       = 0      // select.h:40:1:
   181  	X_TIME_H_                = 0      // time.h:42:1:
   182  	X_TIME_T_DEFINED_        = 0      // types.h:182:1:
   183  	X_UINT16_T_DEFINED_      = 0      // types.h:89:1:
   184  	X_UINT32_T_DEFINED_      = 0      // types.h:99:1:
   185  	X_UINT64_T_DEFINED_      = 0      // types.h:109:1:
   186  	X_UINT8_T_DEFINED_       = 0      // types.h:79:1:
   187  	X_USER_SIGNAL_H          = 0      // signal.h:36:1:
   188  	Unix                     = 1      // <predefined>:360:1:
   189  )
   190  
   191  type Ptrdiff_t = int64 /* <builtin>:3:26 */
   192  
   193  type Size_t = uint64 /* <builtin>:9:23 */
   194  
   195  type Wchar_t = int32 /* <builtin>:15:24 */
   196  
   197  type X__int128_t = struct {
   198  	Flo int64
   199  	Fhi int64
   200  } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
   201  type X__uint128_t = struct {
   202  	Flo uint64
   203  	Fhi uint64
   204  } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
   205  
   206  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
   207  type X__float128 = float64        /* <builtin>:47:21 */
   208  
   209  //	$OpenBSD: signal.h,v 1.26 2018/05/30 13:20:38 bluhm Exp $
   210  //	$NetBSD: signal.h,v 1.8 1996/02/29 00:04:57 jtc Exp $
   211  
   212  // -
   213  // Copyright (c) 1991, 1993
   214  //	The Regents of the University of California.  All rights reserved.
   215  //
   216  // Redistribution and use in source and binary forms, with or without
   217  // modification, are permitted provided that the following conditions
   218  // are met:
   219  // 1. Redistributions of source code must retain the above copyright
   220  //    notice, this list of conditions and the following disclaimer.
   221  // 2. Redistributions in binary form must reproduce the above copyright
   222  //    notice, this list of conditions and the following disclaimer in the
   223  //    documentation and/or other materials provided with the distribution.
   224  // 3. Neither the name of the University nor the names of its contributors
   225  //    may be used to endorse or promote products derived from this software
   226  //    without specific prior written permission.
   227  //
   228  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   229  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   230  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   231  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   232  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   233  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   234  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   235  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   236  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   237  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   238  // SUCH DAMAGE.
   239  //
   240  //	@(#)signal.h	8.3 (Berkeley) 3/30/94
   241  
   242  //	$OpenBSD: signal.h,v 1.29 2018/04/18 16:05:20 deraadt Exp $
   243  //	$NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $
   244  
   245  // Copyright (c) 1982, 1986, 1989, 1991, 1993
   246  //	The Regents of the University of California.  All rights reserved.
   247  // (c) UNIX System Laboratories, Inc.
   248  // All or some portions of this file are derived from material licensed
   249  // to the University of California by American Telephone and Telegraph
   250  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
   251  // the permission of UNIX System Laboratories, Inc.
   252  //
   253  // Redistribution and use in source and binary forms, with or without
   254  // modification, are permitted provided that the following conditions
   255  // are met:
   256  // 1. Redistributions of source code must retain the above copyright
   257  //    notice, this list of conditions and the following disclaimer.
   258  // 2. Redistributions in binary form must reproduce the above copyright
   259  //    notice, this list of conditions and the following disclaimer in the
   260  //    documentation and/or other materials provided with the distribution.
   261  // 3. Neither the name of the University nor the names of its contributors
   262  //    may be used to endorse or promote products derived from this software
   263  //    without specific prior written permission.
   264  //
   265  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   266  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   267  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   268  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   269  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   270  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   271  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   272  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   273  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   274  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   275  // SUCH DAMAGE.
   276  //
   277  //	@(#)signal.h	8.2 (Berkeley) 1/21/94
   278  
   279  // $OpenBSD: signal.h,v 1.2 2017/03/12 17:57:12 kettenis Exp $
   280  // Copyright (c) 1992, 1993
   281  //	The Regents of the University of California.  All rights reserved.
   282  //
   283  // This code is derived from software contributed to Berkeley by
   284  // Ralph Campbell.
   285  //
   286  // Redistribution and use in source and binary forms, with or without
   287  // modification, are permitted provided that the following conditions
   288  // are met:
   289  // 1. Redistributions of source code must retain the above copyright
   290  //    notice, this list of conditions and the following disclaimer.
   291  // 2. Redistributions in binary form must reproduce the above copyright
   292  //    notice, this list of conditions and the following disclaimer in the
   293  //    documentation and/or other materials provided with the distribution.
   294  // 3. Neither the name of the University nor the names of its contributors
   295  //    may be used to endorse or promote products derived from this software
   296  //    without specific prior written permission.
   297  //
   298  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   299  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   300  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   301  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   302  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   303  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   304  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   305  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   306  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   307  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   308  // SUCH DAMAGE.
   309  //
   310  //	@(#)signal.h	8.1 (Berkeley) 6/10/93
   311  
   312  //	$OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
   313  //	$NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
   314  
   315  // Copyright (c) 1991, 1993
   316  //	The Regents of the University of California.  All rights reserved.
   317  //
   318  // This code is derived from software contributed to Berkeley by
   319  // Berkeley Software Design, Inc.
   320  //
   321  // Redistribution and use in source and binary forms, with or without
   322  // modification, are permitted provided that the following conditions
   323  // are met:
   324  // 1. Redistributions of source code must retain the above copyright
   325  //    notice, this list of conditions and the following disclaimer.
   326  // 2. Redistributions in binary form must reproduce the above copyright
   327  //    notice, this list of conditions and the following disclaimer in the
   328  //    documentation and/or other materials provided with the distribution.
   329  // 3. Neither the name of the University nor the names of its contributors
   330  //    may be used to endorse or promote products derived from this software
   331  //    without specific prior written permission.
   332  //
   333  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   334  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   335  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   336  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   337  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   338  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   339  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   340  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   341  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   342  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   343  // SUCH DAMAGE.
   344  //
   345  //	@(#)cdefs.h	8.7 (Berkeley) 1/21/94
   346  
   347  //	$OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
   348  
   349  // Macro to test if we're using a specific version of gcc or later.
   350  
   351  // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
   352  // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
   353  // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
   354  // in between its arguments.  Do not use __CONCAT on double-quoted strings,
   355  // such as those from the __STRING macro: to concatenate strings just put
   356  // them next to each other.
   357  
   358  // GCC1 and some versions of GCC2 declare dead (non-returning) and
   359  // pure (no side effects) functions using "volatile" and "const";
   360  // unfortunately, these then cause warnings under "-ansi -pedantic".
   361  // GCC >= 2.5 uses the __attribute__((attrs)) style.  All of these
   362  // work for GNU C++ (modulo a slight glitch in the C++ grammar in
   363  // the distribution version of 2.5.5).
   364  
   365  // __returns_twice makes the compiler not assume the function
   366  // only returns once.  This affects registerisation of variables:
   367  // even local variables need to be in memory across such a call.
   368  // Example: setjmp()
   369  
   370  // __only_inline makes the compiler only use this function definition
   371  // for inlining; references that can't be inlined will be left as
   372  // external references instead of generating a local copy.  The
   373  // matching library should include a simple extern definition for
   374  // the function to handle those references.  c.f. ctype.h
   375  
   376  // GNU C version 2.96 adds explicit branch prediction so that
   377  // the CPU back-end can hint the processor and also so that
   378  // code blocks can be reordered such that the predicted path
   379  // sees a more linear flow, thus improving cache behavior, etc.
   380  //
   381  // The following two macros provide us with a way to utilize this
   382  // compiler feature.  Use __predict_true() if you expect the expression
   383  // to evaluate to true, and __predict_false() if you expect the
   384  // expression to evaluate to false.
   385  //
   386  // A few notes about usage:
   387  //
   388  //	* Generally, __predict_false() error condition checks (unless
   389  //	  you have some _strong_ reason to do otherwise, in which case
   390  //	  document it), and/or __predict_true() `no-error' condition
   391  //	  checks, assuming you want to optimize for the no-error case.
   392  //
   393  //	* Other than that, if you don't know the likelihood of a test
   394  //	  succeeding from empirical or other `hard' evidence, don't
   395  //	  make predictions.
   396  //
   397  //	* These are meant to be used in places that are run `a lot'.
   398  //	  It is wasteful to make predictions in code that is run
   399  //	  seldomly (e.g. at subsystem initialization time) as the
   400  //	  basic block reordering that this affects can often generate
   401  //	  larger code.
   402  
   403  // Delete pseudo-keywords wherever they are not available or needed.
   404  
   405  // The __packed macro indicates that a variable or structure members
   406  // should have the smallest possible alignment, despite any host CPU
   407  // alignment requirements.
   408  //
   409  // The __aligned(x) macro specifies the minimum alignment of a
   410  // variable or structure.
   411  //
   412  // These macros together are useful for describing the layout and
   413  // alignment of messages exchanged with hardware or other systems.
   414  
   415  // "The nice thing about standards is that there are so many to choose from."
   416  // There are a number of "feature test macros" specified by (different)
   417  // standards that determine which interfaces and types the header files
   418  // should expose.
   419  //
   420  // Because of inconsistencies in these macros, we define our own
   421  // set in the private name space that end in _VISIBLE.  These are
   422  // always defined and so headers can test their values easily.
   423  // Things can get tricky when multiple feature macros are defined.
   424  // We try to take the union of all the features requested.
   425  //
   426  // The following macros are guaranteed to have a value after cdefs.h
   427  // has been included:
   428  //	__POSIX_VISIBLE
   429  //	__XPG_VISIBLE
   430  //	__ISO_C_VISIBLE
   431  //	__BSD_VISIBLE
   432  
   433  // X/Open Portability Guides and Single Unix Specifications.
   434  // _XOPEN_SOURCE				XPG3
   435  // _XOPEN_SOURCE && _XOPEN_VERSION = 4		XPG4
   436  // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1	XPG4v2
   437  // _XOPEN_SOURCE == 500				XPG5
   438  // _XOPEN_SOURCE == 520				XPG5v2
   439  // _XOPEN_SOURCE == 600				POSIX 1003.1-2001 with XSI
   440  // _XOPEN_SOURCE == 700				POSIX 1003.1-2008 with XSI
   441  //
   442  // The XPG spec implies a specific value for _POSIX_C_SOURCE.
   443  
   444  // POSIX macros, these checks must follow the XOPEN ones above.
   445  //
   446  // _POSIX_SOURCE == 1		1003.1-1988 (superseded by _POSIX_C_SOURCE)
   447  // _POSIX_C_SOURCE == 1		1003.1-1990
   448  // _POSIX_C_SOURCE == 2		1003.2-1992
   449  // _POSIX_C_SOURCE == 199309L	1003.1b-1993
   450  // _POSIX_C_SOURCE == 199506L   1003.1c-1995, 1003.1i-1995,
   451  //				and the omnibus ISO/IEC 9945-1:1996
   452  // _POSIX_C_SOURCE == 200112L   1003.1-2001
   453  // _POSIX_C_SOURCE == 200809L   1003.1-2008
   454  //
   455  // The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
   456  // this may be overridden by the _ISOC99_SOURCE macro later.
   457  
   458  // _ANSI_SOURCE means to expose ANSI C89 interfaces only.
   459  // If the user defines it in addition to one of the POSIX or XOPEN
   460  // macros, assume the POSIX/XOPEN macro(s) should take precedence.
   461  
   462  // _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
   463  // override any of the other macros since they are non-exclusive.
   464  
   465  // Finally deal with BSD-specific interfaces that are not covered
   466  // by any standards.  We expose these when none of the POSIX or XPG
   467  // macros is defined or if the user explicitly asks for them.
   468  
   469  // Default values.
   470  
   471  type Sig_atomic_t = int32 /* signal.h:41:13 */
   472  
   473  // Information pushed on stack when a signal is delivered.
   474  // This is used by the kernel to restore state following
   475  // execution of the signal handler.  It is also made available
   476  // to the handler to allow it to restore state properly if
   477  // a non-standard exit is performed.
   478  type Sigcontext = struct {
   479  	F__sc_unused int32
   480  	Fsc_mask     int32
   481  	Fsc_sp       uint64
   482  	Fsc_lr       uint64
   483  	Fsc_elr      uint64
   484  	Fsc_spsr     uint64
   485  	Fsc_x        [30]uint64
   486  	Fsc_cookie   int64
   487  } /* signal.h:51:1 */
   488  
   489  // Language spec says we must list exactly one parameter, even though we
   490  // actually supply three.  Ugh!
   491  
   492  type Sigset_t = uint32 /* signal.h:104:22 */
   493  
   494  //	$OpenBSD: siginfo.h,v 1.12 2017/04/07 04:48:44 guenther Exp $
   495  
   496  // Copyright (c) 1997 Theo de Raadt
   497  // All rights reserved.
   498  //
   499  // Redistribution and use in source and binary forms, with or without
   500  // modification, are permitted provided that the following conditions
   501  // are met:
   502  // 1. Redistributions of source code must retain the above copyright
   503  //    notice, this list of conditions and the following disclaimer.
   504  // 2. Redistributions in binary form must reproduce the above copyright
   505  //    notice, this list of conditions and the following disclaimer in the
   506  //    documentation and/or other materials provided with the distribution.
   507  //
   508  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   509  // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   510  // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   511  // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   512  // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   513  // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   514  // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   515  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   516  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   517  // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   518  
   519  //	$OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
   520  //	$NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
   521  
   522  // Copyright (c) 1991, 1993
   523  //	The Regents of the University of California.  All rights reserved.
   524  //
   525  // This code is derived from software contributed to Berkeley by
   526  // Berkeley Software Design, Inc.
   527  //
   528  // Redistribution and use in source and binary forms, with or without
   529  // modification, are permitted provided that the following conditions
   530  // are met:
   531  // 1. Redistributions of source code must retain the above copyright
   532  //    notice, this list of conditions and the following disclaimer.
   533  // 2. Redistributions in binary form must reproduce the above copyright
   534  //    notice, this list of conditions and the following disclaimer in the
   535  //    documentation and/or other materials provided with the distribution.
   536  // 3. Neither the name of the University nor the names of its contributors
   537  //    may be used to endorse or promote products derived from this software
   538  //    without specific prior written permission.
   539  //
   540  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   541  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   542  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   543  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   544  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   545  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   546  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   547  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   548  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   549  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   550  // SUCH DAMAGE.
   551  //
   552  //	@(#)cdefs.h	8.7 (Berkeley) 1/21/94
   553  
   554  type Sigval = struct {
   555  	F__ccgo_pad1 [0]uint64
   556  	Fsival_int   int32
   557  	F__ccgo_pad2 [4]byte
   558  } /* siginfo.h:33:1 */
   559  
   560  // Negative signal codes are reserved for future use for
   561  // user generated signals.
   562  
   563  // The machine dependent signal codes (SIGILL, SIGFPE,
   564  // SIGSEGV, and SIGBUS)
   565  
   566  // SIGTRAP signal codes
   567  
   568  // SIGCHLD signal codes
   569  
   570  //	$OpenBSD: time.h,v 1.62 2022/07/23 22:58:51 cheloha Exp $
   571  //	$NetBSD: time.h,v 1.18 1996/04/23 10:29:33 mycroft Exp $
   572  
   573  // Copyright (c) 1982, 1986, 1993
   574  //	The Regents of the University of California.  All rights reserved.
   575  //
   576  // Redistribution and use in source and binary forms, with or without
   577  // modification, are permitted provided that the following conditions
   578  // are met:
   579  // 1. Redistributions of source code must retain the above copyright
   580  //    notice, this list of conditions and the following disclaimer.
   581  // 2. Redistributions in binary form must reproduce the above copyright
   582  //    notice, this list of conditions and the following disclaimer in the
   583  //    documentation and/or other materials provided with the distribution.
   584  // 3. Neither the name of the University nor the names of its contributors
   585  //    may be used to endorse or promote products derived from this software
   586  //    without specific prior written permission.
   587  //
   588  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   589  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   590  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   591  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   592  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   593  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   594  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   595  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   596  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   597  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   598  // SUCH DAMAGE.
   599  //
   600  //	@(#)time.h	8.2 (Berkeley) 7/10/94
   601  
   602  //	$OpenBSD: select.h,v 1.17 2016/09/12 19:41:20 guenther Exp $
   603  
   604  // -
   605  // Copyright (c) 1992, 1993
   606  //	The Regents of the University of California.  All rights reserved.
   607  //
   608  // Redistribution and use in source and binary forms, with or without
   609  // modification, are permitted provided that the following conditions
   610  // are met:
   611  // 1. Redistributions of source code must retain the above copyright
   612  //    notice, this list of conditions and the following disclaimer.
   613  // 2. Redistributions in binary form must reproduce the above copyright
   614  //    notice, this list of conditions and the following disclaimer in the
   615  //    documentation and/or other materials provided with the distribution.
   616  // 3. Neither the name of the University nor the names of its contributors
   617  //    may be used to endorse or promote products derived from this software
   618  //    without specific prior written permission.
   619  //
   620  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   621  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   622  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   623  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   624  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   625  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   626  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   627  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   628  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   629  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   630  // SUCH DAMAGE.
   631  //
   632  //	@(#)select.h	8.2 (Berkeley) 1/4/94
   633  
   634  //	$OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
   635  //	$NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
   636  
   637  // -
   638  // Copyright (c) 1982, 1986, 1991, 1993
   639  //	The Regents of the University of California.  All rights reserved.
   640  // (c) UNIX System Laboratories, Inc.
   641  // All or some portions of this file are derived from material licensed
   642  // to the University of California by American Telephone and Telegraph
   643  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
   644  // the permission of UNIX System Laboratories, Inc.
   645  //
   646  // Redistribution and use in source and binary forms, with or without
   647  // modification, are permitted provided that the following conditions
   648  // are met:
   649  // 1. Redistributions of source code must retain the above copyright
   650  //    notice, this list of conditions and the following disclaimer.
   651  // 2. Redistributions in binary form must reproduce the above copyright
   652  //    notice, this list of conditions and the following disclaimer in the
   653  //    documentation and/or other materials provided with the distribution.
   654  // 3. Neither the name of the University nor the names of its contributors
   655  //    may be used to endorse or promote products derived from this software
   656  //    without specific prior written permission.
   657  //
   658  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   659  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   660  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   661  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   662  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   663  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   664  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   665  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   666  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   667  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   668  // SUCH DAMAGE.
   669  //
   670  //	@(#)types.h	8.4 (Berkeley) 1/21/94
   671  
   672  //	$OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
   673  //	$NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
   674  
   675  // Copyright (c) 1991, 1993
   676  //	The Regents of the University of California.  All rights reserved.
   677  //
   678  // This code is derived from software contributed to Berkeley by
   679  // Berkeley Software Design, Inc.
   680  //
   681  // Redistribution and use in source and binary forms, with or without
   682  // modification, are permitted provided that the following conditions
   683  // are met:
   684  // 1. Redistributions of source code must retain the above copyright
   685  //    notice, this list of conditions and the following disclaimer.
   686  // 2. Redistributions in binary form must reproduce the above copyright
   687  //    notice, this list of conditions and the following disclaimer in the
   688  //    documentation and/or other materials provided with the distribution.
   689  // 3. Neither the name of the University nor the names of its contributors
   690  //    may be used to endorse or promote products derived from this software
   691  //    without specific prior written permission.
   692  //
   693  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   694  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   695  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   696  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   697  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   698  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   699  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   700  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   701  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   702  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   703  // SUCH DAMAGE.
   704  //
   705  //	@(#)cdefs.h	8.7 (Berkeley) 1/21/94
   706  
   707  //	$OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
   708  
   709  // -
   710  // Copyright (c) 1997 Niklas Hallqvist.  All rights reserved.
   711  //
   712  // Redistribution and use in source and binary forms, with or without
   713  // modification, are permitted provided that the following conditions
   714  // are met:
   715  // 1. Redistributions of source code must retain the above copyright
   716  //    notice, this list of conditions and the following disclaimer.
   717  // 2. Redistributions in binary form must reproduce the above copyright
   718  //    notice, this list of conditions and the following disclaimer in the
   719  //    documentation and/or other materials provided with the distribution.
   720  //
   721  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   722  // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   723  // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   724  // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   725  // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   726  // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   727  // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   728  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   729  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   730  // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   731  
   732  // Public definitions for little- and big-endian systems.
   733  // This file should be included as <endian.h> in userspace and as
   734  // <sys/endian.h> in the kernel.
   735  //
   736  // System headers that need endian information but that can't or don't
   737  // want to export the public names here should include <sys/_endian.h>
   738  // and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
   739  
   740  //	$OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
   741  //	$NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
   742  
   743  // Copyright (c) 1991, 1993
   744  //	The Regents of the University of California.  All rights reserved.
   745  //
   746  // This code is derived from software contributed to Berkeley by
   747  // Berkeley Software Design, Inc.
   748  //
   749  // Redistribution and use in source and binary forms, with or without
   750  // modification, are permitted provided that the following conditions
   751  // are met:
   752  // 1. Redistributions of source code must retain the above copyright
   753  //    notice, this list of conditions and the following disclaimer.
   754  // 2. Redistributions in binary form must reproduce the above copyright
   755  //    notice, this list of conditions and the following disclaimer in the
   756  //    documentation and/or other materials provided with the distribution.
   757  // 3. Neither the name of the University nor the names of its contributors
   758  //    may be used to endorse or promote products derived from this software
   759  //    without specific prior written permission.
   760  //
   761  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   762  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   763  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   764  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   765  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   766  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   767  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   768  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   769  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   770  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   771  // SUCH DAMAGE.
   772  //
   773  //	@(#)cdefs.h	8.7 (Berkeley) 1/21/94
   774  
   775  //	$OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
   776  
   777  // -
   778  // Copyright (c) 1997 Niklas Hallqvist.  All rights reserved.
   779  //
   780  // Redistribution and use in source and binary forms, with or without
   781  // modification, are permitted provided that the following conditions
   782  // are met:
   783  // 1. Redistributions of source code must retain the above copyright
   784  //    notice, this list of conditions and the following disclaimer.
   785  // 2. Redistributions in binary form must reproduce the above copyright
   786  //    notice, this list of conditions and the following disclaimer in the
   787  //    documentation and/or other materials provided with the distribution.
   788  //
   789  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   790  // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   791  // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   792  // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   793  // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   794  // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   795  // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   796  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   797  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   798  // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   799  
   800  // Internal endianness macros.  This pulls in <machine/endian.h> to
   801  // get the correct setting direction for the platform and sets internal
   802  // ('__' prefix) macros appropriately.
   803  
   804  //	$OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
   805  
   806  // -
   807  // Copyright (c) 1990, 1993
   808  //	The Regents of the University of California.  All rights reserved.
   809  //
   810  // Redistribution and use in source and binary forms, with or without
   811  // modification, are permitted provided that the following conditions
   812  // are met:
   813  // 1. Redistributions of source code must retain the above copyright
   814  //    notice, this list of conditions and the following disclaimer.
   815  // 2. Redistributions in binary form must reproduce the above copyright
   816  //    notice, this list of conditions and the following disclaimer in the
   817  //    documentation and/or other materials provided with the distribution.
   818  // 3. Neither the name of the University nor the names of its contributors
   819  //    may be used to endorse or promote products derived from this software
   820  //    without specific prior written permission.
   821  //
   822  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   823  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   824  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   825  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   826  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   827  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   828  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   829  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   830  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   831  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   832  // SUCH DAMAGE.
   833  //
   834  //	@(#)types.h	8.3 (Berkeley) 1/5/94
   835  
   836  // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
   837  // -
   838  // Copyright (c) 1990, 1993
   839  //	The Regents of the University of California.  All rights reserved.
   840  //
   841  // Redistribution and use in source and binary forms, with or without
   842  // modification, are permitted provided that the following conditions
   843  // are met:
   844  // 1. Redistributions of source code must retain the above copyright
   845  //    notice, this list of conditions and the following disclaimer.
   846  // 2. Redistributions in binary form must reproduce the above copyright
   847  //    notice, this list of conditions and the following disclaimer in the
   848  //    documentation and/or other materials provided with the distribution.
   849  // 3. Neither the name of the University nor the names of its contributors
   850  //    may be used to endorse or promote products derived from this software
   851  //    without specific prior written permission.
   852  //
   853  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   854  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   855  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   856  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   857  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   858  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   859  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   860  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   861  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   862  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   863  // SUCH DAMAGE.
   864  //
   865  //	@(#)types.h	8.3 (Berkeley) 1/5/94
   866  //	@(#)ansi.h	8.2 (Berkeley) 1/4/94
   867  
   868  // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
   869  // value for all data types (int, long, ...).   The result is an
   870  // unsigned long and must be cast to any desired pointer type.
   871  //
   872  // _ALIGNED_POINTER is a boolean macro that checks whether an address
   873  // is valid to fetch data elements of type t from on this architecture.
   874  // This does not reflect the optimal alignment, just the possibility
   875  // (within reasonable limits).
   876  
   877  // 7.18.1.1 Exact-width integer types
   878  type X__int8_t = int8     /* _types.h:60:22 */
   879  type X__uint8_t = uint8   /* _types.h:61:24 */
   880  type X__int16_t = int16   /* _types.h:62:17 */
   881  type X__uint16_t = uint16 /* _types.h:63:25 */
   882  type X__int32_t = int32   /* _types.h:64:15 */
   883  type X__uint32_t = uint32 /* _types.h:65:23 */
   884  // LONGLONG
   885  type X__int64_t = int64 /* _types.h:67:20 */
   886  // LONGLONG
   887  type X__uint64_t = uint64 /* _types.h:69:28 */
   888  
   889  // 7.18.1.2 Minimum-width integer types
   890  type X__int_least8_t = X__int8_t     /* _types.h:72:19 */
   891  type X__uint_least8_t = X__uint8_t   /* _types.h:73:20 */
   892  type X__int_least16_t = X__int16_t   /* _types.h:74:20 */
   893  type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
   894  type X__int_least32_t = X__int32_t   /* _types.h:76:20 */
   895  type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
   896  type X__int_least64_t = X__int64_t   /* _types.h:78:20 */
   897  type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
   898  
   899  // 7.18.1.3 Fastest minimum-width integer types
   900  type X__int_fast8_t = X__int32_t    /* _types.h:82:20 */
   901  type X__uint_fast8_t = X__uint32_t  /* _types.h:83:21 */
   902  type X__int_fast16_t = X__int32_t   /* _types.h:84:20 */
   903  type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
   904  type X__int_fast32_t = X__int32_t   /* _types.h:86:20 */
   905  type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
   906  type X__int_fast64_t = X__int64_t   /* _types.h:88:20 */
   907  type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
   908  
   909  // 7.18.1.4 Integer types capable of holding object pointers
   910  type X__intptr_t = int64   /* _types.h:104:16 */
   911  type X__uintptr_t = uint64 /* _types.h:105:24 */
   912  
   913  // 7.18.1.5 Greatest-width integer types
   914  type X__intmax_t = X__int64_t   /* _types.h:108:20 */
   915  type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
   916  
   917  // Register size
   918  type X__register_t = int64 /* _types.h:112:16 */
   919  
   920  // VM system types
   921  type X__vaddr_t = uint64 /* _types.h:115:24 */
   922  type X__paddr_t = uint64 /* _types.h:116:24 */
   923  type X__vsize_t = uint64 /* _types.h:117:24 */
   924  type X__psize_t = uint64 /* _types.h:118:24 */
   925  
   926  // Standard system types
   927  type X__double_t = float64           /* _types.h:121:18 */
   928  type X__float_t = float32            /* _types.h:122:17 */
   929  type X__ptrdiff_t = int64            /* _types.h:123:16 */
   930  type X__size_t = uint64              /* _types.h:124:24 */
   931  type X__ssize_t = int64              /* _types.h:125:16 */
   932  type X__va_list = X__builtin_va_list /* _types.h:127:27 */
   933  
   934  // Wide character support types
   935  type X__wchar_t = int32     /* _types.h:137:15 */
   936  type X__wint_t = int32      /* _types.h:140:15 */
   937  type X__rune_t = int32      /* _types.h:141:15 */
   938  type X__wctrans_t = uintptr /* _types.h:142:14 */
   939  type X__wctype_t = uintptr  /* _types.h:143:14 */
   940  
   941  type X__blkcnt_t = X__int64_t    /* _types.h:39:19 */ // blocks allocated for file
   942  type X__blksize_t = X__int32_t   /* _types.h:40:19 */ // optimal blocksize for I/O
   943  type X__clock_t = X__int64_t     /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
   944  type X__clockid_t = X__int32_t   /* _types.h:42:19 */ // CLOCK_* identifiers
   945  type X__cpuid_t = uint64         /* _types.h:43:23 */ // CPU id
   946  type X__dev_t = X__int32_t       /* _types.h:44:19 */ // device number
   947  type X__fixpt_t = X__uint32_t    /* _types.h:45:20 */ // fixed point number
   948  type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
   949  type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
   950  type X__gid_t = X__uint32_t      /* _types.h:48:20 */ // group id
   951  type X__id_t = X__uint32_t       /* _types.h:49:20 */ // may contain pid, uid or gid
   952  type X__in_addr_t = X__uint32_t  /* _types.h:50:20 */ // base type for internet address
   953  type X__in_port_t = X__uint16_t  /* _types.h:51:20 */ // IP port type
   954  type X__ino_t = X__uint64_t      /* _types.h:52:20 */ // inode number
   955  type X__key_t = int64            /* _types.h:53:15 */ // IPC key (for Sys V IPC)
   956  type X__mode_t = X__uint32_t     /* _types.h:54:20 */ // permissions
   957  type X__nlink_t = X__uint32_t    /* _types.h:55:20 */ // link count
   958  type X__off_t = X__int64_t       /* _types.h:56:19 */ // file offset or size
   959  type X__pid_t = X__int32_t       /* _types.h:57:19 */ // process id
   960  type X__rlim_t = X__uint64_t     /* _types.h:58:20 */ // resource limit
   961  type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
   962  type X__segsz_t = X__int32_t     /* _types.h:60:19 */ // segment size
   963  type X__socklen_t = X__uint32_t  /* _types.h:61:20 */ // length type for network syscalls
   964  type X__suseconds_t = int64      /* _types.h:62:15 */ // microseconds (signed)
   965  type X__time_t = X__int64_t      /* _types.h:63:19 */ // epoch time
   966  type X__timer_t = X__int32_t     /* _types.h:64:19 */ // POSIX timer identifiers
   967  type X__uid_t = X__uint32_t      /* _types.h:65:20 */ // user id
   968  type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
   969  
   970  // mbstate_t is an opaque object to keep conversion state, during multibyte
   971  // stream conversions. The content must not be referenced by user programs.
   972  type X__mbstate_t = struct {
   973  	F__ccgo_pad1 [0]uint64
   974  	F__mbstate8  [128]int8
   975  } /* _types.h:75:3 */
   976  
   977  // Tell sys/endian.h we have MD variants of the swap macros.
   978  
   979  // Note that these macros evaluate their arguments several times.
   980  
   981  // Public names
   982  
   983  // These are specified to be function-like macros to match the spec
   984  
   985  // POSIX names
   986  
   987  // original BSD names
   988  
   989  // these were exposed here before
   990  
   991  // ancient stuff
   992  
   993  type U_char = uint8   /* types.h:51:23 */
   994  type U_short = uint16 /* types.h:52:24 */
   995  type U_int = uint32   /* types.h:53:22 */
   996  type U_long = uint64  /* types.h:54:23 */
   997  
   998  type Unchar = uint8  /* types.h:56:23 */ // Sys V compatibility
   999  type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
  1000  type Uint = uint32   /* types.h:58:22 */ // Sys V compatibility
  1001  type Ulong = uint64  /* types.h:59:23 */ // Sys V compatibility
  1002  
  1003  type Cpuid_t = X__cpuid_t       /* types.h:61:19 */ // CPU id
  1004  type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
  1005  
  1006  // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
  1007  //     but the rest of the includes are not ready for that yet.
  1008  
  1009  type Int8_t = X__int8_t /* types.h:75:19 */
  1010  
  1011  type Uint8_t = X__uint8_t /* types.h:80:20 */
  1012  
  1013  type Int16_t = X__int16_t /* types.h:85:20 */
  1014  
  1015  type Uint16_t = X__uint16_t /* types.h:90:21 */
  1016  
  1017  type Int32_t = X__int32_t /* types.h:95:20 */
  1018  
  1019  type Uint32_t = X__uint32_t /* types.h:100:21 */
  1020  
  1021  type Int64_t = X__int64_t /* types.h:105:20 */
  1022  
  1023  type Uint64_t = X__uint64_t /* types.h:110:21 */
  1024  
  1025  // BSD-style unsigned bits types
  1026  type U_int8_t = X__uint8_t   /* types.h:114:19 */
  1027  type U_int16_t = X__uint16_t /* types.h:115:20 */
  1028  type U_int32_t = X__uint32_t /* types.h:116:20 */
  1029  type U_int64_t = X__uint64_t /* types.h:117:20 */
  1030  
  1031  // quads, deprecated in favor of 64 bit int types
  1032  type Quad_t = X__int64_t    /* types.h:120:19 */
  1033  type U_quad_t = X__uint64_t /* types.h:121:20 */
  1034  
  1035  // VM system types
  1036  type Vaddr_t = X__vaddr_t /* types.h:125:19 */
  1037  type Paddr_t = X__paddr_t /* types.h:126:19 */
  1038  type Vsize_t = X__vsize_t /* types.h:127:19 */
  1039  type Psize_t = X__psize_t /* types.h:128:19 */
  1040  
  1041  // Standard system types
  1042  type Blkcnt_t = X__blkcnt_t       /* types.h:132:20 */ // blocks allocated for file
  1043  type Blksize_t = X__blksize_t     /* types.h:133:21 */ // optimal blocksize for I/O
  1044  type Caddr_t = uintptr            /* types.h:134:14 */ // core address
  1045  type Daddr32_t = X__int32_t       /* types.h:135:19 */ // 32-bit disk address
  1046  type Daddr_t = X__int64_t         /* types.h:136:19 */ // 64-bit disk address
  1047  type Dev_t = X__dev_t             /* types.h:137:18 */ // device number
  1048  type Fixpt_t = X__fixpt_t         /* types.h:138:19 */ // fixed point number
  1049  type Gid_t = X__gid_t             /* types.h:139:18 */ // group id
  1050  type Id_t = X__id_t               /* types.h:140:17 */ // may contain pid, uid or gid
  1051  type Ino_t = X__ino_t             /* types.h:141:18 */ // inode number
  1052  type Key_t = X__key_t             /* types.h:142:18 */ // IPC key (for Sys V IPC)
  1053  type Mode_t = X__mode_t           /* types.h:143:18 */ // permissions
  1054  type Nlink_t = X__nlink_t         /* types.h:144:19 */ // link count
  1055  type Rlim_t = X__rlim_t           /* types.h:145:18 */ // resource limit
  1056  type Segsz_t = X__segsz_t         /* types.h:146:19 */ // segment size
  1057  type Uid_t = X__uid_t             /* types.h:147:18 */ // user id
  1058  type Useconds_t = X__useconds_t   /* types.h:148:22 */ // microseconds
  1059  type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
  1060  type Fsblkcnt_t = X__fsblkcnt_t   /* types.h:150:22 */ // file system block count
  1061  type Fsfilcnt_t = X__fsfilcnt_t   /* types.h:151:22 */ // file system file count
  1062  
  1063  // The following types may be defined in multiple header files.
  1064  type Clock_t = X__clock_t /* types.h:158:19 */
  1065  
  1066  type Clockid_t = X__clockid_t /* types.h:163:21 */
  1067  
  1068  type Pid_t = X__pid_t /* types.h:168:18 */
  1069  
  1070  type Ssize_t = X__ssize_t /* types.h:178:19 */
  1071  
  1072  type Time_t = X__time_t /* types.h:183:18 */
  1073  
  1074  type Timer_t = X__timer_t /* types.h:188:19 */
  1075  
  1076  type Off_t = X__off_t /* types.h:193:18 */
  1077  
  1078  // Major, minor numbers, dev_t's.
  1079  
  1080  type Timeval = struct {
  1081  	Ftv_sec  Time_t
  1082  	Ftv_usec Suseconds_t
  1083  } /* select.h:41:1 */
  1084  
  1085  type Timespec = struct {
  1086  	Ftv_sec  Time_t
  1087  	Ftv_nsec int64
  1088  } /* select.h:49:1 */
  1089  
  1090  // Select uses bit masks of file descriptors in longs.  These macros
  1091  // manipulate such bit fields (the filesystem macros use chars).
  1092  // FD_SETSIZE may be defined by the user, but the default here should
  1093  // be enough for most uses.
  1094  
  1095  // We don't want to pollute the namespace with select(2) internals.
  1096  // Non-underscore versions are exposed later #if __BSD_VISIBLE
  1097  type X__fd_mask = Uint32_t /* select.h:70:18 */
  1098  
  1099  type Fd_set1 = struct{ Ffds_bits [32]X__fd_mask } /* select.h:74:9 */
  1100  
  1101  type Fd_set = Fd_set1 /* select.h:76:3 */
  1102  
  1103  type Timezone = struct {
  1104  	Ftz_minuteswest int32
  1105  	Ftz_dsttime     int32
  1106  } /* time.h:72:1 */
  1107  
  1108  // Operations on timevals.
  1109  
  1110  // Operations on timespecs.
  1111  
  1112  // Names of the interval timers, and structure
  1113  // defining a timer setting.
  1114  
  1115  type Itimerval = struct {
  1116  	Fit_interval struct {
  1117  		Ftv_sec  Time_t
  1118  		Ftv_usec Suseconds_t
  1119  	}
  1120  	Fit_value struct {
  1121  		Ftv_sec  Time_t
  1122  		Ftv_usec Suseconds_t
  1123  	}
  1124  } /* time.h:148:1 */
  1125  
  1126  // clock information structure for sysctl({CTL_KERN, KERN_CLOCKRATE})
  1127  type Clockinfo = struct {
  1128  	Fhz     int32
  1129  	Ftick   int32
  1130  	Fstathz int32
  1131  	Fprofhz int32
  1132  } /* time.h:157:1 */
  1133  
  1134  //	$OpenBSD: time.h,v 1.31 2018/10/30 16:28:42 guenther Exp $
  1135  //	$NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $
  1136  
  1137  // Copyright (c) 1989 The Regents of the University of California.
  1138  // All rights reserved.
  1139  //
  1140  // (c) UNIX System Laboratories, Inc.
  1141  // All or some portions of this file are derived from material licensed
  1142  // to the University of California by American Telephone and Telegraph
  1143  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  1144  // the permission of UNIX System Laboratories, Inc.
  1145  //
  1146  // Redistribution and use in source and binary forms, with or without
  1147  // modification, are permitted provided that the following conditions
  1148  // are met:
  1149  // 1. Redistributions of source code must retain the above copyright
  1150  //    notice, this list of conditions and the following disclaimer.
  1151  // 2. Redistributions in binary form must reproduce the above copyright
  1152  //    notice, this list of conditions and the following disclaimer in the
  1153  //    documentation and/or other materials provided with the distribution.
  1154  // 3. Neither the name of the University nor the names of its contributors
  1155  //    may be used to endorse or promote products derived from this software
  1156  //    without specific prior written permission.
  1157  //
  1158  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1159  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1160  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1161  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1162  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1163  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1164  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1165  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1166  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1167  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1168  // SUCH DAMAGE.
  1169  //
  1170  //	@(#)time.h	5.12 (Berkeley) 3/9/91
  1171  
  1172  //	$OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
  1173  //	$NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
  1174  
  1175  // Copyright (c) 1991, 1993
  1176  //	The Regents of the University of California.  All rights reserved.
  1177  //
  1178  // This code is derived from software contributed to Berkeley by
  1179  // Berkeley Software Design, Inc.
  1180  //
  1181  // Redistribution and use in source and binary forms, with or without
  1182  // modification, are permitted provided that the following conditions
  1183  // are met:
  1184  // 1. Redistributions of source code must retain the above copyright
  1185  //    notice, this list of conditions and the following disclaimer.
  1186  // 2. Redistributions in binary form must reproduce the above copyright
  1187  //    notice, this list of conditions and the following disclaimer in the
  1188  //    documentation and/or other materials provided with the distribution.
  1189  // 3. Neither the name of the University nor the names of its contributors
  1190  //    may be used to endorse or promote products derived from this software
  1191  //    without specific prior written permission.
  1192  //
  1193  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1194  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1195  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1196  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1197  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1198  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1199  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1200  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1201  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1202  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1203  // SUCH DAMAGE.
  1204  //
  1205  //	@(#)cdefs.h	8.7 (Berkeley) 1/21/94
  1206  
  1207  //	$OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $
  1208  
  1209  // Written by Todd C. Miller, September 9, 2016
  1210  // Public domain.
  1211  
  1212  //	$OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
  1213  
  1214  // -
  1215  // Copyright (c) 1990, 1993
  1216  //	The Regents of the University of California.  All rights reserved.
  1217  //
  1218  // Redistribution and use in source and binary forms, with or without
  1219  // modification, are permitted provided that the following conditions
  1220  // are met:
  1221  // 1. Redistributions of source code must retain the above copyright
  1222  //    notice, this list of conditions and the following disclaimer.
  1223  // 2. Redistributions in binary form must reproduce the above copyright
  1224  //    notice, this list of conditions and the following disclaimer in the
  1225  //    documentation and/or other materials provided with the distribution.
  1226  // 3. Neither the name of the University nor the names of its contributors
  1227  //    may be used to endorse or promote products derived from this software
  1228  //    without specific prior written permission.
  1229  //
  1230  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1231  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1232  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1233  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1234  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1235  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1236  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1237  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1238  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1239  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1240  // SUCH DAMAGE.
  1241  //
  1242  //	@(#)types.h	8.3 (Berkeley) 1/5/94
  1243  
  1244  // Frequency of the clock ticks reported by times().  Deprecated - use
  1245  // sysconf(_SC_CLK_TCK) instead.  (Removed in 1003.1-2001.)
  1246  
  1247  //	$OpenBSD: _time.h,v 1.9 2017/12/18 05:51:53 cheloha Exp $
  1248  
  1249  // Copyright (c) 1982, 1986, 1993
  1250  //	The Regents of the University of California.  All rights reserved.
  1251  //
  1252  // Redistribution and use in source and binary forms, with or without
  1253  // modification, are permitted provided that the following conditions
  1254  // are met:
  1255  // 1. Redistributions of source code must retain the above copyright
  1256  //    notice, this list of conditions and the following disclaimer.
  1257  // 2. Redistributions in binary form must reproduce the above copyright
  1258  //    notice, this list of conditions and the following disclaimer in the
  1259  //    documentation and/or other materials provided with the distribution.
  1260  // 3. Neither the name of the University nor the names of its contributors
  1261  //    may be used to endorse or promote products derived from this software
  1262  //    without specific prior written permission.
  1263  //
  1264  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1265  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1266  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1267  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1268  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1269  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1270  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1271  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1272  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1273  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1274  // SUCH DAMAGE.
  1275  
  1276  // Per-process and per-thread clocks encode the PID or TID into the
  1277  // high bits, with the type in the bottom bits
  1278  
  1279  // Structure defined by POSIX 1003.1b to be like a itimerval,
  1280  // but with timespecs. Used in the timer_*() system calls.
  1281  type Itimerspec = struct {
  1282  	Fit_interval struct {
  1283  		Ftv_sec  Time_t
  1284  		Ftv_nsec int64
  1285  	}
  1286  	Fit_value struct {
  1287  		Ftv_sec  Time_t
  1288  		Ftv_nsec int64
  1289  	}
  1290  } /* _time.h:56:1 */
  1291  
  1292  type Locale_t = uintptr /* time.h:107:14 */
  1293  
  1294  type Tm = struct {
  1295  	Ftm_sec      int32
  1296  	Ftm_min      int32
  1297  	Ftm_hour     int32
  1298  	Ftm_mday     int32
  1299  	Ftm_mon      int32
  1300  	Ftm_year     int32
  1301  	Ftm_wday     int32
  1302  	Ftm_yday     int32
  1303  	Ftm_isdst    int32
  1304  	F__ccgo_pad1 [4]byte
  1305  	Ftm_gmtoff   int64
  1306  	Ftm_zone     uintptr
  1307  } /* time.h:111:1 */
  1308  
  1309  type Siginfo_t = struct {
  1310  	Fsi_signo    int32
  1311  	Fsi_code     int32
  1312  	Fsi_errno    int32
  1313  	F__ccgo_pad1 [4]byte
  1314  	F_data       struct {
  1315  		F__ccgo_pad1 [0]uint64
  1316  		F_pad        [29]int32
  1317  		F__ccgo_pad2 [4]byte
  1318  	}
  1319  } /* siginfo.h:173:3 */
  1320  
  1321  // Signal vector "template" used in sigaction call.
  1322  type Sigaction = struct {
  1323  	F__sigaction_u struct{ F__sa_handler uintptr }
  1324  	Fsa_mask       Sigset_t
  1325  	Fsa_flags      int32
  1326  } /* signal.h:112:1 */
  1327  
  1328  // if SA_SIGINFO is set, sa_sigaction is to be used instead of sa_handler.
  1329  
  1330  // Flags for sigprocmask:
  1331  
  1332  type Sig_t = uintptr /* signal.h:146:14 */ // type of signal function
  1333  
  1334  // 4.3 compatibility:
  1335  // Signal vector "template" used in sigvec call.
  1336  type Sigvec = struct {
  1337  	Fsv_handler uintptr
  1338  	Fsv_mask    int32
  1339  	Fsv_flags   int32
  1340  } /* signal.h:152:1 */
  1341  
  1342  // Macro for converting signal number to a mask suitable for
  1343  // sigblock().
  1344  
  1345  // Structure used in sigaltstack call.
  1346  type Sigaltstack = struct {
  1347  	Fss_sp       uintptr
  1348  	Fss_size     Size_t
  1349  	Fss_flags    int32
  1350  	F__ccgo_pad1 [4]byte
  1351  } /* signal.h:176:9 */
  1352  
  1353  // Macro for converting signal number to a mask suitable for
  1354  // sigblock().
  1355  
  1356  // Structure used in sigaltstack call.
  1357  type Stack_t = Sigaltstack /* signal.h:180:3 */
  1358  
  1359  type Ucontext_t = Sigcontext /* signal.h:190:27 */
  1360  
  1361  var _ int8 /* gen.c:2:13: */