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