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