github.com/afumu/libc@v0.0.6/pwd/pwd_openbsd_arm64.go (about)

     1  // Code generated by 'ccgo pwd/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 pwd/pwd_openbsd_arm64.go -pkgname pwd', DO NOT EDIT.
     2  
     3  package pwd
     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  	BYTE_ORDER               = 1234                 // endian.h:47:1:
    20  	LITTLE_ENDIAN            = 1234                 // endian.h:44:1:
    21  	PDP_ENDIAN               = 3412                 // endian.h:46:1:
    22  	X_BIG_ENDIAN             = 4321                 // _endian.h:43:1:
    23  	X_BYTE_ORDER             = 1234                 // endian.h:60:1:
    24  	X_CLOCKID_T_DEFINED_     = 0                    // types.h:162:1:
    25  	X_CLOCK_T_DEFINED_       = 0                    // types.h:157:1:
    26  	X_FILE_OFFSET_BITS       = 64                   // <builtin>:25:1:
    27  	X_INT16_T_DEFINED_       = 0                    // types.h:84:1:
    28  	X_INT32_T_DEFINED_       = 0                    // types.h:94:1:
    29  	X_INT64_T_DEFINED_       = 0                    // types.h:104:1:
    30  	X_INT8_T_DEFINED_        = 0                    // types.h:74:1:
    31  	X_LITTLE_ENDIAN          = 1234                 // _endian.h:42:1:
    32  	X_LP64                   = 1                    // <predefined>:1:1:
    33  	X_MACHINE_CDEFS_H_       = 0                    // cdefs.h:4:1:
    34  	X_MACHINE_ENDIAN_H_      = 0                    // endian.h:20:1:
    35  	X_MACHINE__TYPES_H_      = 0                    // _types.h:35:1:
    36  	X_MAX_PAGE_SHIFT         = 12                   // _types.h:57:1:
    37  	X_OFF_T_DEFINED_         = 0                    // types.h:192:1:
    38  	X_PASSWORD_EFMT1         = 95                   // pwd.h:62:1:
    39  	X_PASSWORD_LEN           = 128                  // pwd.h:64:1:
    40  	X_PASSWORD_NOCHG         = 0x04                 // pwd.h:71:1:
    41  	X_PASSWORD_NOEXP         = 0x08                 // pwd.h:72:1:
    42  	X_PASSWORD_NOGID         = 0x02                 // pwd.h:70:1:
    43  	X_PASSWORD_NOUID         = 0x01                 // pwd.h:69:1:
    44  	X_PASSWORD_OMITV7        = 0x02                 // pwd.h:76:1:
    45  	X_PASSWORD_SECUREONLY    = 0x01                 // pwd.h:75:1:
    46  	X_PATH_MASTERPASSWD      = "/etc/master.passwd" // pwd.h:48:1:
    47  	X_PATH_MASTERPASSWD_LOCK = "/etc/ptmp"          // pwd.h:49:1:
    48  	X_PATH_MP_DB             = "/etc/pwd.db"        // pwd.h:51:1:
    49  	X_PATH_PASSWD            = "/etc/passwd"        // pwd.h:47:1:
    50  	X_PATH_PWD_MKDB          = "/usr/sbin/pwd_mkdb" // pwd.h:54:1:
    51  	X_PATH_SMP_DB            = "/etc/spwd.db"       // pwd.h:52:1:
    52  	X_PDP_ENDIAN             = 3412                 // _endian.h:44:1:
    53  	X_PID_T_DEFINED_         = 0                    // types.h:167:1:
    54  	X_PWD_H_                 = 0                    // pwd.h:42:1:
    55  	X_PW_BUF_LEN             = 1024                 // pwd.h:67:1:
    56  	X_PW_KEYBYNAME           = 49                   // pwd.h:56:1:
    57  	X_PW_KEYBYNUM            = 50                   // pwd.h:57:1:
    58  	X_PW_KEYBYUID            = 51                   // pwd.h:58:1:
    59  	X_PW_NAME_LEN            = 31                   // pwd.h:65:1:
    60  	X_PW_YPTOKEN             = "__YP!"              // pwd.h:60:1:
    61  	X_QUAD_HIGHWORD          = 1                    // _endian.h:95:1:
    62  	X_QUAD_LOWWORD           = 0                    // _endian.h:96:1:
    63  	X_RET_PROTECTOR          = 1                    // <predefined>:2:1:
    64  	X_SIZE_T_DEFINED_        = 0                    // types.h:172:1:
    65  	X_SSIZE_T_DEFINED_       = 0                    // types.h:177:1:
    66  	X_STACKALIGNBYTES        = 15                   // _types.h:54:1:
    67  	X_SYS_CDEFS_H_           = 0                    // cdefs.h:39:1:
    68  	X_SYS_ENDIAN_H_          = 0                    // endian.h:38:1:
    69  	X_SYS_TYPES_H_           = 0                    // types.h:41:1:
    70  	X_SYS__ENDIAN_H_         = 0                    // _endian.h:34:1:
    71  	X_SYS__TYPES_H_          = 0                    // _types.h:35:1:
    72  	X_TIMER_T_DEFINED_       = 0                    // types.h:187:1:
    73  	X_TIME_T_DEFINED_        = 0                    // types.h:182:1:
    74  	X_UINT16_T_DEFINED_      = 0                    // types.h:89:1:
    75  	X_UINT32_T_DEFINED_      = 0                    // types.h:99:1:
    76  	X_UINT64_T_DEFINED_      = 0                    // types.h:109:1:
    77  	X_UINT8_T_DEFINED_       = 0                    // types.h:79:1:
    78  	Unix                     = 1                    // <predefined>:360:1:
    79  )
    80  
    81  type Ptrdiff_t = int64 /* <builtin>:3:26 */
    82  
    83  type Size_t = uint64 /* <builtin>:9:23 */
    84  
    85  type Wchar_t = int32 /* <builtin>:15:24 */
    86  
    87  type X__int128_t = struct {
    88  	Flo int64
    89  	Fhi int64
    90  } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
    91  type X__uint128_t = struct {
    92  	Flo uint64
    93  	Fhi uint64
    94  } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
    95  
    96  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
    97  type X__float128 = float64        /* <builtin>:47:21 */
    98  
    99  //	$OpenBSD: pwd.h,v 1.26 2018/09/13 12:31:15 millert Exp $
   100  //	$NetBSD: pwd.h,v 1.9 1996/05/15 21:36:45 jtc Exp $
   101  
   102  // -
   103  // Copyright (c) 1989, 1993
   104  //	The Regents of the University of California.  All rights reserved.
   105  // (c) UNIX System Laboratories, Inc.
   106  // All or some portions of this file are derived from material licensed
   107  // to the University of California by American Telephone and Telegraph
   108  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
   109  // the permission of UNIX System Laboratories, Inc.
   110  // Portions Copyright(C) 1995, 1996, Jason Downs.  All rights reserved.
   111  //
   112  // Redistribution and use in source and binary forms, with or without
   113  // modification, are permitted provided that the following conditions
   114  // are met:
   115  // 1. Redistributions of source code must retain the above copyright
   116  //    notice, this list of conditions and the following disclaimer.
   117  // 2. Redistributions in binary form must reproduce the above copyright
   118  //    notice, this list of conditions and the following disclaimer in the
   119  //    documentation and/or other materials provided with the distribution.
   120  // 3. Neither the name of the University nor the names of its contributors
   121  //    may be used to endorse or promote products derived from this software
   122  //    without specific prior written permission.
   123  //
   124  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   125  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   126  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   127  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   128  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   129  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   130  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   131  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   132  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   133  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   134  // SUCH DAMAGE.
   135  //
   136  //	@(#)pwd.h	8.2 (Berkeley) 1/21/94
   137  
   138  //	$OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
   139  //	$NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
   140  
   141  // -
   142  // Copyright (c) 1982, 1986, 1991, 1993
   143  //	The Regents of the University of California.  All rights reserved.
   144  // (c) UNIX System Laboratories, Inc.
   145  // All or some portions of this file are derived from material licensed
   146  // to the University of California by American Telephone and Telegraph
   147  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
   148  // the permission of UNIX System Laboratories, Inc.
   149  //
   150  // Redistribution and use in source and binary forms, with or without
   151  // modification, are permitted provided that the following conditions
   152  // are met:
   153  // 1. Redistributions of source code must retain the above copyright
   154  //    notice, this list of conditions and the following disclaimer.
   155  // 2. Redistributions in binary form must reproduce the above copyright
   156  //    notice, this list of conditions and the following disclaimer in the
   157  //    documentation and/or other materials provided with the distribution.
   158  // 3. Neither the name of the University nor the names of its contributors
   159  //    may be used to endorse or promote products derived from this software
   160  //    without specific prior written permission.
   161  //
   162  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   163  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   164  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   165  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   166  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   167  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   168  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   169  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   170  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   171  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   172  // SUCH DAMAGE.
   173  //
   174  //	@(#)types.h	8.4 (Berkeley) 1/21/94
   175  
   176  //	$OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
   177  //	$NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
   178  
   179  // Copyright (c) 1991, 1993
   180  //	The Regents of the University of California.  All rights reserved.
   181  //
   182  // This code is derived from software contributed to Berkeley by
   183  // Berkeley Software Design, Inc.
   184  //
   185  // Redistribution and use in source and binary forms, with or without
   186  // modification, are permitted provided that the following conditions
   187  // are met:
   188  // 1. Redistributions of source code must retain the above copyright
   189  //    notice, this list of conditions and the following disclaimer.
   190  // 2. Redistributions in binary form must reproduce the above copyright
   191  //    notice, this list of conditions and the following disclaimer in the
   192  //    documentation and/or other materials provided with the distribution.
   193  // 3. Neither the name of the University nor the names of its contributors
   194  //    may be used to endorse or promote products derived from this software
   195  //    without specific prior written permission.
   196  //
   197  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   198  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   199  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   200  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   201  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   202  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   203  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   204  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   205  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   206  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   207  // SUCH DAMAGE.
   208  //
   209  //	@(#)cdefs.h	8.7 (Berkeley) 1/21/94
   210  
   211  //	$OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
   212  
   213  // Macro to test if we're using a specific version of gcc or later.
   214  
   215  // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
   216  // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
   217  // The __CONCAT macro is a bit tricky -- make sure you don't put spaces
   218  // in between its arguments.  Do not use __CONCAT on double-quoted strings,
   219  // such as those from the __STRING macro: to concatenate strings just put
   220  // them next to each other.
   221  
   222  // GCC1 and some versions of GCC2 declare dead (non-returning) and
   223  // pure (no side effects) functions using "volatile" and "const";
   224  // unfortunately, these then cause warnings under "-ansi -pedantic".
   225  // GCC >= 2.5 uses the __attribute__((attrs)) style.  All of these
   226  // work for GNU C++ (modulo a slight glitch in the C++ grammar in
   227  // the distribution version of 2.5.5).
   228  
   229  // __returns_twice makes the compiler not assume the function
   230  // only returns once.  This affects registerisation of variables:
   231  // even local variables need to be in memory across such a call.
   232  // Example: setjmp()
   233  
   234  // __only_inline makes the compiler only use this function definition
   235  // for inlining; references that can't be inlined will be left as
   236  // external references instead of generating a local copy.  The
   237  // matching library should include a simple extern definition for
   238  // the function to handle those references.  c.f. ctype.h
   239  
   240  // GNU C version 2.96 adds explicit branch prediction so that
   241  // the CPU back-end can hint the processor and also so that
   242  // code blocks can be reordered such that the predicted path
   243  // sees a more linear flow, thus improving cache behavior, etc.
   244  //
   245  // The following two macros provide us with a way to utilize this
   246  // compiler feature.  Use __predict_true() if you expect the expression
   247  // to evaluate to true, and __predict_false() if you expect the
   248  // expression to evaluate to false.
   249  //
   250  // A few notes about usage:
   251  //
   252  //	* Generally, __predict_false() error condition checks (unless
   253  //	  you have some _strong_ reason to do otherwise, in which case
   254  //	  document it), and/or __predict_true() `no-error' condition
   255  //	  checks, assuming you want to optimize for the no-error case.
   256  //
   257  //	* Other than that, if you don't know the likelihood of a test
   258  //	  succeeding from empirical or other `hard' evidence, don't
   259  //	  make predictions.
   260  //
   261  //	* These are meant to be used in places that are run `a lot'.
   262  //	  It is wasteful to make predictions in code that is run
   263  //	  seldomly (e.g. at subsystem initialization time) as the
   264  //	  basic block reordering that this affects can often generate
   265  //	  larger code.
   266  
   267  // Delete pseudo-keywords wherever they are not available or needed.
   268  
   269  // The __packed macro indicates that a variable or structure members
   270  // should have the smallest possible alignment, despite any host CPU
   271  // alignment requirements.
   272  //
   273  // The __aligned(x) macro specifies the minimum alignment of a
   274  // variable or structure.
   275  //
   276  // These macros together are useful for describing the layout and
   277  // alignment of messages exchanged with hardware or other systems.
   278  
   279  // "The nice thing about standards is that there are so many to choose from."
   280  // There are a number of "feature test macros" specified by (different)
   281  // standards that determine which interfaces and types the header files
   282  // should expose.
   283  //
   284  // Because of inconsistencies in these macros, we define our own
   285  // set in the private name space that end in _VISIBLE.  These are
   286  // always defined and so headers can test their values easily.
   287  // Things can get tricky when multiple feature macros are defined.
   288  // We try to take the union of all the features requested.
   289  //
   290  // The following macros are guaranteed to have a value after cdefs.h
   291  // has been included:
   292  //	__POSIX_VISIBLE
   293  //	__XPG_VISIBLE
   294  //	__ISO_C_VISIBLE
   295  //	__BSD_VISIBLE
   296  
   297  // X/Open Portability Guides and Single Unix Specifications.
   298  // _XOPEN_SOURCE				XPG3
   299  // _XOPEN_SOURCE && _XOPEN_VERSION = 4		XPG4
   300  // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1	XPG4v2
   301  // _XOPEN_SOURCE == 500				XPG5
   302  // _XOPEN_SOURCE == 520				XPG5v2
   303  // _XOPEN_SOURCE == 600				POSIX 1003.1-2001 with XSI
   304  // _XOPEN_SOURCE == 700				POSIX 1003.1-2008 with XSI
   305  //
   306  // The XPG spec implies a specific value for _POSIX_C_SOURCE.
   307  
   308  // POSIX macros, these checks must follow the XOPEN ones above.
   309  //
   310  // _POSIX_SOURCE == 1		1003.1-1988 (superseded by _POSIX_C_SOURCE)
   311  // _POSIX_C_SOURCE == 1		1003.1-1990
   312  // _POSIX_C_SOURCE == 2		1003.2-1992
   313  // _POSIX_C_SOURCE == 199309L	1003.1b-1993
   314  // _POSIX_C_SOURCE == 199506L   1003.1c-1995, 1003.1i-1995,
   315  //				and the omnibus ISO/IEC 9945-1:1996
   316  // _POSIX_C_SOURCE == 200112L   1003.1-2001
   317  // _POSIX_C_SOURCE == 200809L   1003.1-2008
   318  //
   319  // The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
   320  // this may be overridden by the _ISOC99_SOURCE macro later.
   321  
   322  // _ANSI_SOURCE means to expose ANSI C89 interfaces only.
   323  // If the user defines it in addition to one of the POSIX or XOPEN
   324  // macros, assume the POSIX/XOPEN macro(s) should take precedence.
   325  
   326  // _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
   327  // override any of the other macros since they are non-exclusive.
   328  
   329  // Finally deal with BSD-specific interfaces that are not covered
   330  // by any standards.  We expose these when none of the POSIX or XPG
   331  // macros is defined or if the user explicitly asks for them.
   332  
   333  // Default values.
   334  
   335  //	$OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
   336  
   337  // -
   338  // Copyright (c) 1997 Niklas Hallqvist.  All rights reserved.
   339  //
   340  // Redistribution and use in source and binary forms, with or without
   341  // modification, are permitted provided that the following conditions
   342  // are met:
   343  // 1. Redistributions of source code must retain the above copyright
   344  //    notice, this list of conditions and the following disclaimer.
   345  // 2. Redistributions in binary form must reproduce the above copyright
   346  //    notice, this list of conditions and the following disclaimer in the
   347  //    documentation and/or other materials provided with the distribution.
   348  //
   349  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   350  // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   351  // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   352  // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   353  // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   354  // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   355  // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   356  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   357  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   358  // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   359  
   360  // Public definitions for little- and big-endian systems.
   361  // This file should be included as <endian.h> in userspace and as
   362  // <sys/endian.h> in the kernel.
   363  //
   364  // System headers that need endian information but that can't or don't
   365  // want to export the public names here should include <sys/_endian.h>
   366  // and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
   367  
   368  //	$OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
   369  //	$NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
   370  
   371  // Copyright (c) 1991, 1993
   372  //	The Regents of the University of California.  All rights reserved.
   373  //
   374  // This code is derived from software contributed to Berkeley by
   375  // Berkeley Software Design, Inc.
   376  //
   377  // Redistribution and use in source and binary forms, with or without
   378  // modification, are permitted provided that the following conditions
   379  // are met:
   380  // 1. Redistributions of source code must retain the above copyright
   381  //    notice, this list of conditions and the following disclaimer.
   382  // 2. Redistributions in binary form must reproduce the above copyright
   383  //    notice, this list of conditions and the following disclaimer in the
   384  //    documentation and/or other materials provided with the distribution.
   385  // 3. Neither the name of the University nor the names of its contributors
   386  //    may be used to endorse or promote products derived from this software
   387  //    without specific prior written permission.
   388  //
   389  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   390  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   391  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   392  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   393  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   394  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   395  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   396  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   397  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   398  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   399  // SUCH DAMAGE.
   400  //
   401  //	@(#)cdefs.h	8.7 (Berkeley) 1/21/94
   402  
   403  //	$OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
   404  
   405  // -
   406  // Copyright (c) 1997 Niklas Hallqvist.  All rights reserved.
   407  //
   408  // Redistribution and use in source and binary forms, with or without
   409  // modification, are permitted provided that the following conditions
   410  // are met:
   411  // 1. Redistributions of source code must retain the above copyright
   412  //    notice, this list of conditions and the following disclaimer.
   413  // 2. Redistributions in binary form must reproduce the above copyright
   414  //    notice, this list of conditions and the following disclaimer in the
   415  //    documentation and/or other materials provided with the distribution.
   416  //
   417  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   418  // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   419  // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   420  // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
   421  // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   422  // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   423  // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   424  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   425  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
   426  // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   427  
   428  // Internal endianness macros.  This pulls in <machine/endian.h> to
   429  // get the correct setting direction for the platform and sets internal
   430  // ('__' prefix) macros appropriately.
   431  
   432  //	$OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
   433  
   434  // -
   435  // Copyright (c) 1990, 1993
   436  //	The Regents of the University of California.  All rights reserved.
   437  //
   438  // Redistribution and use in source and binary forms, with or without
   439  // modification, are permitted provided that the following conditions
   440  // are met:
   441  // 1. Redistributions of source code must retain the above copyright
   442  //    notice, this list of conditions and the following disclaimer.
   443  // 2. Redistributions in binary form must reproduce the above copyright
   444  //    notice, this list of conditions and the following disclaimer in the
   445  //    documentation and/or other materials provided with the distribution.
   446  // 3. Neither the name of the University nor the names of its contributors
   447  //    may be used to endorse or promote products derived from this software
   448  //    without specific prior written permission.
   449  //
   450  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   451  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   452  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   453  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   454  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   455  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   456  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   457  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   458  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   459  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   460  // SUCH DAMAGE.
   461  //
   462  //	@(#)types.h	8.3 (Berkeley) 1/5/94
   463  
   464  // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
   465  // -
   466  // Copyright (c) 1990, 1993
   467  //	The Regents of the University of California.  All rights reserved.
   468  //
   469  // Redistribution and use in source and binary forms, with or without
   470  // modification, are permitted provided that the following conditions
   471  // are met:
   472  // 1. Redistributions of source code must retain the above copyright
   473  //    notice, this list of conditions and the following disclaimer.
   474  // 2. Redistributions in binary form must reproduce the above copyright
   475  //    notice, this list of conditions and the following disclaimer in the
   476  //    documentation and/or other materials provided with the distribution.
   477  // 3. Neither the name of the University nor the names of its contributors
   478  //    may be used to endorse or promote products derived from this software
   479  //    without specific prior written permission.
   480  //
   481  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   482  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   483  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   484  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   485  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   486  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   487  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   488  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   489  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   490  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   491  // SUCH DAMAGE.
   492  //
   493  //	@(#)types.h	8.3 (Berkeley) 1/5/94
   494  //	@(#)ansi.h	8.2 (Berkeley) 1/4/94
   495  
   496  // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
   497  // value for all data types (int, long, ...).   The result is an
   498  // unsigned long and must be cast to any desired pointer type.
   499  //
   500  // _ALIGNED_POINTER is a boolean macro that checks whether an address
   501  // is valid to fetch data elements of type t from on this architecture.
   502  // This does not reflect the optimal alignment, just the possibility
   503  // (within reasonable limits).
   504  
   505  // 7.18.1.1 Exact-width integer types
   506  type X__int8_t = int8     /* _types.h:60:22 */
   507  type X__uint8_t = uint8   /* _types.h:61:24 */
   508  type X__int16_t = int16   /* _types.h:62:17 */
   509  type X__uint16_t = uint16 /* _types.h:63:25 */
   510  type X__int32_t = int32   /* _types.h:64:15 */
   511  type X__uint32_t = uint32 /* _types.h:65:23 */
   512  // LONGLONG
   513  type X__int64_t = int64 /* _types.h:67:20 */
   514  // LONGLONG
   515  type X__uint64_t = uint64 /* _types.h:69:28 */
   516  
   517  // 7.18.1.2 Minimum-width integer types
   518  type X__int_least8_t = X__int8_t     /* _types.h:72:19 */
   519  type X__uint_least8_t = X__uint8_t   /* _types.h:73:20 */
   520  type X__int_least16_t = X__int16_t   /* _types.h:74:20 */
   521  type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
   522  type X__int_least32_t = X__int32_t   /* _types.h:76:20 */
   523  type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
   524  type X__int_least64_t = X__int64_t   /* _types.h:78:20 */
   525  type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
   526  
   527  // 7.18.1.3 Fastest minimum-width integer types
   528  type X__int_fast8_t = X__int32_t    /* _types.h:82:20 */
   529  type X__uint_fast8_t = X__uint32_t  /* _types.h:83:21 */
   530  type X__int_fast16_t = X__int32_t   /* _types.h:84:20 */
   531  type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
   532  type X__int_fast32_t = X__int32_t   /* _types.h:86:20 */
   533  type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
   534  type X__int_fast64_t = X__int64_t   /* _types.h:88:20 */
   535  type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
   536  
   537  // 7.18.1.4 Integer types capable of holding object pointers
   538  type X__intptr_t = int64   /* _types.h:104:16 */
   539  type X__uintptr_t = uint64 /* _types.h:105:24 */
   540  
   541  // 7.18.1.5 Greatest-width integer types
   542  type X__intmax_t = X__int64_t   /* _types.h:108:20 */
   543  type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
   544  
   545  // Register size
   546  type X__register_t = int64 /* _types.h:112:16 */
   547  
   548  // VM system types
   549  type X__vaddr_t = uint64 /* _types.h:115:24 */
   550  type X__paddr_t = uint64 /* _types.h:116:24 */
   551  type X__vsize_t = uint64 /* _types.h:117:24 */
   552  type X__psize_t = uint64 /* _types.h:118:24 */
   553  
   554  // Standard system types
   555  type X__double_t = float64           /* _types.h:121:18 */
   556  type X__float_t = float32            /* _types.h:122:17 */
   557  type X__ptrdiff_t = int64            /* _types.h:123:16 */
   558  type X__size_t = uint64              /* _types.h:124:24 */
   559  type X__ssize_t = int64              /* _types.h:125:16 */
   560  type X__va_list = X__builtin_va_list /* _types.h:127:27 */
   561  
   562  // Wide character support types
   563  type X__wchar_t = int32     /* _types.h:137:15 */
   564  type X__wint_t = int32      /* _types.h:140:15 */
   565  type X__rune_t = int32      /* _types.h:141:15 */
   566  type X__wctrans_t = uintptr /* _types.h:142:14 */
   567  type X__wctype_t = uintptr  /* _types.h:143:14 */
   568  
   569  type X__blkcnt_t = X__int64_t    /* _types.h:39:19 */ // blocks allocated for file
   570  type X__blksize_t = X__int32_t   /* _types.h:40:19 */ // optimal blocksize for I/O
   571  type X__clock_t = X__int64_t     /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
   572  type X__clockid_t = X__int32_t   /* _types.h:42:19 */ // CLOCK_* identifiers
   573  type X__cpuid_t = uint64         /* _types.h:43:23 */ // CPU id
   574  type X__dev_t = X__int32_t       /* _types.h:44:19 */ // device number
   575  type X__fixpt_t = X__uint32_t    /* _types.h:45:20 */ // fixed point number
   576  type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
   577  type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
   578  type X__gid_t = X__uint32_t      /* _types.h:48:20 */ // group id
   579  type X__id_t = X__uint32_t       /* _types.h:49:20 */ // may contain pid, uid or gid
   580  type X__in_addr_t = X__uint32_t  /* _types.h:50:20 */ // base type for internet address
   581  type X__in_port_t = X__uint16_t  /* _types.h:51:20 */ // IP port type
   582  type X__ino_t = X__uint64_t      /* _types.h:52:20 */ // inode number
   583  type X__key_t = int64            /* _types.h:53:15 */ // IPC key (for Sys V IPC)
   584  type X__mode_t = X__uint32_t     /* _types.h:54:20 */ // permissions
   585  type X__nlink_t = X__uint32_t    /* _types.h:55:20 */ // link count
   586  type X__off_t = X__int64_t       /* _types.h:56:19 */ // file offset or size
   587  type X__pid_t = X__int32_t       /* _types.h:57:19 */ // process id
   588  type X__rlim_t = X__uint64_t     /* _types.h:58:20 */ // resource limit
   589  type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
   590  type X__segsz_t = X__int32_t     /* _types.h:60:19 */ // segment size
   591  type X__socklen_t = X__uint32_t  /* _types.h:61:20 */ // length type for network syscalls
   592  type X__suseconds_t = int64      /* _types.h:62:15 */ // microseconds (signed)
   593  type X__time_t = X__int64_t      /* _types.h:63:19 */ // epoch time
   594  type X__timer_t = X__int32_t     /* _types.h:64:19 */ // POSIX timer identifiers
   595  type X__uid_t = X__uint32_t      /* _types.h:65:20 */ // user id
   596  type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
   597  
   598  // mbstate_t is an opaque object to keep conversion state, during multibyte
   599  // stream conversions. The content must not be referenced by user programs.
   600  type X__mbstate_t = struct {
   601  	F__ccgo_pad1 [0]uint64
   602  	F__mbstate8  [128]int8
   603  } /* _types.h:75:3 */
   604  
   605  // Tell sys/endian.h we have MD variants of the swap macros.
   606  
   607  // Note that these macros evaluate their arguments several times.
   608  
   609  // Public names
   610  
   611  // These are specified to be function-like macros to match the spec
   612  
   613  // POSIX names
   614  
   615  // original BSD names
   616  
   617  // these were exposed here before
   618  
   619  // ancient stuff
   620  
   621  type U_char = uint8   /* types.h:51:23 */
   622  type U_short = uint16 /* types.h:52:24 */
   623  type U_int = uint32   /* types.h:53:22 */
   624  type U_long = uint64  /* types.h:54:23 */
   625  
   626  type Unchar = uint8  /* types.h:56:23 */ // Sys V compatibility
   627  type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
   628  type Uint = uint32   /* types.h:58:22 */ // Sys V compatibility
   629  type Ulong = uint64  /* types.h:59:23 */ // Sys V compatibility
   630  
   631  type Cpuid_t = X__cpuid_t       /* types.h:61:19 */ // CPU id
   632  type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
   633  
   634  // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
   635  //     but the rest of the includes are not ready for that yet.
   636  
   637  type Int8_t = X__int8_t /* types.h:75:19 */
   638  
   639  type Uint8_t = X__uint8_t /* types.h:80:20 */
   640  
   641  type Int16_t = X__int16_t /* types.h:85:20 */
   642  
   643  type Uint16_t = X__uint16_t /* types.h:90:21 */
   644  
   645  type Int32_t = X__int32_t /* types.h:95:20 */
   646  
   647  type Uint32_t = X__uint32_t /* types.h:100:21 */
   648  
   649  type Int64_t = X__int64_t /* types.h:105:20 */
   650  
   651  type Uint64_t = X__uint64_t /* types.h:110:21 */
   652  
   653  // BSD-style unsigned bits types
   654  type U_int8_t = X__uint8_t   /* types.h:114:19 */
   655  type U_int16_t = X__uint16_t /* types.h:115:20 */
   656  type U_int32_t = X__uint32_t /* types.h:116:20 */
   657  type U_int64_t = X__uint64_t /* types.h:117:20 */
   658  
   659  // quads, deprecated in favor of 64 bit int types
   660  type Quad_t = X__int64_t    /* types.h:120:19 */
   661  type U_quad_t = X__uint64_t /* types.h:121:20 */
   662  
   663  // VM system types
   664  type Vaddr_t = X__vaddr_t /* types.h:125:19 */
   665  type Paddr_t = X__paddr_t /* types.h:126:19 */
   666  type Vsize_t = X__vsize_t /* types.h:127:19 */
   667  type Psize_t = X__psize_t /* types.h:128:19 */
   668  
   669  // Standard system types
   670  type Blkcnt_t = X__blkcnt_t       /* types.h:132:20 */ // blocks allocated for file
   671  type Blksize_t = X__blksize_t     /* types.h:133:21 */ // optimal blocksize for I/O
   672  type Caddr_t = uintptr            /* types.h:134:14 */ // core address
   673  type Daddr32_t = X__int32_t       /* types.h:135:19 */ // 32-bit disk address
   674  type Daddr_t = X__int64_t         /* types.h:136:19 */ // 64-bit disk address
   675  type Dev_t = X__dev_t             /* types.h:137:18 */ // device number
   676  type Fixpt_t = X__fixpt_t         /* types.h:138:19 */ // fixed point number
   677  type Gid_t = X__gid_t             /* types.h:139:18 */ // group id
   678  type Id_t = X__id_t               /* types.h:140:17 */ // may contain pid, uid or gid
   679  type Ino_t = X__ino_t             /* types.h:141:18 */ // inode number
   680  type Key_t = X__key_t             /* types.h:142:18 */ // IPC key (for Sys V IPC)
   681  type Mode_t = X__mode_t           /* types.h:143:18 */ // permissions
   682  type Nlink_t = X__nlink_t         /* types.h:144:19 */ // link count
   683  type Rlim_t = X__rlim_t           /* types.h:145:18 */ // resource limit
   684  type Segsz_t = X__segsz_t         /* types.h:146:19 */ // segment size
   685  type Uid_t = X__uid_t             /* types.h:147:18 */ // user id
   686  type Useconds_t = X__useconds_t   /* types.h:148:22 */ // microseconds
   687  type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
   688  type Fsblkcnt_t = X__fsblkcnt_t   /* types.h:150:22 */ // file system block count
   689  type Fsfilcnt_t = X__fsfilcnt_t   /* types.h:151:22 */ // file system file count
   690  
   691  // The following types may be defined in multiple header files.
   692  type Clock_t = X__clock_t /* types.h:158:19 */
   693  
   694  type Clockid_t = X__clockid_t /* types.h:163:21 */
   695  
   696  type Pid_t = X__pid_t /* types.h:168:18 */
   697  
   698  type Ssize_t = X__ssize_t /* types.h:178:19 */
   699  
   700  type Time_t = X__time_t /* types.h:183:18 */
   701  
   702  type Timer_t = X__timer_t /* types.h:188:19 */
   703  
   704  type Off_t = X__off_t /* types.h:193:18 */
   705  
   706  // Major, minor numbers, dev_t's.
   707  
   708  // Should be MAXLOGNAME - 1
   709  
   710  // Flags for pw_mkdb(3)
   711  
   712  type Passwd = struct {
   713  	Fpw_name   uintptr
   714  	Fpw_passwd uintptr
   715  	Fpw_uid    Uid_t
   716  	Fpw_gid    Gid_t
   717  	Fpw_change Time_t
   718  	Fpw_class  uintptr
   719  	Fpw_gecos  uintptr
   720  	Fpw_dir    uintptr
   721  	Fpw_shell  uintptr
   722  	Fpw_expire Time_t
   723  } /* pwd.h:80:1 */
   724  
   725  var _ int8 /* gen.c:2:13: */