Adding upstream version 1.65.7.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
5189956325
commit
32b8eb3fd7
4153 changed files with 2487292 additions and 0 deletions
7
fcntl/capi_darwin_amd64.go
Normal file
7
fcntl/capi_darwin_amd64.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_darwin_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
7
fcntl/capi_darwin_arm64.go
Normal file
7
fcntl/capi_darwin_arm64.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_darwin_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
5
fcntl/capi_freebsd_386.go
Normal file
5
fcntl/capi_freebsd_386.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_freebsd_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_freebsd_amd64.go
Normal file
5
fcntl/capi_freebsd_amd64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_freebsd_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_freebsd_arm.go
Normal file
5
fcntl/capi_freebsd_arm.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_freebsd_arm.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_freebsd_arm64.go
Normal file
5
fcntl/capi_freebsd_arm64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_freebsd_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_illumos_amd64.go
Normal file
5
fcntl/capi_illumos_amd64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_illumos_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_linux_386.go
Normal file
5
fcntl/capi_linux_386.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_linux_amd64.go
Normal file
5
fcntl/capi_linux_amd64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_linux_arm.go
Normal file
5
fcntl/capi_linux_arm.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_linux_arm64.go
Normal file
5
fcntl/capi_linux_arm64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_linux_loong64.go
Normal file
5
fcntl/capi_linux_loong64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_linux_loong64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_linux_mips64le.go
Normal file
5
fcntl/capi_linux_mips64le.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_linux_ppc64le.go
Normal file
5
fcntl/capi_linux_ppc64le.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_linux_ppc64le.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_linux_riscv64.go
Normal file
5
fcntl/capi_linux_riscv64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_riscv64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_linux_s390x.go
Normal file
5
fcntl/capi_linux_s390x.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl/fcntl_linux_s390x.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_netbsd_amd64.go
Normal file
5
fcntl/capi_netbsd_amd64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_netbsd_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_netbsd_arm.go
Normal file
5
fcntl/capi_netbsd_arm.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_netbsd_arm.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_openbsd_386.go
Normal file
5
fcntl/capi_openbsd_386.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_openbsd_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_openbsd_amd64.go
Normal file
5
fcntl/capi_openbsd_amd64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_openbsd_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_openbsd_arm64.go
Normal file
5
fcntl/capi_openbsd_arm64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_openbsd_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_windows_386.go
Normal file
5
fcntl/capi_windows_386.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_windows_amd64.go
Normal file
5
fcntl/capi_windows_amd64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
5
fcntl/capi_windows_arm64.go
Normal file
5
fcntl/capi_windows_arm64.go
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fcntl\gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
2064
fcntl/fcntl_darwin_amd64.go
Normal file
2064
fcntl/fcntl_darwin_amd64.go
Normal file
File diff suppressed because it is too large
Load diff
2080
fcntl/fcntl_darwin_arm64.go
Normal file
2080
fcntl/fcntl_darwin_arm64.go
Normal file
File diff suppressed because it is too large
Load diff
766
fcntl/fcntl_freebsd_386.go
Normal file
766
fcntl/fcntl_freebsd_386.go
Normal file
|
@ -0,0 +1,766 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_freebsd_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x0100 // fcntl.h:224:1:
|
||||
AT_EMPTY_PATH = 0x4000 // fcntl.h:234:1:
|
||||
AT_FDCWD = -100 // fcntl.h:219:1:
|
||||
AT_REMOVEDIR = 0x0800 // fcntl.h:228:1:
|
||||
AT_RESOLVE_BENEATH = 0x2000 // fcntl.h:232:1:
|
||||
AT_SYMLINK_FOLLOW = 0x0400 // fcntl.h:227:1:
|
||||
AT_SYMLINK_NOFOLLOW = 0x0200 // fcntl.h:226:1:
|
||||
FAPPEND = 8 // fcntl.h:193:1:
|
||||
FASYNC = 64 // fcntl.h:194:1:
|
||||
FDSYNC = 16777216 // fcntl.h:196:1:
|
||||
FD_CLOEXEC = 1 // fcntl.h:283:1:
|
||||
FD_NONE = -200 // fcntl.h:355:1:
|
||||
FFSYNC = 128 // fcntl.h:195:1:
|
||||
FNDELAY = 4 // fcntl.h:198:1:
|
||||
FNONBLOCK = 4 // fcntl.h:197:1:
|
||||
FRDAHEAD = 512 // fcntl.h:210:1:
|
||||
FREAD = 0x0001 // fcntl.h:89:1:
|
||||
FWRITE = 0x0002 // fcntl.h:90:1:
|
||||
F_ADD_SEALS = 19 // fcntl.h:270:1:
|
||||
F_CANCEL = 5 // fcntl.h:291:1:
|
||||
F_DUP2FD = 10 // fcntl.h:255:1:
|
||||
F_DUP2FD_CLOEXEC = 18 // fcntl.h:269:1:
|
||||
F_DUPFD = 0 // fcntl.h:242:1:
|
||||
F_DUPFD_CLOEXEC = 17 // fcntl.h:266:1:
|
||||
F_GETFD = 1 // fcntl.h:243:1:
|
||||
F_GETFL = 3 // fcntl.h:245:1:
|
||||
F_GETLK = 11 // fcntl.h:257:1:
|
||||
F_GETOWN = 5 // fcntl.h:248:1:
|
||||
F_GET_SEALS = 20 // fcntl.h:271:1:
|
||||
F_ISUNIONSTACK = 21 // fcntl.h:272:1:
|
||||
F_KINFO = 22 // fcntl.h:273:1:
|
||||
F_OGETLK = 7 // fcntl.h:252:1:
|
||||
F_OSETLK = 8 // fcntl.h:253:1:
|
||||
F_OSETLKW = 9 // fcntl.h:254:1:
|
||||
F_RDAHEAD = 16 // fcntl.h:263:1:
|
||||
F_RDLCK = 1 // fcntl.h:286:1:
|
||||
F_READAHEAD = 15 // fcntl.h:262:1:
|
||||
F_SEAL_GROW = 0x0004 // fcntl.h:278:1:
|
||||
F_SEAL_SEAL = 0x0001 // fcntl.h:276:1:
|
||||
F_SEAL_SHRINK = 0x0002 // fcntl.h:277:1:
|
||||
F_SEAL_WRITE = 0x0008 // fcntl.h:279:1:
|
||||
F_SETFD = 2 // fcntl.h:244:1:
|
||||
F_SETFL = 4 // fcntl.h:246:1:
|
||||
F_SETLK = 12 // fcntl.h:258:1:
|
||||
F_SETLKW = 13 // fcntl.h:259:1:
|
||||
F_SETLK_REMOTE = 14 // fcntl.h:261:1:
|
||||
F_SETOWN = 6 // fcntl.h:249:1:
|
||||
F_UNLCK = 2 // fcntl.h:287:1:
|
||||
F_UNLCKSYS = 4 // fcntl.h:290:1:
|
||||
F_WRLCK = 3 // fcntl.h:288:1:
|
||||
LOCK_EX = 0x02 // fcntl.h:332:1:
|
||||
LOCK_NB = 0x04 // fcntl.h:333:1:
|
||||
LOCK_SH = 0x01 // fcntl.h:331:1:
|
||||
LOCK_UN = 0x08 // fcntl.h:334:1:
|
||||
O_ACCMODE = 0x0003 // fcntl.h:78:1:
|
||||
O_APPEND = 0x0008 // fcntl.h:93:1:
|
||||
O_ASYNC = 0x0040 // fcntl.h:97:1:
|
||||
O_CLOEXEC = 0x00100000 // fcntl.h:133:1:
|
||||
O_CREAT = 0x0200 // fcntl.h:104:1:
|
||||
O_DIRECT = 0x00010000 // fcntl.h:116:1:
|
||||
O_DIRECTORY = 0x00020000 // fcntl.h:120:1:
|
||||
O_DSYNC = 0x01000000 // fcntl.h:143:1:
|
||||
O_EMPTY_PATH = 0x02000000 // fcntl.h:145:1:
|
||||
O_EXCL = 0x0800 // fcntl.h:106:1:
|
||||
O_EXEC = 0x00040000 // fcntl.h:121:1:
|
||||
O_EXLOCK = 0x0020 // fcntl.h:96:1:
|
||||
O_FSYNC = 0x0080 // fcntl.h:98:1:
|
||||
O_NDELAY = 4 // fcntl.h:199:1:
|
||||
O_NOCTTY = 0x8000 // fcntl.h:112:1:
|
||||
O_NOFOLLOW = 0x0100 // fcntl.h:102:1:
|
||||
O_NONBLOCK = 0x0004 // fcntl.h:92:1:
|
||||
O_PATH = 0x00400000 // fcntl.h:138:1:
|
||||
O_RDONLY = 0x0000 // fcntl.h:75:1:
|
||||
O_RDWR = 0x0002 // fcntl.h:77:1:
|
||||
O_RESOLVE_BENEATH = 0x00800000 // fcntl.h:139:1:
|
||||
O_SEARCH = 262144 // fcntl.h:122:1:
|
||||
O_SHLOCK = 0x0010 // fcntl.h:95:1:
|
||||
O_SYNC = 0x0080 // fcntl.h:100:1:
|
||||
O_TRUNC = 0x0400 // fcntl.h:105:1:
|
||||
O_TTY_INIT = 0x00080000 // fcntl.h:131:1:
|
||||
O_VERIFY = 0x00200000 // fcntl.h:137:1:
|
||||
O_WRONLY = 0x0001 // fcntl.h:76:1:
|
||||
POSIX_FADV_DONTNEED = 4 // fcntl.h:345:1:
|
||||
POSIX_FADV_NOREUSE = 5 // fcntl.h:346:1:
|
||||
POSIX_FADV_NORMAL = 0 // fcntl.h:341:1:
|
||||
POSIX_FADV_RANDOM = 1 // fcntl.h:342:1:
|
||||
POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:343:1:
|
||||
POSIX_FADV_WILLNEED = 3 // fcntl.h:344:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_ILP32 = 1 // <predefined>:1:1:
|
||||
X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:42:1:
|
||||
X_MODE_T_DECLARED = 0 // fcntl.h:54:1:
|
||||
X_Nonnull = 0 // cdefs.h:790:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:792:1:
|
||||
X_Nullable = 0 // cdefs.h:791:1:
|
||||
X_OFF_T_DECLARED = 0 // fcntl.h:59:1:
|
||||
X_PID_T_DECLARED = 0 // fcntl.h:64:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:32:1:
|
||||
I386 = 1 // <predefined>:335:1:
|
||||
Unix = 1 // <predefined>:336:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint32 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1983, 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)fcntl.h 8.3 (Berkeley) 1/21/94
|
||||
// $FreeBSD$
|
||||
|
||||
// This file includes the definitions for open and fcntl
|
||||
// described by POSIX for <fcntl.h>; it also includes
|
||||
// related kernel definitions.
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
|
||||
// Testing against Clang-specific extensions.
|
||||
|
||||
// This code has been put in place to help reduce the addition of
|
||||
// compiler specific defines in FreeBSD code. It helps to aid in
|
||||
// having a compiler-agnostic source tree.
|
||||
|
||||
// Compiler memory barriers, specific to gcc and clang.
|
||||
|
||||
// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
|
||||
// mode -- there must be no spaces between its arguments, and for nested
|
||||
// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
|
||||
// concatenate double-quoted strings produced by the __STRING macro, but
|
||||
// this only works with ANSI C.
|
||||
//
|
||||
// __XSTRING is like __STRING, but it expands any macros in its argument
|
||||
// first. It is only available with ANSI C.
|
||||
|
||||
// Compiler-dependent macros to help declare dead (non-returning) and
|
||||
// pure (no side effects) functions, and unused variables. They are
|
||||
// null except for versions of gcc that are known to support the features
|
||||
// properly (old versions of gcc-2 supported the dead and pure features
|
||||
// in a different (wrong) way). If we do not provide an implementation
|
||||
// for a given compiler, let the compile fail if it is told to use
|
||||
// a feature that we cannot live without.
|
||||
|
||||
// Keywords added in C11.
|
||||
|
||||
// Emulation of C11 _Generic(). Unlike the previously defined C11
|
||||
// keywords, it is not possible to implement this using exactly the same
|
||||
// syntax. Therefore implement something similar under the name
|
||||
// __generic(). Unlike _Generic(), this macro can only distinguish
|
||||
// between a single type, so it requires nested invocations to
|
||||
// distinguish multiple cases.
|
||||
|
||||
// C99 Static array indices in function parameter declarations. Syntax such as:
|
||||
// void bar(int myArray[static 10]);
|
||||
// is allowed in C99 but not in C++. Define __min_size appropriately so
|
||||
// headers using it can be compiled in either language. Use like this:
|
||||
// void bar(int myArray[__min_size(10)]);
|
||||
|
||||
// XXX: should use `#if __STDC_VERSION__ < 199901'.
|
||||
|
||||
// C++11 exposes a load of C99 stuff
|
||||
|
||||
// GCC 2.95 provides `__restrict' as an extension to C90 to support the
|
||||
// C99-specific `restrict' type qualifier. We happen to use `__restrict' as
|
||||
// a way to define the `restrict' type qualifier without disturbing older
|
||||
// software that is unaware of C99 keywords.
|
||||
|
||||
// GNU C version 2.96 adds explicit branch prediction so that
|
||||
// the CPU back-end can hint the processor and also so that
|
||||
// code blocks can be reordered such that the predicted path
|
||||
// sees a more linear flow, thus improving cache behavior, etc.
|
||||
//
|
||||
// The following two macros provide us with a way to utilize this
|
||||
// compiler feature. Use __predict_true() if you expect the expression
|
||||
// to evaluate to true, and __predict_false() if you expect the
|
||||
// expression to evaluate to false.
|
||||
//
|
||||
// A few notes about usage:
|
||||
//
|
||||
// * Generally, __predict_false() error condition checks (unless
|
||||
// you have some _strong_ reason to do otherwise, in which case
|
||||
// document it), and/or __predict_true() `no-error' condition
|
||||
// checks, assuming you want to optimize for the no-error case.
|
||||
//
|
||||
// * Other than that, if you don't know the likelihood of a test
|
||||
// succeeding from empirical or other `hard' evidence, don't
|
||||
// make predictions.
|
||||
//
|
||||
// * These are meant to be used in places that are run `a lot'.
|
||||
// It is wasteful to make predictions in code that is run
|
||||
// seldomly (e.g. at subsystem initialization time) as the
|
||||
// basic block reordering that this affects can often generate
|
||||
// larger code.
|
||||
|
||||
// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
|
||||
// require it.
|
||||
|
||||
// Given the pointer x to the member m of the struct s, return
|
||||
// a pointer to the containing structure. When using GCC, we first
|
||||
// assign pointer x to a local variable, to check that its type is
|
||||
// compatible with member m.
|
||||
|
||||
// Compiler-dependent macros to declare that functions take printf-like
|
||||
// or scanf-like arguments. They are null except for versions of gcc
|
||||
// that are known to support the features properly (old versions of gcc-2
|
||||
// didn't permit keeping the keywords out of the application namespace).
|
||||
|
||||
// Compiler-dependent macros that rely on FreeBSD-specific extensions.
|
||||
|
||||
// Embed the rcs id of a source file in the resulting library. Note that in
|
||||
// more recent ELF binutils, we use .ident allowing the ID to be stripped.
|
||||
// Usage:
|
||||
// __FBSDID("$FreeBSD$");
|
||||
|
||||
// -
|
||||
// The following definitions are an extension of the behavior originally
|
||||
// implemented in <sys/_posix.h>, but with a different level of granularity.
|
||||
// POSIX.1 requires that the macros we test be defined before any standard
|
||||
// header file is included.
|
||||
//
|
||||
// Here's a quick run-down of the versions:
|
||||
// defined(_POSIX_SOURCE) 1003.1-1988
|
||||
// _POSIX_C_SOURCE == 1 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
|
||||
// _POSIX_C_SOURCE == 199309 1003.1b-1993
|
||||
// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
|
||||
// and the omnibus ISO/IEC 9945-1: 1996
|
||||
// _POSIX_C_SOURCE == 200112 1003.1-2001
|
||||
// _POSIX_C_SOURCE == 200809 1003.1-2008
|
||||
//
|
||||
// In addition, the X/Open Portability Guide, which is now the Single UNIX
|
||||
// Specification, defines a feature-test macro which indicates the version of
|
||||
// that specification, and which subsumes _POSIX_C_SOURCE.
|
||||
//
|
||||
// Our macros begin with two underscores to avoid namespace screwage.
|
||||
|
||||
// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1.
|
||||
|
||||
// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2.
|
||||
|
||||
// Deal with various X/Open Portability Guides and Single UNIX Spec.
|
||||
|
||||
// Deal with all versions of POSIX. The ordering relative to the tests above is
|
||||
// important.
|
||||
// -
|
||||
// Deal with _ANSI_SOURCE:
|
||||
// If it is defined, and no other compilation environment is explicitly
|
||||
// requested, then define our internal feature-test macros to zero. This
|
||||
// makes no difference to the preprocessor (undefined symbols in preprocessing
|
||||
// expressions are defined to have value zero), but makes it more convenient for
|
||||
// a test program to print out the values.
|
||||
//
|
||||
// If a program mistakenly defines _ANSI_SOURCE and some other macro such as
|
||||
// _POSIX_C_SOURCE, we will assume that it wants the broader compilation
|
||||
// environment (and in fact we will never get here).
|
||||
|
||||
// User override __EXT1_VISIBLE
|
||||
|
||||
// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
|
||||
// translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
|
||||
|
||||
// Nullability qualifiers: currently only supported by Clang.
|
||||
|
||||
// Type Safety Checking
|
||||
//
|
||||
// Clang provides additional attributes to enable checking type safety
|
||||
// properties that cannot be enforced by the C type system.
|
||||
|
||||
// Lock annotations.
|
||||
//
|
||||
// Clang provides support for doing basic thread-safety tests at
|
||||
// compile-time, by marking which locks will/should be held when
|
||||
// entering/leaving a functions.
|
||||
//
|
||||
// Furthermore, it is also possible to annotate variables and structure
|
||||
// members to enforce that they are only accessed when certain locks are
|
||||
// held.
|
||||
|
||||
// Structure implements a lock.
|
||||
|
||||
// Function acquires an exclusive or shared lock.
|
||||
|
||||
// Function attempts to acquire an exclusive or shared lock.
|
||||
|
||||
// Function releases a lock.
|
||||
|
||||
// Function asserts that an exclusive or shared lock is held.
|
||||
|
||||
// Function requires that an exclusive or shared lock is or is not held.
|
||||
|
||||
// Function should not be analyzed.
|
||||
|
||||
// Function or variable should not be sanitized, e.g., by AddressSanitizer.
|
||||
// GCC has the nosanitize attribute, but as a function attribute only, and
|
||||
// warns on use as a variable attribute.
|
||||
|
||||
// Guard variables and structure members by lock.
|
||||
|
||||
// Alignment builtins for better type checking and improved code generation.
|
||||
// Provide fallback versions for other compilers (GCC/Clang < 10):
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// This file is in the public domain.
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-4-Clause
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. All advertising materials mentioning features or use of this software
|
||||
// must display the following acknowledgement:
|
||||
// This product includes software developed by the University of
|
||||
// California, Berkeley and its contributors.
|
||||
// 4. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
// From: @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// This file is in the public domain.
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1988, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)limits.h 8.3 (Berkeley) 1/4/94
|
||||
// $FreeBSD$
|
||||
|
||||
// According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
// #if preprocessing directives. Additionally, the expression must have the
|
||||
// same type as would an expression that is an object of the corresponding
|
||||
// type converted according to the integral promotions. The subtraction for
|
||||
// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
|
||||
// max value for an unsigned long long
|
||||
|
||||
// Minimum signal stack size.
|
||||
|
||||
// Basic types upon which most other types are built.
|
||||
type X__int8_t = int8 /* _types.h:55:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:56:24 */
|
||||
type X__int16_t = int16 /* _types.h:57:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:58:25 */
|
||||
type X__int32_t = int32 /* _types.h:59:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:60:23 */
|
||||
|
||||
type X__int64_t = int64 /* _types.h:66:20 */
|
||||
|
||||
type X__uint64_t = uint64 /* _types.h:68:28 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__clock_t = uint32 /* _types.h:84:23 */
|
||||
type X__critical_t = X__int32_t /* _types.h:85:19 */
|
||||
type X__double_t = float64 /* _types.h:87:21 */
|
||||
type X__float_t = float64 /* _types.h:88:21 */
|
||||
type X__intfptr_t = X__int32_t /* _types.h:90:19 */
|
||||
type X__intptr_t = X__int32_t /* _types.h:91:19 */
|
||||
type X__intmax_t = X__int64_t /* _types.h:93:19 */
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:94:19 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:95:19 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:96:19 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:97:19 */
|
||||
type X__int_least8_t = X__int8_t /* _types.h:98:18 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:99:19 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:100:19 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:101:19 */
|
||||
type X__ptrdiff_t = X__int32_t /* _types.h:112:19 */
|
||||
type X__register_t = X__int32_t /* _types.h:113:19 */
|
||||
type X__segsz_t = X__int32_t /* _types.h:114:19 */
|
||||
type X__size_t = X__uint32_t /* _types.h:115:20 */
|
||||
type X__ssize_t = X__int32_t /* _types.h:116:19 */
|
||||
type X__time_t = X__int32_t /* _types.h:117:19 */
|
||||
type X__uintfptr_t = X__uint32_t /* _types.h:118:20 */
|
||||
type X__uintptr_t = X__uint32_t /* _types.h:119:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:121:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */
|
||||
type X__u_register_t = X__uint32_t /* _types.h:136:20 */
|
||||
type X__vm_offset_t = X__uint32_t /* _types.h:137:20 */
|
||||
type X__vm_paddr_t = X__uint64_t /* _types.h:138:20 */
|
||||
type X__vm_size_t = X__uint32_t /* _types.h:139:20 */
|
||||
type X___wchar_t = int32 /* _types.h:141:14 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count
|
||||
type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()...
|
||||
type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags
|
||||
type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
|
||||
type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
|
||||
type X__gid_t = X__uint32_t /* _types.h:46:20 */
|
||||
type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
|
||||
type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number
|
||||
type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC)
|
||||
type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
|
||||
type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions
|
||||
type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions
|
||||
type X__nl_item = int32 /* _types.h:53:14 */
|
||||
type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count
|
||||
type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset
|
||||
type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias)
|
||||
type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group]
|
||||
type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally
|
||||
// signed, because of legacy code
|
||||
// that uses -1 for RLIM_INFINITY
|
||||
type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
|
||||
type X__socklen_t = X__uint32_t /* _types.h:62:20 */
|
||||
type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed)
|
||||
type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()...
|
||||
type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()...
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */
|
||||
type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned)
|
||||
type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset.
|
||||
type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset.
|
||||
type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier.
|
||||
type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
|
||||
|
||||
// Unusual type definitions.
|
||||
// rune_t is declared to be an “int” instead of the more natural
|
||||
// “unsigned long” or “long”. Two things are happening here. It is not
|
||||
// unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
|
||||
// it looks like 10646 will be a 31 bit standard. This means that if your
|
||||
// ints cannot hold 32 bits, you will be in trouble. The reason an int was
|
||||
// chosen over a long is that the is*() and to*() routines take ints (says
|
||||
// ANSI C), but they use __ct_rune_t instead of int.
|
||||
//
|
||||
// NOTE: rune_t is not covered by ANSI nor other standards, and should not
|
||||
// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
|
||||
// rune_t must be the same type. Also, wint_t should be able to hold all
|
||||
// members of the largest character set plus one extra value (WEOF), and
|
||||
// must be at least 16 bits.
|
||||
type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs
|
||||
type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
|
||||
type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
|
||||
|
||||
// Clang already provides these types as built-ins, but only in C++ mode.
|
||||
type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
|
||||
type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
|
||||
// In C++11, char16_t and char32_t are built-in types.
|
||||
|
||||
type X__max_align_t = struct {
|
||||
F__max_align1 int64
|
||||
F__max_align2 float64
|
||||
} /* _types.h:111:3 */
|
||||
|
||||
type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
|
||||
|
||||
type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state during multibyte
|
||||
// stream conversions.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint32
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:124:3 */
|
||||
|
||||
type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
|
||||
|
||||
// Types for varargs. These are all provided by builtin types these
|
||||
// days, so centralize their definition.
|
||||
type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
|
||||
type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers
|
||||
|
||||
// When the following macro is defined, the system uses 64-bit inode numbers.
|
||||
// Programs can use this to avoid including <sys/param.h>, with its associated
|
||||
// namespace pollution.
|
||||
|
||||
type Mode_t = X__mode_t /* fcntl.h:53:18 */
|
||||
|
||||
type Off_t = X__off_t /* fcntl.h:58:18 */
|
||||
|
||||
type Pid_t = X__pid_t /* fcntl.h:63:18 */
|
||||
|
||||
// File status flags: these are used by open(2), fcntl(2).
|
||||
// They are also used (indirectly) in the kernel file structure f_flags,
|
||||
// which is a superset of the open/fcntl flags. Open flags and f_flags
|
||||
// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
|
||||
// Open/fcntl flags begin with O_; kernel-internal flags begin with F.
|
||||
// open-only flags
|
||||
|
||||
// Kernel encoding of open mode; separate read and write bits that are
|
||||
// independently testable: 1 greater than the above.
|
||||
//
|
||||
// XXX
|
||||
// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
|
||||
// which was documented to use FREAD/FWRITE, continues to work.
|
||||
|
||||
// Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY.
|
||||
|
||||
// Attempt to bypass buffer cache
|
||||
|
||||
// Defined by POSIX 1003.1-2008; BSD default, but reserve for future use.
|
||||
|
||||
// XXX missing O_RSYNC.
|
||||
|
||||
// The O_* flags used to have only F* names, which were used in the kernel
|
||||
// and by fcntl. We retain the F* names for the kernel f_flag field
|
||||
// and for backward compatibility for fcntl. These flags are deprecated.
|
||||
|
||||
// Historically, we ran out of bits in f_flag (which was once a short).
|
||||
// However, the flag bits not set in FMASK are only meaningful in the
|
||||
// initial open syscall. Those bits were thus given a
|
||||
// different meaning for fcntl(2).
|
||||
// Read ahead
|
||||
|
||||
// Magic value that specify the use of the current working directory
|
||||
// to determine the target of relative file paths in the openat() and
|
||||
// similar syscalls.
|
||||
|
||||
// Miscellaneous flags for the *at() syscalls.
|
||||
/* #define AT_UNUSED1 0x1000 */ // Was AT_BENEATH
|
||||
|
||||
// Constants used for fcntl(2)
|
||||
|
||||
// command values
|
||||
|
||||
// Seals (F_ADD_SEALS, F_GET_SEALS).
|
||||
|
||||
// file descriptor flags (F_GETFD, F_SETFD)
|
||||
|
||||
// record locking flags (F_GETLK, F_SETLK, F_SETLKW)
|
||||
|
||||
// Advisory file segment locking data type -
|
||||
// information passed to system by user
|
||||
type Flock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
Fl_sysid int32
|
||||
} /* fcntl.h:306:1 */
|
||||
|
||||
// Old advisory file segment locking data type,
|
||||
// before adding l_sysid.
|
||||
type X__oflock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
} /* fcntl.h:320:1 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
775
fcntl/fcntl_freebsd_amd64.go
Normal file
775
fcntl/fcntl_freebsd_amd64.go
Normal file
|
@ -0,0 +1,775 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_freebsd_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x0100 // fcntl.h:224:1:
|
||||
AT_EMPTY_PATH = 0x4000 // fcntl.h:234:1:
|
||||
AT_FDCWD = -100 // fcntl.h:219:1:
|
||||
AT_REMOVEDIR = 0x0800 // fcntl.h:228:1:
|
||||
AT_RESOLVE_BENEATH = 0x2000 // fcntl.h:232:1:
|
||||
AT_SYMLINK_FOLLOW = 0x0400 // fcntl.h:227:1:
|
||||
AT_SYMLINK_NOFOLLOW = 0x0200 // fcntl.h:226:1:
|
||||
FAPPEND = 8 // fcntl.h:193:1:
|
||||
FASYNC = 64 // fcntl.h:194:1:
|
||||
FDSYNC = 16777216 // fcntl.h:196:1:
|
||||
FD_CLOEXEC = 1 // fcntl.h:283:1:
|
||||
FD_NONE = -200 // fcntl.h:355:1:
|
||||
FFSYNC = 128 // fcntl.h:195:1:
|
||||
FNDELAY = 4 // fcntl.h:198:1:
|
||||
FNONBLOCK = 4 // fcntl.h:197:1:
|
||||
FRDAHEAD = 512 // fcntl.h:210:1:
|
||||
FREAD = 0x0001 // fcntl.h:89:1:
|
||||
FWRITE = 0x0002 // fcntl.h:90:1:
|
||||
F_ADD_SEALS = 19 // fcntl.h:270:1:
|
||||
F_CANCEL = 5 // fcntl.h:291:1:
|
||||
F_DUP2FD = 10 // fcntl.h:255:1:
|
||||
F_DUP2FD_CLOEXEC = 18 // fcntl.h:269:1:
|
||||
F_DUPFD = 0 // fcntl.h:242:1:
|
||||
F_DUPFD_CLOEXEC = 17 // fcntl.h:266:1:
|
||||
F_GETFD = 1 // fcntl.h:243:1:
|
||||
F_GETFL = 3 // fcntl.h:245:1:
|
||||
F_GETLK = 11 // fcntl.h:257:1:
|
||||
F_GETOWN = 5 // fcntl.h:248:1:
|
||||
F_GET_SEALS = 20 // fcntl.h:271:1:
|
||||
F_ISUNIONSTACK = 21 // fcntl.h:272:1:
|
||||
F_KINFO = 22 // fcntl.h:273:1:
|
||||
F_OGETLK = 7 // fcntl.h:252:1:
|
||||
F_OSETLK = 8 // fcntl.h:253:1:
|
||||
F_OSETLKW = 9 // fcntl.h:254:1:
|
||||
F_RDAHEAD = 16 // fcntl.h:263:1:
|
||||
F_RDLCK = 1 // fcntl.h:286:1:
|
||||
F_READAHEAD = 15 // fcntl.h:262:1:
|
||||
F_SEAL_GROW = 0x0004 // fcntl.h:278:1:
|
||||
F_SEAL_SEAL = 0x0001 // fcntl.h:276:1:
|
||||
F_SEAL_SHRINK = 0x0002 // fcntl.h:277:1:
|
||||
F_SEAL_WRITE = 0x0008 // fcntl.h:279:1:
|
||||
F_SETFD = 2 // fcntl.h:244:1:
|
||||
F_SETFL = 4 // fcntl.h:246:1:
|
||||
F_SETLK = 12 // fcntl.h:258:1:
|
||||
F_SETLKW = 13 // fcntl.h:259:1:
|
||||
F_SETLK_REMOTE = 14 // fcntl.h:261:1:
|
||||
F_SETOWN = 6 // fcntl.h:249:1:
|
||||
F_UNLCK = 2 // fcntl.h:287:1:
|
||||
F_UNLCKSYS = 4 // fcntl.h:290:1:
|
||||
F_WRLCK = 3 // fcntl.h:288:1:
|
||||
LOCK_EX = 0x02 // fcntl.h:332:1:
|
||||
LOCK_NB = 0x04 // fcntl.h:333:1:
|
||||
LOCK_SH = 0x01 // fcntl.h:331:1:
|
||||
LOCK_UN = 0x08 // fcntl.h:334:1:
|
||||
O_ACCMODE = 0x0003 // fcntl.h:78:1:
|
||||
O_APPEND = 0x0008 // fcntl.h:93:1:
|
||||
O_ASYNC = 0x0040 // fcntl.h:97:1:
|
||||
O_CLOEXEC = 0x00100000 // fcntl.h:133:1:
|
||||
O_CREAT = 0x0200 // fcntl.h:104:1:
|
||||
O_DIRECT = 0x00010000 // fcntl.h:116:1:
|
||||
O_DIRECTORY = 0x00020000 // fcntl.h:120:1:
|
||||
O_DSYNC = 0x01000000 // fcntl.h:143:1:
|
||||
O_EMPTY_PATH = 0x02000000 // fcntl.h:145:1:
|
||||
O_EXCL = 0x0800 // fcntl.h:106:1:
|
||||
O_EXEC = 0x00040000 // fcntl.h:121:1:
|
||||
O_EXLOCK = 0x0020 // fcntl.h:96:1:
|
||||
O_FSYNC = 0x0080 // fcntl.h:98:1:
|
||||
O_NDELAY = 4 // fcntl.h:199:1:
|
||||
O_NOCTTY = 0x8000 // fcntl.h:112:1:
|
||||
O_NOFOLLOW = 0x0100 // fcntl.h:102:1:
|
||||
O_NONBLOCK = 0x0004 // fcntl.h:92:1:
|
||||
O_PATH = 0x00400000 // fcntl.h:138:1:
|
||||
O_RDONLY = 0x0000 // fcntl.h:75:1:
|
||||
O_RDWR = 0x0002 // fcntl.h:77:1:
|
||||
O_RESOLVE_BENEATH = 0x00800000 // fcntl.h:139:1:
|
||||
O_SEARCH = 262144 // fcntl.h:122:1:
|
||||
O_SHLOCK = 0x0010 // fcntl.h:95:1:
|
||||
O_SYNC = 0x0080 // fcntl.h:100:1:
|
||||
O_TRUNC = 0x0400 // fcntl.h:105:1:
|
||||
O_TTY_INIT = 0x00080000 // fcntl.h:131:1:
|
||||
O_VERIFY = 0x00200000 // fcntl.h:137:1:
|
||||
O_WRONLY = 0x0001 // fcntl.h:76:1:
|
||||
POSIX_FADV_DONTNEED = 4 // fcntl.h:345:1:
|
||||
POSIX_FADV_NOREUSE = 5 // fcntl.h:346:1:
|
||||
POSIX_FADV_NORMAL = 0 // fcntl.h:341:1:
|
||||
POSIX_FADV_RANDOM = 1 // fcntl.h:342:1:
|
||||
POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:343:1:
|
||||
POSIX_FADV_WILLNEED = 3 // fcntl.h:344:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:42:1:
|
||||
X_MODE_T_DECLARED = 0 // fcntl.h:54:1:
|
||||
X_Nonnull = 0 // cdefs.h:790:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:792:1:
|
||||
X_Nullable = 0 // cdefs.h:791:1:
|
||||
X_OFF_T_DECLARED = 0 // fcntl.h:59:1:
|
||||
X_PID_T_DECLARED = 0 // fcntl.h:64:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:32:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1983, 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)fcntl.h 8.3 (Berkeley) 1/21/94
|
||||
// $FreeBSD$
|
||||
|
||||
// This file includes the definitions for open and fcntl
|
||||
// described by POSIX for <fcntl.h>; it also includes
|
||||
// related kernel definitions.
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
|
||||
// Testing against Clang-specific extensions.
|
||||
|
||||
// This code has been put in place to help reduce the addition of
|
||||
// compiler specific defines in FreeBSD code. It helps to aid in
|
||||
// having a compiler-agnostic source tree.
|
||||
|
||||
// Compiler memory barriers, specific to gcc and clang.
|
||||
|
||||
// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
|
||||
// mode -- there must be no spaces between its arguments, and for nested
|
||||
// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
|
||||
// concatenate double-quoted strings produced by the __STRING macro, but
|
||||
// this only works with ANSI C.
|
||||
//
|
||||
// __XSTRING is like __STRING, but it expands any macros in its argument
|
||||
// first. It is only available with ANSI C.
|
||||
|
||||
// Compiler-dependent macros to help declare dead (non-returning) and
|
||||
// pure (no side effects) functions, and unused variables. They are
|
||||
// null except for versions of gcc that are known to support the features
|
||||
// properly (old versions of gcc-2 supported the dead and pure features
|
||||
// in a different (wrong) way). If we do not provide an implementation
|
||||
// for a given compiler, let the compile fail if it is told to use
|
||||
// a feature that we cannot live without.
|
||||
|
||||
// Keywords added in C11.
|
||||
|
||||
// Emulation of C11 _Generic(). Unlike the previously defined C11
|
||||
// keywords, it is not possible to implement this using exactly the same
|
||||
// syntax. Therefore implement something similar under the name
|
||||
// __generic(). Unlike _Generic(), this macro can only distinguish
|
||||
// between a single type, so it requires nested invocations to
|
||||
// distinguish multiple cases.
|
||||
|
||||
// C99 Static array indices in function parameter declarations. Syntax such as:
|
||||
// void bar(int myArray[static 10]);
|
||||
// is allowed in C99 but not in C++. Define __min_size appropriately so
|
||||
// headers using it can be compiled in either language. Use like this:
|
||||
// void bar(int myArray[__min_size(10)]);
|
||||
|
||||
// XXX: should use `#if __STDC_VERSION__ < 199901'.
|
||||
|
||||
// C++11 exposes a load of C99 stuff
|
||||
|
||||
// GCC 2.95 provides `__restrict' as an extension to C90 to support the
|
||||
// C99-specific `restrict' type qualifier. We happen to use `__restrict' as
|
||||
// a way to define the `restrict' type qualifier without disturbing older
|
||||
// software that is unaware of C99 keywords.
|
||||
|
||||
// GNU C version 2.96 adds explicit branch prediction so that
|
||||
// the CPU back-end can hint the processor and also so that
|
||||
// code blocks can be reordered such that the predicted path
|
||||
// sees a more linear flow, thus improving cache behavior, etc.
|
||||
//
|
||||
// The following two macros provide us with a way to utilize this
|
||||
// compiler feature. Use __predict_true() if you expect the expression
|
||||
// to evaluate to true, and __predict_false() if you expect the
|
||||
// expression to evaluate to false.
|
||||
//
|
||||
// A few notes about usage:
|
||||
//
|
||||
// * Generally, __predict_false() error condition checks (unless
|
||||
// you have some _strong_ reason to do otherwise, in which case
|
||||
// document it), and/or __predict_true() `no-error' condition
|
||||
// checks, assuming you want to optimize for the no-error case.
|
||||
//
|
||||
// * Other than that, if you don't know the likelihood of a test
|
||||
// succeeding from empirical or other `hard' evidence, don't
|
||||
// make predictions.
|
||||
//
|
||||
// * These are meant to be used in places that are run `a lot'.
|
||||
// It is wasteful to make predictions in code that is run
|
||||
// seldomly (e.g. at subsystem initialization time) as the
|
||||
// basic block reordering that this affects can often generate
|
||||
// larger code.
|
||||
|
||||
// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
|
||||
// require it.
|
||||
|
||||
// Given the pointer x to the member m of the struct s, return
|
||||
// a pointer to the containing structure. When using GCC, we first
|
||||
// assign pointer x to a local variable, to check that its type is
|
||||
// compatible with member m.
|
||||
|
||||
// Compiler-dependent macros to declare that functions take printf-like
|
||||
// or scanf-like arguments. They are null except for versions of gcc
|
||||
// that are known to support the features properly (old versions of gcc-2
|
||||
// didn't permit keeping the keywords out of the application namespace).
|
||||
|
||||
// Compiler-dependent macros that rely on FreeBSD-specific extensions.
|
||||
|
||||
// Embed the rcs id of a source file in the resulting library. Note that in
|
||||
// more recent ELF binutils, we use .ident allowing the ID to be stripped.
|
||||
// Usage:
|
||||
// __FBSDID("$FreeBSD$");
|
||||
|
||||
// -
|
||||
// The following definitions are an extension of the behavior originally
|
||||
// implemented in <sys/_posix.h>, but with a different level of granularity.
|
||||
// POSIX.1 requires that the macros we test be defined before any standard
|
||||
// header file is included.
|
||||
//
|
||||
// Here's a quick run-down of the versions:
|
||||
// defined(_POSIX_SOURCE) 1003.1-1988
|
||||
// _POSIX_C_SOURCE == 1 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
|
||||
// _POSIX_C_SOURCE == 199309 1003.1b-1993
|
||||
// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
|
||||
// and the omnibus ISO/IEC 9945-1: 1996
|
||||
// _POSIX_C_SOURCE == 200112 1003.1-2001
|
||||
// _POSIX_C_SOURCE == 200809 1003.1-2008
|
||||
//
|
||||
// In addition, the X/Open Portability Guide, which is now the Single UNIX
|
||||
// Specification, defines a feature-test macro which indicates the version of
|
||||
// that specification, and which subsumes _POSIX_C_SOURCE.
|
||||
//
|
||||
// Our macros begin with two underscores to avoid namespace screwage.
|
||||
|
||||
// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1.
|
||||
|
||||
// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2.
|
||||
|
||||
// Deal with various X/Open Portability Guides and Single UNIX Spec.
|
||||
|
||||
// Deal with all versions of POSIX. The ordering relative to the tests above is
|
||||
// important.
|
||||
// -
|
||||
// Deal with _ANSI_SOURCE:
|
||||
// If it is defined, and no other compilation environment is explicitly
|
||||
// requested, then define our internal feature-test macros to zero. This
|
||||
// makes no difference to the preprocessor (undefined symbols in preprocessing
|
||||
// expressions are defined to have value zero), but makes it more convenient for
|
||||
// a test program to print out the values.
|
||||
//
|
||||
// If a program mistakenly defines _ANSI_SOURCE and some other macro such as
|
||||
// _POSIX_C_SOURCE, we will assume that it wants the broader compilation
|
||||
// environment (and in fact we will never get here).
|
||||
|
||||
// User override __EXT1_VISIBLE
|
||||
|
||||
// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
|
||||
// translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
|
||||
|
||||
// Nullability qualifiers: currently only supported by Clang.
|
||||
|
||||
// Type Safety Checking
|
||||
//
|
||||
// Clang provides additional attributes to enable checking type safety
|
||||
// properties that cannot be enforced by the C type system.
|
||||
|
||||
// Lock annotations.
|
||||
//
|
||||
// Clang provides support for doing basic thread-safety tests at
|
||||
// compile-time, by marking which locks will/should be held when
|
||||
// entering/leaving a functions.
|
||||
//
|
||||
// Furthermore, it is also possible to annotate variables and structure
|
||||
// members to enforce that they are only accessed when certain locks are
|
||||
// held.
|
||||
|
||||
// Structure implements a lock.
|
||||
|
||||
// Function acquires an exclusive or shared lock.
|
||||
|
||||
// Function attempts to acquire an exclusive or shared lock.
|
||||
|
||||
// Function releases a lock.
|
||||
|
||||
// Function asserts that an exclusive or shared lock is held.
|
||||
|
||||
// Function requires that an exclusive or shared lock is or is not held.
|
||||
|
||||
// Function should not be analyzed.
|
||||
|
||||
// Function or variable should not be sanitized, e.g., by AddressSanitizer.
|
||||
// GCC has the nosanitize attribute, but as a function attribute only, and
|
||||
// warns on use as a variable attribute.
|
||||
|
||||
// Guard variables and structure members by lock.
|
||||
|
||||
// Alignment builtins for better type checking and improved code generation.
|
||||
// Provide fallback versions for other compilers (GCC/Clang < 10):
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// This file is in the public domain.
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-4-Clause
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. All advertising materials mentioning features or use of this software
|
||||
// must display the following acknowledgement:
|
||||
// This product includes software developed by the University of
|
||||
// California, Berkeley and its contributors.
|
||||
// 4. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
// From: @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// This file is in the public domain.
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1988, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)limits.h 8.3 (Berkeley) 1/4/94
|
||||
// $FreeBSD$
|
||||
|
||||
// According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
// #if preprocessing directives. Additionally, the expression must have the
|
||||
// same type as would an expression that is an object of the corresponding
|
||||
// type converted according to the integral promotions. The subtraction for
|
||||
// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
|
||||
// max value for an unsigned long long
|
||||
|
||||
// Quads and longs are the same on the amd64. Ensure they stay in sync.
|
||||
|
||||
// Minimum signal stack size.
|
||||
|
||||
// Basic types upon which most other types are built.
|
||||
type X__int8_t = int8 /* _types.h:55:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:56:24 */
|
||||
type X__int16_t = int16 /* _types.h:57:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:58:25 */
|
||||
type X__int32_t = int32 /* _types.h:59:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:60:23 */
|
||||
type X__int64_t = int64 /* _types.h:62:16 */
|
||||
type X__uint64_t = uint64 /* _types.h:63:24 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()...
|
||||
type X__critical_t = X__int64_t /* _types.h:76:19 */
|
||||
type X__double_t = float64 /* _types.h:78:17 */
|
||||
type X__float_t = float32 /* _types.h:79:16 */
|
||||
type X__intfptr_t = X__int64_t /* _types.h:81:19 */
|
||||
type X__intptr_t = X__int64_t /* _types.h:82:19 */
|
||||
type X__intmax_t = X__int64_t /* _types.h:93:19 */
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:94:19 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:95:19 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:96:19 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:97:19 */
|
||||
type X__int_least8_t = X__int8_t /* _types.h:98:18 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:99:19 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:100:19 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:101:19 */
|
||||
type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2
|
||||
type X__register_t = X__int64_t /* _types.h:104:19 */
|
||||
type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages)
|
||||
type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof()
|
||||
type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error
|
||||
type X__time_t = X__int64_t /* _types.h:108:19 */ // time()...
|
||||
type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */
|
||||
type X__uintptr_t = X__uint64_t /* _types.h:110:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:121:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */
|
||||
type X__u_register_t = X__uint64_t /* _types.h:131:20 */
|
||||
type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */
|
||||
type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */
|
||||
type X__vm_size_t = X__uint64_t /* _types.h:134:20 */
|
||||
type X___wchar_t = int32 /* _types.h:141:14 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count
|
||||
type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()...
|
||||
type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags
|
||||
type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
|
||||
type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
|
||||
type X__gid_t = X__uint32_t /* _types.h:46:20 */
|
||||
type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
|
||||
type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number
|
||||
type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC)
|
||||
type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
|
||||
type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions
|
||||
type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions
|
||||
type X__nl_item = int32 /* _types.h:53:14 */
|
||||
type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count
|
||||
type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset
|
||||
type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias)
|
||||
type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group]
|
||||
type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally
|
||||
// signed, because of legacy code
|
||||
// that uses -1 for RLIM_INFINITY
|
||||
type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
|
||||
type X__socklen_t = X__uint32_t /* _types.h:62:20 */
|
||||
type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed)
|
||||
type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()...
|
||||
type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()...
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */
|
||||
type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned)
|
||||
type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset.
|
||||
type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset.
|
||||
type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier.
|
||||
type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
|
||||
|
||||
// Unusual type definitions.
|
||||
// rune_t is declared to be an “int” instead of the more natural
|
||||
// “unsigned long” or “long”. Two things are happening here. It is not
|
||||
// unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
|
||||
// it looks like 10646 will be a 31 bit standard. This means that if your
|
||||
// ints cannot hold 32 bits, you will be in trouble. The reason an int was
|
||||
// chosen over a long is that the is*() and to*() routines take ints (says
|
||||
// ANSI C), but they use __ct_rune_t instead of int.
|
||||
//
|
||||
// NOTE: rune_t is not covered by ANSI nor other standards, and should not
|
||||
// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
|
||||
// rune_t must be the same type. Also, wint_t should be able to hold all
|
||||
// members of the largest character set plus one extra value (WEOF), and
|
||||
// must be at least 16 bits.
|
||||
type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs
|
||||
type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
|
||||
type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
|
||||
|
||||
// Clang already provides these types as built-ins, but only in C++ mode.
|
||||
type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
|
||||
type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
|
||||
// In C++11, char16_t and char32_t are built-in types.
|
||||
|
||||
type X__max_align_t = struct {
|
||||
F__max_align1 int64
|
||||
F__max_align2 float64
|
||||
} /* _types.h:111:3 */
|
||||
|
||||
type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
|
||||
|
||||
type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state during multibyte
|
||||
// stream conversions.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:124:3 */
|
||||
|
||||
type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
|
||||
|
||||
// Types for varargs. These are all provided by builtin types these
|
||||
// days, so centralize their definition.
|
||||
type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
|
||||
type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers
|
||||
|
||||
// When the following macro is defined, the system uses 64-bit inode numbers.
|
||||
// Programs can use this to avoid including <sys/param.h>, with its associated
|
||||
// namespace pollution.
|
||||
|
||||
type Mode_t = X__mode_t /* fcntl.h:53:18 */
|
||||
|
||||
type Off_t = X__off_t /* fcntl.h:58:18 */
|
||||
|
||||
type Pid_t = X__pid_t /* fcntl.h:63:18 */
|
||||
|
||||
// File status flags: these are used by open(2), fcntl(2).
|
||||
// They are also used (indirectly) in the kernel file structure f_flags,
|
||||
// which is a superset of the open/fcntl flags. Open flags and f_flags
|
||||
// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
|
||||
// Open/fcntl flags begin with O_; kernel-internal flags begin with F.
|
||||
// open-only flags
|
||||
|
||||
// Kernel encoding of open mode; separate read and write bits that are
|
||||
// independently testable: 1 greater than the above.
|
||||
//
|
||||
// XXX
|
||||
// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
|
||||
// which was documented to use FREAD/FWRITE, continues to work.
|
||||
|
||||
// Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY.
|
||||
|
||||
// Attempt to bypass buffer cache
|
||||
|
||||
// Defined by POSIX 1003.1-2008; BSD default, but reserve for future use.
|
||||
|
||||
// XXX missing O_RSYNC.
|
||||
|
||||
// The O_* flags used to have only F* names, which were used in the kernel
|
||||
// and by fcntl. We retain the F* names for the kernel f_flag field
|
||||
// and for backward compatibility for fcntl. These flags are deprecated.
|
||||
|
||||
// Historically, we ran out of bits in f_flag (which was once a short).
|
||||
// However, the flag bits not set in FMASK are only meaningful in the
|
||||
// initial open syscall. Those bits were thus given a
|
||||
// different meaning for fcntl(2).
|
||||
// Read ahead
|
||||
|
||||
// Magic value that specify the use of the current working directory
|
||||
// to determine the target of relative file paths in the openat() and
|
||||
// similar syscalls.
|
||||
|
||||
// Miscellaneous flags for the *at() syscalls.
|
||||
/* #define AT_UNUSED1 0x1000 */ // Was AT_BENEATH
|
||||
|
||||
// Constants used for fcntl(2)
|
||||
|
||||
// command values
|
||||
|
||||
// Seals (F_ADD_SEALS, F_GET_SEALS).
|
||||
|
||||
// file descriptor flags (F_GETFD, F_SETFD)
|
||||
|
||||
// record locking flags (F_GETLK, F_SETLK, F_SETLKW)
|
||||
|
||||
// Advisory file segment locking data type -
|
||||
// information passed to system by user
|
||||
type Flock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
Fl_sysid int32
|
||||
F__ccgo_pad1 [4]byte
|
||||
} /* fcntl.h:306:1 */
|
||||
|
||||
// Old advisory file segment locking data type,
|
||||
// before adding l_sysid.
|
||||
type X__oflock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
} /* fcntl.h:320:1 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
716
fcntl/fcntl_freebsd_arm.go
Normal file
716
fcntl/fcntl_freebsd_arm.go
Normal file
|
@ -0,0 +1,716 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_freebsd_arm.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x0100 // fcntl.h:224:1:
|
||||
AT_EMPTY_PATH = 0x4000 // fcntl.h:234:1:
|
||||
AT_FDCWD = -100 // fcntl.h:219:1:
|
||||
AT_REMOVEDIR = 0x0800 // fcntl.h:228:1:
|
||||
AT_RESOLVE_BENEATH = 0x2000 // fcntl.h:232:1:
|
||||
AT_SYMLINK_FOLLOW = 0x0400 // fcntl.h:227:1:
|
||||
AT_SYMLINK_NOFOLLOW = 0x0200 // fcntl.h:226:1:
|
||||
FAPPEND = 8 // fcntl.h:193:1:
|
||||
FASYNC = 64 // fcntl.h:194:1:
|
||||
FDSYNC = 16777216 // fcntl.h:196:1:
|
||||
FD_CLOEXEC = 1 // fcntl.h:283:1:
|
||||
FD_NONE = -200 // fcntl.h:355:1:
|
||||
FFSYNC = 128 // fcntl.h:195:1:
|
||||
FNDELAY = 4 // fcntl.h:198:1:
|
||||
FNONBLOCK = 4 // fcntl.h:197:1:
|
||||
FRDAHEAD = 512 // fcntl.h:210:1:
|
||||
FREAD = 0x0001 // fcntl.h:89:1:
|
||||
FWRITE = 0x0002 // fcntl.h:90:1:
|
||||
F_ADD_SEALS = 19 // fcntl.h:270:1:
|
||||
F_CANCEL = 5 // fcntl.h:291:1:
|
||||
F_DUP2FD = 10 // fcntl.h:255:1:
|
||||
F_DUP2FD_CLOEXEC = 18 // fcntl.h:269:1:
|
||||
F_DUPFD = 0 // fcntl.h:242:1:
|
||||
F_DUPFD_CLOEXEC = 17 // fcntl.h:266:1:
|
||||
F_GETFD = 1 // fcntl.h:243:1:
|
||||
F_GETFL = 3 // fcntl.h:245:1:
|
||||
F_GETLK = 11 // fcntl.h:257:1:
|
||||
F_GETOWN = 5 // fcntl.h:248:1:
|
||||
F_GET_SEALS = 20 // fcntl.h:271:1:
|
||||
F_ISUNIONSTACK = 21 // fcntl.h:272:1:
|
||||
F_KINFO = 22 // fcntl.h:273:1:
|
||||
F_OGETLK = 7 // fcntl.h:252:1:
|
||||
F_OSETLK = 8 // fcntl.h:253:1:
|
||||
F_OSETLKW = 9 // fcntl.h:254:1:
|
||||
F_RDAHEAD = 16 // fcntl.h:263:1:
|
||||
F_RDLCK = 1 // fcntl.h:286:1:
|
||||
F_READAHEAD = 15 // fcntl.h:262:1:
|
||||
F_SEAL_GROW = 0x0004 // fcntl.h:278:1:
|
||||
F_SEAL_SEAL = 0x0001 // fcntl.h:276:1:
|
||||
F_SEAL_SHRINK = 0x0002 // fcntl.h:277:1:
|
||||
F_SEAL_WRITE = 0x0008 // fcntl.h:279:1:
|
||||
F_SETFD = 2 // fcntl.h:244:1:
|
||||
F_SETFL = 4 // fcntl.h:246:1:
|
||||
F_SETLK = 12 // fcntl.h:258:1:
|
||||
F_SETLKW = 13 // fcntl.h:259:1:
|
||||
F_SETLK_REMOTE = 14 // fcntl.h:261:1:
|
||||
F_SETOWN = 6 // fcntl.h:249:1:
|
||||
F_UNLCK = 2 // fcntl.h:287:1:
|
||||
F_UNLCKSYS = 4 // fcntl.h:290:1:
|
||||
F_WRLCK = 3 // fcntl.h:288:1:
|
||||
LOCK_EX = 0x02 // fcntl.h:332:1:
|
||||
LOCK_NB = 0x04 // fcntl.h:333:1:
|
||||
LOCK_SH = 0x01 // fcntl.h:331:1:
|
||||
LOCK_UN = 0x08 // fcntl.h:334:1:
|
||||
O_ACCMODE = 0x0003 // fcntl.h:78:1:
|
||||
O_APPEND = 0x0008 // fcntl.h:93:1:
|
||||
O_ASYNC = 0x0040 // fcntl.h:97:1:
|
||||
O_CLOEXEC = 0x00100000 // fcntl.h:133:1:
|
||||
O_CREAT = 0x0200 // fcntl.h:104:1:
|
||||
O_DIRECT = 0x00010000 // fcntl.h:116:1:
|
||||
O_DIRECTORY = 0x00020000 // fcntl.h:120:1:
|
||||
O_DSYNC = 0x01000000 // fcntl.h:143:1:
|
||||
O_EMPTY_PATH = 0x02000000 // fcntl.h:145:1:
|
||||
O_EXCL = 0x0800 // fcntl.h:106:1:
|
||||
O_EXEC = 0x00040000 // fcntl.h:121:1:
|
||||
O_EXLOCK = 0x0020 // fcntl.h:96:1:
|
||||
O_FSYNC = 0x0080 // fcntl.h:98:1:
|
||||
O_NDELAY = 4 // fcntl.h:199:1:
|
||||
O_NOCTTY = 0x8000 // fcntl.h:112:1:
|
||||
O_NOFOLLOW = 0x0100 // fcntl.h:102:1:
|
||||
O_NONBLOCK = 0x0004 // fcntl.h:92:1:
|
||||
O_PATH = 0x00400000 // fcntl.h:138:1:
|
||||
O_RDONLY = 0x0000 // fcntl.h:75:1:
|
||||
O_RDWR = 0x0002 // fcntl.h:77:1:
|
||||
O_RESOLVE_BENEATH = 0x00800000 // fcntl.h:139:1:
|
||||
O_SEARCH = 262144 // fcntl.h:122:1:
|
||||
O_SHLOCK = 0x0010 // fcntl.h:95:1:
|
||||
O_SYNC = 0x0080 // fcntl.h:100:1:
|
||||
O_TRUNC = 0x0400 // fcntl.h:105:1:
|
||||
O_TTY_INIT = 0x00080000 // fcntl.h:131:1:
|
||||
O_VERIFY = 0x00200000 // fcntl.h:137:1:
|
||||
O_WRONLY = 0x0001 // fcntl.h:76:1:
|
||||
POSIX_FADV_DONTNEED = 4 // fcntl.h:345:1:
|
||||
POSIX_FADV_NOREUSE = 5 // fcntl.h:346:1:
|
||||
POSIX_FADV_NORMAL = 0 // fcntl.h:341:1:
|
||||
POSIX_FADV_RANDOM = 1 // fcntl.h:342:1:
|
||||
POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:343:1:
|
||||
POSIX_FADV_WILLNEED = 3 // fcntl.h:344:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_ILP32 = 1 // <predefined>:1:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:42:1:
|
||||
X_MODE_T_DECLARED = 0 // fcntl.h:54:1:
|
||||
X_Nonnull = 0 // cdefs.h:790:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:792:1:
|
||||
X_Nullable = 0 // cdefs.h:791:1:
|
||||
X_OFF_T_DECLARED = 0 // fcntl.h:59:1:
|
||||
X_PID_T_DECLARED = 0 // fcntl.h:64:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:32:1:
|
||||
Unix = 1 // <predefined>:367:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint32 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint32 /* <builtin>:15:24 */
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1983, 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)fcntl.h 8.3 (Berkeley) 1/21/94
|
||||
// $FreeBSD$
|
||||
|
||||
// This file includes the definitions for open and fcntl
|
||||
// described by POSIX for <fcntl.h>; it also includes
|
||||
// related kernel definitions.
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
|
||||
// Testing against Clang-specific extensions.
|
||||
|
||||
// This code has been put in place to help reduce the addition of
|
||||
// compiler specific defines in FreeBSD code. It helps to aid in
|
||||
// having a compiler-agnostic source tree.
|
||||
|
||||
// Compiler memory barriers, specific to gcc and clang.
|
||||
|
||||
// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
|
||||
// mode -- there must be no spaces between its arguments, and for nested
|
||||
// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
|
||||
// concatenate double-quoted strings produced by the __STRING macro, but
|
||||
// this only works with ANSI C.
|
||||
//
|
||||
// __XSTRING is like __STRING, but it expands any macros in its argument
|
||||
// first. It is only available with ANSI C.
|
||||
|
||||
// Compiler-dependent macros to help declare dead (non-returning) and
|
||||
// pure (no side effects) functions, and unused variables. They are
|
||||
// null except for versions of gcc that are known to support the features
|
||||
// properly (old versions of gcc-2 supported the dead and pure features
|
||||
// in a different (wrong) way). If we do not provide an implementation
|
||||
// for a given compiler, let the compile fail if it is told to use
|
||||
// a feature that we cannot live without.
|
||||
|
||||
// Keywords added in C11.
|
||||
|
||||
// Emulation of C11 _Generic(). Unlike the previously defined C11
|
||||
// keywords, it is not possible to implement this using exactly the same
|
||||
// syntax. Therefore implement something similar under the name
|
||||
// __generic(). Unlike _Generic(), this macro can only distinguish
|
||||
// between a single type, so it requires nested invocations to
|
||||
// distinguish multiple cases.
|
||||
|
||||
// C99 Static array indices in function parameter declarations. Syntax such as:
|
||||
// void bar(int myArray[static 10]);
|
||||
// is allowed in C99 but not in C++. Define __min_size appropriately so
|
||||
// headers using it can be compiled in either language. Use like this:
|
||||
// void bar(int myArray[__min_size(10)]);
|
||||
|
||||
// XXX: should use `#if __STDC_VERSION__ < 199901'.
|
||||
|
||||
// C++11 exposes a load of C99 stuff
|
||||
|
||||
// GCC 2.95 provides `__restrict' as an extension to C90 to support the
|
||||
// C99-specific `restrict' type qualifier. We happen to use `__restrict' as
|
||||
// a way to define the `restrict' type qualifier without disturbing older
|
||||
// software that is unaware of C99 keywords.
|
||||
|
||||
// GNU C version 2.96 adds explicit branch prediction so that
|
||||
// the CPU back-end can hint the processor and also so that
|
||||
// code blocks can be reordered such that the predicted path
|
||||
// sees a more linear flow, thus improving cache behavior, etc.
|
||||
//
|
||||
// The following two macros provide us with a way to utilize this
|
||||
// compiler feature. Use __predict_true() if you expect the expression
|
||||
// to evaluate to true, and __predict_false() if you expect the
|
||||
// expression to evaluate to false.
|
||||
//
|
||||
// A few notes about usage:
|
||||
//
|
||||
// * Generally, __predict_false() error condition checks (unless
|
||||
// you have some _strong_ reason to do otherwise, in which case
|
||||
// document it), and/or __predict_true() `no-error' condition
|
||||
// checks, assuming you want to optimize for the no-error case.
|
||||
//
|
||||
// * Other than that, if you don't know the likelihood of a test
|
||||
// succeeding from empirical or other `hard' evidence, don't
|
||||
// make predictions.
|
||||
//
|
||||
// * These are meant to be used in places that are run `a lot'.
|
||||
// It is wasteful to make predictions in code that is run
|
||||
// seldomly (e.g. at subsystem initialization time) as the
|
||||
// basic block reordering that this affects can often generate
|
||||
// larger code.
|
||||
|
||||
// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
|
||||
// require it.
|
||||
|
||||
// Given the pointer x to the member m of the struct s, return
|
||||
// a pointer to the containing structure. When using GCC, we first
|
||||
// assign pointer x to a local variable, to check that its type is
|
||||
// compatible with member m.
|
||||
|
||||
// Compiler-dependent macros to declare that functions take printf-like
|
||||
// or scanf-like arguments. They are null except for versions of gcc
|
||||
// that are known to support the features properly (old versions of gcc-2
|
||||
// didn't permit keeping the keywords out of the application namespace).
|
||||
|
||||
// Compiler-dependent macros that rely on FreeBSD-specific extensions.
|
||||
|
||||
// Embed the rcs id of a source file in the resulting library. Note that in
|
||||
// more recent ELF binutils, we use .ident allowing the ID to be stripped.
|
||||
// Usage:
|
||||
// __FBSDID("$FreeBSD$");
|
||||
|
||||
// -
|
||||
// The following definitions are an extension of the behavior originally
|
||||
// implemented in <sys/_posix.h>, but with a different level of granularity.
|
||||
// POSIX.1 requires that the macros we test be defined before any standard
|
||||
// header file is included.
|
||||
//
|
||||
// Here's a quick run-down of the versions:
|
||||
// defined(_POSIX_SOURCE) 1003.1-1988
|
||||
// _POSIX_C_SOURCE == 1 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
|
||||
// _POSIX_C_SOURCE == 199309 1003.1b-1993
|
||||
// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
|
||||
// and the omnibus ISO/IEC 9945-1: 1996
|
||||
// _POSIX_C_SOURCE == 200112 1003.1-2001
|
||||
// _POSIX_C_SOURCE == 200809 1003.1-2008
|
||||
//
|
||||
// In addition, the X/Open Portability Guide, which is now the Single UNIX
|
||||
// Specification, defines a feature-test macro which indicates the version of
|
||||
// that specification, and which subsumes _POSIX_C_SOURCE.
|
||||
//
|
||||
// Our macros begin with two underscores to avoid namespace screwage.
|
||||
|
||||
// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1.
|
||||
|
||||
// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2.
|
||||
|
||||
// Deal with various X/Open Portability Guides and Single UNIX Spec.
|
||||
|
||||
// Deal with all versions of POSIX. The ordering relative to the tests above is
|
||||
// important.
|
||||
// -
|
||||
// Deal with _ANSI_SOURCE:
|
||||
// If it is defined, and no other compilation environment is explicitly
|
||||
// requested, then define our internal feature-test macros to zero. This
|
||||
// makes no difference to the preprocessor (undefined symbols in preprocessing
|
||||
// expressions are defined to have value zero), but makes it more convenient for
|
||||
// a test program to print out the values.
|
||||
//
|
||||
// If a program mistakenly defines _ANSI_SOURCE and some other macro such as
|
||||
// _POSIX_C_SOURCE, we will assume that it wants the broader compilation
|
||||
// environment (and in fact we will never get here).
|
||||
|
||||
// User override __EXT1_VISIBLE
|
||||
|
||||
// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
|
||||
// translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
|
||||
|
||||
// Nullability qualifiers: currently only supported by Clang.
|
||||
|
||||
// Type Safety Checking
|
||||
//
|
||||
// Clang provides additional attributes to enable checking type safety
|
||||
// properties that cannot be enforced by the C type system.
|
||||
|
||||
// Lock annotations.
|
||||
//
|
||||
// Clang provides support for doing basic thread-safety tests at
|
||||
// compile-time, by marking which locks will/should be held when
|
||||
// entering/leaving a functions.
|
||||
//
|
||||
// Furthermore, it is also possible to annotate variables and structure
|
||||
// members to enforce that they are only accessed when certain locks are
|
||||
// held.
|
||||
|
||||
// Structure implements a lock.
|
||||
|
||||
// Function acquires an exclusive or shared lock.
|
||||
|
||||
// Function attempts to acquire an exclusive or shared lock.
|
||||
|
||||
// Function releases a lock.
|
||||
|
||||
// Function asserts that an exclusive or shared lock is held.
|
||||
|
||||
// Function requires that an exclusive or shared lock is or is not held.
|
||||
|
||||
// Function should not be analyzed.
|
||||
|
||||
// Function or variable should not be sanitized, e.g., by AddressSanitizer.
|
||||
// GCC has the nosanitize attribute, but as a function attribute only, and
|
||||
// warns on use as a variable attribute.
|
||||
|
||||
// Guard variables and structure members by lock.
|
||||
|
||||
// Alignment builtins for better type checking and improved code generation.
|
||||
// Provide fallback versions for other compilers (GCC/Clang < 10):
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-4-Clause
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. All advertising materials mentioning features or use of this software
|
||||
// must display the following acknowledgement:
|
||||
// This product includes software developed by the University of
|
||||
// California, Berkeley and its contributors.
|
||||
// 4. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
// From: @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
// $FreeBSD$
|
||||
|
||||
// Basic types upon which most other types are built.
|
||||
type X__int8_t = int8 /* _types.h:51:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:52:24 */
|
||||
type X__int16_t = int16 /* _types.h:53:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:54:25 */
|
||||
type X__int32_t = int32 /* _types.h:55:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:56:23 */
|
||||
|
||||
// LONGLONG
|
||||
type X__int64_t = int64 /* _types.h:61:20 */
|
||||
|
||||
// LONGLONG
|
||||
type X__uint64_t = uint64 /* _types.h:66:28 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__clock_t = X__uint32_t /* _types.h:71:20 */ // clock()...
|
||||
type X__critical_t = X__int32_t /* _types.h:72:19 */
|
||||
type X__double_t = float64 /* _types.h:74:17 */
|
||||
type X__float_t = float32 /* _types.h:75:16 */
|
||||
type X__intfptr_t = X__int32_t /* _types.h:77:19 */
|
||||
type X__intmax_t = X__int64_t /* _types.h:78:19 */
|
||||
type X__intptr_t = X__int32_t /* _types.h:79:19 */
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:80:19 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:81:19 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:82:19 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:83:19 */
|
||||
type X__int_least8_t = X__int8_t /* _types.h:84:18 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:85:19 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:86:19 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:87:19 */
|
||||
type X__ptrdiff_t = X__int32_t /* _types.h:88:19 */ // ptr1 - ptr2
|
||||
type X__register_t = X__int32_t /* _types.h:89:19 */
|
||||
type X__segsz_t = X__int32_t /* _types.h:90:19 */ // segment size (in pages)
|
||||
type X__size_t = X__uint32_t /* _types.h:91:20 */ // sizeof()
|
||||
type X__ssize_t = X__int32_t /* _types.h:92:19 */ // byte count or error
|
||||
type X__time_t = X__int64_t /* _types.h:93:19 */ // time()...
|
||||
type X__uintfptr_t = X__uint32_t /* _types.h:94:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:95:20 */
|
||||
type X__uintptr_t = X__uint32_t /* _types.h:96:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:97:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:98:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:99:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:100:20 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:101:19 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */
|
||||
type X__u_register_t = X__uint32_t /* _types.h:105:20 */
|
||||
type X__vm_offset_t = X__uint32_t /* _types.h:106:20 */
|
||||
type X__vm_paddr_t = X__uint32_t /* _types.h:107:20 */
|
||||
type X__vm_size_t = X__uint32_t /* _types.h:108:20 */
|
||||
|
||||
type X___wchar_t = uint32 /* _types.h:110:22 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count
|
||||
type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()...
|
||||
type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags
|
||||
type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
|
||||
type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
|
||||
type X__gid_t = X__uint32_t /* _types.h:46:20 */
|
||||
type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
|
||||
type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number
|
||||
type X__key_t = int32 /* _types.h:49:15 */ // IPC key (for Sys V IPC)
|
||||
type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
|
||||
type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions
|
||||
type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions
|
||||
type X__nl_item = int32 /* _types.h:53:14 */
|
||||
type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count
|
||||
type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset
|
||||
type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias)
|
||||
type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group]
|
||||
type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally
|
||||
// signed, because of legacy code
|
||||
// that uses -1 for RLIM_INFINITY
|
||||
type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
|
||||
type X__socklen_t = X__uint32_t /* _types.h:62:20 */
|
||||
type X__suseconds_t = int32 /* _types.h:63:15 */ // microseconds (signed)
|
||||
type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()...
|
||||
type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()...
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */
|
||||
type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned)
|
||||
type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset.
|
||||
type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset.
|
||||
type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier.
|
||||
type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
|
||||
|
||||
// Unusual type definitions.
|
||||
// rune_t is declared to be an “int” instead of the more natural
|
||||
// “unsigned long” or “long”. Two things are happening here. It is not
|
||||
// unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
|
||||
// it looks like 10646 will be a 31 bit standard. This means that if your
|
||||
// ints cannot hold 32 bits, you will be in trouble. The reason an int was
|
||||
// chosen over a long is that the is*() and to*() routines take ints (says
|
||||
// ANSI C), but they use __ct_rune_t instead of int.
|
||||
//
|
||||
// NOTE: rune_t is not covered by ANSI nor other standards, and should not
|
||||
// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
|
||||
// rune_t must be the same type. Also, wint_t should be able to hold all
|
||||
// members of the largest character set plus one extra value (WEOF), and
|
||||
// must be at least 16 bits.
|
||||
type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs
|
||||
type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
|
||||
type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
|
||||
|
||||
// Clang already provides these types as built-ins, but only in C++ mode.
|
||||
type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
|
||||
type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
|
||||
// In C++11, char16_t and char32_t are built-in types.
|
||||
|
||||
type X__max_align_t = struct {
|
||||
F__max_align1 int64
|
||||
F__max_align2 float64
|
||||
} /* _types.h:111:3 */
|
||||
|
||||
type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
|
||||
|
||||
type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state during multibyte
|
||||
// stream conversions.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]uint8
|
||||
} /* _types.h:124:3 */
|
||||
|
||||
type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
|
||||
|
||||
// Types for varargs. These are all provided by builtin types these
|
||||
// days, so centralize their definition.
|
||||
type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
|
||||
type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers
|
||||
|
||||
// When the following macro is defined, the system uses 64-bit inode numbers.
|
||||
// Programs can use this to avoid including <sys/param.h>, with its associated
|
||||
// namespace pollution.
|
||||
|
||||
type Mode_t = X__mode_t /* fcntl.h:53:18 */
|
||||
|
||||
type Off_t = X__off_t /* fcntl.h:58:18 */
|
||||
|
||||
type Pid_t = X__pid_t /* fcntl.h:63:18 */
|
||||
|
||||
// File status flags: these are used by open(2), fcntl(2).
|
||||
// They are also used (indirectly) in the kernel file structure f_flags,
|
||||
// which is a superset of the open/fcntl flags. Open flags and f_flags
|
||||
// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
|
||||
// Open/fcntl flags begin with O_; kernel-internal flags begin with F.
|
||||
// open-only flags
|
||||
|
||||
// Kernel encoding of open mode; separate read and write bits that are
|
||||
// independently testable: 1 greater than the above.
|
||||
//
|
||||
// XXX
|
||||
// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
|
||||
// which was documented to use FREAD/FWRITE, continues to work.
|
||||
|
||||
// Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY.
|
||||
|
||||
// Attempt to bypass buffer cache
|
||||
|
||||
// Defined by POSIX 1003.1-2008; BSD default, but reserve for future use.
|
||||
|
||||
// XXX missing O_RSYNC.
|
||||
|
||||
// The O_* flags used to have only F* names, which were used in the kernel
|
||||
// and by fcntl. We retain the F* names for the kernel f_flag field
|
||||
// and for backward compatibility for fcntl. These flags are deprecated.
|
||||
|
||||
// Historically, we ran out of bits in f_flag (which was once a short).
|
||||
// However, the flag bits not set in FMASK are only meaningful in the
|
||||
// initial open syscall. Those bits were thus given a
|
||||
// different meaning for fcntl(2).
|
||||
// Read ahead
|
||||
|
||||
// Magic value that specify the use of the current working directory
|
||||
// to determine the target of relative file paths in the openat() and
|
||||
// similar syscalls.
|
||||
|
||||
// Miscellaneous flags for the *at() syscalls.
|
||||
/* #define AT_UNUSED1 0x1000 */ // Was AT_BENEATH
|
||||
|
||||
// Constants used for fcntl(2)
|
||||
|
||||
// command values
|
||||
|
||||
// Seals (F_ADD_SEALS, F_GET_SEALS).
|
||||
|
||||
// file descriptor flags (F_GETFD, F_SETFD)
|
||||
|
||||
// record locking flags (F_GETLK, F_SETLK, F_SETLKW)
|
||||
|
||||
// Advisory file segment locking data type -
|
||||
// information passed to system by user
|
||||
type Flock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
Fl_sysid int32
|
||||
F__ccgo_pad1 [4]byte
|
||||
} /* fcntl.h:306:1 */
|
||||
|
||||
// Old advisory file segment locking data type,
|
||||
// before adding l_sysid.
|
||||
type X__oflock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
} /* fcntl.h:320:1 */
|
||||
|
||||
var _ uint8 /* gen.c:2:13: */
|
775
fcntl/fcntl_freebsd_arm64.go
Normal file
775
fcntl/fcntl_freebsd_arm64.go
Normal file
|
@ -0,0 +1,775 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_freebsd_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x0100 // fcntl.h:224:1:
|
||||
AT_EMPTY_PATH = 0x4000 // fcntl.h:234:1:
|
||||
AT_FDCWD = -100 // fcntl.h:219:1:
|
||||
AT_REMOVEDIR = 0x0800 // fcntl.h:228:1:
|
||||
AT_RESOLVE_BENEATH = 0x2000 // fcntl.h:232:1:
|
||||
AT_SYMLINK_FOLLOW = 0x0400 // fcntl.h:227:1:
|
||||
AT_SYMLINK_NOFOLLOW = 0x0200 // fcntl.h:226:1:
|
||||
FAPPEND = 8 // fcntl.h:193:1:
|
||||
FASYNC = 64 // fcntl.h:194:1:
|
||||
FDSYNC = 16777216 // fcntl.h:196:1:
|
||||
FD_CLOEXEC = 1 // fcntl.h:283:1:
|
||||
FD_NONE = -200 // fcntl.h:355:1:
|
||||
FFSYNC = 128 // fcntl.h:195:1:
|
||||
FNDELAY = 4 // fcntl.h:198:1:
|
||||
FNONBLOCK = 4 // fcntl.h:197:1:
|
||||
FRDAHEAD = 512 // fcntl.h:210:1:
|
||||
FREAD = 0x0001 // fcntl.h:89:1:
|
||||
FWRITE = 0x0002 // fcntl.h:90:1:
|
||||
F_ADD_SEALS = 19 // fcntl.h:270:1:
|
||||
F_CANCEL = 5 // fcntl.h:291:1:
|
||||
F_DUP2FD = 10 // fcntl.h:255:1:
|
||||
F_DUP2FD_CLOEXEC = 18 // fcntl.h:269:1:
|
||||
F_DUPFD = 0 // fcntl.h:242:1:
|
||||
F_DUPFD_CLOEXEC = 17 // fcntl.h:266:1:
|
||||
F_GETFD = 1 // fcntl.h:243:1:
|
||||
F_GETFL = 3 // fcntl.h:245:1:
|
||||
F_GETLK = 11 // fcntl.h:257:1:
|
||||
F_GETOWN = 5 // fcntl.h:248:1:
|
||||
F_GET_SEALS = 20 // fcntl.h:271:1:
|
||||
F_ISUNIONSTACK = 21 // fcntl.h:272:1:
|
||||
F_KINFO = 22 // fcntl.h:273:1:
|
||||
F_OGETLK = 7 // fcntl.h:252:1:
|
||||
F_OSETLK = 8 // fcntl.h:253:1:
|
||||
F_OSETLKW = 9 // fcntl.h:254:1:
|
||||
F_RDAHEAD = 16 // fcntl.h:263:1:
|
||||
F_RDLCK = 1 // fcntl.h:286:1:
|
||||
F_READAHEAD = 15 // fcntl.h:262:1:
|
||||
F_SEAL_GROW = 0x0004 // fcntl.h:278:1:
|
||||
F_SEAL_SEAL = 0x0001 // fcntl.h:276:1:
|
||||
F_SEAL_SHRINK = 0x0002 // fcntl.h:277:1:
|
||||
F_SEAL_WRITE = 0x0008 // fcntl.h:279:1:
|
||||
F_SETFD = 2 // fcntl.h:244:1:
|
||||
F_SETFL = 4 // fcntl.h:246:1:
|
||||
F_SETLK = 12 // fcntl.h:258:1:
|
||||
F_SETLKW = 13 // fcntl.h:259:1:
|
||||
F_SETLK_REMOTE = 14 // fcntl.h:261:1:
|
||||
F_SETOWN = 6 // fcntl.h:249:1:
|
||||
F_UNLCK = 2 // fcntl.h:287:1:
|
||||
F_UNLCKSYS = 4 // fcntl.h:290:1:
|
||||
F_WRLCK = 3 // fcntl.h:288:1:
|
||||
LOCK_EX = 0x02 // fcntl.h:332:1:
|
||||
LOCK_NB = 0x04 // fcntl.h:333:1:
|
||||
LOCK_SH = 0x01 // fcntl.h:331:1:
|
||||
LOCK_UN = 0x08 // fcntl.h:334:1:
|
||||
O_ACCMODE = 0x0003 // fcntl.h:78:1:
|
||||
O_APPEND = 0x0008 // fcntl.h:93:1:
|
||||
O_ASYNC = 0x0040 // fcntl.h:97:1:
|
||||
O_CLOEXEC = 0x00100000 // fcntl.h:133:1:
|
||||
O_CREAT = 0x0200 // fcntl.h:104:1:
|
||||
O_DIRECT = 0x00010000 // fcntl.h:116:1:
|
||||
O_DIRECTORY = 0x00020000 // fcntl.h:120:1:
|
||||
O_DSYNC = 0x01000000 // fcntl.h:143:1:
|
||||
O_EMPTY_PATH = 0x02000000 // fcntl.h:145:1:
|
||||
O_EXCL = 0x0800 // fcntl.h:106:1:
|
||||
O_EXEC = 0x00040000 // fcntl.h:121:1:
|
||||
O_EXLOCK = 0x0020 // fcntl.h:96:1:
|
||||
O_FSYNC = 0x0080 // fcntl.h:98:1:
|
||||
O_NDELAY = 4 // fcntl.h:199:1:
|
||||
O_NOCTTY = 0x8000 // fcntl.h:112:1:
|
||||
O_NOFOLLOW = 0x0100 // fcntl.h:102:1:
|
||||
O_NONBLOCK = 0x0004 // fcntl.h:92:1:
|
||||
O_PATH = 0x00400000 // fcntl.h:138:1:
|
||||
O_RDONLY = 0x0000 // fcntl.h:75:1:
|
||||
O_RDWR = 0x0002 // fcntl.h:77:1:
|
||||
O_RESOLVE_BENEATH = 0x00800000 // fcntl.h:139:1:
|
||||
O_SEARCH = 262144 // fcntl.h:122:1:
|
||||
O_SHLOCK = 0x0010 // fcntl.h:95:1:
|
||||
O_SYNC = 0x0080 // fcntl.h:100:1:
|
||||
O_TRUNC = 0x0400 // fcntl.h:105:1:
|
||||
O_TTY_INIT = 0x00080000 // fcntl.h:131:1:
|
||||
O_VERIFY = 0x00200000 // fcntl.h:137:1:
|
||||
O_WRONLY = 0x0001 // fcntl.h:76:1:
|
||||
POSIX_FADV_DONTNEED = 4 // fcntl.h:345:1:
|
||||
POSIX_FADV_NOREUSE = 5 // fcntl.h:346:1:
|
||||
POSIX_FADV_NORMAL = 0 // fcntl.h:341:1:
|
||||
POSIX_FADV_RANDOM = 1 // fcntl.h:342:1:
|
||||
POSIX_FADV_SEQUENTIAL = 2 // fcntl.h:343:1:
|
||||
POSIX_FADV_WILLNEED = 3 // fcntl.h:344:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHINE__LIMITS_H_ = 0 // _limits.h:36:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:42:1:
|
||||
X_MODE_T_DECLARED = 0 // fcntl.h:54:1:
|
||||
X_Nonnull = 0 // cdefs.h:790:1:
|
||||
X_Null_unspecified = 0 // cdefs.h:792:1:
|
||||
X_Nullable = 0 // cdefs.h:791:1:
|
||||
X_OFF_T_DECLARED = 0 // fcntl.h:59:1:
|
||||
X_PID_T_DECLARED = 0 // fcntl.h:64:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:32:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1983, 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)fcntl.h 8.3 (Berkeley) 1/21/94
|
||||
// $FreeBSD$
|
||||
|
||||
// This file includes the definitions for open and fcntl
|
||||
// described by POSIX for <fcntl.h>; it also includes
|
||||
// related kernel definitions.
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
|
||||
// Testing against Clang-specific extensions.
|
||||
|
||||
// This code has been put in place to help reduce the addition of
|
||||
// compiler specific defines in FreeBSD code. It helps to aid in
|
||||
// having a compiler-agnostic source tree.
|
||||
|
||||
// Compiler memory barriers, specific to gcc and clang.
|
||||
|
||||
// XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
|
||||
// mode -- there must be no spaces between its arguments, and for nested
|
||||
// __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also
|
||||
// concatenate double-quoted strings produced by the __STRING macro, but
|
||||
// this only works with ANSI C.
|
||||
//
|
||||
// __XSTRING is like __STRING, but it expands any macros in its argument
|
||||
// first. It is only available with ANSI C.
|
||||
|
||||
// Compiler-dependent macros to help declare dead (non-returning) and
|
||||
// pure (no side effects) functions, and unused variables. They are
|
||||
// null except for versions of gcc that are known to support the features
|
||||
// properly (old versions of gcc-2 supported the dead and pure features
|
||||
// in a different (wrong) way). If we do not provide an implementation
|
||||
// for a given compiler, let the compile fail if it is told to use
|
||||
// a feature that we cannot live without.
|
||||
|
||||
// Keywords added in C11.
|
||||
|
||||
// Emulation of C11 _Generic(). Unlike the previously defined C11
|
||||
// keywords, it is not possible to implement this using exactly the same
|
||||
// syntax. Therefore implement something similar under the name
|
||||
// __generic(). Unlike _Generic(), this macro can only distinguish
|
||||
// between a single type, so it requires nested invocations to
|
||||
// distinguish multiple cases.
|
||||
|
||||
// C99 Static array indices in function parameter declarations. Syntax such as:
|
||||
// void bar(int myArray[static 10]);
|
||||
// is allowed in C99 but not in C++. Define __min_size appropriately so
|
||||
// headers using it can be compiled in either language. Use like this:
|
||||
// void bar(int myArray[__min_size(10)]);
|
||||
|
||||
// XXX: should use `#if __STDC_VERSION__ < 199901'.
|
||||
|
||||
// C++11 exposes a load of C99 stuff
|
||||
|
||||
// GCC 2.95 provides `__restrict' as an extension to C90 to support the
|
||||
// C99-specific `restrict' type qualifier. We happen to use `__restrict' as
|
||||
// a way to define the `restrict' type qualifier without disturbing older
|
||||
// software that is unaware of C99 keywords.
|
||||
|
||||
// GNU C version 2.96 adds explicit branch prediction so that
|
||||
// the CPU back-end can hint the processor and also so that
|
||||
// code blocks can be reordered such that the predicted path
|
||||
// sees a more linear flow, thus improving cache behavior, etc.
|
||||
//
|
||||
// The following two macros provide us with a way to utilize this
|
||||
// compiler feature. Use __predict_true() if you expect the expression
|
||||
// to evaluate to true, and __predict_false() if you expect the
|
||||
// expression to evaluate to false.
|
||||
//
|
||||
// A few notes about usage:
|
||||
//
|
||||
// * Generally, __predict_false() error condition checks (unless
|
||||
// you have some _strong_ reason to do otherwise, in which case
|
||||
// document it), and/or __predict_true() `no-error' condition
|
||||
// checks, assuming you want to optimize for the no-error case.
|
||||
//
|
||||
// * Other than that, if you don't know the likelihood of a test
|
||||
// succeeding from empirical or other `hard' evidence, don't
|
||||
// make predictions.
|
||||
//
|
||||
// * These are meant to be used in places that are run `a lot'.
|
||||
// It is wasteful to make predictions in code that is run
|
||||
// seldomly (e.g. at subsystem initialization time) as the
|
||||
// basic block reordering that this affects can often generate
|
||||
// larger code.
|
||||
|
||||
// We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
|
||||
// require it.
|
||||
|
||||
// Given the pointer x to the member m of the struct s, return
|
||||
// a pointer to the containing structure. When using GCC, we first
|
||||
// assign pointer x to a local variable, to check that its type is
|
||||
// compatible with member m.
|
||||
|
||||
// Compiler-dependent macros to declare that functions take printf-like
|
||||
// or scanf-like arguments. They are null except for versions of gcc
|
||||
// that are known to support the features properly (old versions of gcc-2
|
||||
// didn't permit keeping the keywords out of the application namespace).
|
||||
|
||||
// Compiler-dependent macros that rely on FreeBSD-specific extensions.
|
||||
|
||||
// Embed the rcs id of a source file in the resulting library. Note that in
|
||||
// more recent ELF binutils, we use .ident allowing the ID to be stripped.
|
||||
// Usage:
|
||||
// __FBSDID("$FreeBSD$");
|
||||
|
||||
// -
|
||||
// The following definitions are an extension of the behavior originally
|
||||
// implemented in <sys/_posix.h>, but with a different level of granularity.
|
||||
// POSIX.1 requires that the macros we test be defined before any standard
|
||||
// header file is included.
|
||||
//
|
||||
// Here's a quick run-down of the versions:
|
||||
// defined(_POSIX_SOURCE) 1003.1-1988
|
||||
// _POSIX_C_SOURCE == 1 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
|
||||
// _POSIX_C_SOURCE == 199309 1003.1b-1993
|
||||
// _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
|
||||
// and the omnibus ISO/IEC 9945-1: 1996
|
||||
// _POSIX_C_SOURCE == 200112 1003.1-2001
|
||||
// _POSIX_C_SOURCE == 200809 1003.1-2008
|
||||
//
|
||||
// In addition, the X/Open Portability Guide, which is now the Single UNIX
|
||||
// Specification, defines a feature-test macro which indicates the version of
|
||||
// that specification, and which subsumes _POSIX_C_SOURCE.
|
||||
//
|
||||
// Our macros begin with two underscores to avoid namespace screwage.
|
||||
|
||||
// Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1.
|
||||
|
||||
// Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2.
|
||||
|
||||
// Deal with various X/Open Portability Guides and Single UNIX Spec.
|
||||
|
||||
// Deal with all versions of POSIX. The ordering relative to the tests above is
|
||||
// important.
|
||||
// -
|
||||
// Deal with _ANSI_SOURCE:
|
||||
// If it is defined, and no other compilation environment is explicitly
|
||||
// requested, then define our internal feature-test macros to zero. This
|
||||
// makes no difference to the preprocessor (undefined symbols in preprocessing
|
||||
// expressions are defined to have value zero), but makes it more convenient for
|
||||
// a test program to print out the values.
|
||||
//
|
||||
// If a program mistakenly defines _ANSI_SOURCE and some other macro such as
|
||||
// _POSIX_C_SOURCE, we will assume that it wants the broader compilation
|
||||
// environment (and in fact we will never get here).
|
||||
|
||||
// User override __EXT1_VISIBLE
|
||||
|
||||
// Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
|
||||
// translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
|
||||
|
||||
// Nullability qualifiers: currently only supported by Clang.
|
||||
|
||||
// Type Safety Checking
|
||||
//
|
||||
// Clang provides additional attributes to enable checking type safety
|
||||
// properties that cannot be enforced by the C type system.
|
||||
|
||||
// Lock annotations.
|
||||
//
|
||||
// Clang provides support for doing basic thread-safety tests at
|
||||
// compile-time, by marking which locks will/should be held when
|
||||
// entering/leaving a functions.
|
||||
//
|
||||
// Furthermore, it is also possible to annotate variables and structure
|
||||
// members to enforce that they are only accessed when certain locks are
|
||||
// held.
|
||||
|
||||
// Structure implements a lock.
|
||||
|
||||
// Function acquires an exclusive or shared lock.
|
||||
|
||||
// Function attempts to acquire an exclusive or shared lock.
|
||||
|
||||
// Function releases a lock.
|
||||
|
||||
// Function asserts that an exclusive or shared lock is held.
|
||||
|
||||
// Function requires that an exclusive or shared lock is or is not held.
|
||||
|
||||
// Function should not be analyzed.
|
||||
|
||||
// Function or variable should not be sanitized, e.g., by AddressSanitizer.
|
||||
// GCC has the nosanitize attribute, but as a function attribute only, and
|
||||
// warns on use as a variable attribute.
|
||||
|
||||
// Guard variables and structure members by lock.
|
||||
|
||||
// Alignment builtins for better type checking and improved code generation.
|
||||
// Provide fallback versions for other compilers (GCC/Clang < 10):
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// This file is in the public domain.
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-4-Clause
|
||||
//
|
||||
// Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. All advertising materials mentioning features or use of this software
|
||||
// must display the following acknowledgement:
|
||||
// This product includes software developed by the University of
|
||||
// California, Berkeley and its contributors.
|
||||
// 4. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
// From: @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// This file is in the public domain.
|
||||
// $FreeBSD$
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
//
|
||||
// Copyright (c) 1988, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)limits.h 8.3 (Berkeley) 1/4/94
|
||||
// $FreeBSD$
|
||||
|
||||
// According to ANSI (section 2.2.4.2), the values below must be usable by
|
||||
// #if preprocessing directives. Additionally, the expression must have the
|
||||
// same type as would an expression that is an object of the corresponding
|
||||
// type converted according to the integral promotions. The subtraction for
|
||||
// INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
|
||||
// unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
|
||||
|
||||
// max value for an unsigned long long
|
||||
|
||||
// Quads and longs are the same on the amd64. Ensure they stay in sync.
|
||||
|
||||
// Minimum signal stack size.
|
||||
|
||||
// Basic types upon which most other types are built.
|
||||
type X__int8_t = int8 /* _types.h:55:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:56:24 */
|
||||
type X__int16_t = int16 /* _types.h:57:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:58:25 */
|
||||
type X__int32_t = int32 /* _types.h:59:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:60:23 */
|
||||
type X__int64_t = int64 /* _types.h:62:16 */
|
||||
type X__uint64_t = uint64 /* _types.h:63:24 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__clock_t = X__int32_t /* _types.h:75:19 */ // clock()...
|
||||
type X__critical_t = X__int64_t /* _types.h:76:19 */
|
||||
type X__double_t = float64 /* _types.h:78:17 */
|
||||
type X__float_t = float32 /* _types.h:79:16 */
|
||||
type X__intfptr_t = X__int64_t /* _types.h:81:19 */
|
||||
type X__intptr_t = X__int64_t /* _types.h:82:19 */
|
||||
type X__intmax_t = X__int64_t /* _types.h:93:19 */
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:94:19 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:95:19 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:96:19 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:97:19 */
|
||||
type X__int_least8_t = X__int8_t /* _types.h:98:18 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:99:19 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:100:19 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:101:19 */
|
||||
type X__ptrdiff_t = X__int64_t /* _types.h:103:19 */ // ptr1 - ptr2
|
||||
type X__register_t = X__int64_t /* _types.h:104:19 */
|
||||
type X__segsz_t = X__int64_t /* _types.h:105:19 */ // segment size (in pages)
|
||||
type X__size_t = X__uint64_t /* _types.h:106:20 */ // sizeof()
|
||||
type X__ssize_t = X__int64_t /* _types.h:107:19 */ // byte count or error
|
||||
type X__time_t = X__int64_t /* _types.h:108:19 */ // time()...
|
||||
type X__uintfptr_t = X__uint64_t /* _types.h:109:20 */
|
||||
type X__uintptr_t = X__uint64_t /* _types.h:110:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:121:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:122:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:123:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:124:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:125:20 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:126:19 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */
|
||||
type X__u_register_t = X__uint64_t /* _types.h:131:20 */
|
||||
type X__vm_offset_t = X__uint64_t /* _types.h:132:20 */
|
||||
type X__vm_paddr_t = X__uint64_t /* _types.h:133:20 */
|
||||
type X__vm_size_t = X__uint64_t /* _types.h:134:20 */
|
||||
type X___wchar_t = int32 /* _types.h:141:14 */
|
||||
|
||||
// Standard type definitions.
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // file block size
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:41:19 */ // file block count
|
||||
type X__clockid_t = X__int32_t /* _types.h:42:19 */ // clock_gettime()...
|
||||
type X__fflags_t = X__uint32_t /* _types.h:43:20 */ // file flags
|
||||
type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
|
||||
type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
|
||||
type X__gid_t = X__uint32_t /* _types.h:46:20 */
|
||||
type X__id_t = X__int64_t /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
|
||||
type X__ino_t = X__uint64_t /* _types.h:48:20 */ // inode number
|
||||
type X__key_t = int64 /* _types.h:49:15 */ // IPC key (for Sys V IPC)
|
||||
type X__lwpid_t = X__int32_t /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
|
||||
type X__mode_t = X__uint16_t /* _types.h:51:20 */ // permissions
|
||||
type X__accmode_t = int32 /* _types.h:52:14 */ // access permissions
|
||||
type X__nl_item = int32 /* _types.h:53:14 */
|
||||
type X__nlink_t = X__uint64_t /* _types.h:54:20 */ // link count
|
||||
type X__off_t = X__int64_t /* _types.h:55:19 */ // file offset
|
||||
type X__off64_t = X__int64_t /* _types.h:56:19 */ // file offset (alias)
|
||||
type X__pid_t = X__int32_t /* _types.h:57:19 */ // process [group]
|
||||
type X__rlim_t = X__int64_t /* _types.h:58:19 */ // resource limit - intentionally
|
||||
// signed, because of legacy code
|
||||
// that uses -1 for RLIM_INFINITY
|
||||
type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
|
||||
type X__socklen_t = X__uint32_t /* _types.h:62:20 */
|
||||
type X__suseconds_t = int64 /* _types.h:63:15 */ // microseconds (signed)
|
||||
type X__timer_t = uintptr /* _types.h:64:24 */ // timer_gettime()...
|
||||
type X__mqd_t = uintptr /* _types.h:65:21 */ // mq_open()...
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */
|
||||
type X__useconds_t = uint32 /* _types.h:67:22 */ // microseconds (unsigned)
|
||||
type X__cpuwhich_t = int32 /* _types.h:68:14 */ // which parameter for cpuset.
|
||||
type X__cpulevel_t = int32 /* _types.h:69:14 */ // level parameter for cpuset.
|
||||
type X__cpusetid_t = int32 /* _types.h:70:14 */ // cpuset identifier.
|
||||
type X__daddr_t = X__int64_t /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
|
||||
|
||||
// Unusual type definitions.
|
||||
// rune_t is declared to be an “int” instead of the more natural
|
||||
// “unsigned long” or “long”. Two things are happening here. It is not
|
||||
// unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
|
||||
// it looks like 10646 will be a 31 bit standard. This means that if your
|
||||
// ints cannot hold 32 bits, you will be in trouble. The reason an int was
|
||||
// chosen over a long is that the is*() and to*() routines take ints (says
|
||||
// ANSI C), but they use __ct_rune_t instead of int.
|
||||
//
|
||||
// NOTE: rune_t is not covered by ANSI nor other standards, and should not
|
||||
// be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
|
||||
// rune_t must be the same type. Also, wint_t should be able to hold all
|
||||
// members of the largest character set plus one extra value (WEOF), and
|
||||
// must be at least 16 bits.
|
||||
type X__ct_rune_t = int32 /* _types.h:91:14 */ // arg type for ctype funcs
|
||||
type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
|
||||
type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
|
||||
|
||||
// Clang already provides these types as built-ins, but only in C++ mode.
|
||||
type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
|
||||
type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
|
||||
// In C++11, char16_t and char32_t are built-in types.
|
||||
|
||||
type X__max_align_t = struct {
|
||||
F__max_align1 int64
|
||||
F__max_align2 float64
|
||||
} /* _types.h:111:3 */
|
||||
|
||||
type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
|
||||
|
||||
type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state during multibyte
|
||||
// stream conversions.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:124:3 */
|
||||
|
||||
type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
|
||||
|
||||
// Types for varargs. These are all provided by builtin types these
|
||||
// days, so centralize their definition.
|
||||
type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
|
||||
type X__gnuc_va_list = X__va_list /* _types.h:140:20 */ // compatibility w/GNU headers
|
||||
|
||||
// When the following macro is defined, the system uses 64-bit inode numbers.
|
||||
// Programs can use this to avoid including <sys/param.h>, with its associated
|
||||
// namespace pollution.
|
||||
|
||||
type Mode_t = X__mode_t /* fcntl.h:53:18 */
|
||||
|
||||
type Off_t = X__off_t /* fcntl.h:58:18 */
|
||||
|
||||
type Pid_t = X__pid_t /* fcntl.h:63:18 */
|
||||
|
||||
// File status flags: these are used by open(2), fcntl(2).
|
||||
// They are also used (indirectly) in the kernel file structure f_flags,
|
||||
// which is a superset of the open/fcntl flags. Open flags and f_flags
|
||||
// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
|
||||
// Open/fcntl flags begin with O_; kernel-internal flags begin with F.
|
||||
// open-only flags
|
||||
|
||||
// Kernel encoding of open mode; separate read and write bits that are
|
||||
// independently testable: 1 greater than the above.
|
||||
//
|
||||
// XXX
|
||||
// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
|
||||
// which was documented to use FREAD/FWRITE, continues to work.
|
||||
|
||||
// Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY.
|
||||
|
||||
// Attempt to bypass buffer cache
|
||||
|
||||
// Defined by POSIX 1003.1-2008; BSD default, but reserve for future use.
|
||||
|
||||
// XXX missing O_RSYNC.
|
||||
|
||||
// The O_* flags used to have only F* names, which were used in the kernel
|
||||
// and by fcntl. We retain the F* names for the kernel f_flag field
|
||||
// and for backward compatibility for fcntl. These flags are deprecated.
|
||||
|
||||
// Historically, we ran out of bits in f_flag (which was once a short).
|
||||
// However, the flag bits not set in FMASK are only meaningful in the
|
||||
// initial open syscall. Those bits were thus given a
|
||||
// different meaning for fcntl(2).
|
||||
// Read ahead
|
||||
|
||||
// Magic value that specify the use of the current working directory
|
||||
// to determine the target of relative file paths in the openat() and
|
||||
// similar syscalls.
|
||||
|
||||
// Miscellaneous flags for the *at() syscalls.
|
||||
/* #define AT_UNUSED1 0x1000 */ // Was AT_BENEATH
|
||||
|
||||
// Constants used for fcntl(2)
|
||||
|
||||
// command values
|
||||
|
||||
// Seals (F_ADD_SEALS, F_GET_SEALS).
|
||||
|
||||
// file descriptor flags (F_GETFD, F_SETFD)
|
||||
|
||||
// record locking flags (F_GETLK, F_SETLK, F_SETLKW)
|
||||
|
||||
// Advisory file segment locking data type -
|
||||
// information passed to system by user
|
||||
type Flock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
Fl_sysid int32
|
||||
F__ccgo_pad1 [4]byte
|
||||
} /* fcntl.h:306:1 */
|
||||
|
||||
// Old advisory file segment locking data type,
|
||||
// before adding l_sysid.
|
||||
type X__oflock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
} /* fcntl.h:320:1 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
3242
fcntl/fcntl_illumos_amd64.go
Normal file
3242
fcntl/fcntl_illumos_amd64.go
Normal file
File diff suppressed because it is too large
Load diff
1073
fcntl/fcntl_linux_386.go
Normal file
1073
fcntl/fcntl_linux_386.go
Normal file
File diff suppressed because it is too large
Load diff
1087
fcntl/fcntl_linux_amd64.go
Normal file
1087
fcntl/fcntl_linux_amd64.go
Normal file
File diff suppressed because it is too large
Load diff
1135
fcntl/fcntl_linux_arm.go
Normal file
1135
fcntl/fcntl_linux_arm.go
Normal file
File diff suppressed because it is too large
Load diff
1199
fcntl/fcntl_linux_arm64.go
Normal file
1199
fcntl/fcntl_linux_arm64.go
Normal file
File diff suppressed because it is too large
Load diff
1332
fcntl/fcntl_linux_loong64.go
Normal file
1332
fcntl/fcntl_linux_loong64.go
Normal file
File diff suppressed because it is too large
Load diff
1087
fcntl/fcntl_linux_mips64le.go
Normal file
1087
fcntl/fcntl_linux_mips64le.go
Normal file
File diff suppressed because it is too large
Load diff
1107
fcntl/fcntl_linux_ppc64le.go
Normal file
1107
fcntl/fcntl_linux_ppc64le.go
Normal file
File diff suppressed because it is too large
Load diff
1350
fcntl/fcntl_linux_riscv64.go
Normal file
1350
fcntl/fcntl_linux_riscv64.go
Normal file
File diff suppressed because it is too large
Load diff
1092
fcntl/fcntl_linux_s390x.go
Normal file
1092
fcntl/fcntl_linux_s390x.go
Normal file
File diff suppressed because it is too large
Load diff
1481
fcntl/fcntl_netbsd_amd64.go
Normal file
1481
fcntl/fcntl_netbsd_amd64.go
Normal file
File diff suppressed because it is too large
Load diff
1455
fcntl/fcntl_netbsd_arm.go
Normal file
1455
fcntl/fcntl_netbsd_arm.go
Normal file
File diff suppressed because it is too large
Load diff
816
fcntl/fcntl_openbsd_386.go
Normal file
816
fcntl/fcntl_openbsd_386.go
Normal file
|
@ -0,0 +1,816 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_openbsd_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x01 // fcntl.h:200:1:
|
||||
AT_FDCWD = -100 // fcntl.h:198:1:
|
||||
AT_REMOVEDIR = 0x08 // fcntl.h:203:1:
|
||||
AT_SYMLINK_FOLLOW = 0x04 // fcntl.h:202:1:
|
||||
AT_SYMLINK_NOFOLLOW = 0x02 // fcntl.h:201:1:
|
||||
BIG_ENDIAN = 4321 // endian.h:45:1:
|
||||
BYTE_ORDER = 1234 // endian.h:47:1:
|
||||
FAPPEND = 8 // fcntl.h:130:1:
|
||||
FASYNC = 64 // fcntl.h:131:1:
|
||||
FD_CLOEXEC = 1 // fcntl.h:163:1:
|
||||
FFSYNC = 128 // fcntl.h:132:1:
|
||||
FNDELAY = 4 // fcntl.h:134:1:
|
||||
FNONBLOCK = 4 // fcntl.h:133:1:
|
||||
FREAD = 0x0001 // fcntl.h:76:1:
|
||||
FWRITE = 0x0002 // fcntl.h:77:1:
|
||||
F_DUPFD = 0 // fcntl.h:143:1:
|
||||
F_DUPFD_CLOEXEC = 10 // fcntl.h:156:1:
|
||||
F_GETFD = 1 // fcntl.h:144:1:
|
||||
F_GETFL = 3 // fcntl.h:146:1:
|
||||
F_GETLK = 7 // fcntl.h:152:1:
|
||||
F_GETOWN = 5 // fcntl.h:149:1:
|
||||
F_ISATTY = 11 // fcntl.h:159:1:
|
||||
F_RDLCK = 1 // fcntl.h:166:1:
|
||||
F_SETFD = 2 // fcntl.h:145:1:
|
||||
F_SETFL = 4 // fcntl.h:147:1:
|
||||
F_SETLK = 8 // fcntl.h:153:1:
|
||||
F_SETLKW = 9 // fcntl.h:154:1:
|
||||
F_SETOWN = 6 // fcntl.h:150:1:
|
||||
F_UNLCK = 2 // fcntl.h:167:1:
|
||||
F_WRLCK = 3 // fcntl.h:168:1:
|
||||
LITTLE_ENDIAN = 1234 // endian.h:44:1:
|
||||
LOCK_EX = 0x02 // fcntl.h:192:1:
|
||||
LOCK_NB = 0x04 // fcntl.h:193:1:
|
||||
LOCK_SH = 0x01 // fcntl.h:191:1:
|
||||
LOCK_UN = 0x08 // fcntl.h:194:1:
|
||||
O_ACCMODE = 0x0003 // fcntl.h:65:1:
|
||||
O_APPEND = 0x0008 // fcntl.h:80:1:
|
||||
O_ASYNC = 0x0040 // fcntl.h:84:1:
|
||||
O_CLOEXEC = 0x10000 // fcntl.h:107:1:
|
||||
O_CREAT = 0x0200 // fcntl.h:91:1:
|
||||
O_DIRECTORY = 0x20000 // fcntl.h:108:1:
|
||||
O_DSYNC = 128 // fcntl.h:100:1:
|
||||
O_EXCL = 0x0800 // fcntl.h:93:1:
|
||||
O_EXLOCK = 0x0020 // fcntl.h:83:1:
|
||||
O_FSYNC = 0x0080 // fcntl.h:85:1:
|
||||
O_NDELAY = 4 // fcntl.h:135:1:
|
||||
O_NOCTTY = 0x8000 // fcntl.h:104:1:
|
||||
O_NOFOLLOW = 0x0100 // fcntl.h:86:1:
|
||||
O_NONBLOCK = 0x0004 // fcntl.h:79:1:
|
||||
O_RDONLY = 0x0000 // fcntl.h:62:1:
|
||||
O_RDWR = 0x0002 // fcntl.h:64:1:
|
||||
O_RSYNC = 128 // fcntl.h:101:1:
|
||||
O_SHLOCK = 0x0010 // fcntl.h:82:1:
|
||||
O_SYNC = 0x0080 // fcntl.h:89:1:
|
||||
O_TRUNC = 0x0400 // fcntl.h:92:1:
|
||||
O_WRONLY = 0x0001 // fcntl.h:63:1:
|
||||
PDP_ENDIAN = 3412 // endian.h:46:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:58:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_ILP32 = 1 // <predefined>:1:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
X_INT32_T_DEFINED_ = 0 // types.h:94:1:
|
||||
X_INT64_T_DEFINED_ = 0 // types.h:104:1:
|
||||
X_INT8_T_DEFINED_ = 0 // types.h:74:1:
|
||||
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:49:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1:
|
||||
X_SYS_TYPES_H_ = 0 // types.h:41:1:
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
I386 = 1 // <predefined>:339:1:
|
||||
Unix = 1 // <predefined>:340:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint32 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// $OpenBSD: fcntl.h,v 1.22 2019/01/21 18:09:21 anton Exp $
|
||||
// $NetBSD: fcntl.h,v 1.8 1995/03/26 20:24:12 jtc Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1983, 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)fcntl.h 8.3 (Berkeley) 1/21/94
|
||||
|
||||
// This file includes the definitions for open and fcntl
|
||||
// described by POSIX for <fcntl.h>; it also includes
|
||||
// related kernel definitions.
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.10 2013/03/28 17:30:45 martynas Exp $
|
||||
|
||||
// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
|
||||
// Public domain.
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky -- make sure you don't put spaces
|
||||
// in between its arguments. Do not use __CONCAT on double-quoted strings,
|
||||
// such as those from the __STRING macro: to concatenate strings just put
|
||||
// them next to each other.
|
||||
|
||||
// GCC1 and some versions of GCC2 declare dead (non-returning) and
|
||||
// pure (no side effects) functions using "volatile" and "const";
|
||||
// unfortunately, these then cause warnings under "-ansi -pedantic".
|
||||
// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
|
||||
// work for GNU C++ (modulo a slight glitch in the C++ grammar in
|
||||
// the distribution version of 2.5.5).
|
||||
|
||||
// __returns_twice makes the compiler not assume the function
|
||||
// only returns once. This affects registerisation of variables:
|
||||
// even local variables need to be in memory across such a call.
|
||||
// Example: setjmp()
|
||||
|
||||
// __only_inline makes the compiler only use this function definition
|
||||
// for inlining; references that can't be inlined will be left as
|
||||
// external references instead of generating a local copy. The
|
||||
// matching library should include a simple extern definition for
|
||||
// the function to handle those references. c.f. ctype.h
|
||||
|
||||
// GNU C version 2.96 adds explicit branch prediction so that
|
||||
// the CPU back-end can hint the processor and also so that
|
||||
// code blocks can be reordered such that the predicted path
|
||||
// sees a more linear flow, thus improving cache behavior, etc.
|
||||
//
|
||||
// The following two macros provide us with a way to utilize this
|
||||
// compiler feature. Use __predict_true() if you expect the expression
|
||||
// to evaluate to true, and __predict_false() if you expect the
|
||||
// expression to evaluate to false.
|
||||
//
|
||||
// A few notes about usage:
|
||||
//
|
||||
// * Generally, __predict_false() error condition checks (unless
|
||||
// you have some _strong_ reason to do otherwise, in which case
|
||||
// document it), and/or __predict_true() `no-error' condition
|
||||
// checks, assuming you want to optimize for the no-error case.
|
||||
//
|
||||
// * Other than that, if you don't know the likelihood of a test
|
||||
// succeeding from empirical or other `hard' evidence, don't
|
||||
// make predictions.
|
||||
//
|
||||
// * These are meant to be used in places that are run `a lot'.
|
||||
// It is wasteful to make predictions in code that is run
|
||||
// seldomly (e.g. at subsystem initialization time) as the
|
||||
// basic block reordering that this affects can often generate
|
||||
// larger code.
|
||||
|
||||
// Delete pseudo-keywords wherever they are not available or needed.
|
||||
|
||||
// The __packed macro indicates that a variable or structure members
|
||||
// should have the smallest possible alignment, despite any host CPU
|
||||
// alignment requirements.
|
||||
//
|
||||
// The __aligned(x) macro specifies the minimum alignment of a
|
||||
// variable or structure.
|
||||
//
|
||||
// These macros together are useful for describing the layout and
|
||||
// alignment of messages exchanged with hardware or other systems.
|
||||
|
||||
// "The nice thing about standards is that there are so many to choose from."
|
||||
// There are a number of "feature test macros" specified by (different)
|
||||
// standards that determine which interfaces and types the header files
|
||||
// should expose.
|
||||
//
|
||||
// Because of inconsistencies in these macros, we define our own
|
||||
// set in the private name space that end in _VISIBLE. These are
|
||||
// always defined and so headers can test their values easily.
|
||||
// Things can get tricky when multiple feature macros are defined.
|
||||
// We try to take the union of all the features requested.
|
||||
//
|
||||
// The following macros are guaranteed to have a value after cdefs.h
|
||||
// has been included:
|
||||
// __POSIX_VISIBLE
|
||||
// __XPG_VISIBLE
|
||||
// __ISO_C_VISIBLE
|
||||
// __BSD_VISIBLE
|
||||
|
||||
// X/Open Portability Guides and Single Unix Specifications.
|
||||
// _XOPEN_SOURCE XPG3
|
||||
// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
|
||||
// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
|
||||
// _XOPEN_SOURCE == 500 XPG5
|
||||
// _XOPEN_SOURCE == 520 XPG5v2
|
||||
// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
|
||||
// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
|
||||
//
|
||||
// The XPG spec implies a specific value for _POSIX_C_SOURCE.
|
||||
|
||||
// POSIX macros, these checks must follow the XOPEN ones above.
|
||||
//
|
||||
// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
|
||||
// _POSIX_C_SOURCE == 1 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2 1003.2-1992
|
||||
// _POSIX_C_SOURCE == 199309L 1003.1b-1993
|
||||
// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
|
||||
// and the omnibus ISO/IEC 9945-1:1996
|
||||
// _POSIX_C_SOURCE == 200112L 1003.1-2001
|
||||
// _POSIX_C_SOURCE == 200809L 1003.1-2008
|
||||
//
|
||||
// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
|
||||
// this may be overridden by the _ISOC99_SOURCE macro later.
|
||||
|
||||
// _ANSI_SOURCE means to expose ANSI C89 interfaces only.
|
||||
// If the user defines it in addition to one of the POSIX or XOPEN
|
||||
// macros, assume the POSIX/XOPEN macro(s) should take precedence.
|
||||
|
||||
// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
|
||||
// override any of the other macros since they are non-exclusive.
|
||||
|
||||
// Finally deal with BSD-specific interfaces that are not covered
|
||||
// by any standards. We expose these when none of the POSIX or XPG
|
||||
// macros is defined or if the user explicitly asks for them.
|
||||
|
||||
// Default values.
|
||||
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1982, 1986, 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.4 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Public definitions for little- and big-endian systems.
|
||||
// This file should be included as <endian.h> in userspace and as
|
||||
// <sys/endian.h> in the kernel.
|
||||
//
|
||||
// System headers that need endian information but that can't or don't
|
||||
// want to export the public names here should include <sys/_endian.h>
|
||||
// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Internal endianness macros. This pulls in <machine/endian.h> to
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
|
||||
// $OpenBSD: _types.h,v 1.23 2018/03/05 01:15:25 deraadt Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
// @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
|
||||
// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
|
||||
// value for all data types (int, long, ...). The result is an
|
||||
// unsigned long and must be cast to any desired pointer type.
|
||||
//
|
||||
// _ALIGNED_POINTER is a boolean macro that checks whether an address
|
||||
// is valid to fetch data elements of type t from on this architecture.
|
||||
// This does not reflect the optimal alignment, just the possibility
|
||||
// (within reasonable limits).
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
type X__int8_t = int8 /* _types.h:61:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:62:24 */
|
||||
type X__int16_t = int16 /* _types.h:63:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:64:25 */
|
||||
type X__int32_t = int32 /* _types.h:65:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:66:23 */
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
type X__uint64_t = uint64 /* _types.h:68:28 */
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
type X__int_least8_t = X__int8_t /* _types.h:71:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:73:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:75:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:77:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:81:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:83:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:85:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:87:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
type X__intptr_t = int32 /* _types.h:103:16 */
|
||||
type X__uintptr_t = uint32 /* _types.h:104:24 */
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
type X__intmax_t = X__int64_t /* _types.h:107:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:108:21 */
|
||||
|
||||
// Register size
|
||||
type X__register_t = int32 /* _types.h:111:16 */
|
||||
|
||||
// VM system types
|
||||
type X__vaddr_t = uint32 /* _types.h:114:24 */
|
||||
type X__paddr_t = uint32 /* _types.h:115:24 */
|
||||
type X__vsize_t = uint32 /* _types.h:116:24 */
|
||||
type X__psize_t = uint32 /* _types.h:117:24 */
|
||||
|
||||
// Standard system types
|
||||
type X__double_t = float64 /* _types.h:120:22 */
|
||||
type X__float_t = float64 /* _types.h:121:22 */
|
||||
type X__ptrdiff_t = int32 /* _types.h:122:16 */
|
||||
type X__size_t = uint32 /* _types.h:123:24 */
|
||||
type X__ssize_t = int32 /* _types.h:124:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:126:27 */
|
||||
|
||||
// Wide character support types
|
||||
type X__wchar_t = int32 /* _types.h:133:15 */
|
||||
type X__wint_t = int32 /* _types.h:135:15 */
|
||||
type X__rune_t = int32 /* _types.h:136:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:137:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:138:14 */
|
||||
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
|
||||
type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
|
||||
type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers
|
||||
type X__cpuid_t = uint32 /* _types.h:43:23 */ // CPU id
|
||||
type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number
|
||||
type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number
|
||||
type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
|
||||
type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
|
||||
type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id
|
||||
type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid
|
||||
type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address
|
||||
type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type
|
||||
type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number
|
||||
type X__key_t = int32 /* _types.h:53:15 */ // IPC key (for Sys V IPC)
|
||||
type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions
|
||||
type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count
|
||||
type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size
|
||||
type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id
|
||||
type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit
|
||||
type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int32 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint32
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
// Note that these macros evaluate their arguments several times.
|
||||
|
||||
// Public names
|
||||
|
||||
// These are specified to be function-like macros to match the spec
|
||||
|
||||
// POSIX names
|
||||
|
||||
// original BSD names
|
||||
|
||||
// these were exposed here before
|
||||
|
||||
// ancient stuff
|
||||
|
||||
type U_char = uint8 /* types.h:51:23 */
|
||||
type U_short = uint16 /* types.h:52:24 */
|
||||
type U_int = uint32 /* types.h:53:22 */
|
||||
type U_long = uint32 /* types.h:54:23 */
|
||||
|
||||
type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility
|
||||
type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
|
||||
type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility
|
||||
type Ulong = uint32 /* types.h:59:23 */ // Sys V compatibility
|
||||
|
||||
type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id
|
||||
type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
|
||||
|
||||
// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
|
||||
// but the rest of the includes are not ready for that yet.
|
||||
|
||||
type Int8_t = X__int8_t /* types.h:75:19 */
|
||||
|
||||
type Uint8_t = X__uint8_t /* types.h:80:20 */
|
||||
|
||||
type Int16_t = X__int16_t /* types.h:85:20 */
|
||||
|
||||
type Uint16_t = X__uint16_t /* types.h:90:21 */
|
||||
|
||||
type Int32_t = X__int32_t /* types.h:95:20 */
|
||||
|
||||
type Uint32_t = X__uint32_t /* types.h:100:21 */
|
||||
|
||||
type Int64_t = X__int64_t /* types.h:105:20 */
|
||||
|
||||
type Uint64_t = X__uint64_t /* types.h:110:21 */
|
||||
|
||||
// BSD-style unsigned bits types
|
||||
type U_int8_t = X__uint8_t /* types.h:114:19 */
|
||||
type U_int16_t = X__uint16_t /* types.h:115:20 */
|
||||
type U_int32_t = X__uint32_t /* types.h:116:20 */
|
||||
type U_int64_t = X__uint64_t /* types.h:117:20 */
|
||||
|
||||
// quads, deprecated in favor of 64 bit int types
|
||||
type Quad_t = X__int64_t /* types.h:120:19 */
|
||||
type U_quad_t = X__uint64_t /* types.h:121:20 */
|
||||
|
||||
// VM system types
|
||||
type Vaddr_t = X__vaddr_t /* types.h:125:19 */
|
||||
type Paddr_t = X__paddr_t /* types.h:126:19 */
|
||||
type Vsize_t = X__vsize_t /* types.h:127:19 */
|
||||
type Psize_t = X__psize_t /* types.h:128:19 */
|
||||
|
||||
// Standard system types
|
||||
type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file
|
||||
type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O
|
||||
type Caddr_t = uintptr /* types.h:134:14 */ // core address
|
||||
type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address
|
||||
type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address
|
||||
type Dev_t = X__dev_t /* types.h:137:18 */ // device number
|
||||
type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number
|
||||
type Gid_t = X__gid_t /* types.h:139:18 */ // group id
|
||||
type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid
|
||||
type Ino_t = X__ino_t /* types.h:141:18 */ // inode number
|
||||
type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC)
|
||||
type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
// File status flags: these are used by open(2), fcntl(2).
|
||||
// They are also used (indirectly) in the kernel file structure f_flags,
|
||||
// which is a superset of the open/fcntl flags. Open flags and f_flags
|
||||
// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
|
||||
// Open/fcntl flags begin with O_; kernel-internal flags begin with F.
|
||||
// open-only flags
|
||||
|
||||
// Kernel encoding of open mode; separate read and write bits that are
|
||||
// independently testable: 1 greater than the above.
|
||||
//
|
||||
// XXX
|
||||
// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
|
||||
// which was documented to use FREAD/FWRITE, continues to work.
|
||||
|
||||
// POSIX 1003.1 specifies a higher granularity for synchronous operations
|
||||
// than we support. Since synchronicity is all or nothing in OpenBSD
|
||||
// we just define these to be the same as O_SYNC.
|
||||
|
||||
// defined by POSIX 1003.1; BSD default, this bit is not required
|
||||
|
||||
// defined by POSIX Issue 7
|
||||
|
||||
// The O_* flags used to have only F* names, which were used in the kernel
|
||||
// and by fcntl. We retain the F* names for the kernel f_flags field
|
||||
// and for backward compatibility for fcntl.
|
||||
|
||||
// Constants used for fcntl(2)
|
||||
|
||||
// command values
|
||||
|
||||
// file descriptor flags (F_GETFD, F_SETFD)
|
||||
|
||||
// record locking flags (F_GETLK, F_SETLK, F_SETLKW)
|
||||
|
||||
// Advisory file segment locking data type -
|
||||
// information passed to system by user
|
||||
type Flock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
} /* fcntl.h:180:1 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
825
fcntl/fcntl_openbsd_amd64.go
Normal file
825
fcntl/fcntl_openbsd_amd64.go
Normal file
|
@ -0,0 +1,825 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_openbsd_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x01 // fcntl.h:200:1:
|
||||
AT_FDCWD = -100 // fcntl.h:198:1:
|
||||
AT_REMOVEDIR = 0x08 // fcntl.h:203:1:
|
||||
AT_SYMLINK_FOLLOW = 0x04 // fcntl.h:202:1:
|
||||
AT_SYMLINK_NOFOLLOW = 0x02 // fcntl.h:201:1:
|
||||
BIG_ENDIAN = 4321 // endian.h:45:1:
|
||||
BYTE_ORDER = 1234 // endian.h:47:1:
|
||||
FAPPEND = 8 // fcntl.h:130:1:
|
||||
FASYNC = 64 // fcntl.h:131:1:
|
||||
FD_CLOEXEC = 1 // fcntl.h:163:1:
|
||||
FFSYNC = 128 // fcntl.h:132:1:
|
||||
FNDELAY = 4 // fcntl.h:134:1:
|
||||
FNONBLOCK = 4 // fcntl.h:133:1:
|
||||
FREAD = 0x0001 // fcntl.h:76:1:
|
||||
FWRITE = 0x0002 // fcntl.h:77:1:
|
||||
F_DUPFD = 0 // fcntl.h:143:1:
|
||||
F_DUPFD_CLOEXEC = 10 // fcntl.h:156:1:
|
||||
F_GETFD = 1 // fcntl.h:144:1:
|
||||
F_GETFL = 3 // fcntl.h:146:1:
|
||||
F_GETLK = 7 // fcntl.h:152:1:
|
||||
F_GETOWN = 5 // fcntl.h:149:1:
|
||||
F_ISATTY = 11 // fcntl.h:159:1:
|
||||
F_RDLCK = 1 // fcntl.h:166:1:
|
||||
F_SETFD = 2 // fcntl.h:145:1:
|
||||
F_SETFL = 4 // fcntl.h:147:1:
|
||||
F_SETLK = 8 // fcntl.h:153:1:
|
||||
F_SETLKW = 9 // fcntl.h:154:1:
|
||||
F_SETOWN = 6 // fcntl.h:150:1:
|
||||
F_UNLCK = 2 // fcntl.h:167:1:
|
||||
F_WRLCK = 3 // fcntl.h:168:1:
|
||||
LITTLE_ENDIAN = 1234 // endian.h:44:1:
|
||||
LOCK_EX = 0x02 // fcntl.h:192:1:
|
||||
LOCK_NB = 0x04 // fcntl.h:193:1:
|
||||
LOCK_SH = 0x01 // fcntl.h:191:1:
|
||||
LOCK_UN = 0x08 // fcntl.h:194:1:
|
||||
O_ACCMODE = 0x0003 // fcntl.h:65:1:
|
||||
O_APPEND = 0x0008 // fcntl.h:80:1:
|
||||
O_ASYNC = 0x0040 // fcntl.h:84:1:
|
||||
O_CLOEXEC = 0x10000 // fcntl.h:107:1:
|
||||
O_CREAT = 0x0200 // fcntl.h:91:1:
|
||||
O_DIRECTORY = 0x20000 // fcntl.h:108:1:
|
||||
O_DSYNC = 128 // fcntl.h:100:1:
|
||||
O_EXCL = 0x0800 // fcntl.h:93:1:
|
||||
O_EXLOCK = 0x0020 // fcntl.h:83:1:
|
||||
O_FSYNC = 0x0080 // fcntl.h:85:1:
|
||||
O_NDELAY = 4 // fcntl.h:135:1:
|
||||
O_NOCTTY = 0x8000 // fcntl.h:104:1:
|
||||
O_NOFOLLOW = 0x0100 // fcntl.h:86:1:
|
||||
O_NONBLOCK = 0x0004 // fcntl.h:79:1:
|
||||
O_RDONLY = 0x0000 // fcntl.h:62:1:
|
||||
O_RDWR = 0x0002 // fcntl.h:64:1:
|
||||
O_RSYNC = 128 // fcntl.h:101:1:
|
||||
O_SHLOCK = 0x0010 // fcntl.h:82:1:
|
||||
O_SYNC = 0x0080 // fcntl.h:89:1:
|
||||
O_TRUNC = 0x0400 // fcntl.h:92:1:
|
||||
O_WRONLY = 0x0001 // fcntl.h:63:1:
|
||||
PDP_ENDIAN = 3412 // endian.h:46:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:58:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
X_INT32_T_DEFINED_ = 0 // types.h:94:1:
|
||||
X_INT64_T_DEFINED_ = 0 // types.h:104:1:
|
||||
X_INT8_T_DEFINED_ = 0 // types.h:74:1:
|
||||
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:9:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:28:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:36:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:52:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:49:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1:
|
||||
X_SYS_TYPES_H_ = 0 // types.h:41:1:
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
Unix = 1 // <predefined>:344:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// $OpenBSD: fcntl.h,v 1.22 2019/01/21 18:09:21 anton Exp $
|
||||
// $NetBSD: fcntl.h,v 1.8 1995/03/26 20:24:12 jtc Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1983, 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)fcntl.h 8.3 (Berkeley) 1/21/94
|
||||
|
||||
// This file includes the definitions for open and fcntl
|
||||
// described by POSIX for <fcntl.h>; it also includes
|
||||
// related kernel definitions.
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.3 2013/03/28 17:30:45 martynas Exp $
|
||||
|
||||
// Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
|
||||
// Public domain.
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky -- make sure you don't put spaces
|
||||
// in between its arguments. Do not use __CONCAT on double-quoted strings,
|
||||
// such as those from the __STRING macro: to concatenate strings just put
|
||||
// them next to each other.
|
||||
|
||||
// GCC1 and some versions of GCC2 declare dead (non-returning) and
|
||||
// pure (no side effects) functions using "volatile" and "const";
|
||||
// unfortunately, these then cause warnings under "-ansi -pedantic".
|
||||
// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
|
||||
// work for GNU C++ (modulo a slight glitch in the C++ grammar in
|
||||
// the distribution version of 2.5.5).
|
||||
|
||||
// __returns_twice makes the compiler not assume the function
|
||||
// only returns once. This affects registerisation of variables:
|
||||
// even local variables need to be in memory across such a call.
|
||||
// Example: setjmp()
|
||||
|
||||
// __only_inline makes the compiler only use this function definition
|
||||
// for inlining; references that can't be inlined will be left as
|
||||
// external references instead of generating a local copy. The
|
||||
// matching library should include a simple extern definition for
|
||||
// the function to handle those references. c.f. ctype.h
|
||||
|
||||
// GNU C version 2.96 adds explicit branch prediction so that
|
||||
// the CPU back-end can hint the processor and also so that
|
||||
// code blocks can be reordered such that the predicted path
|
||||
// sees a more linear flow, thus improving cache behavior, etc.
|
||||
//
|
||||
// The following two macros provide us with a way to utilize this
|
||||
// compiler feature. Use __predict_true() if you expect the expression
|
||||
// to evaluate to true, and __predict_false() if you expect the
|
||||
// expression to evaluate to false.
|
||||
//
|
||||
// A few notes about usage:
|
||||
//
|
||||
// * Generally, __predict_false() error condition checks (unless
|
||||
// you have some _strong_ reason to do otherwise, in which case
|
||||
// document it), and/or __predict_true() `no-error' condition
|
||||
// checks, assuming you want to optimize for the no-error case.
|
||||
//
|
||||
// * Other than that, if you don't know the likelihood of a test
|
||||
// succeeding from empirical or other `hard' evidence, don't
|
||||
// make predictions.
|
||||
//
|
||||
// * These are meant to be used in places that are run `a lot'.
|
||||
// It is wasteful to make predictions in code that is run
|
||||
// seldomly (e.g. at subsystem initialization time) as the
|
||||
// basic block reordering that this affects can often generate
|
||||
// larger code.
|
||||
|
||||
// Delete pseudo-keywords wherever they are not available or needed.
|
||||
|
||||
// The __packed macro indicates that a variable or structure members
|
||||
// should have the smallest possible alignment, despite any host CPU
|
||||
// alignment requirements.
|
||||
//
|
||||
// The __aligned(x) macro specifies the minimum alignment of a
|
||||
// variable or structure.
|
||||
//
|
||||
// These macros together are useful for describing the layout and
|
||||
// alignment of messages exchanged with hardware or other systems.
|
||||
|
||||
// "The nice thing about standards is that there are so many to choose from."
|
||||
// There are a number of "feature test macros" specified by (different)
|
||||
// standards that determine which interfaces and types the header files
|
||||
// should expose.
|
||||
//
|
||||
// Because of inconsistencies in these macros, we define our own
|
||||
// set in the private name space that end in _VISIBLE. These are
|
||||
// always defined and so headers can test their values easily.
|
||||
// Things can get tricky when multiple feature macros are defined.
|
||||
// We try to take the union of all the features requested.
|
||||
//
|
||||
// The following macros are guaranteed to have a value after cdefs.h
|
||||
// has been included:
|
||||
// __POSIX_VISIBLE
|
||||
// __XPG_VISIBLE
|
||||
// __ISO_C_VISIBLE
|
||||
// __BSD_VISIBLE
|
||||
|
||||
// X/Open Portability Guides and Single Unix Specifications.
|
||||
// _XOPEN_SOURCE XPG3
|
||||
// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
|
||||
// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
|
||||
// _XOPEN_SOURCE == 500 XPG5
|
||||
// _XOPEN_SOURCE == 520 XPG5v2
|
||||
// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
|
||||
// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
|
||||
//
|
||||
// The XPG spec implies a specific value for _POSIX_C_SOURCE.
|
||||
|
||||
// POSIX macros, these checks must follow the XOPEN ones above.
|
||||
//
|
||||
// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
|
||||
// _POSIX_C_SOURCE == 1 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2 1003.2-1992
|
||||
// _POSIX_C_SOURCE == 199309L 1003.1b-1993
|
||||
// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
|
||||
// and the omnibus ISO/IEC 9945-1:1996
|
||||
// _POSIX_C_SOURCE == 200112L 1003.1-2001
|
||||
// _POSIX_C_SOURCE == 200809L 1003.1-2008
|
||||
//
|
||||
// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
|
||||
// this may be overridden by the _ISOC99_SOURCE macro later.
|
||||
|
||||
// _ANSI_SOURCE means to expose ANSI C89 interfaces only.
|
||||
// If the user defines it in addition to one of the POSIX or XOPEN
|
||||
// macros, assume the POSIX/XOPEN macro(s) should take precedence.
|
||||
|
||||
// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
|
||||
// override any of the other macros since they are non-exclusive.
|
||||
|
||||
// Finally deal with BSD-specific interfaces that are not covered
|
||||
// by any standards. We expose these when none of the POSIX or XPG
|
||||
// macros is defined or if the user explicitly asks for them.
|
||||
|
||||
// Default values.
|
||||
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1982, 1986, 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.4 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Public definitions for little- and big-endian systems.
|
||||
// This file should be included as <endian.h> in userspace and as
|
||||
// <sys/endian.h> in the kernel.
|
||||
//
|
||||
// System headers that need endian information but that can't or don't
|
||||
// want to export the public names here should include <sys/_endian.h>
|
||||
// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Internal endianness macros. This pulls in <machine/endian.h> to
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
|
||||
// $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
// @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
|
||||
// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
|
||||
// value for all data types (int, long, ...). The result is an
|
||||
// unsigned long and must be cast to any desired pointer type.
|
||||
//
|
||||
// _ALIGNED_POINTER is a boolean macro that checks whether an address
|
||||
// is valid to fetch data elements of type t from on this architecture.
|
||||
// This does not reflect the optimal alignment, just the possibility
|
||||
// (within reasonable limits).
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
type X__int8_t = int8 /* _types.h:61:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:62:24 */
|
||||
type X__int16_t = int16 /* _types.h:63:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:64:25 */
|
||||
type X__int32_t = int32 /* _types.h:65:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:66:23 */
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
type X__uint64_t = uint64 /* _types.h:68:28 */
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
type X__int_least8_t = X__int8_t /* _types.h:71:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:72:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:73:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:74:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:75:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:76:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:77:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:78:21 */
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:81:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:82:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:83:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:84:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:85:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:86:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:87:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:88:21 */
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
type X__intptr_t = int64 /* _types.h:103:16 */
|
||||
type X__uintptr_t = uint64 /* _types.h:104:24 */
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
type X__intmax_t = X__int64_t /* _types.h:107:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:108:21 */
|
||||
|
||||
// Register size
|
||||
type X__register_t = int64 /* _types.h:111:16 */
|
||||
|
||||
// VM system types
|
||||
type X__vaddr_t = uint64 /* _types.h:114:24 */
|
||||
type X__paddr_t = uint64 /* _types.h:115:24 */
|
||||
type X__vsize_t = uint64 /* _types.h:116:24 */
|
||||
type X__psize_t = uint64 /* _types.h:117:24 */
|
||||
|
||||
// Standard system types
|
||||
type X__double_t = float64 /* _types.h:120:18 */
|
||||
type X__float_t = float32 /* _types.h:121:17 */
|
||||
type X__ptrdiff_t = int64 /* _types.h:122:16 */
|
||||
type X__size_t = uint64 /* _types.h:123:24 */
|
||||
type X__ssize_t = int64 /* _types.h:124:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:126:27 */
|
||||
|
||||
// Wide character support types
|
||||
type X__wchar_t = int32 /* _types.h:133:15 */
|
||||
type X__wint_t = int32 /* _types.h:135:15 */
|
||||
type X__rune_t = int32 /* _types.h:136:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:137:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:138:14 */
|
||||
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
|
||||
type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
|
||||
type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers
|
||||
type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id
|
||||
type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number
|
||||
type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number
|
||||
type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
|
||||
type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
|
||||
type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id
|
||||
type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid
|
||||
type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address
|
||||
type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type
|
||||
type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number
|
||||
type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC)
|
||||
type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions
|
||||
type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count
|
||||
type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size
|
||||
type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id
|
||||
type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit
|
||||
type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
// Note that these macros evaluate their arguments several times.
|
||||
|
||||
// Public names
|
||||
|
||||
// These are specified to be function-like macros to match the spec
|
||||
|
||||
// POSIX names
|
||||
|
||||
// original BSD names
|
||||
|
||||
// these were exposed here before
|
||||
|
||||
// ancient stuff
|
||||
|
||||
type U_char = uint8 /* types.h:51:23 */
|
||||
type U_short = uint16 /* types.h:52:24 */
|
||||
type U_int = uint32 /* types.h:53:22 */
|
||||
type U_long = uint64 /* types.h:54:23 */
|
||||
|
||||
type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility
|
||||
type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
|
||||
type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility
|
||||
type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility
|
||||
|
||||
type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id
|
||||
type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
|
||||
|
||||
// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
|
||||
// but the rest of the includes are not ready for that yet.
|
||||
|
||||
type Int8_t = X__int8_t /* types.h:75:19 */
|
||||
|
||||
type Uint8_t = X__uint8_t /* types.h:80:20 */
|
||||
|
||||
type Int16_t = X__int16_t /* types.h:85:20 */
|
||||
|
||||
type Uint16_t = X__uint16_t /* types.h:90:21 */
|
||||
|
||||
type Int32_t = X__int32_t /* types.h:95:20 */
|
||||
|
||||
type Uint32_t = X__uint32_t /* types.h:100:21 */
|
||||
|
||||
type Int64_t = X__int64_t /* types.h:105:20 */
|
||||
|
||||
type Uint64_t = X__uint64_t /* types.h:110:21 */
|
||||
|
||||
// BSD-style unsigned bits types
|
||||
type U_int8_t = X__uint8_t /* types.h:114:19 */
|
||||
type U_int16_t = X__uint16_t /* types.h:115:20 */
|
||||
type U_int32_t = X__uint32_t /* types.h:116:20 */
|
||||
type U_int64_t = X__uint64_t /* types.h:117:20 */
|
||||
|
||||
// quads, deprecated in favor of 64 bit int types
|
||||
type Quad_t = X__int64_t /* types.h:120:19 */
|
||||
type U_quad_t = X__uint64_t /* types.h:121:20 */
|
||||
|
||||
// VM system types
|
||||
type Vaddr_t = X__vaddr_t /* types.h:125:19 */
|
||||
type Paddr_t = X__paddr_t /* types.h:126:19 */
|
||||
type Vsize_t = X__vsize_t /* types.h:127:19 */
|
||||
type Psize_t = X__psize_t /* types.h:128:19 */
|
||||
|
||||
// Standard system types
|
||||
type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file
|
||||
type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O
|
||||
type Caddr_t = uintptr /* types.h:134:14 */ // core address
|
||||
type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address
|
||||
type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address
|
||||
type Dev_t = X__dev_t /* types.h:137:18 */ // device number
|
||||
type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number
|
||||
type Gid_t = X__gid_t /* types.h:139:18 */ // group id
|
||||
type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid
|
||||
type Ino_t = X__ino_t /* types.h:141:18 */ // inode number
|
||||
type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC)
|
||||
type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
// File status flags: these are used by open(2), fcntl(2).
|
||||
// They are also used (indirectly) in the kernel file structure f_flags,
|
||||
// which is a superset of the open/fcntl flags. Open flags and f_flags
|
||||
// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
|
||||
// Open/fcntl flags begin with O_; kernel-internal flags begin with F.
|
||||
// open-only flags
|
||||
|
||||
// Kernel encoding of open mode; separate read and write bits that are
|
||||
// independently testable: 1 greater than the above.
|
||||
//
|
||||
// XXX
|
||||
// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
|
||||
// which was documented to use FREAD/FWRITE, continues to work.
|
||||
|
||||
// POSIX 1003.1 specifies a higher granularity for synchronous operations
|
||||
// than we support. Since synchronicity is all or nothing in OpenBSD
|
||||
// we just define these to be the same as O_SYNC.
|
||||
|
||||
// defined by POSIX 1003.1; BSD default, this bit is not required
|
||||
|
||||
// defined by POSIX Issue 7
|
||||
|
||||
// The O_* flags used to have only F* names, which were used in the kernel
|
||||
// and by fcntl. We retain the F* names for the kernel f_flags field
|
||||
// and for backward compatibility for fcntl.
|
||||
|
||||
// Constants used for fcntl(2)
|
||||
|
||||
// command values
|
||||
|
||||
// file descriptor flags (F_GETFD, F_SETFD)
|
||||
|
||||
// record locking flags (F_GETLK, F_SETLK, F_SETLKW)
|
||||
|
||||
// Advisory file segment locking data type -
|
||||
// information passed to system by user
|
||||
type Flock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
} /* fcntl.h:180:1 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
823
fcntl/fcntl_openbsd_arm64.go
Normal file
823
fcntl/fcntl_openbsd_arm64.go
Normal file
|
@ -0,0 +1,823 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_openbsd_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
AT_EACCESS = 0x01 // fcntl.h:200:1:
|
||||
AT_FDCWD = -100 // fcntl.h:198:1:
|
||||
AT_REMOVEDIR = 0x08 // fcntl.h:203:1:
|
||||
AT_SYMLINK_FOLLOW = 0x04 // fcntl.h:202:1:
|
||||
AT_SYMLINK_NOFOLLOW = 0x02 // fcntl.h:201:1:
|
||||
BIG_ENDIAN = 4321 // endian.h:45:1:
|
||||
BYTE_ORDER = 1234 // endian.h:47:1:
|
||||
FAPPEND = 8 // fcntl.h:130:1:
|
||||
FASYNC = 64 // fcntl.h:131:1:
|
||||
FD_CLOEXEC = 1 // fcntl.h:163:1:
|
||||
FFSYNC = 128 // fcntl.h:132:1:
|
||||
FNDELAY = 4 // fcntl.h:134:1:
|
||||
FNONBLOCK = 4 // fcntl.h:133:1:
|
||||
FREAD = 0x0001 // fcntl.h:76:1:
|
||||
FWRITE = 0x0002 // fcntl.h:77:1:
|
||||
F_DUPFD = 0 // fcntl.h:143:1:
|
||||
F_DUPFD_CLOEXEC = 10 // fcntl.h:156:1:
|
||||
F_GETFD = 1 // fcntl.h:144:1:
|
||||
F_GETFL = 3 // fcntl.h:146:1:
|
||||
F_GETLK = 7 // fcntl.h:152:1:
|
||||
F_GETOWN = 5 // fcntl.h:149:1:
|
||||
F_ISATTY = 11 // fcntl.h:159:1:
|
||||
F_RDLCK = 1 // fcntl.h:166:1:
|
||||
F_SETFD = 2 // fcntl.h:145:1:
|
||||
F_SETFL = 4 // fcntl.h:147:1:
|
||||
F_SETLK = 8 // fcntl.h:153:1:
|
||||
F_SETLKW = 9 // fcntl.h:154:1:
|
||||
F_SETOWN = 6 // fcntl.h:150:1:
|
||||
F_UNLCK = 2 // fcntl.h:167:1:
|
||||
F_WRLCK = 3 // fcntl.h:168:1:
|
||||
LITTLE_ENDIAN = 1234 // endian.h:44:1:
|
||||
LOCK_EX = 0x02 // fcntl.h:192:1:
|
||||
LOCK_NB = 0x04 // fcntl.h:193:1:
|
||||
LOCK_SH = 0x01 // fcntl.h:191:1:
|
||||
LOCK_UN = 0x08 // fcntl.h:194:1:
|
||||
O_ACCMODE = 0x0003 // fcntl.h:65:1:
|
||||
O_APPEND = 0x0008 // fcntl.h:80:1:
|
||||
O_ASYNC = 0x0040 // fcntl.h:84:1:
|
||||
O_CLOEXEC = 0x10000 // fcntl.h:107:1:
|
||||
O_CREAT = 0x0200 // fcntl.h:91:1:
|
||||
O_DIRECTORY = 0x20000 // fcntl.h:108:1:
|
||||
O_DSYNC = 128 // fcntl.h:100:1:
|
||||
O_EXCL = 0x0800 // fcntl.h:93:1:
|
||||
O_EXLOCK = 0x0020 // fcntl.h:83:1:
|
||||
O_FSYNC = 0x0080 // fcntl.h:85:1:
|
||||
O_NDELAY = 4 // fcntl.h:135:1:
|
||||
O_NOCTTY = 0x8000 // fcntl.h:104:1:
|
||||
O_NOFOLLOW = 0x0100 // fcntl.h:86:1:
|
||||
O_NONBLOCK = 0x0004 // fcntl.h:79:1:
|
||||
O_RDONLY = 0x0000 // fcntl.h:62:1:
|
||||
O_RDWR = 0x0002 // fcntl.h:64:1:
|
||||
O_RSYNC = 128 // fcntl.h:101:1:
|
||||
O_SHLOCK = 0x0010 // fcntl.h:82:1:
|
||||
O_SYNC = 0x0080 // fcntl.h:89:1:
|
||||
O_TRUNC = 0x0400 // fcntl.h:92:1:
|
||||
O_WRONLY = 0x0001 // fcntl.h:63:1:
|
||||
PDP_ENDIAN = 3412 // endian.h:46:1:
|
||||
X_BIG_ENDIAN = 4321 // _endian.h:43:1:
|
||||
X_BYTE_ORDER = 1234 // endian.h:60:1:
|
||||
X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1:
|
||||
X_CLOCK_T_DEFINED_ = 0 // types.h:157:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_INT16_T_DEFINED_ = 0 // types.h:84:1:
|
||||
X_INT32_T_DEFINED_ = 0 // types.h:94:1:
|
||||
X_INT64_T_DEFINED_ = 0 // types.h:104:1:
|
||||
X_INT8_T_DEFINED_ = 0 // types.h:74:1:
|
||||
X_LITTLE_ENDIAN = 1234 // _endian.h:42:1:
|
||||
X_LP64 = 1 // <predefined>:1:1:
|
||||
X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1:
|
||||
X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1:
|
||||
X_MACHINE__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_MAX_PAGE_SHIFT = 12 // _types.h:57:1:
|
||||
X_OFF_T_DEFINED_ = 0 // types.h:192:1:
|
||||
X_PDP_ENDIAN = 3412 // _endian.h:44:1:
|
||||
X_PID_T_DEFINED_ = 0 // types.h:167:1:
|
||||
X_QUAD_HIGHWORD = 1 // _endian.h:95:1:
|
||||
X_QUAD_LOWWORD = 0 // _endian.h:96:1:
|
||||
X_RET_PROTECTOR = 1 // <predefined>:2:1:
|
||||
X_SIZE_T_DEFINED_ = 0 // types.h:172:1:
|
||||
X_SSIZE_T_DEFINED_ = 0 // types.h:177:1:
|
||||
X_STACKALIGNBYTES = 15 // _types.h:54:1:
|
||||
X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1:
|
||||
X_SYS_ENDIAN_H_ = 0 // endian.h:38:1:
|
||||
X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1:
|
||||
X_SYS_TYPES_H_ = 0 // types.h:41:1:
|
||||
X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1:
|
||||
X_SYS__TYPES_H_ = 0 // _types.h:35:1:
|
||||
X_TIMER_T_DEFINED_ = 0 // types.h:187:1:
|
||||
X_TIME_T_DEFINED_ = 0 // types.h:182:1:
|
||||
X_UINT16_T_DEFINED_ = 0 // types.h:89:1:
|
||||
X_UINT32_T_DEFINED_ = 0 // types.h:99:1:
|
||||
X_UINT64_T_DEFINED_ = 0 // types.h:109:1:
|
||||
X_UINT8_T_DEFINED_ = 0 // types.h:79:1:
|
||||
Unix = 1 // <predefined>:360:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
// $OpenBSD: fcntl.h,v 1.22 2019/01/21 18:09:21 anton Exp $
|
||||
// $NetBSD: fcntl.h,v 1.8 1995/03/26 20:24:12 jtc Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1983, 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)fcntl.h 8.3 (Berkeley) 1/21/94
|
||||
|
||||
// This file includes the definitions for open and fcntl
|
||||
// described by POSIX for <fcntl.h>; it also includes
|
||||
// related kernel definitions.
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $
|
||||
|
||||
// Macro to test if we're using a specific version of gcc or later.
|
||||
|
||||
// The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
// with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
// The __CONCAT macro is a bit tricky -- make sure you don't put spaces
|
||||
// in between its arguments. Do not use __CONCAT on double-quoted strings,
|
||||
// such as those from the __STRING macro: to concatenate strings just put
|
||||
// them next to each other.
|
||||
|
||||
// GCC1 and some versions of GCC2 declare dead (non-returning) and
|
||||
// pure (no side effects) functions using "volatile" and "const";
|
||||
// unfortunately, these then cause warnings under "-ansi -pedantic".
|
||||
// GCC >= 2.5 uses the __attribute__((attrs)) style. All of these
|
||||
// work for GNU C++ (modulo a slight glitch in the C++ grammar in
|
||||
// the distribution version of 2.5.5).
|
||||
|
||||
// __returns_twice makes the compiler not assume the function
|
||||
// only returns once. This affects registerisation of variables:
|
||||
// even local variables need to be in memory across such a call.
|
||||
// Example: setjmp()
|
||||
|
||||
// __only_inline makes the compiler only use this function definition
|
||||
// for inlining; references that can't be inlined will be left as
|
||||
// external references instead of generating a local copy. The
|
||||
// matching library should include a simple extern definition for
|
||||
// the function to handle those references. c.f. ctype.h
|
||||
|
||||
// GNU C version 2.96 adds explicit branch prediction so that
|
||||
// the CPU back-end can hint the processor and also so that
|
||||
// code blocks can be reordered such that the predicted path
|
||||
// sees a more linear flow, thus improving cache behavior, etc.
|
||||
//
|
||||
// The following two macros provide us with a way to utilize this
|
||||
// compiler feature. Use __predict_true() if you expect the expression
|
||||
// to evaluate to true, and __predict_false() if you expect the
|
||||
// expression to evaluate to false.
|
||||
//
|
||||
// A few notes about usage:
|
||||
//
|
||||
// * Generally, __predict_false() error condition checks (unless
|
||||
// you have some _strong_ reason to do otherwise, in which case
|
||||
// document it), and/or __predict_true() `no-error' condition
|
||||
// checks, assuming you want to optimize for the no-error case.
|
||||
//
|
||||
// * Other than that, if you don't know the likelihood of a test
|
||||
// succeeding from empirical or other `hard' evidence, don't
|
||||
// make predictions.
|
||||
//
|
||||
// * These are meant to be used in places that are run `a lot'.
|
||||
// It is wasteful to make predictions in code that is run
|
||||
// seldomly (e.g. at subsystem initialization time) as the
|
||||
// basic block reordering that this affects can often generate
|
||||
// larger code.
|
||||
|
||||
// Delete pseudo-keywords wherever they are not available or needed.
|
||||
|
||||
// The __packed macro indicates that a variable or structure members
|
||||
// should have the smallest possible alignment, despite any host CPU
|
||||
// alignment requirements.
|
||||
//
|
||||
// The __aligned(x) macro specifies the minimum alignment of a
|
||||
// variable or structure.
|
||||
//
|
||||
// These macros together are useful for describing the layout and
|
||||
// alignment of messages exchanged with hardware or other systems.
|
||||
|
||||
// "The nice thing about standards is that there are so many to choose from."
|
||||
// There are a number of "feature test macros" specified by (different)
|
||||
// standards that determine which interfaces and types the header files
|
||||
// should expose.
|
||||
//
|
||||
// Because of inconsistencies in these macros, we define our own
|
||||
// set in the private name space that end in _VISIBLE. These are
|
||||
// always defined and so headers can test their values easily.
|
||||
// Things can get tricky when multiple feature macros are defined.
|
||||
// We try to take the union of all the features requested.
|
||||
//
|
||||
// The following macros are guaranteed to have a value after cdefs.h
|
||||
// has been included:
|
||||
// __POSIX_VISIBLE
|
||||
// __XPG_VISIBLE
|
||||
// __ISO_C_VISIBLE
|
||||
// __BSD_VISIBLE
|
||||
|
||||
// X/Open Portability Guides and Single Unix Specifications.
|
||||
// _XOPEN_SOURCE XPG3
|
||||
// _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4
|
||||
// _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2
|
||||
// _XOPEN_SOURCE == 500 XPG5
|
||||
// _XOPEN_SOURCE == 520 XPG5v2
|
||||
// _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI
|
||||
// _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI
|
||||
//
|
||||
// The XPG spec implies a specific value for _POSIX_C_SOURCE.
|
||||
|
||||
// POSIX macros, these checks must follow the XOPEN ones above.
|
||||
//
|
||||
// _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE)
|
||||
// _POSIX_C_SOURCE == 1 1003.1-1990
|
||||
// _POSIX_C_SOURCE == 2 1003.2-1992
|
||||
// _POSIX_C_SOURCE == 199309L 1003.1b-1993
|
||||
// _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995,
|
||||
// and the omnibus ISO/IEC 9945-1:1996
|
||||
// _POSIX_C_SOURCE == 200112L 1003.1-2001
|
||||
// _POSIX_C_SOURCE == 200809L 1003.1-2008
|
||||
//
|
||||
// The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
|
||||
// this may be overridden by the _ISOC99_SOURCE macro later.
|
||||
|
||||
// _ANSI_SOURCE means to expose ANSI C89 interfaces only.
|
||||
// If the user defines it in addition to one of the POSIX or XOPEN
|
||||
// macros, assume the POSIX/XOPEN macro(s) should take precedence.
|
||||
|
||||
// _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus
|
||||
// override any of the other macros since they are non-exclusive.
|
||||
|
||||
// Finally deal with BSD-specific interfaces that are not covered
|
||||
// by any standards. We expose these when none of the POSIX or XPG
|
||||
// macros is defined or if the user explicitly asks for them.
|
||||
|
||||
// Default values.
|
||||
|
||||
// $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $
|
||||
// $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1982, 1986, 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
// (c) UNIX System Laboratories, Inc.
|
||||
// All or some portions of this file are derived from material licensed
|
||||
// to the University of California by American Telephone and Telegraph
|
||||
// Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
// the permission of UNIX System Laboratories, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.4 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: endian.h,v 1.25 2014/12/21 04:49:00 guenther Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Public definitions for little- and big-endian systems.
|
||||
// This file should be included as <endian.h> in userspace and as
|
||||
// <sys/endian.h> in the kernel.
|
||||
//
|
||||
// System headers that need endian information but that can't or don't
|
||||
// want to export the public names here should include <sys/_endian.h>
|
||||
// and use the internal names: _BYTE_ORDER, _*_ENDIAN, etc.
|
||||
|
||||
// $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $
|
||||
// $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $
|
||||
|
||||
// Copyright (c) 1991, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to Berkeley by
|
||||
// Berkeley Software Design, Inc.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: _endian.h,v 1.8 2018/01/11 23:13:37 dlg Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Internal endianness macros. This pulls in <machine/endian.h> to
|
||||
// get the correct setting direction for the platform and sets internal
|
||||
// ('__' prefix) macros appropriately.
|
||||
|
||||
// $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
|
||||
// $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $
|
||||
// -
|
||||
// Copyright (c) 1990, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// 1. Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// 3. Neither the name of the University nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
// SUCH DAMAGE.
|
||||
//
|
||||
// @(#)types.h 8.3 (Berkeley) 1/5/94
|
||||
// @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
|
||||
// _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned
|
||||
// value for all data types (int, long, ...). The result is an
|
||||
// unsigned long and must be cast to any desired pointer type.
|
||||
//
|
||||
// _ALIGNED_POINTER is a boolean macro that checks whether an address
|
||||
// is valid to fetch data elements of type t from on this architecture.
|
||||
// This does not reflect the optimal alignment, just the possibility
|
||||
// (within reasonable limits).
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
type X__int8_t = int8 /* _types.h:60:22 */
|
||||
type X__uint8_t = uint8 /* _types.h:61:24 */
|
||||
type X__int16_t = int16 /* _types.h:62:17 */
|
||||
type X__uint16_t = uint16 /* _types.h:63:25 */
|
||||
type X__int32_t = int32 /* _types.h:64:15 */
|
||||
type X__uint32_t = uint32 /* _types.h:65:23 */
|
||||
// LONGLONG
|
||||
type X__int64_t = int64 /* _types.h:67:20 */
|
||||
// LONGLONG
|
||||
type X__uint64_t = uint64 /* _types.h:69:28 */
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
type X__int_least8_t = X__int8_t /* _types.h:72:19 */
|
||||
type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */
|
||||
type X__int_least16_t = X__int16_t /* _types.h:74:20 */
|
||||
type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */
|
||||
type X__int_least32_t = X__int32_t /* _types.h:76:20 */
|
||||
type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */
|
||||
type X__int_least64_t = X__int64_t /* _types.h:78:20 */
|
||||
type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
type X__int_fast8_t = X__int32_t /* _types.h:82:20 */
|
||||
type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */
|
||||
type X__int_fast16_t = X__int32_t /* _types.h:84:20 */
|
||||
type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */
|
||||
type X__int_fast32_t = X__int32_t /* _types.h:86:20 */
|
||||
type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */
|
||||
type X__int_fast64_t = X__int64_t /* _types.h:88:20 */
|
||||
type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
type X__intptr_t = int64 /* _types.h:104:16 */
|
||||
type X__uintptr_t = uint64 /* _types.h:105:24 */
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
type X__intmax_t = X__int64_t /* _types.h:108:20 */
|
||||
type X__uintmax_t = X__uint64_t /* _types.h:109:21 */
|
||||
|
||||
// Register size
|
||||
type X__register_t = int64 /* _types.h:112:16 */
|
||||
|
||||
// VM system types
|
||||
type X__vaddr_t = uint64 /* _types.h:115:24 */
|
||||
type X__paddr_t = uint64 /* _types.h:116:24 */
|
||||
type X__vsize_t = uint64 /* _types.h:117:24 */
|
||||
type X__psize_t = uint64 /* _types.h:118:24 */
|
||||
|
||||
// Standard system types
|
||||
type X__double_t = float64 /* _types.h:121:18 */
|
||||
type X__float_t = float32 /* _types.h:122:17 */
|
||||
type X__ptrdiff_t = int64 /* _types.h:123:16 */
|
||||
type X__size_t = uint64 /* _types.h:124:24 */
|
||||
type X__ssize_t = int64 /* _types.h:125:16 */
|
||||
type X__va_list = X__builtin_va_list /* _types.h:127:27 */
|
||||
|
||||
// Wide character support types
|
||||
type X__wchar_t = int32 /* _types.h:137:15 */
|
||||
type X__wint_t = int32 /* _types.h:140:15 */
|
||||
type X__rune_t = int32 /* _types.h:141:15 */
|
||||
type X__wctrans_t = uintptr /* _types.h:142:14 */
|
||||
type X__wctype_t = uintptr /* _types.h:143:14 */
|
||||
|
||||
type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file
|
||||
type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O
|
||||
type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC
|
||||
type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers
|
||||
type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id
|
||||
type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number
|
||||
type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number
|
||||
type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count
|
||||
type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count
|
||||
type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id
|
||||
type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid
|
||||
type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address
|
||||
type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type
|
||||
type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number
|
||||
type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC)
|
||||
type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions
|
||||
type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count
|
||||
type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size
|
||||
type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id
|
||||
type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit
|
||||
type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type
|
||||
type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size
|
||||
type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls
|
||||
type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed)
|
||||
type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds
|
||||
|
||||
// mbstate_t is an opaque object to keep conversion state, during multibyte
|
||||
// stream conversions. The content must not be referenced by user programs.
|
||||
type X__mbstate_t = struct {
|
||||
F__ccgo_pad1 [0]uint64
|
||||
F__mbstate8 [128]int8
|
||||
} /* _types.h:75:3 */
|
||||
|
||||
// Tell sys/endian.h we have MD variants of the swap macros.
|
||||
|
||||
// Note that these macros evaluate their arguments several times.
|
||||
|
||||
// Public names
|
||||
|
||||
// These are specified to be function-like macros to match the spec
|
||||
|
||||
// POSIX names
|
||||
|
||||
// original BSD names
|
||||
|
||||
// these were exposed here before
|
||||
|
||||
// ancient stuff
|
||||
|
||||
type U_char = uint8 /* types.h:51:23 */
|
||||
type U_short = uint16 /* types.h:52:24 */
|
||||
type U_int = uint32 /* types.h:53:22 */
|
||||
type U_long = uint64 /* types.h:54:23 */
|
||||
|
||||
type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility
|
||||
type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility
|
||||
type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility
|
||||
type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility
|
||||
|
||||
type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id
|
||||
type Register_t = X__register_t /* types.h:62:22 */ // register-sized type
|
||||
|
||||
// XXX The exact-width bit types should only be exposed if __BSD_VISIBLE
|
||||
// but the rest of the includes are not ready for that yet.
|
||||
|
||||
type Int8_t = X__int8_t /* types.h:75:19 */
|
||||
|
||||
type Uint8_t = X__uint8_t /* types.h:80:20 */
|
||||
|
||||
type Int16_t = X__int16_t /* types.h:85:20 */
|
||||
|
||||
type Uint16_t = X__uint16_t /* types.h:90:21 */
|
||||
|
||||
type Int32_t = X__int32_t /* types.h:95:20 */
|
||||
|
||||
type Uint32_t = X__uint32_t /* types.h:100:21 */
|
||||
|
||||
type Int64_t = X__int64_t /* types.h:105:20 */
|
||||
|
||||
type Uint64_t = X__uint64_t /* types.h:110:21 */
|
||||
|
||||
// BSD-style unsigned bits types
|
||||
type U_int8_t = X__uint8_t /* types.h:114:19 */
|
||||
type U_int16_t = X__uint16_t /* types.h:115:20 */
|
||||
type U_int32_t = X__uint32_t /* types.h:116:20 */
|
||||
type U_int64_t = X__uint64_t /* types.h:117:20 */
|
||||
|
||||
// quads, deprecated in favor of 64 bit int types
|
||||
type Quad_t = X__int64_t /* types.h:120:19 */
|
||||
type U_quad_t = X__uint64_t /* types.h:121:20 */
|
||||
|
||||
// VM system types
|
||||
type Vaddr_t = X__vaddr_t /* types.h:125:19 */
|
||||
type Paddr_t = X__paddr_t /* types.h:126:19 */
|
||||
type Vsize_t = X__vsize_t /* types.h:127:19 */
|
||||
type Psize_t = X__psize_t /* types.h:128:19 */
|
||||
|
||||
// Standard system types
|
||||
type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file
|
||||
type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O
|
||||
type Caddr_t = uintptr /* types.h:134:14 */ // core address
|
||||
type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address
|
||||
type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address
|
||||
type Dev_t = X__dev_t /* types.h:137:18 */ // device number
|
||||
type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number
|
||||
type Gid_t = X__gid_t /* types.h:139:18 */ // group id
|
||||
type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid
|
||||
type Ino_t = X__ino_t /* types.h:141:18 */ // inode number
|
||||
type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC)
|
||||
type Mode_t = X__mode_t /* types.h:143:18 */ // permissions
|
||||
type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count
|
||||
type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit
|
||||
type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size
|
||||
type Uid_t = X__uid_t /* types.h:147:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:158:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:163:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:168:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:178:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:183:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:188:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:193:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
// File status flags: these are used by open(2), fcntl(2).
|
||||
// They are also used (indirectly) in the kernel file structure f_flags,
|
||||
// which is a superset of the open/fcntl flags. Open flags and f_flags
|
||||
// are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
|
||||
// Open/fcntl flags begin with O_; kernel-internal flags begin with F.
|
||||
// open-only flags
|
||||
|
||||
// Kernel encoding of open mode; separate read and write bits that are
|
||||
// independently testable: 1 greater than the above.
|
||||
//
|
||||
// XXX
|
||||
// FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
|
||||
// which was documented to use FREAD/FWRITE, continues to work.
|
||||
|
||||
// POSIX 1003.1 specifies a higher granularity for synchronous operations
|
||||
// than we support. Since synchronicity is all or nothing in OpenBSD
|
||||
// we just define these to be the same as O_SYNC.
|
||||
|
||||
// defined by POSIX 1003.1; BSD default, this bit is not required
|
||||
|
||||
// defined by POSIX Issue 7
|
||||
|
||||
// The O_* flags used to have only F* names, which were used in the kernel
|
||||
// and by fcntl. We retain the F* names for the kernel f_flags field
|
||||
// and for backward compatibility for fcntl.
|
||||
|
||||
// Constants used for fcntl(2)
|
||||
|
||||
// command values
|
||||
|
||||
// file descriptor flags (F_GETFD, F_SETFD)
|
||||
|
||||
// record locking flags (F_GETLK, F_SETLK, F_SETLKW)
|
||||
|
||||
// Advisory file segment locking data type -
|
||||
// information passed to system by user
|
||||
type Flock = struct {
|
||||
Fl_start Off_t
|
||||
Fl_len Off_t
|
||||
Fl_pid Pid_t
|
||||
Fl_type int16
|
||||
Fl_whence int16
|
||||
} /* fcntl.h:180:1 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
422
fcntl/fcntl_windows_386.go
Normal file
422
fcntl/fcntl_windows_386.go
Normal file
|
@ -0,0 +1,422 @@
|
|||
// Code generated by 'ccgo fcntl/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 fcntl/fcntl_windows_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
DUMMYSTRUCTNAME = 0 // _mingw.h:519:1:
|
||||
DUMMYSTRUCTNAME1 = 0 // _mingw.h:520:1:
|
||||
DUMMYSTRUCTNAME2 = 0 // _mingw.h:521:1:
|
||||
DUMMYSTRUCTNAME3 = 0 // _mingw.h:522:1:
|
||||
DUMMYSTRUCTNAME4 = 0 // _mingw.h:523:1:
|
||||
DUMMYSTRUCTNAME5 = 0 // _mingw.h:524:1:
|
||||
DUMMYUNIONNAME = 0 // _mingw.h:497:1:
|
||||
DUMMYUNIONNAME1 = 0 // _mingw.h:498:1:
|
||||
DUMMYUNIONNAME2 = 0 // _mingw.h:499:1:
|
||||
DUMMYUNIONNAME3 = 0 // _mingw.h:500:1:
|
||||
DUMMYUNIONNAME4 = 0 // _mingw.h:501:1:
|
||||
DUMMYUNIONNAME5 = 0 // _mingw.h:502:1:
|
||||
DUMMYUNIONNAME6 = 0 // _mingw.h:503:1:
|
||||
DUMMYUNIONNAME7 = 0 // _mingw.h:504:1:
|
||||
DUMMYUNIONNAME8 = 0 // _mingw.h:505:1:
|
||||
DUMMYUNIONNAME9 = 0 // _mingw.h:506:1:
|
||||
F_OK = 0 // io.h:182:1:
|
||||
MINGW_DDK_H = 0 // _mingw_ddk.h:2:1:
|
||||
MINGW_HAS_DDK_H = 1 // _mingw_ddk.h:4:1:
|
||||
MINGW_HAS_SECURE_API = 1 // _mingw.h:602:1:
|
||||
MINGW_SDK_INIT = 0 // _mingw.h:598:1:
|
||||
O_ACCMODE = 3 // fcntl.h:50:1:
|
||||
O_APPEND = 8 // fcntl.h:39:1:
|
||||
O_BINARY = 32768 // fcntl.h:44:1:
|
||||
O_CREAT = 256 // fcntl.h:40:1:
|
||||
O_EXCL = 1024 // fcntl.h:42:1:
|
||||
O_NOINHERIT = 128 // fcntl.h:47:1:
|
||||
O_RANDOM = 16 // fcntl.h:49:1:
|
||||
O_RAW = 32768 // fcntl.h:45:1:
|
||||
O_RDONLY = 0 // fcntl.h:36:1:
|
||||
O_RDWR = 2 // fcntl.h:38:1:
|
||||
O_SEQUENTIAL = 32 // fcntl.h:48:1:
|
||||
O_TEMPORARY = 64 // fcntl.h:46:1:
|
||||
O_TEXT = 16384 // fcntl.h:43:1:
|
||||
O_TRUNC = 512 // fcntl.h:41:1:
|
||||
O_WRONLY = 1 // fcntl.h:37:1:
|
||||
R_OK = 4 // io.h:185:1:
|
||||
UNALIGNED = 0 // _mingw.h:384:1:
|
||||
USE___UUIDOF = 0 // _mingw.h:77:1:
|
||||
WIN32 = 1 // <predefined>:258:1:
|
||||
WINNT = 1 // <predefined>:306:1:
|
||||
W_OK = 2 // io.h:184:1:
|
||||
X_OK = 1 // io.h:183:1:
|
||||
X_AGLOBAL = 0 // _mingw.h:346:1:
|
||||
X_ANONYMOUS_STRUCT = 0 // _mingw.h:474:1:
|
||||
X_ANONYMOUS_UNION = 0 // _mingw.h:473:1:
|
||||
X_ARGMAX = 100 // _mingw.h:402:1:
|
||||
X_A_ARCH = 0x20 // io.h:156:1:
|
||||
X_A_HIDDEN = 0x02 // io.h:153:1:
|
||||
X_A_NORMAL = 0x00 // io.h:151:1:
|
||||
X_A_RDONLY = 0x01 // io.h:152:1:
|
||||
X_A_SUBDIR = 0x10 // io.h:155:1:
|
||||
X_A_SYSTEM = 0x04 // io.h:154:1:
|
||||
X_CONST_RETURN = 0 // _mingw.h:377:1:
|
||||
X_CRTNOALIAS = 0 // corecrt.h:29:1:
|
||||
X_CRTRESTRICT = 0 // corecrt.h:33:1:
|
||||
X_CRT_ALTERNATIVE_IMPORTED = 0 // _mingw.h:313:1:
|
||||
X_CRT_DIRECTORY_DEFINED = 0 // io.h:214:1:
|
||||
X_CRT_MANAGED_HEAP_DEPRECATE = 0 // _mingw.h:361:1:
|
||||
X_CRT_MEMORY_DEFINED = 0 // string.h:44:1:
|
||||
X_CRT_PACKING = 8 // corecrt.h:14:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // _mingw_secapi.h:34:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // _mingw_secapi.h:35:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // _mingw_secapi.h:36:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // _mingw_secapi.h:37:1:
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // _mingw_secapi.h:38:1:
|
||||
X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // corecrt.h:501:1:
|
||||
X_DLL = 0 // _mingw.h:326:1:
|
||||
X_ERRCODE_DEFINED = 0 // corecrt.h:117:1:
|
||||
X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
|
||||
X_FILE_OFFSET_BITS_SET_LSEEK = 0 // io.h:350:1:
|
||||
X_FILE_OFFSET_BITS_SET_OFFT = 0 // _mingw_off_t.h:21:1:
|
||||
X_FINDDATA_T_DEFINED = 0 // io.h:89:1:
|
||||
X_FSIZE_T_DEFINED = 0 // io.h:30:1:
|
||||
X_ILP32 = 1 // <predefined>:211:1:
|
||||
X_INC_CORECRT = 0 // corecrt.h:8:1:
|
||||
X_INC_CRTDEFS = 0 // crtdefs.h:8:1:
|
||||
X_INC_CRTDEFS_MACRO = 0 // _mingw_mac.h:8:1:
|
||||
X_INC_FCNTL = 0 // fcntl.h:11:1:
|
||||
X_INC_MINGW_SECAPI = 0 // _mingw_secapi.h:8:1:
|
||||
X_INC_STRING = 0 // string.h:7:1:
|
||||
X_INC_STRING_S = 0 // string_s.h:7:1:
|
||||
X_INC_VADEFS = 0 // vadefs.h:7:1:
|
||||
X_INC__MINGW_H = 0 // _mingw.h:8:1:
|
||||
X_INT128_DEFINED = 0 // _mingw.h:237:1:
|
||||
X_INTEGRAL_MAX_BITS = 64 // <predefined>:320:1:
|
||||
X_INTPTR_T_DEFINED = 0 // corecrt.h:62:1:
|
||||
X_IO_H_ = 0 // io.h:7:1:
|
||||
X_MT = 0 // _mingw.h:330:1:
|
||||
X_M_IX86 = 600 // _mingw_mac.h:54:1:
|
||||
X_NLSCMPERROR = 2147483647 // string.h:26:1:
|
||||
X_NLSCMP_DEFINED = 0 // string.h:25:1:
|
||||
X_OFF64_T_DEFINED = 0 // _mingw_off_t.h:12:1:
|
||||
X_OFF_T_ = 0 // _mingw_off_t.h:4:1:
|
||||
X_OFF_T_DEFINED = 0 // _mingw_off_t.h:2:1:
|
||||
X_O_ACCMODE = 3 // fcntl.h:25:1:
|
||||
X_O_APPEND = 0x0008 // fcntl.h:16:1:
|
||||
X_O_BINARY = 0x8000 // fcntl.h:21:1:
|
||||
X_O_CREAT = 0x0100 // fcntl.h:17:1:
|
||||
X_O_EXCL = 0x0400 // fcntl.h:19:1:
|
||||
X_O_NOINHERIT = 0x0080 // fcntl.h:28:1:
|
||||
X_O_RANDOM = 0x0010 // fcntl.h:33:1:
|
||||
X_O_RAW = 32768 // fcntl.h:27:1:
|
||||
X_O_RDONLY = 0x0000 // fcntl.h:13:1:
|
||||
X_O_RDWR = 0x0002 // fcntl.h:15:1:
|
||||
X_O_SEQUENTIAL = 0x0020 // fcntl.h:32:1:
|
||||
X_O_SHORT_LIVED = 0x1000 // fcntl.h:30:1:
|
||||
X_O_TEMPORARY = 0x0040 // fcntl.h:29:1:
|
||||
X_O_TEXT = 0x4000 // fcntl.h:20:1:
|
||||
X_O_TRUNC = 0x0200 // fcntl.h:18:1:
|
||||
X_O_U16TEXT = 0x20000 // fcntl.h:23:1:
|
||||
X_O_U8TEXT = 0x40000 // fcntl.h:24:1:
|
||||
X_O_WRONLY = 0x0001 // fcntl.h:14:1:
|
||||
X_O_WTEXT = 0x10000 // fcntl.h:22:1:
|
||||
X_PGLOBAL = 0 // _mingw.h:342:1:
|
||||
X_PTRDIFF_T_ = 0 // corecrt.h:90:1:
|
||||
X_PTRDIFF_T_DEFINED = 0 // corecrt.h:88:1:
|
||||
X_RSIZE_T_DEFINED = 0 // corecrt.h:58:1:
|
||||
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // _mingw.h:349:1:
|
||||
X_SIZE_T_DEFINED = 0 // corecrt.h:37:1:
|
||||
X_SSIZE_T_DEFINED = 0 // corecrt.h:47:1:
|
||||
X_TAGLC_ID_DEFINED = 0 // corecrt.h:447:1:
|
||||
X_THREADLOCALEINFO = 0 // corecrt.h:456:1:
|
||||
X_TIME32_T_DEFINED = 0 // corecrt.h:122:1:
|
||||
X_TIME64_T_DEFINED = 0 // corecrt.h:127:1:
|
||||
X_TIME_T_DEFINED = 0 // corecrt.h:139:1:
|
||||
X_UINTPTR_T_DEFINED = 0 // corecrt.h:75:1:
|
||||
X_USE_32BIT_TIME_T = 0 // _mingw.h:372:1:
|
||||
X_VA_LIST_DEFINED = 0 // <builtin>:55:1:
|
||||
X_W64 = 0 // _mingw.h:296:1:
|
||||
X_WCHAR_T_DEFINED = 0 // corecrt.h:101:1:
|
||||
X_WCTYPE_T_DEFINED = 0 // corecrt.h:108:1:
|
||||
X_WConst_return = 0 // string.h:41:1:
|
||||
X_WFINDDATA_T_DEFINED = 0 // io.h:148:1:
|
||||
X_WIN32 = 1 // <predefined>:164:1:
|
||||
X_WIN32_WINNT = 0x502 // _mingw.h:233:1:
|
||||
X_WINT_T = 0 // corecrt.h:110:1:
|
||||
X_WIO_DEFINED = 0 // io.h:295:1:
|
||||
X_WSTRING_DEFINED = 0 // string.h:129:1:
|
||||
X_WSTRING_S_DEFINED = 0 // string_s.h:48:1:
|
||||
X_X86_ = 1 // <predefined>:169:1:
|
||||
I386 = 1 // <predefined>:171:1:
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int32 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint32 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint16 /* <builtin>:15:24 */
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// This macro holds an monotonic increasing value, which indicates
|
||||
// a specific fix/patch is present on trunk. This value isn't related to
|
||||
// minor/major version-macros. It is increased on demand, if a big
|
||||
// fix was applied to trunk. This macro gets just increased on trunk. For
|
||||
// other branches its value won't be modified.
|
||||
|
||||
// mingw.org's version macros: these make gcc to define
|
||||
// MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
|
||||
// and the __mingwthr_key_dtor() function from the MinGW
|
||||
// CRT in its private gthr-win32.h header.
|
||||
|
||||
// Set VC specific compiler target macros.
|
||||
|
||||
// For x86 we have always to prefix by underscore.
|
||||
|
||||
// Special case nameless struct/union.
|
||||
|
||||
// MinGW-w64 has some additional C99 printf/scanf feature support.
|
||||
// So we add some helper macros to ease recognition of them.
|
||||
|
||||
// If _FORTIFY_SOURCE is enabled, some inline functions may use
|
||||
// __builtin_va_arg_pack(). GCC may report an error if the address
|
||||
// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case.
|
||||
|
||||
// Enable workaround for ABI incompatibility on affected platforms
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
|
||||
// Templates won't work in C, will break if secure API is not enabled, disabled
|
||||
|
||||
// https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
|
||||
// fallback on default implementation if we can't know the size of the destination
|
||||
|
||||
// Include _cygwin.h if we're building a Cygwin application.
|
||||
|
||||
// Target specific macro replacement for type "long". In the Windows API,
|
||||
// the type long is always 32 bit, even if the target is 64 bit (LLP64).
|
||||
// On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right
|
||||
// sized definitions and declarations, all usage of type long in the Windows
|
||||
// headers have to be replaced by the below defined macro __LONG32.
|
||||
|
||||
// C/C++ specific language defines.
|
||||
|
||||
// Note the extern. This is needed to work around GCC's
|
||||
// limitations in handling dllimport attribute.
|
||||
|
||||
// Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
|
||||
// variadiac macro facility, because variadic macros cause syntax
|
||||
// errors with --traditional-cpp.
|
||||
|
||||
// High byte is the major version, low byte is the minor.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// for backward compatibility
|
||||
|
||||
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
|
||||
|
||||
type Ssize_t = int32 /* corecrt.h:52:13 */
|
||||
|
||||
type Rsize_t = Size_t /* corecrt.h:57:16 */
|
||||
|
||||
type Intptr_t = int32 /* corecrt.h:69:13 */
|
||||
|
||||
type Uintptr_t = uint32 /* corecrt.h:82:22 */
|
||||
|
||||
type Wint_t = uint16 /* corecrt.h:111:24 */
|
||||
type Wctype_t = uint16 /* corecrt.h:112:24 */
|
||||
|
||||
type Errno_t = int32 /* corecrt.h:118:13 */
|
||||
|
||||
type X__time32_t = int32 /* corecrt.h:123:14 */
|
||||
|
||||
type X__time64_t = int64 /* corecrt.h:128:35 */
|
||||
|
||||
type Time_t = X__time32_t /* corecrt.h:141:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
Flc_codepage uint32
|
||||
Flc_collate_cp uint32
|
||||
Flc_handle [6]uint32
|
||||
Flc_id [6]LC_ID
|
||||
Flc_category [6]struct {
|
||||
Flocale uintptr
|
||||
Fwlocale uintptr
|
||||
Frefcount uintptr
|
||||
Fwrefcount uintptr
|
||||
}
|
||||
Flc_clike int32
|
||||
Fmb_cur_max int32
|
||||
Flconv_intl_refcount uintptr
|
||||
Flconv_num_refcount uintptr
|
||||
Flconv_mon_refcount uintptr
|
||||
Flconv uintptr
|
||||
Fctype1_refcount uintptr
|
||||
Fctype1 uintptr
|
||||
Fpctype uintptr
|
||||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* corecrt.h:435:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */
|
||||
type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* corecrt.h:441:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */
|
||||
type X_locale_t = uintptr /* corecrt.h:444:19 */
|
||||
|
||||
type TagLC_ID = struct {
|
||||
FwLanguage uint16
|
||||
FwCountry uint16
|
||||
FwCodePage uint16
|
||||
} /* corecrt.h:435:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* corecrt.h:452:3 */
|
||||
type LPLC_ID = uintptr /* corecrt.h:452:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */
|
||||
type X_fsize_t = uint32 /* io.h:29:25 */
|
||||
|
||||
type X_finddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:35:3 */
|
||||
|
||||
type X_finddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
F__ccgo_pad1 [4]byte
|
||||
} /* io.h:44:3 */
|
||||
|
||||
type X_finddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:53:3 */
|
||||
|
||||
type X__finddata64_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
F__ccgo_pad2 [4]byte
|
||||
} /* io.h:62:3 */
|
||||
|
||||
type X_wfinddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:94:3 */
|
||||
|
||||
type X_wfinddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:103:3 */
|
||||
|
||||
type X_wfinddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
F__ccgo_pad2 [4]byte
|
||||
} /* io.h:112:3 */
|
||||
|
||||
type X_wfinddata64_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:121:3 */
|
||||
|
||||
type X_off_t = int32 /* _mingw_off_t.h:5:16 */
|
||||
type Off32_t = int32 /* _mingw_off_t.h:7:16 */
|
||||
|
||||
type X_off64_t = int64 /* _mingw_off_t.h:13:39 */
|
||||
type Off64_t = int64 /* _mingw_off_t.h:15:39 */
|
||||
|
||||
type Off_t = Off64_t /* _mingw_off_t.h:24:17 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
421
fcntl/fcntl_windows_amd64.go
Normal file
421
fcntl/fcntl_windows_amd64.go
Normal file
|
@ -0,0 +1,421 @@
|
|||
// Code generated by 'ccgo fcntl\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
DUMMYSTRUCTNAME = 0
|
||||
DUMMYSTRUCTNAME1 = 0
|
||||
DUMMYSTRUCTNAME2 = 0
|
||||
DUMMYSTRUCTNAME3 = 0
|
||||
DUMMYSTRUCTNAME4 = 0
|
||||
DUMMYSTRUCTNAME5 = 0
|
||||
DUMMYUNIONNAME = 0
|
||||
DUMMYUNIONNAME1 = 0
|
||||
DUMMYUNIONNAME2 = 0
|
||||
DUMMYUNIONNAME3 = 0
|
||||
DUMMYUNIONNAME4 = 0
|
||||
DUMMYUNIONNAME5 = 0
|
||||
DUMMYUNIONNAME6 = 0
|
||||
DUMMYUNIONNAME7 = 0
|
||||
DUMMYUNIONNAME8 = 0
|
||||
DUMMYUNIONNAME9 = 0
|
||||
F_OK = 0
|
||||
MINGW_DDK_H = 0
|
||||
MINGW_DDRAW_VERSION = 7
|
||||
MINGW_HAS_DDK_H = 1
|
||||
MINGW_HAS_DDRAW_H = 1
|
||||
MINGW_HAS_SECURE_API = 1
|
||||
MINGW_SDK_INIT = 0
|
||||
O_ACCMODE = 3
|
||||
O_APPEND = 8
|
||||
O_BINARY = 32768
|
||||
O_CREAT = 256
|
||||
O_EXCL = 1024
|
||||
O_NOINHERIT = 128
|
||||
O_RANDOM = 16
|
||||
O_RAW = 32768
|
||||
O_RDONLY = 0
|
||||
O_RDWR = 2
|
||||
O_SEQUENTIAL = 32
|
||||
O_TEMPORARY = 64
|
||||
O_TEXT = 16384
|
||||
O_TRUNC = 512
|
||||
O_WRONLY = 1
|
||||
R_OK = 4
|
||||
UNALIGNED = 0
|
||||
USE___UUIDOF = 0
|
||||
WIN32 = 1
|
||||
WIN64 = 1
|
||||
WINNT = 1
|
||||
W_OK = 2
|
||||
X_OK = 1
|
||||
X_AGLOBAL = 0
|
||||
X_ANONYMOUS_STRUCT = 0
|
||||
X_ANONYMOUS_UNION = 0
|
||||
X_ARGMAX = 100
|
||||
X_A_ARCH = 0x20
|
||||
X_A_HIDDEN = 0x02
|
||||
X_A_NORMAL = 0x00
|
||||
X_A_RDONLY = 0x01
|
||||
X_A_SUBDIR = 0x10
|
||||
X_A_SYSTEM = 0x04
|
||||
X_CONST_RETURN = 0
|
||||
X_CRTNOALIAS = 0
|
||||
X_CRTRESTRICT = 0
|
||||
X_CRT_ALTERNATIVE_IMPORTED = 0
|
||||
X_CRT_DIRECTORY_DEFINED = 0
|
||||
X_CRT_MANAGED_HEAP_DEPRECATE = 0
|
||||
X_CRT_MEMORY_DEFINED = 0
|
||||
X_CRT_PACKING = 8
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0
|
||||
X_DLL = 0
|
||||
X_ERRCODE_DEFINED = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_FILE_OFFSET_BITS_SET_LSEEK = 0
|
||||
X_FILE_OFFSET_BITS_SET_OFFT = 0
|
||||
X_FINDDATA_T_DEFINED = 0
|
||||
X_FSIZE_T_DEFINED = 0
|
||||
X_INC_CRTDEFS = 0
|
||||
X_INC_CRTDEFS_MACRO = 0
|
||||
X_INC_FCNTL = 0
|
||||
X_INC_MINGW_SECAPI = 0
|
||||
X_INC_STRING = 0
|
||||
X_INC_STRING_S = 0
|
||||
X_INC_VADEFS = 0
|
||||
X_INC__MINGW_H = 0
|
||||
X_INT128_DEFINED = 0
|
||||
X_INTEGRAL_MAX_BITS = 64
|
||||
X_INTPTR_T_DEFINED = 0
|
||||
X_IO_H_ = 0
|
||||
X_MT = 0
|
||||
X_M_AMD64 = 100
|
||||
X_M_X64 = 100
|
||||
X_NLSCMPERROR = 2147483647
|
||||
X_NLSCMP_DEFINED = 0
|
||||
X_OFF64_T_DEFINED = 0
|
||||
X_OFF_T_ = 0
|
||||
X_OFF_T_DEFINED = 0
|
||||
X_O_ACCMODE = 3
|
||||
X_O_APPEND = 0x0008
|
||||
X_O_BINARY = 0x8000
|
||||
X_O_CREAT = 0x0100
|
||||
X_O_EXCL = 0x0400
|
||||
X_O_NOINHERIT = 0x0080
|
||||
X_O_RANDOM = 0x0010
|
||||
X_O_RAW = 32768
|
||||
X_O_RDONLY = 0x0000
|
||||
X_O_RDWR = 0x0002
|
||||
X_O_SEQUENTIAL = 0x0020
|
||||
X_O_SHORT_LIVED = 0x1000
|
||||
X_O_TEMPORARY = 0x0040
|
||||
X_O_TEXT = 0x4000
|
||||
X_O_TRUNC = 0x0200
|
||||
X_O_U16TEXT = 0x20000
|
||||
X_O_U8TEXT = 0x40000
|
||||
X_O_WRONLY = 0x0001
|
||||
X_O_WTEXT = 0x10000
|
||||
X_PGLOBAL = 0
|
||||
X_PTRDIFF_T_ = 0
|
||||
X_PTRDIFF_T_DEFINED = 0
|
||||
X_REENTRANT = 1
|
||||
X_RSIZE_T_DEFINED = 0
|
||||
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD
|
||||
X_SIZE_T_DEFINED = 0
|
||||
X_SSIZE_T_DEFINED = 0
|
||||
X_TAGLC_ID_DEFINED = 0
|
||||
X_THREADLOCALEINFO = 0
|
||||
X_TIME32_T_DEFINED = 0
|
||||
X_TIME64_T_DEFINED = 0
|
||||
X_TIME_T_DEFINED = 0
|
||||
X_UINTPTR_T_DEFINED = 0
|
||||
X_VA_LIST_DEFINED = 0
|
||||
X_W64 = 0
|
||||
X_WCHAR_T_DEFINED = 0
|
||||
X_WCTYPE_T_DEFINED = 0
|
||||
X_WConst_return = 0
|
||||
X_WFINDDATA_T_DEFINED = 0
|
||||
X_WIN32 = 1
|
||||
X_WIN32_WINNT = 0x502
|
||||
X_WIN64 = 1
|
||||
X_WINT_T = 0
|
||||
X_WIO_DEFINED = 0
|
||||
X_WSTRING_DEFINED = 0
|
||||
X_WSTRING_S_DEFINED = 0
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint16 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// This macro holds an monotonic increasing value, which indicates
|
||||
// a specific fix/patch is present on trunk. This value isn't related to
|
||||
// minor/major version-macros. It is increased on demand, if a big
|
||||
// fix was applied to trunk. This macro gets just increased on trunk. For
|
||||
// other branches its value won't be modified.
|
||||
|
||||
// mingw.org's version macros: these make gcc to define
|
||||
// MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
|
||||
// and the __mingwthr_key_dtor() function from the MinGW
|
||||
// CRT in its private gthr-win32.h header.
|
||||
|
||||
// Set VC specific compiler target macros.
|
||||
|
||||
// MS does not prefix symbols by underscores for 64-bit.
|
||||
// As we have to support older gcc version, which are using underscores
|
||||
// as symbol prefix for x64, we have to check here for the user label
|
||||
// prefix defined by gcc.
|
||||
|
||||
// Special case nameless struct/union.
|
||||
|
||||
// MinGW-w64 has some additional C99 printf/scanf feature support.
|
||||
// So we add some helper macros to ease recognition of them.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
|
||||
// Templates won't work in C, will break if secure API is not enabled, disabled
|
||||
|
||||
// https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
|
||||
// fallback on default implementation if we can't know the size of the destination
|
||||
|
||||
// Include _cygwin.h if we're building a Cygwin application.
|
||||
|
||||
// Target specific macro replacement for type "long". In the Windows API,
|
||||
// the type long is always 32 bit, even if the target is 64 bit (LLP64).
|
||||
// On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right
|
||||
// sized definitions and declarations, all usage of type long in the Windows
|
||||
// headers have to be replaced by the below defined macro __LONG32.
|
||||
|
||||
// C/C++ specific language defines.
|
||||
|
||||
// Note the extern. This is needed to work around GCC's
|
||||
// limitations in handling dllimport attribute.
|
||||
|
||||
// Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
|
||||
// variadiac macro facility, because variadic macros cause syntax
|
||||
// errors with --traditional-cpp.
|
||||
|
||||
// High byte is the major version, low byte is the minor.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
|
||||
|
||||
type Ssize_t = int64 /* crtdefs.h:45:35 */
|
||||
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
|
||||
type Intptr_t = int64 /* crtdefs.h:62:35 */
|
||||
|
||||
type Uintptr_t = uint64 /* crtdefs.h:75:44 */
|
||||
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
|
||||
type Time_t = X__time64_t /* crtdefs.h:138:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
Flc_codepage uint32
|
||||
Flc_collate_cp uint32
|
||||
Flc_handle [6]uint32
|
||||
Flc_id [6]LC_ID
|
||||
Flc_category [6]struct {
|
||||
Flocale uintptr
|
||||
Fwlocale uintptr
|
||||
Frefcount uintptr
|
||||
Fwrefcount uintptr
|
||||
}
|
||||
Flc_clike int32
|
||||
Fmb_cur_max int32
|
||||
Flconv_intl_refcount uintptr
|
||||
Flconv_num_refcount uintptr
|
||||
Flconv_mon_refcount uintptr
|
||||
Flconv uintptr
|
||||
Fctype1_refcount uintptr
|
||||
Fctype1 uintptr
|
||||
Fpctype uintptr
|
||||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* crtdefs.h:428:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* crtdefs.h:431:3 */
|
||||
type X_locale_t = uintptr /* crtdefs.h:431:19 */
|
||||
|
||||
type TagLC_ID = struct {
|
||||
FwLanguage uint16
|
||||
FwCountry uint16
|
||||
FwCodePage uint16
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
type X_fsize_t = uint32 /* io.h:29:25 */
|
||||
|
||||
type X_finddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:35:3 */
|
||||
|
||||
type X_finddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
F__ccgo_pad1 [4]byte
|
||||
} /* io.h:44:3 */
|
||||
|
||||
type X_finddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:53:3 */
|
||||
|
||||
type X__finddata64_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
F__ccgo_pad2 [4]byte
|
||||
} /* io.h:62:3 */
|
||||
|
||||
type X_wfinddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:94:3 */
|
||||
|
||||
type X_wfinddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:103:3 */
|
||||
|
||||
type X_wfinddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
F__ccgo_pad2 [4]byte
|
||||
} /* io.h:112:3 */
|
||||
|
||||
type X_wfinddata64_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:121:3 */
|
||||
|
||||
type X_off_t = int32 /* _mingw_off_t.h:5:16 */
|
||||
type Off32_t = int32 /* _mingw_off_t.h:7:16 */
|
||||
|
||||
type X_off64_t = int64 /* _mingw_off_t.h:13:39 */
|
||||
type Off64_t = int64 /* _mingw_off_t.h:15:39 */
|
||||
|
||||
type Off_t = Off64_t /* _mingw_off_t.h:24:17 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
424
fcntl/fcntl_windows_arm64.go
Normal file
424
fcntl/fcntl_windows_arm64.go
Normal file
|
@ -0,0 +1,424 @@
|
|||
// Code generated by 'ccgo fcntl\gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o fcntl\fcntl_windows_arm64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
DUMMYSTRUCTNAME = 0
|
||||
DUMMYSTRUCTNAME1 = 0
|
||||
DUMMYSTRUCTNAME2 = 0
|
||||
DUMMYSTRUCTNAME3 = 0
|
||||
DUMMYSTRUCTNAME4 = 0
|
||||
DUMMYSTRUCTNAME5 = 0
|
||||
DUMMYUNIONNAME = 0
|
||||
DUMMYUNIONNAME1 = 0
|
||||
DUMMYUNIONNAME2 = 0
|
||||
DUMMYUNIONNAME3 = 0
|
||||
DUMMYUNIONNAME4 = 0
|
||||
DUMMYUNIONNAME5 = 0
|
||||
DUMMYUNIONNAME6 = 0
|
||||
DUMMYUNIONNAME7 = 0
|
||||
DUMMYUNIONNAME8 = 0
|
||||
DUMMYUNIONNAME9 = 0
|
||||
F_OK = 0
|
||||
MINGW_DDK_H = 0
|
||||
MINGW_HAS_DDK_H = 1
|
||||
MINGW_HAS_SECURE_API = 1
|
||||
MINGW_SDK_INIT = 0
|
||||
O_ACCMODE = 3
|
||||
O_APPEND = 8
|
||||
O_BINARY = 32768
|
||||
O_CREAT = 256
|
||||
O_EXCL = 1024
|
||||
O_NOINHERIT = 128
|
||||
O_RANDOM = 16
|
||||
O_RAW = 32768
|
||||
O_RDONLY = 0
|
||||
O_RDWR = 2
|
||||
O_SEQUENTIAL = 32
|
||||
O_TEMPORARY = 64
|
||||
O_TEXT = 16384
|
||||
O_TRUNC = 512
|
||||
O_WRONLY = 1
|
||||
R_OK = 4
|
||||
UNALIGNED = 0
|
||||
USE___UUIDOF = 0
|
||||
WIN32 = 1
|
||||
WIN64 = 1
|
||||
WINNT = 1
|
||||
W_OK = 2
|
||||
X_OK = 1
|
||||
X_AGLOBAL = 0
|
||||
X_ANONYMOUS_STRUCT = 0
|
||||
X_ANONYMOUS_UNION = 0
|
||||
X_ARGMAX = 100
|
||||
X_ARM64_ = 1
|
||||
X_A_ARCH = 0x20
|
||||
X_A_HIDDEN = 0x02
|
||||
X_A_NORMAL = 0x00
|
||||
X_A_RDONLY = 0x01
|
||||
X_A_SUBDIR = 0x10
|
||||
X_A_SYSTEM = 0x04
|
||||
X_CONST_RETURN = 0
|
||||
X_CRTNOALIAS = 0
|
||||
X_CRTRESTRICT = 0
|
||||
X_CRT_ALTERNATIVE_IMPORTED = 0
|
||||
X_CRT_DIRECTORY_DEFINED = 0
|
||||
X_CRT_MANAGED_HEAP_DEPRECATE = 0
|
||||
X_CRT_MEMORY_DEFINED = 0
|
||||
X_CRT_PACKING = 8
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0
|
||||
X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0
|
||||
X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0
|
||||
X_DLL = 0
|
||||
X_ERRCODE_DEFINED = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_FILE_OFFSET_BITS_SET_LSEEK = 0
|
||||
X_FILE_OFFSET_BITS_SET_OFFT = 0
|
||||
X_FINDDATA_T_DEFINED = 0
|
||||
X_FSIZE_T_DEFINED = 0
|
||||
X_INC_CORECRT = 0
|
||||
X_INC_CRTDEFS = 0
|
||||
X_INC_CRTDEFS_MACRO = 0
|
||||
X_INC_FCNTL = 0
|
||||
X_INC_MINGW_SECAPI = 0
|
||||
X_INC_STRING = 0
|
||||
X_INC_STRING_S = 0
|
||||
X_INC_VADEFS = 0
|
||||
X_INC__MINGW_H = 0
|
||||
X_INT128_DEFINED = 0
|
||||
X_INTPTR_T_DEFINED = 0
|
||||
X_IO_H_ = 0
|
||||
X_MT = 0
|
||||
X_M_ARM64 = 1
|
||||
X_NLSCMPERROR = 2147483647
|
||||
X_NLSCMP_DEFINED = 0
|
||||
X_OFF64_T_DEFINED = 0
|
||||
X_OFF_T_ = 0
|
||||
X_OFF_T_DEFINED = 0
|
||||
X_O_ACCMODE = 3
|
||||
X_O_APPEND = 0x0008
|
||||
X_O_BINARY = 0x8000
|
||||
X_O_CREAT = 0x0100
|
||||
X_O_EXCL = 0x0400
|
||||
X_O_NOINHERIT = 0x0080
|
||||
X_O_RANDOM = 0x0010
|
||||
X_O_RAW = 32768
|
||||
X_O_RDONLY = 0x0000
|
||||
X_O_RDWR = 0x0002
|
||||
X_O_SEQUENTIAL = 0x0020
|
||||
X_O_SHORT_LIVED = 0x1000
|
||||
X_O_TEMPORARY = 0x0040
|
||||
X_O_TEXT = 0x4000
|
||||
X_O_TRUNC = 0x0200
|
||||
X_O_U16TEXT = 0x20000
|
||||
X_O_U8TEXT = 0x40000
|
||||
X_O_WRONLY = 0x0001
|
||||
X_O_WTEXT = 0x10000
|
||||
X_PGLOBAL = 0
|
||||
X_PTRDIFF_T_ = 0
|
||||
X_PTRDIFF_T_DEFINED = 0
|
||||
X_RSIZE_T_DEFINED = 0
|
||||
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD
|
||||
X_SIZE_T_DEFINED = 0
|
||||
X_SSIZE_T_DEFINED = 0
|
||||
X_TAGLC_ID_DEFINED = 0
|
||||
X_THREADLOCALEINFO = 0
|
||||
X_TIME32_T_DEFINED = 0
|
||||
X_TIME64_T_DEFINED = 0
|
||||
X_TIME_T_DEFINED = 0
|
||||
X_UCRT = 0
|
||||
X_UINTPTR_T_DEFINED = 0
|
||||
X_VA_LIST_DEFINED = 0
|
||||
X_W64 = 0
|
||||
X_WCHAR_T_DEFINED = 0
|
||||
X_WCTYPE_T_DEFINED = 0
|
||||
X_WConst_return = 0
|
||||
X_WFINDDATA_T_DEFINED = 0
|
||||
X_WIN32 = 1
|
||||
X_WIN32_WINNT = 0x601
|
||||
X_WIN64 = 1
|
||||
X_WINT_T = 0
|
||||
X_WIO_DEFINED = 0
|
||||
X_WSTRING_DEFINED = 0
|
||||
X_WSTRING_S_DEFINED = 0
|
||||
)
|
||||
|
||||
type Ptrdiff_t = int64 /* <builtin>:3:26 */
|
||||
|
||||
type Size_t = uint64 /* <builtin>:9:23 */
|
||||
|
||||
type Wchar_t = uint16 /* <builtin>:15:24 */
|
||||
|
||||
type X__int128_t = struct {
|
||||
Flo int64
|
||||
Fhi int64
|
||||
} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
|
||||
type X__uint128_t = struct {
|
||||
Flo uint64
|
||||
Fhi uint64
|
||||
} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
|
||||
|
||||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// This macro holds an monotonic increasing value, which indicates
|
||||
// a specific fix/patch is present on trunk. This value isn't related to
|
||||
// minor/major version-macros. It is increased on demand, if a big
|
||||
// fix was applied to trunk. This macro gets just increased on trunk. For
|
||||
// other branches its value won't be modified.
|
||||
|
||||
// mingw.org's version macros: these make gcc to define
|
||||
// MINGW32_SUPPORTS_MT_EH and to use the _CRT_MT global
|
||||
// and the __mingwthr_key_dtor() function from the MinGW
|
||||
// CRT in its private gthr-win32.h header.
|
||||
|
||||
// Set VC specific compiler target macros.
|
||||
|
||||
// MS does not prefix symbols by underscores for 64-bit.
|
||||
// As we have to support older gcc version, which are using underscores
|
||||
// as symbol prefix for x64, we have to check here for the user label
|
||||
// prefix defined by gcc.
|
||||
|
||||
// Special case nameless struct/union.
|
||||
|
||||
// MinGW-w64 has some additional C99 printf/scanf feature support.
|
||||
// So we add some helper macros to ease recognition of them.
|
||||
|
||||
// If _FORTIFY_SOURCE is enabled, some inline functions may use
|
||||
// __builtin_va_arg_pack(). GCC may report an error if the address
|
||||
// of such a function is used. Set _FORTIFY_VA_ARG=0 in this case.
|
||||
|
||||
// Enable workaround for ABI incompatibility on affected platforms
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// http://msdn.microsoft.com/en-us/library/ms175759%28v=VS.100%29.aspx
|
||||
// Templates won't work in C, will break if secure API is not enabled, disabled
|
||||
|
||||
// https://blogs.msdn.com/b/sdl/archive/2010/02/16/vc-2010-and-memcpy.aspx?Redirected=true
|
||||
// fallback on default implementation if we can't know the size of the destination
|
||||
|
||||
// Include _cygwin.h if we're building a Cygwin application.
|
||||
|
||||
// Target specific macro replacement for type "long". In the Windows API,
|
||||
// the type long is always 32 bit, even if the target is 64 bit (LLP64).
|
||||
// On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right
|
||||
// sized definitions and declarations, all usage of type long in the Windows
|
||||
// headers have to be replaced by the below defined macro __LONG32.
|
||||
|
||||
// C/C++ specific language defines.
|
||||
|
||||
// Note the extern. This is needed to work around GCC's
|
||||
// limitations in handling dllimport attribute.
|
||||
|
||||
// Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
|
||||
// variadiac macro facility, because variadic macros cause syntax
|
||||
// errors with --traditional-cpp.
|
||||
|
||||
// High byte is the major version, low byte is the minor.
|
||||
|
||||
// Allow both 0x1400 and 0xE00 to identify UCRT
|
||||
|
||||
// ===-------- vadefs.h ---------------------------------------------------===
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===-----------------------------------------------------------------------===
|
||||
|
||||
// Only include this if we are aiming for MSVC compatibility.
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// *
|
||||
// This file has no copyright assigned and is placed in the Public Domain.
|
||||
// This file is part of the mingw-w64 runtime package.
|
||||
// No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
|
||||
// for backward compatibility
|
||||
|
||||
type X__gnuc_va_list = X__builtin_va_list /* vadefs.h:24:29 */
|
||||
|
||||
type Ssize_t = int64 /* corecrt.h:45:35 */
|
||||
|
||||
type Rsize_t = Size_t /* corecrt.h:52:16 */
|
||||
|
||||
type Intptr_t = int64 /* corecrt.h:62:35 */
|
||||
|
||||
type Uintptr_t = uint64 /* corecrt.h:75:44 */
|
||||
|
||||
type Wint_t = uint16 /* corecrt.h:106:24 */
|
||||
type Wctype_t = uint16 /* corecrt.h:107:24 */
|
||||
|
||||
type Errno_t = int32 /* corecrt.h:113:13 */
|
||||
|
||||
type X__time32_t = int32 /* corecrt.h:118:14 */
|
||||
|
||||
type X__time64_t = int64 /* corecrt.h:123:35 */
|
||||
|
||||
type Time_t = X__time64_t /* corecrt.h:138:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
F_locale_pctype uintptr
|
||||
F_locale_mb_cur_max int32
|
||||
F_locale_lc_codepage uint32
|
||||
} /* corecrt.h:430:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* corecrt.h:432:39 */
|
||||
type Pthreadmbcinfo = uintptr /* corecrt.h:433:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* corecrt.h:436:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* corecrt.h:439:3 */
|
||||
type X_locale_t = uintptr /* corecrt.h:439:19 */
|
||||
|
||||
type TagLC_ID = struct {
|
||||
FwLanguage uint16
|
||||
FwCountry uint16
|
||||
FwCodePage uint16
|
||||
} /* corecrt.h:443:9 */
|
||||
|
||||
type LC_ID = TagLC_ID /* corecrt.h:447:3 */
|
||||
type LPLC_ID = uintptr /* corecrt.h:447:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:482:3 */
|
||||
type X_fsize_t = uint32 /* io.h:29:25 */
|
||||
|
||||
type X_finddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:35:3 */
|
||||
|
||||
type X_finddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
F__ccgo_pad1 [4]byte
|
||||
} /* io.h:44:3 */
|
||||
|
||||
type X_finddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]int8
|
||||
} /* io.h:53:3 */
|
||||
|
||||
type X__finddata64_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]int8
|
||||
F__ccgo_pad2 [4]byte
|
||||
} /* io.h:62:3 */
|
||||
|
||||
type X_wfinddata32_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:94:3 */
|
||||
|
||||
type X_wfinddata32i64_t = struct {
|
||||
Fattrib uint32
|
||||
Ftime_create X__time32_t
|
||||
Ftime_access X__time32_t
|
||||
Ftime_write X__time32_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:103:3 */
|
||||
|
||||
type X_wfinddata64i32_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize X_fsize_t
|
||||
Fname [260]Wchar_t
|
||||
F__ccgo_pad2 [4]byte
|
||||
} /* io.h:112:3 */
|
||||
|
||||
type X_wfinddata64_t = struct {
|
||||
Fattrib uint32
|
||||
F__ccgo_pad1 [4]byte
|
||||
Ftime_create X__time64_t
|
||||
Ftime_access X__time64_t
|
||||
Ftime_write X__time64_t
|
||||
Fsize int64
|
||||
Fname [260]Wchar_t
|
||||
} /* io.h:121:3 */
|
||||
|
||||
type X_off_t = int32 /* _mingw_off_t.h:5:16 */
|
||||
type Off32_t = int32 /* _mingw_off_t.h:7:16 */
|
||||
|
||||
type X_off64_t = int64 /* _mingw_off_t.h:13:39 */
|
||||
type Off64_t = int64 /* _mingw_off_t.h:15:39 */
|
||||
|
||||
type Off_t = Off64_t /* _mingw_off_t.h:24:17 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
Loading…
Add table
Add a link
Reference in a new issue