mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 18:37:28 -06:00
[feature] Clean up/uncache remote media (#407)
* Add whereNotEmptyAndNotNull * Add GetRemoteOlderThanDays * Add GetRemoteOlderThanDays * Add PruneRemote to Manager interface * Start implementing PruneRemote * add new attachment + status to tests * fix up and test GetRemoteOlderThan * fix bad import * PruneRemote: return number pruned * add Cached column to mediaattachment * update + test pruneRemote * update mediaTest * use Cached column * upstep bun to latest version * embed structs in mediaAttachment * migrate mediaAttachment to new format * don't default cached to true * select only remote media * update db dependencies * step bun back to last working version * update pruneRemote to use Cached field * fix storage path of test attachments * add recache logic to manager * fix trimmed aspect ratio * test prune and recache * return errwithcode * tidy up different paths for emoji vs attachment * fix incorrect thumbnail type being stored * expose TransportController to media processor * implement tee-ing recached content * add thoughts of dog to test fedi attachments * test get remote files * add comment on PruneRemote * add postData cleanup to recache * test thumbnail fetching * add incredible diagram * go mod tidy * buffer pipes for recache streaming * test for client stops reading after 1kb * add media-remote-cache-days to config * add cron package * wrap logrus so it's available to cron * start and stop cron jobs gracefully
This commit is contained in:
parent
100f1280a6
commit
07727753b9
424 changed files with 637100 additions and 176498 deletions
18
vendor/modernc.org/libc/Makefile
generated
vendored
18
vendor/modernc.org/libc/Makefile
generated
vendored
|
|
@ -25,6 +25,7 @@ all:
|
|||
go test 2>&1 -timeout 1h | tee -a $(log)
|
||||
GOOS=darwin GOARCH=amd64 go build
|
||||
GOOS=darwin GOARCH=arm64 go build
|
||||
GOOS=freebsd GOARCH=386 go build
|
||||
GOOS=freebsd GOARCH=amd64 go build
|
||||
GOOS=linux GOARCH=386 go build
|
||||
GOOS=linux GOARCH=amd64 go build
|
||||
|
|
@ -32,6 +33,7 @@ all:
|
|||
GOOS=linux GOARCH=arm64 go build
|
||||
GOOS=linux GOARCH=s390x go build
|
||||
GOOS=netbsd GOARCH=amd64 go build
|
||||
GOOS=openbsd GOARCH=amd64 go build
|
||||
GOOS=windows GOARCH=386 go build
|
||||
GOOS=windows GOARCH=amd64 go build
|
||||
go vet -unsafeptr=false 2>&1 | grep -v $(ngrep) || true
|
||||
|
|
@ -60,6 +62,12 @@ freebsd_amd64:
|
|||
go generate 2>&1 | tee log-generate
|
||||
go build -v ./...
|
||||
|
||||
# only on freebsd/386
|
||||
freebsd_386:
|
||||
@echo "Should be executed only on freebsd/386."
|
||||
go generate 2>&1 | tee log-generate
|
||||
go build -v ./...
|
||||
|
||||
# only on netbsd/amd64
|
||||
netbsd_amd64:
|
||||
@echo "Should be executed only on netbsd/amd64."
|
||||
|
|
@ -87,6 +95,12 @@ linux_s390x:
|
|||
CCGO_CPP=s390x-linux-gnu-cpp TARGET_GOOS=linux TARGET_GOARCH=s390x go generate
|
||||
GOOS=linux GOARCH=s390x go build -v ./...
|
||||
|
||||
# only on openbsd/amd64
|
||||
openbsd_amd64:
|
||||
@echo "Should be executed only on openbsd/amd64."
|
||||
go generate 2>&1 | tee log-generate
|
||||
go build -v ./...
|
||||
|
||||
windows_amd64:
|
||||
@echo "Should be executed only on windows/amd64."
|
||||
go generate 2>&1 | tee log-generate
|
||||
|
|
@ -105,6 +119,8 @@ build_all_targets:
|
|||
GOOS=darwin GOARCH=amd64 go test -c -o /dev/null
|
||||
GOOS=darwin GOARCH=arm64 go build -v ./...
|
||||
GOOS=darwin GOARCH=arm64 go test -c -o /dev/null
|
||||
GOOS=freebsd GOARCH=386 go build -v ./...
|
||||
GOOS=freebsd GOARCH=386 go test -c -o /dev/null
|
||||
GOOS=freebsd GOARCH=amd64 go build -v ./...
|
||||
GOOS=freebsd GOARCH=amd64 go test -c -o /dev/null
|
||||
GOOS=linux GOARCH=386 go build -v ./...
|
||||
|
|
@ -119,6 +135,8 @@ build_all_targets:
|
|||
GOOS=linux GOARCH=s390x go test -c -o /dev/null
|
||||
GOOS=netbsd GOARCH=amd64 go build -v ./...
|
||||
GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null
|
||||
GOOS=openbsd GOARCH=amd64 go build -v ./...
|
||||
GOOS=openbsd GOARCH=amd64 go test -c -o /dev/null
|
||||
GOOS=windows GOARCH=386 go build -v ./...
|
||||
GOOS=windows GOARCH=386 go test -c -o /dev/null
|
||||
GOOS=windows GOARCH=amd64 go build -v ./...
|
||||
|
|
|
|||
56
vendor/modernc.org/libc/capi_darwin_amd64.go
generated
vendored
56
vendor/modernc.org/libc/capi_darwin_amd64.go
generated
vendored
|
|
@ -3,6 +3,8 @@
|
|||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_CurrentRuneLocale": {},
|
||||
"_DefaultRuneLocale": {},
|
||||
"_IO_putc": {},
|
||||
"_NSGetEnviron": {},
|
||||
"___errno_location": {},
|
||||
|
|
@ -36,6 +38,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -44,6 +48,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -77,6 +82,7 @@ var CAPI = map[string]struct{}{
|
|||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
|
|
@ -93,33 +99,37 @@ var CAPI = map[string]struct{}{
|
|||
"__inline_isnanf": {},
|
||||
"__inline_isnanl": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isctype": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__istype": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__maskrune": {},
|
||||
"__mb_cur_max": {},
|
||||
"__putenv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__sincos_stret": {},
|
||||
"__sincosf_stret": {},
|
||||
"__sincospi_stret": {},
|
||||
"__sincospif_stret": {},
|
||||
"__stderrp": {},
|
||||
"__stdinp": {},
|
||||
"__stdoutp": {},
|
||||
"__strchrnul": {},
|
||||
"__strncasecmp_l": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__tolower": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__toupper": {},
|
||||
"__uflow": {},
|
||||
"__wcwidth": {},
|
||||
"_exit": {},
|
||||
"_longjmp": {},
|
||||
"_obstack_begin": {},
|
||||
|
|
@ -143,6 +153,7 @@ var CAPI = map[string]struct{}{
|
|||
"atoi": {},
|
||||
"atol": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -167,11 +178,15 @@ var CAPI = map[string]struct{}{
|
|||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"ctime": {},
|
||||
"ctime_r": {},
|
||||
"digittoint": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"endpwent": {},
|
||||
"environ": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
|
|
@ -227,7 +242,9 @@ var CAPI = map[string]struct{}{
|
|||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrgid_r": {},
|
||||
"getgrnam": {},
|
||||
"getgrnam_r": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
|
|
@ -238,6 +255,7 @@ var CAPI = map[string]struct{}{
|
|||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getprogname": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
|
|
@ -258,19 +276,31 @@ var CAPI = map[string]struct{}{
|
|||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isblank": {},
|
||||
"iscntrl": {},
|
||||
"isdigit": {},
|
||||
"isgraph": {},
|
||||
"ishexnumber": {},
|
||||
"isideogram": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isnumber": {},
|
||||
"isphonogram": {},
|
||||
"isprint": {},
|
||||
"ispunct": {},
|
||||
"isrune": {},
|
||||
"issetugid": {},
|
||||
"isspace": {},
|
||||
"isspecial": {},
|
||||
"isupper": {},
|
||||
"iswalnum": {},
|
||||
"iswspace": {},
|
||||
|
|
@ -279,6 +309,7 @@ var CAPI = map[string]struct{}{
|
|||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localeconv": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
|
|
@ -303,7 +334,9 @@ var CAPI = map[string]struct{}{
|
|||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkostemp": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
|
|
@ -370,6 +403,7 @@ var CAPI = map[string]struct{}{
|
|||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readlink": {},
|
||||
|
|
@ -401,6 +435,7 @@ var CAPI = map[string]struct{}{
|
|||
"setlocale": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
|
|
@ -433,9 +468,11 @@ var CAPI = map[string]struct{}{
|
|||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strerror_r": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncasecmp": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
|
|
@ -464,6 +501,7 @@ var CAPI = map[string]struct{}{
|
|||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tmpfile": {},
|
||||
"toascii": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
|
|
@ -477,6 +515,10 @@ var CAPI = map[string]struct{}{
|
|||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"uuid_copy": {},
|
||||
"uuid_generate_random": {},
|
||||
"uuid_parse": {},
|
||||
"uuid_unparse": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
|
|
|
|||
54
vendor/modernc.org/libc/capi_darwin_arm64.go
generated
vendored
54
vendor/modernc.org/libc/capi_darwin_arm64.go
generated
vendored
|
|
@ -3,6 +3,8 @@
|
|||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_CurrentRuneLocale": {},
|
||||
"_DefaultRuneLocale": {},
|
||||
"_IO_putc": {},
|
||||
"_NSGetEnviron": {},
|
||||
"___errno_location": {},
|
||||
|
|
@ -36,6 +38,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -44,6 +48,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -77,6 +82,7 @@ var CAPI = map[string]struct{}{
|
|||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
|
|
@ -93,33 +99,37 @@ var CAPI = map[string]struct{}{
|
|||
"__inline_isnanf": {},
|
||||
"__inline_isnanl": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isctype": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__istype": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__maskrune": {},
|
||||
"__mb_cur_max": {},
|
||||
"__putenv": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__sincos_stret": {},
|
||||
"__sincosf_stret": {},
|
||||
"__sincospi_stret": {},
|
||||
"__sincospif_stret": {},
|
||||
"__stderrp": {},
|
||||
"__stdinp": {},
|
||||
"__stdoutp": {},
|
||||
"__strchrnul": {},
|
||||
"__strncasecmp_l": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__tolower": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__toupper": {},
|
||||
"__uflow": {},
|
||||
"__wcwidth": {},
|
||||
"_exit": {},
|
||||
"_longjmp": {},
|
||||
"_obstack_begin": {},
|
||||
|
|
@ -143,6 +153,7 @@ var CAPI = map[string]struct{}{
|
|||
"atoi": {},
|
||||
"atol": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -167,11 +178,15 @@ var CAPI = map[string]struct{}{
|
|||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"ctime": {},
|
||||
"ctime_r": {},
|
||||
"digittoint": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"endpwent": {},
|
||||
"environ": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
|
|
@ -240,6 +255,7 @@ var CAPI = map[string]struct{}{
|
|||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getprogname": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
|
|
@ -260,19 +276,31 @@ var CAPI = map[string]struct{}{
|
|||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isblank": {},
|
||||
"iscntrl": {},
|
||||
"isdigit": {},
|
||||
"isgraph": {},
|
||||
"ishexnumber": {},
|
||||
"isideogram": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isnumber": {},
|
||||
"isphonogram": {},
|
||||
"isprint": {},
|
||||
"ispunct": {},
|
||||
"isrune": {},
|
||||
"issetugid": {},
|
||||
"isspace": {},
|
||||
"isspecial": {},
|
||||
"isupper": {},
|
||||
"iswalnum": {},
|
||||
"iswspace": {},
|
||||
|
|
@ -281,6 +309,7 @@ var CAPI = map[string]struct{}{
|
|||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localeconv": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
|
|
@ -305,7 +334,9 @@ var CAPI = map[string]struct{}{
|
|||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkostemp": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
|
|
@ -372,6 +403,7 @@ var CAPI = map[string]struct{}{
|
|||
"rand": {},
|
||||
"rand_r": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readlink": {},
|
||||
|
|
@ -403,6 +435,7 @@ var CAPI = map[string]struct{}{
|
|||
"setlocale": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
|
|
@ -435,9 +468,11 @@ var CAPI = map[string]struct{}{
|
|||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strerror_r": {},
|
||||
"strlcat": {},
|
||||
"strlcpy": {},
|
||||
"strlen": {},
|
||||
"strncasecmp": {},
|
||||
"strncat": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
|
|
@ -466,6 +501,7 @@ var CAPI = map[string]struct{}{
|
|||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tmpfile": {},
|
||||
"toascii": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
|
|
@ -479,6 +515,10 @@ var CAPI = map[string]struct{}{
|
|||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"uuid_copy": {},
|
||||
"uuid_generate_random": {},
|
||||
"uuid_parse": {},
|
||||
"uuid_unparse": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
|
|
|
|||
486
vendor/modernc.org/libc/capi_freebsd_386.go
generated
vendored
Normal file
486
vendor/modernc.org/libc/capi_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,486 @@
|
|||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_CurrentRuneLocale": {},
|
||||
"_DefaultRuneLocale": {},
|
||||
"_IO_putc": {},
|
||||
"_ThreadRuneLocale": {},
|
||||
"___errno_location": {},
|
||||
"___runetype": {},
|
||||
"__assert": {},
|
||||
"__assert_fail": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_copysignl": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nan": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_nanl": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_popcountl": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_dmesg": {},
|
||||
"__ccgo_getMutexType": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_pthreadAttrGetDetachState": {},
|
||||
"__ccgo_pthreadMutexattrGettype": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__errno_location": {},
|
||||
"__error": {},
|
||||
"__floatscan": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__inet_ntoa": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isthreaded": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__mb_sb_limit": {},
|
||||
"__runes_for_locale": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__srget": {},
|
||||
"__stderrp": {},
|
||||
"__stdinp": {},
|
||||
"__stdoutp": {},
|
||||
"__swbuf": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"__xuname": {},
|
||||
"_exit": {},
|
||||
"_longjmp": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"_setjmp": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chflags": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"ctime": {},
|
||||
"ctime_r": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"endpwent": {},
|
||||
"environ": {},
|
||||
"execvp": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fscanf": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"fts64_close": {},
|
||||
"fts64_open": {},
|
||||
"fts64_read": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getentropy": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrgid_r": {},
|
||||
"getgrnam": {},
|
||||
"getgrnam_r": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"getnameinfo": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrlimit": {},
|
||||
"getrlimit64": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"longjmp": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkostemp": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"modf": {},
|
||||
"munmap": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"open64": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pause": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"pow": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"pthread_attr_destroy": {},
|
||||
"pthread_attr_getdetachstate": {},
|
||||
"pthread_attr_init": {},
|
||||
"pthread_attr_setdetachstate": {},
|
||||
"pthread_attr_setscope": {},
|
||||
"pthread_attr_setstacksize": {},
|
||||
"pthread_cond_broadcast": {},
|
||||
"pthread_cond_destroy": {},
|
||||
"pthread_cond_init": {},
|
||||
"pthread_cond_signal": {},
|
||||
"pthread_cond_timedwait": {},
|
||||
"pthread_cond_wait": {},
|
||||
"pthread_create": {},
|
||||
"pthread_detach": {},
|
||||
"pthread_equal": {},
|
||||
"pthread_exit": {},
|
||||
"pthread_getspecific": {},
|
||||
"pthread_join": {},
|
||||
"pthread_key_create": {},
|
||||
"pthread_key_delete": {},
|
||||
"pthread_mutex_destroy": {},
|
||||
"pthread_mutex_init": {},
|
||||
"pthread_mutex_lock": {},
|
||||
"pthread_mutex_trylock": {},
|
||||
"pthread_mutex_unlock": {},
|
||||
"pthread_mutexattr_destroy": {},
|
||||
"pthread_mutexattr_init": {},
|
||||
"pthread_mutexattr_settype": {},
|
||||
"pthread_self": {},
|
||||
"pthread_setspecific": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"puts": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readdir64": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"reallocarray": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"sched_yield": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setjmp": {},
|
||||
"setlocale": {},
|
||||
"setrlimit": {},
|
||||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strerror_r": {},
|
||||
"strlen": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tmpfile": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"uuid_generate_random": {},
|
||||
"uuid_parse": {},
|
||||
"uuid_unparse": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"writev": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
||||
23
vendor/modernc.org/libc/capi_freebsd_amd64.go
generated
vendored
23
vendor/modernc.org/libc/capi_freebsd_amd64.go
generated
vendored
|
|
@ -39,6 +39,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -47,6 +49,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -90,11 +93,16 @@ var CAPI = map[string]struct{}{
|
|||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isspace_l": {},
|
||||
"__isthreaded": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
|
|
@ -139,6 +147,7 @@ var CAPI = map[string]struct{}{
|
|||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -258,15 +267,22 @@ var CAPI = map[string]struct{}{
|
|||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isspace": {},
|
||||
"isupper": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
|
|
@ -293,6 +309,7 @@ var CAPI = map[string]struct{}{
|
|||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkostemp": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
|
|
@ -356,6 +373,7 @@ var CAPI = map[string]struct{}{
|
|||
"raise": {},
|
||||
"rand": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readdir64": {},
|
||||
|
|
@ -389,6 +407,7 @@ var CAPI = map[string]struct{}{
|
|||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
|
|
@ -419,6 +438,7 @@ var CAPI = map[string]struct{}{
|
|||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strerror_r": {},
|
||||
"strlen": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
|
|
@ -458,6 +478,9 @@ var CAPI = map[string]struct{}{
|
|||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"uuid_generate_random": {},
|
||||
"uuid_parse": {},
|
||||
"uuid_unparse": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
|
|
|
|||
6
vendor/modernc.org/libc/capi_linux_386.go
generated
vendored
6
vendor/modernc.org/libc/capi_linux_386.go
generated
vendored
|
|
@ -34,6 +34,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -42,6 +44,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -136,6 +139,7 @@ var CAPI = map[string]struct{}{
|
|||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -258,6 +262,7 @@ var CAPI = map[string]struct{}{
|
|||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
|
|
@ -405,6 +410,7 @@ var CAPI = map[string]struct{}{
|
|||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
|
|
|
|||
6
vendor/modernc.org/libc/capi_linux_amd64.go
generated
vendored
6
vendor/modernc.org/libc/capi_linux_amd64.go
generated
vendored
|
|
@ -34,6 +34,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -42,6 +44,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -136,6 +139,7 @@ var CAPI = map[string]struct{}{
|
|||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -258,6 +262,7 @@ var CAPI = map[string]struct{}{
|
|||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
|
|
@ -407,6 +412,7 @@ var CAPI = map[string]struct{}{
|
|||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
|
|
|
|||
6
vendor/modernc.org/libc/capi_linux_arm.go
generated
vendored
6
vendor/modernc.org/libc/capi_linux_arm.go
generated
vendored
|
|
@ -34,6 +34,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -42,6 +44,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -136,6 +139,7 @@ var CAPI = map[string]struct{}{
|
|||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -258,6 +262,7 @@ var CAPI = map[string]struct{}{
|
|||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
|
|
@ -405,6 +410,7 @@ var CAPI = map[string]struct{}{
|
|||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
|
|
|
|||
6
vendor/modernc.org/libc/capi_linux_arm64.go
generated
vendored
6
vendor/modernc.org/libc/capi_linux_arm64.go
generated
vendored
|
|
@ -34,6 +34,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -42,6 +44,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -136,6 +139,7 @@ var CAPI = map[string]struct{}{
|
|||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -258,6 +262,7 @@ var CAPI = map[string]struct{}{
|
|||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
|
|
@ -405,6 +410,7 @@ var CAPI = map[string]struct{}{
|
|||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
|
|
|
|||
6
vendor/modernc.org/libc/capi_linux_s390x.go
generated
vendored
6
vendor/modernc.org/libc/capi_linux_s390x.go
generated
vendored
|
|
@ -34,6 +34,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -42,6 +44,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -136,6 +139,7 @@ var CAPI = map[string]struct{}{
|
|||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -258,6 +262,7 @@ var CAPI = map[string]struct{}{
|
|||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
|
|
@ -405,6 +410,7 @@ var CAPI = map[string]struct{}{
|
|||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
|
|
|
|||
14
vendor/modernc.org/libc/capi_netbsd_amd64.go
generated
vendored
14
vendor/modernc.org/libc/capi_netbsd_amd64.go
generated
vendored
|
|
@ -39,6 +39,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -47,6 +49,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -110,7 +113,6 @@ var CAPI = map[string]struct{}{
|
|||
"__swbuf": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__sync_synchronize": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
|
|
@ -145,6 +147,7 @@ var CAPI = map[string]struct{}{
|
|||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -264,6 +267,8 @@ var CAPI = map[string]struct{}{
|
|||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
|
|
@ -299,6 +304,7 @@ var CAPI = map[string]struct{}{
|
|||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkostemp": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
|
|
@ -362,6 +368,7 @@ var CAPI = map[string]struct{}{
|
|||
"raise": {},
|
||||
"rand": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readdir64": {},
|
||||
|
|
@ -395,6 +402,7 @@ var CAPI = map[string]struct{}{
|
|||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
|
|
@ -425,6 +433,7 @@ var CAPI = map[string]struct{}{
|
|||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strerror_r": {},
|
||||
"strlen": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
|
|
@ -464,6 +473,9 @@ var CAPI = map[string]struct{}{
|
|||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"uuid_generate_random": {},
|
||||
"uuid_parse": {},
|
||||
"uuid_unparse": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
|
|
|
|||
504
vendor/modernc.org/libc/capi_openbsd_amd64.go
generated
vendored
Normal file
504
vendor/modernc.org/libc/capi_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,504 @@
|
|||
// Code generated by 'go generate' - DO NOT EDIT.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
var CAPI = map[string]struct{}{
|
||||
"_CurrentRuneLocale": {},
|
||||
"_DefaultRuneLocale": {},
|
||||
"_IO_putc": {},
|
||||
"_ThreadRuneLocale": {},
|
||||
"___errno_location": {},
|
||||
"___runetype": {},
|
||||
"__assert": {},
|
||||
"__assert13": {},
|
||||
"__assert2": {},
|
||||
"__assert_fail": {},
|
||||
"__builtin___memcpy_chk": {},
|
||||
"__builtin___memmove_chk": {},
|
||||
"__builtin___memset_chk": {},
|
||||
"__builtin___snprintf_chk": {},
|
||||
"__builtin___sprintf_chk": {},
|
||||
"__builtin___strcat_chk": {},
|
||||
"__builtin___strcpy_chk": {},
|
||||
"__builtin___strncpy_chk": {},
|
||||
"__builtin___vsnprintf_chk": {},
|
||||
"__builtin_abort": {},
|
||||
"__builtin_abs": {},
|
||||
"__builtin_add_overflowInt64": {},
|
||||
"__builtin_add_overflowUint32": {},
|
||||
"__builtin_add_overflowUint64": {},
|
||||
"__builtin_bswap16": {},
|
||||
"__builtin_bswap32": {},
|
||||
"__builtin_bswap64": {},
|
||||
"__builtin_bzero": {},
|
||||
"__builtin_clz": {},
|
||||
"__builtin_clzl": {},
|
||||
"__builtin_clzll": {},
|
||||
"__builtin_constant_p_impl": {},
|
||||
"__builtin_copysign": {},
|
||||
"__builtin_copysignf": {},
|
||||
"__builtin_copysignl": {},
|
||||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
"__builtin_huge_valf": {},
|
||||
"__builtin_inf": {},
|
||||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
"__builtin_memset": {},
|
||||
"__builtin_mmap": {},
|
||||
"__builtin_mul_overflowInt64": {},
|
||||
"__builtin_mul_overflowUint128": {},
|
||||
"__builtin_mul_overflowUint64": {},
|
||||
"__builtin_nan": {},
|
||||
"__builtin_nanf": {},
|
||||
"__builtin_nanl": {},
|
||||
"__builtin_object_size": {},
|
||||
"__builtin_popcount": {},
|
||||
"__builtin_popcountl": {},
|
||||
"__builtin_prefetch": {},
|
||||
"__builtin_printf": {},
|
||||
"__builtin_snprintf": {},
|
||||
"__builtin_sprintf": {},
|
||||
"__builtin_strchr": {},
|
||||
"__builtin_strcmp": {},
|
||||
"__builtin_strcpy": {},
|
||||
"__builtin_strlen": {},
|
||||
"__builtin_sub_overflowInt64": {},
|
||||
"__builtin_trap": {},
|
||||
"__builtin_unreachable": {},
|
||||
"__ccgo_dmesg": {},
|
||||
"__ccgo_getMutexType": {},
|
||||
"__ccgo_in6addr_anyp": {},
|
||||
"__ccgo_pthreadAttrGetDetachState": {},
|
||||
"__ccgo_pthreadMutexattrGettype": {},
|
||||
"__ccgo_sqlite3_log": {},
|
||||
"__cmsg_nxthdr": {},
|
||||
"__ctype_get_mb_cur_max": {},
|
||||
"__errno": {},
|
||||
"__errno_location": {},
|
||||
"__error": {},
|
||||
"__floatscan": {},
|
||||
"__h_errno_location": {},
|
||||
"__inet_aton": {},
|
||||
"__inet_ntoa": {},
|
||||
"__intscan": {},
|
||||
"__isalnum_l": {},
|
||||
"__isalpha_l": {},
|
||||
"__isdigit_l": {},
|
||||
"__islower_l": {},
|
||||
"__isnan": {},
|
||||
"__isnanf": {},
|
||||
"__isnanl": {},
|
||||
"__isoc99_sscanf": {},
|
||||
"__isprint_l": {},
|
||||
"__isspace_l": {},
|
||||
"__isthreaded": {},
|
||||
"__isupper_l": {},
|
||||
"__isxdigit_l": {},
|
||||
"__lookup_ipliteral": {},
|
||||
"__lookup_name": {},
|
||||
"__lookup_serv": {},
|
||||
"__mb_sb_limit": {},
|
||||
"__runes_for_locale": {},
|
||||
"__sF": {},
|
||||
"__shgetc": {},
|
||||
"__shlim": {},
|
||||
"__srget": {},
|
||||
"__stderrp": {},
|
||||
"__stdinp": {},
|
||||
"__stdoutp": {},
|
||||
"__swbuf": {},
|
||||
"__sync_add_and_fetch_uint32": {},
|
||||
"__sync_sub_and_fetch_uint32": {},
|
||||
"__syscall1": {},
|
||||
"__syscall3": {},
|
||||
"__syscall4": {},
|
||||
"__toread": {},
|
||||
"__toread_needs_stdio_exit": {},
|
||||
"__uflow": {},
|
||||
"__xuname": {},
|
||||
"_exit": {},
|
||||
"_longjmp": {},
|
||||
"_obstack_begin": {},
|
||||
"_obstack_newchunk": {},
|
||||
"_setjmp": {},
|
||||
"_tolower_tab_": {},
|
||||
"_toupper_tab_": {},
|
||||
"abort": {},
|
||||
"abs": {},
|
||||
"accept": {},
|
||||
"access": {},
|
||||
"acos": {},
|
||||
"acosh": {},
|
||||
"alarm": {},
|
||||
"asin": {},
|
||||
"asinh": {},
|
||||
"atan": {},
|
||||
"atan2": {},
|
||||
"atanh": {},
|
||||
"atexit": {},
|
||||
"atof": {},
|
||||
"atoi": {},
|
||||
"atol": {},
|
||||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
"ceilf": {},
|
||||
"cfgetospeed": {},
|
||||
"cfsetispeed": {},
|
||||
"cfsetospeed": {},
|
||||
"chdir": {},
|
||||
"chflags": {},
|
||||
"chmod": {},
|
||||
"chown": {},
|
||||
"clock_gettime": {},
|
||||
"close": {},
|
||||
"closedir": {},
|
||||
"confstr": {},
|
||||
"connect": {},
|
||||
"copysign": {},
|
||||
"copysignf": {},
|
||||
"copysignl": {},
|
||||
"cos": {},
|
||||
"cosf": {},
|
||||
"cosh": {},
|
||||
"ctime": {},
|
||||
"ctime_r": {},
|
||||
"dlclose": {},
|
||||
"dlerror": {},
|
||||
"dlopen": {},
|
||||
"dlsym": {},
|
||||
"dup2": {},
|
||||
"endpwent": {},
|
||||
"environ": {},
|
||||
"execvp": {},
|
||||
"exit": {},
|
||||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fchown": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
"fcntl64": {},
|
||||
"fdopen": {},
|
||||
"ferror": {},
|
||||
"fflush": {},
|
||||
"fgetc": {},
|
||||
"fgets": {},
|
||||
"fileno": {},
|
||||
"floor": {},
|
||||
"fmod": {},
|
||||
"fmodl": {},
|
||||
"fopen": {},
|
||||
"fopen64": {},
|
||||
"fork": {},
|
||||
"fprintf": {},
|
||||
"fputc": {},
|
||||
"fputs": {},
|
||||
"fread": {},
|
||||
"free": {},
|
||||
"freeaddrinfo": {},
|
||||
"frexp": {},
|
||||
"fscanf": {},
|
||||
"fseek": {},
|
||||
"fstat": {},
|
||||
"fstat64": {},
|
||||
"fsync": {},
|
||||
"ftell": {},
|
||||
"ftruncate": {},
|
||||
"fts64_close": {},
|
||||
"fts64_open": {},
|
||||
"fts64_read": {},
|
||||
"fts_close": {},
|
||||
"fts_open": {},
|
||||
"fts_read": {},
|
||||
"fwrite": {},
|
||||
"gai_strerror": {},
|
||||
"getaddrinfo": {},
|
||||
"getc": {},
|
||||
"getcwd": {},
|
||||
"getegid": {},
|
||||
"getentropy": {},
|
||||
"getenv": {},
|
||||
"geteuid": {},
|
||||
"getgid": {},
|
||||
"getgrgid": {},
|
||||
"getgrgid_r": {},
|
||||
"getgrnam": {},
|
||||
"getgrnam_r": {},
|
||||
"gethostbyaddr": {},
|
||||
"gethostbyaddr_r": {},
|
||||
"gethostbyname": {},
|
||||
"gethostbyname2": {},
|
||||
"gethostbyname2_r": {},
|
||||
"gethostname": {},
|
||||
"getnameinfo": {},
|
||||
"getpagesize": {},
|
||||
"getpeername": {},
|
||||
"getpid": {},
|
||||
"getpwnam": {},
|
||||
"getpwnam_r": {},
|
||||
"getpwuid": {},
|
||||
"getpwuid_r": {},
|
||||
"getresgid": {},
|
||||
"getresuid": {},
|
||||
"getrlimit": {},
|
||||
"getrlimit64": {},
|
||||
"getrusage": {},
|
||||
"getservbyname": {},
|
||||
"getsockname": {},
|
||||
"getsockopt": {},
|
||||
"gettimeofday": {},
|
||||
"getuid": {},
|
||||
"gmtime_r": {},
|
||||
"h_errno": {},
|
||||
"htonl": {},
|
||||
"htons": {},
|
||||
"hypot": {},
|
||||
"inet_ntoa": {},
|
||||
"inet_ntop": {},
|
||||
"inet_pton": {},
|
||||
"initstate": {},
|
||||
"initstate_r": {},
|
||||
"ioctl": {},
|
||||
"isalnum": {},
|
||||
"isalpha": {},
|
||||
"isascii": {},
|
||||
"isatty": {},
|
||||
"isdigit": {},
|
||||
"islower": {},
|
||||
"isnan": {},
|
||||
"isnanf": {},
|
||||
"isnanl": {},
|
||||
"isprint": {},
|
||||
"isspace": {},
|
||||
"isupper": {},
|
||||
"isxdigit": {},
|
||||
"kill": {},
|
||||
"ldexp": {},
|
||||
"link": {},
|
||||
"listen": {},
|
||||
"localtime": {},
|
||||
"localtime_r": {},
|
||||
"log": {},
|
||||
"log10": {},
|
||||
"longjmp": {},
|
||||
"lrand48": {},
|
||||
"lseek": {},
|
||||
"lseek64": {},
|
||||
"lstat": {},
|
||||
"lstat64": {},
|
||||
"malloc": {},
|
||||
"mblen": {},
|
||||
"mbstowcs": {},
|
||||
"mbtowc": {},
|
||||
"memchr": {},
|
||||
"memcmp": {},
|
||||
"memcpy": {},
|
||||
"memmove": {},
|
||||
"memset": {},
|
||||
"mkdir": {},
|
||||
"mkfifo": {},
|
||||
"mknod": {},
|
||||
"mkostemp": {},
|
||||
"mkstemp": {},
|
||||
"mkstemp64": {},
|
||||
"mkstemps": {},
|
||||
"mkstemps64": {},
|
||||
"mktime": {},
|
||||
"mmap": {},
|
||||
"modf": {},
|
||||
"munmap": {},
|
||||
"nl_langinfo": {},
|
||||
"ntohs": {},
|
||||
"obstack_free": {},
|
||||
"obstack_vprintf": {},
|
||||
"open": {},
|
||||
"open64": {},
|
||||
"opendir": {},
|
||||
"openpty": {},
|
||||
"pathconf": {},
|
||||
"pause": {},
|
||||
"pclose": {},
|
||||
"perror": {},
|
||||
"pipe": {},
|
||||
"poll": {},
|
||||
"popen": {},
|
||||
"pow": {},
|
||||
"printf": {},
|
||||
"pselect": {},
|
||||
"pthread_attr_destroy": {},
|
||||
"pthread_attr_getdetachstate": {},
|
||||
"pthread_attr_init": {},
|
||||
"pthread_attr_setdetachstate": {},
|
||||
"pthread_attr_setscope": {},
|
||||
"pthread_attr_setstacksize": {},
|
||||
"pthread_cond_broadcast": {},
|
||||
"pthread_cond_destroy": {},
|
||||
"pthread_cond_init": {},
|
||||
"pthread_cond_signal": {},
|
||||
"pthread_cond_timedwait": {},
|
||||
"pthread_cond_wait": {},
|
||||
"pthread_create": {},
|
||||
"pthread_detach": {},
|
||||
"pthread_equal": {},
|
||||
"pthread_exit": {},
|
||||
"pthread_getspecific": {},
|
||||
"pthread_join": {},
|
||||
"pthread_key_create": {},
|
||||
"pthread_key_delete": {},
|
||||
"pthread_mutex_destroy": {},
|
||||
"pthread_mutex_init": {},
|
||||
"pthread_mutex_lock": {},
|
||||
"pthread_mutex_trylock": {},
|
||||
"pthread_mutex_unlock": {},
|
||||
"pthread_mutexattr_destroy": {},
|
||||
"pthread_mutexattr_init": {},
|
||||
"pthread_mutexattr_settype": {},
|
||||
"pthread_self": {},
|
||||
"pthread_setspecific": {},
|
||||
"putc": {},
|
||||
"putchar": {},
|
||||
"puts": {},
|
||||
"qsort": {},
|
||||
"raise": {},
|
||||
"rand": {},
|
||||
"random": {},
|
||||
"random_r": {},
|
||||
"read": {},
|
||||
"readdir": {},
|
||||
"readdir64": {},
|
||||
"readlink": {},
|
||||
"readv": {},
|
||||
"realloc": {},
|
||||
"reallocarray": {},
|
||||
"realpath": {},
|
||||
"recv": {},
|
||||
"recvfrom": {},
|
||||
"recvmsg": {},
|
||||
"remove": {},
|
||||
"rename": {},
|
||||
"rewind": {},
|
||||
"rindex": {},
|
||||
"rint": {},
|
||||
"rmdir": {},
|
||||
"round": {},
|
||||
"scalbn": {},
|
||||
"scalbnl": {},
|
||||
"sched_yield": {},
|
||||
"select": {},
|
||||
"send": {},
|
||||
"sendmsg": {},
|
||||
"sendto": {},
|
||||
"setbuf": {},
|
||||
"setenv": {},
|
||||
"setjmp": {},
|
||||
"setlocale": {},
|
||||
"setrlimit": {},
|
||||
"setrlimit64": {},
|
||||
"setsid": {},
|
||||
"setsockopt": {},
|
||||
"setstate": {},
|
||||
"setvbuf": {},
|
||||
"shmat": {},
|
||||
"shmctl": {},
|
||||
"shmdt": {},
|
||||
"shutdown": {},
|
||||
"sigaction": {},
|
||||
"signal": {},
|
||||
"sin": {},
|
||||
"sinf": {},
|
||||
"sinh": {},
|
||||
"sleep": {},
|
||||
"snprintf": {},
|
||||
"socket": {},
|
||||
"sprintf": {},
|
||||
"sqrt": {},
|
||||
"srand48": {},
|
||||
"sscanf": {},
|
||||
"stat": {},
|
||||
"stat64": {},
|
||||
"stderr": {},
|
||||
"stdin": {},
|
||||
"stdout": {},
|
||||
"strcasecmp": {},
|
||||
"strcat": {},
|
||||
"strchr": {},
|
||||
"strcmp": {},
|
||||
"strcpy": {},
|
||||
"strcspn": {},
|
||||
"strdup": {},
|
||||
"strerror": {},
|
||||
"strerror_r": {},
|
||||
"strlen": {},
|
||||
"strncmp": {},
|
||||
"strncpy": {},
|
||||
"strnlen": {},
|
||||
"strpbrk": {},
|
||||
"strrchr": {},
|
||||
"strspn": {},
|
||||
"strstr": {},
|
||||
"strtod": {},
|
||||
"strtof": {},
|
||||
"strtoimax": {},
|
||||
"strtol": {},
|
||||
"strtold": {},
|
||||
"strtoll": {},
|
||||
"strtoul": {},
|
||||
"strtoull": {},
|
||||
"strtoumax": {},
|
||||
"symlink": {},
|
||||
"sysconf": {},
|
||||
"system": {},
|
||||
"tan": {},
|
||||
"tanh": {},
|
||||
"tcgetattr": {},
|
||||
"tcsendbreak": {},
|
||||
"tcsetattr": {},
|
||||
"time": {},
|
||||
"tmpfile": {},
|
||||
"tolower": {},
|
||||
"toupper": {},
|
||||
"trunc": {},
|
||||
"tzset": {},
|
||||
"umask": {},
|
||||
"uname": {},
|
||||
"ungetc": {},
|
||||
"unlink": {},
|
||||
"unsetenv": {},
|
||||
"usleep": {},
|
||||
"utime": {},
|
||||
"utimes": {},
|
||||
"uuid_generate_random": {},
|
||||
"uuid_parse": {},
|
||||
"uuid_unparse": {},
|
||||
"vasprintf": {},
|
||||
"vfprintf": {},
|
||||
"vprintf": {},
|
||||
"vsnprintf": {},
|
||||
"vsprintf": {},
|
||||
"waitpid": {},
|
||||
"wcschr": {},
|
||||
"wctomb": {},
|
||||
"wcwidth": {},
|
||||
"write": {},
|
||||
"writev": {},
|
||||
"zero_struct_address": {},
|
||||
}
|
||||
5
vendor/modernc.org/libc/capi_windows_386.go
generated
vendored
5
vendor/modernc.org/libc/capi_windows_386.go
generated
vendored
|
|
@ -284,6 +284,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -292,6 +294,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -440,6 +443,7 @@ var CAPI = map[string]struct{}{
|
|||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -470,6 +474,7 @@ var CAPI = map[string]struct{}{
|
|||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
|
|
|
|||
5
vendor/modernc.org/libc/capi_windows_amd64.go
generated
vendored
5
vendor/modernc.org/libc/capi_windows_amd64.go
generated
vendored
|
|
@ -282,6 +282,8 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_exit": {},
|
||||
"__builtin_expect": {},
|
||||
"__builtin_fabs": {},
|
||||
"__builtin_fabsf": {},
|
||||
"__builtin_fabsl": {},
|
||||
"__builtin_free": {},
|
||||
"__builtin_getentropy": {},
|
||||
"__builtin_huge_val": {},
|
||||
|
|
@ -290,6 +292,7 @@ var CAPI = map[string]struct{}{
|
|||
"__builtin_inff": {},
|
||||
"__builtin_infl": {},
|
||||
"__builtin_isnan": {},
|
||||
"__builtin_isunordered": {},
|
||||
"__builtin_malloc": {},
|
||||
"__builtin_memcmp": {},
|
||||
"__builtin_memcpy": {},
|
||||
|
|
@ -436,6 +439,7 @@ var CAPI = map[string]struct{}{
|
|||
"backtrace": {},
|
||||
"backtrace_symbols_fd": {},
|
||||
"bind": {},
|
||||
"bsearch": {},
|
||||
"bzero": {},
|
||||
"calloc": {},
|
||||
"ceil": {},
|
||||
|
|
@ -466,6 +470,7 @@ var CAPI = map[string]struct{}{
|
|||
"exp": {},
|
||||
"fabs": {},
|
||||
"fabsf": {},
|
||||
"fabsl": {},
|
||||
"fchmod": {},
|
||||
"fclose": {},
|
||||
"fcntl": {},
|
||||
|
|
|
|||
4
vendor/modernc.org/libc/errno/capi_darwin_amd64.go
generated
vendored
4
vendor/modernc.org/libc/errno/capi_darwin_amd64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
4
vendor/modernc.org/libc/errno/capi_darwin_arm64.go
generated
vendored
4
vendor/modernc.org/libc/errno/capi_darwin_arm64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
5
vendor/modernc.org/libc/errno/capi_freebsd_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo errno/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 errno/errno_freebsd_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
5
vendor/modernc.org/libc/errno/capi_openbsd_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/errno/capi_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo errno/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 errno/errno_openbsd_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
2
vendor/modernc.org/libc/errno/capi_windows_386.go
generated
vendored
2
vendor/modernc.org/libc/errno/capi_windows_386.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo errno/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 errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
// Code generated by 'ccgo errno\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 errno\errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
|
|
|
|||
9
vendor/modernc.org/libc/errno/errno_darwin_amd64.go
generated
vendored
9
vendor/modernc.org/libc/errno/errno_darwin_amd64.go
generated
vendored
|
|
@ -154,6 +154,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
|
|
@ -312,6 +314,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
|
|
|
|||
9
vendor/modernc.org/libc/errno/errno_darwin_arm64.go
generated
vendored
9
vendor/modernc.org/libc/errno/errno_darwin_arm64.go
generated
vendored
|
|
@ -156,6 +156,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
|
|
@ -314,6 +316,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
|
|
|
|||
158
vendor/modernc.org/libc/errno/errno_freebsd_386.go
generated
vendored
Normal file
158
vendor/modernc.org/libc/errno/errno_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
// Code generated by 'ccgo errno/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 errno/errno_freebsd_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
EACCES = 13
|
||||
EADDRINUSE = 48
|
||||
EADDRNOTAVAIL = 49
|
||||
EAFNOSUPPORT = 47
|
||||
EAGAIN = 35
|
||||
EALREADY = 37
|
||||
EAUTH = 80
|
||||
EBADF = 9
|
||||
EBADMSG = 89
|
||||
EBADRPC = 72
|
||||
EBUSY = 16
|
||||
ECANCELED = 85
|
||||
ECAPMODE = 94
|
||||
ECHILD = 10
|
||||
ECONNABORTED = 53
|
||||
ECONNREFUSED = 61
|
||||
ECONNRESET = 54
|
||||
EDEADLK = 11
|
||||
EDESTADDRREQ = 39
|
||||
EDOM = 33
|
||||
EDOOFUS = 88
|
||||
EDQUOT = 69
|
||||
EEXIST = 17
|
||||
EFAULT = 14
|
||||
EFBIG = 27
|
||||
EFTYPE = 79
|
||||
EHOSTDOWN = 64
|
||||
EHOSTUNREACH = 65
|
||||
EIDRM = 82
|
||||
EILSEQ = 86
|
||||
EINPROGRESS = 36
|
||||
EINTEGRITY = 97
|
||||
EINTR = 4
|
||||
EINVAL = 22
|
||||
EIO = 5
|
||||
EISCONN = 56
|
||||
EISDIR = 21
|
||||
ELAST = 97
|
||||
ELOOP = 62
|
||||
EMFILE = 24
|
||||
EMLINK = 31
|
||||
EMSGSIZE = 40
|
||||
EMULTIHOP = 90
|
||||
ENAMETOOLONG = 63
|
||||
ENEEDAUTH = 81
|
||||
ENETDOWN = 50
|
||||
ENETRESET = 52
|
||||
ENETUNREACH = 51
|
||||
ENFILE = 23
|
||||
ENOATTR = 87
|
||||
ENOBUFS = 55
|
||||
ENODEV = 19
|
||||
ENOENT = 2
|
||||
ENOEXEC = 8
|
||||
ENOLCK = 77
|
||||
ENOLINK = 91
|
||||
ENOMEM = 12
|
||||
ENOMSG = 83
|
||||
ENOPROTOOPT = 42
|
||||
ENOSPC = 28
|
||||
ENOSYS = 78
|
||||
ENOTBLK = 15
|
||||
ENOTCAPABLE = 93
|
||||
ENOTCONN = 57
|
||||
ENOTDIR = 20
|
||||
ENOTEMPTY = 66
|
||||
ENOTRECOVERABLE = 95
|
||||
ENOTSOCK = 38
|
||||
ENOTSUP = 45
|
||||
ENOTTY = 25
|
||||
ENXIO = 6
|
||||
EOPNOTSUPP = 45
|
||||
EOVERFLOW = 84
|
||||
EOWNERDEAD = 96
|
||||
EPERM = 1
|
||||
EPFNOSUPPORT = 46
|
||||
EPIPE = 32
|
||||
EPROCLIM = 67
|
||||
EPROCUNAVAIL = 76
|
||||
EPROGMISMATCH = 75
|
||||
EPROGUNAVAIL = 74
|
||||
EPROTO = 92
|
||||
EPROTONOSUPPORT = 43
|
||||
EPROTOTYPE = 41
|
||||
ERANGE = 34
|
||||
EREMOTE = 71
|
||||
EROFS = 30
|
||||
ERPCMISMATCH = 73
|
||||
ESHUTDOWN = 58
|
||||
ESOCKTNOSUPPORT = 44
|
||||
ESPIPE = 29
|
||||
ESRCH = 3
|
||||
ESTALE = 70
|
||||
ETIMEDOUT = 60
|
||||
ETOOMANYREFS = 59
|
||||
ETXTBSY = 26
|
||||
EUSERS = 68
|
||||
EWOULDBLOCK = 35
|
||||
EXDEV = 18
|
||||
X_ERRNO_T_DEFINED = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_ILP32 = 1
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
X_SYS_ERRNO_H_ = 0
|
||||
I386 = 1
|
||||
Unix = 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 */
|
||||
|
||||
// 11 was EAGAIN
|
||||
|
||||
// math software
|
||||
|
||||
// non-blocking and interrupt i/o
|
||||
|
||||
// ipc/network software -- argument errors
|
||||
|
||||
// ipc/network software -- operational errors
|
||||
|
||||
// should be rearranged
|
||||
|
||||
// quotas & mush
|
||||
|
||||
// Network File System
|
||||
|
||||
// ISO/IEC 9899:2011 K.3.2.2
|
||||
type Errno_t = int32 /* errno.h:204:13 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
142
vendor/modernc.org/libc/errno/errno_openbsd_amd64.go
generated
vendored
Normal file
142
vendor/modernc.org/libc/errno/errno_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
// Code generated by 'ccgo errno/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 errno/errno_openbsd_amd64.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
E2BIG = 7
|
||||
EACCES = 13
|
||||
EADDRINUSE = 48
|
||||
EADDRNOTAVAIL = 49
|
||||
EAFNOSUPPORT = 47
|
||||
EAGAIN = 35
|
||||
EALREADY = 37
|
||||
EAUTH = 80
|
||||
EBADF = 9
|
||||
EBADMSG = 92
|
||||
EBADRPC = 72
|
||||
EBUSY = 16
|
||||
ECANCELED = 88
|
||||
ECHILD = 10
|
||||
ECONNABORTED = 53
|
||||
ECONNREFUSED = 61
|
||||
ECONNRESET = 54
|
||||
EDEADLK = 11
|
||||
EDESTADDRREQ = 39
|
||||
EDOM = 33
|
||||
EDQUOT = 69
|
||||
EEXIST = 17
|
||||
EFAULT = 14
|
||||
EFBIG = 27
|
||||
EFTYPE = 79
|
||||
EHOSTDOWN = 64
|
||||
EHOSTUNREACH = 65
|
||||
EIDRM = 89
|
||||
EILSEQ = 84
|
||||
EINPROGRESS = 36
|
||||
EINTR = 4
|
||||
EINVAL = 22
|
||||
EIO = 5
|
||||
EIPSEC = 82
|
||||
EISCONN = 56
|
||||
EISDIR = 21
|
||||
ELAST = 95
|
||||
ELOOP = 62
|
||||
EMEDIUMTYPE = 86
|
||||
EMFILE = 24
|
||||
EMLINK = 31
|
||||
EMSGSIZE = 40
|
||||
ENAMETOOLONG = 63
|
||||
ENEEDAUTH = 81
|
||||
ENETDOWN = 50
|
||||
ENETRESET = 52
|
||||
ENETUNREACH = 51
|
||||
ENFILE = 23
|
||||
ENOATTR = 83
|
||||
ENOBUFS = 55
|
||||
ENODEV = 19
|
||||
ENOENT = 2
|
||||
ENOEXEC = 8
|
||||
ENOLCK = 77
|
||||
ENOMEDIUM = 85
|
||||
ENOMEM = 12
|
||||
ENOMSG = 90
|
||||
ENOPROTOOPT = 42
|
||||
ENOSPC = 28
|
||||
ENOSYS = 78
|
||||
ENOTBLK = 15
|
||||
ENOTCONN = 57
|
||||
ENOTDIR = 20
|
||||
ENOTEMPTY = 66
|
||||
ENOTRECOVERABLE = 93
|
||||
ENOTSOCK = 38
|
||||
ENOTSUP = 91
|
||||
ENOTTY = 25
|
||||
ENXIO = 6
|
||||
EOPNOTSUPP = 45
|
||||
EOVERFLOW = 87
|
||||
EOWNERDEAD = 94
|
||||
EPERM = 1
|
||||
EPFNOSUPPORT = 46
|
||||
EPIPE = 32
|
||||
EPROCLIM = 67
|
||||
EPROCUNAVAIL = 76
|
||||
EPROGMISMATCH = 75
|
||||
EPROGUNAVAIL = 74
|
||||
EPROTO = 95
|
||||
EPROTONOSUPPORT = 43
|
||||
EPROTOTYPE = 41
|
||||
ERANGE = 34
|
||||
EREMOTE = 71
|
||||
EROFS = 30
|
||||
ERPCMISMATCH = 73
|
||||
ESHUTDOWN = 58
|
||||
ESOCKTNOSUPPORT = 44
|
||||
ESPIPE = 29
|
||||
ESRCH = 3
|
||||
ESTALE = 70
|
||||
ETIMEDOUT = 60
|
||||
ETOOMANYREFS = 59
|
||||
ETXTBSY = 26
|
||||
EUSERS = 68
|
||||
EWOULDBLOCK = 35
|
||||
EXDEV = 18
|
||||
X_ERRNO_H_ = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_LP64 = 1
|
||||
X_MACHINE_CDEFS_H_ = 0
|
||||
X_RET_PROTECTOR = 1
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
Unix = 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 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
61
vendor/modernc.org/libc/errno/errno_windows_386.go
generated
vendored
61
vendor/modernc.org/libc/errno/errno_windows_386.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo errno/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 errno/errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
// Code generated by 'ccgo errno\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 errno\errno_windows_386.go -pkgname errno', DO NOT EDIT.
|
||||
|
||||
package errno
|
||||
|
||||
|
|
@ -112,7 +112,9 @@ const (
|
|||
EWOULDBLOCK = 140
|
||||
EXDEV = 18
|
||||
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
|
||||
STRUNCATE = 80
|
||||
|
|
@ -136,12 +138,9 @@ const (
|
|||
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_ILP32 = 1
|
||||
X_INC_CORECRT = 0
|
||||
X_INC_CRTDEFS = 0
|
||||
X_INC_CRTDEFS_MACRO = 0
|
||||
X_INC_ERRNO = 0
|
||||
|
|
@ -156,6 +155,7 @@ const (
|
|||
X_PGLOBAL = 0
|
||||
X_PTRDIFF_T_ = 0
|
||||
X_PTRDIFF_T_DEFINED = 0
|
||||
X_REENTRANT = 1
|
||||
X_RSIZE_T_DEFINED = 0
|
||||
X_SECURECRT_ERRCODE_VALUES_DEFINED = 0
|
||||
X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD
|
||||
|
|
@ -210,11 +210,6 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
|||
// 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
|
||||
|
|
@ -235,12 +230,6 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
|||
// 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.
|
||||
|
|
@ -281,28 +270,26 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
|||
// 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 Ssize_t = int32 /* crtdefs.h:47:13 */
|
||||
|
||||
type Rsize_t = Size_t /* corecrt.h:57:16 */
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
|
||||
type Intptr_t = int32 /* corecrt.h:69:13 */
|
||||
type Intptr_t = int32 /* crtdefs.h:64:13 */
|
||||
|
||||
type Uintptr_t = uint32 /* corecrt.h:82:22 */
|
||||
type Uintptr_t = uint32 /* crtdefs.h:77:22 */
|
||||
|
||||
type Wint_t = uint16 /* corecrt.h:111:24 */
|
||||
type Wctype_t = uint16 /* corecrt.h:112:24 */
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
|
||||
type Errno_t = int32 /* corecrt.h:118:13 */
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
|
||||
type X__time32_t = int32 /* corecrt.h:123:14 */
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
|
||||
type X__time64_t = int64 /* corecrt.h:128:35 */
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
|
||||
type Time_t = X__time32_t /* corecrt.h:141:20 */
|
||||
type Time_t = X__time32_t /* crtdefs.h:136:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
|
|
@ -328,29 +315,29 @@ type Threadlocaleinfostruct = struct {
|
|||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* corecrt.h:435:1 */
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */
|
||||
type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* corecrt.h:441:9 */
|
||||
} /* crtdefs.h:428:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */
|
||||
type X_locale_t = uintptr /* corecrt.h:444:19 */
|
||||
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
|
||||
} /* corecrt.h:435:1 */
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* corecrt.h:452:3 */
|
||||
type LPLC_ID = uintptr /* corecrt.h:452:9 */
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
|
||||
// Posix thread extensions.
|
||||
|
||||
|
|
|
|||
4
vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go
generated
vendored
4
vendor/modernc.org/libc/fcntl/capi_darwin_amd64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
4
vendor/modernc.org/libc/fcntl/capi_darwin_arm64.go
generated
vendored
4
vendor/modernc.org/libc/fcntl/capi_darwin_arm64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
5
vendor/modernc.org/libc/fcntl/capi_freebsd_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_freebsd_386.go
generated
vendored
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_freebsd_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
5
vendor/modernc.org/libc/fcntl/capi_openbsd_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fcntl/capi_openbsd_amd64.go
generated
vendored
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_openbsd_amd64.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
2
vendor/modernc.org/libc/fcntl/capi_windows_386.go
generated
vendored
2
vendor/modernc.org/libc/fcntl/capi_windows_386.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// 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_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
// 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_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
|
|
|
|||
9
vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go
generated
vendored
9
vendor/modernc.org/libc/fcntl/fcntl_darwin_amd64.go
generated
vendored
|
|
@ -219,6 +219,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
|
|
@ -407,6 +409,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
|
|
|
|||
9
vendor/modernc.org/libc/fcntl/fcntl_darwin_arm64.go
generated
vendored
9
vendor/modernc.org/libc/fcntl/fcntl_darwin_arm64.go
generated
vendored
|
|
@ -262,6 +262,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
|
|
@ -450,6 +452,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
|
|
|
|||
766
vendor/modernc.org/libc/fcntl/fcntl_freebsd_386.go
generated
vendored
Normal file
766
vendor/modernc.org/libc/fcntl/fcntl_freebsd_386.go
generated
vendored
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 -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
|
||||
AT_EMPTY_PATH = 0x4000
|
||||
AT_FDCWD = -100
|
||||
AT_REMOVEDIR = 0x0800
|
||||
AT_RESOLVE_BENEATH = 0x2000
|
||||
AT_SYMLINK_FOLLOW = 0x0400
|
||||
AT_SYMLINK_NOFOLLOW = 0x0200
|
||||
FAPPEND = 8
|
||||
FASYNC = 64
|
||||
FDSYNC = 16777216
|
||||
FD_CLOEXEC = 1
|
||||
FD_NONE = -200
|
||||
FFSYNC = 128
|
||||
FNDELAY = 4
|
||||
FNONBLOCK = 4
|
||||
FRDAHEAD = 512
|
||||
FREAD = 0x0001
|
||||
FWRITE = 0x0002
|
||||
F_ADD_SEALS = 19
|
||||
F_CANCEL = 5
|
||||
F_DUP2FD = 10
|
||||
F_DUP2FD_CLOEXEC = 18
|
||||
F_DUPFD = 0
|
||||
F_DUPFD_CLOEXEC = 17
|
||||
F_GETFD = 1
|
||||
F_GETFL = 3
|
||||
F_GETLK = 11
|
||||
F_GETOWN = 5
|
||||
F_GET_SEALS = 20
|
||||
F_ISUNIONSTACK = 21
|
||||
F_KINFO = 22
|
||||
F_OGETLK = 7
|
||||
F_OSETLK = 8
|
||||
F_OSETLKW = 9
|
||||
F_RDAHEAD = 16
|
||||
F_RDLCK = 1
|
||||
F_READAHEAD = 15
|
||||
F_SEAL_GROW = 0x0004
|
||||
F_SEAL_SEAL = 0x0001
|
||||
F_SEAL_SHRINK = 0x0002
|
||||
F_SEAL_WRITE = 0x0008
|
||||
F_SETFD = 2
|
||||
F_SETFL = 4
|
||||
F_SETLK = 12
|
||||
F_SETLKW = 13
|
||||
F_SETLK_REMOTE = 14
|
||||
F_SETOWN = 6
|
||||
F_UNLCK = 2
|
||||
F_UNLCKSYS = 4
|
||||
F_WRLCK = 3
|
||||
LOCK_EX = 0x02
|
||||
LOCK_NB = 0x04
|
||||
LOCK_SH = 0x01
|
||||
LOCK_UN = 0x08
|
||||
O_ACCMODE = 0x0003
|
||||
O_APPEND = 0x0008
|
||||
O_ASYNC = 0x0040
|
||||
O_CLOEXEC = 0x00100000
|
||||
O_CREAT = 0x0200
|
||||
O_DIRECT = 0x00010000
|
||||
O_DIRECTORY = 0x00020000
|
||||
O_DSYNC = 0x01000000
|
||||
O_EMPTY_PATH = 0x02000000
|
||||
O_EXCL = 0x0800
|
||||
O_EXEC = 0x00040000
|
||||
O_EXLOCK = 0x0020
|
||||
O_FSYNC = 0x0080
|
||||
O_NDELAY = 4
|
||||
O_NOCTTY = 0x8000
|
||||
O_NOFOLLOW = 0x0100
|
||||
O_NONBLOCK = 0x0004
|
||||
O_PATH = 0x00400000
|
||||
O_RDONLY = 0x0000
|
||||
O_RDWR = 0x0002
|
||||
O_RESOLVE_BENEATH = 0x00800000
|
||||
O_SEARCH = 262144
|
||||
O_SHLOCK = 0x0010
|
||||
O_SYNC = 0x0080
|
||||
O_TRUNC = 0x0400
|
||||
O_TTY_INIT = 0x00080000
|
||||
O_VERIFY = 0x00200000
|
||||
O_WRONLY = 0x0001
|
||||
POSIX_FADV_DONTNEED = 4
|
||||
POSIX_FADV_NOREUSE = 5
|
||||
POSIX_FADV_NORMAL = 0
|
||||
POSIX_FADV_RANDOM = 1
|
||||
POSIX_FADV_SEQUENTIAL = 2
|
||||
POSIX_FADV_WILLNEED = 3
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_ILP32 = 1
|
||||
X_MACHINE__LIMITS_H_ = 0
|
||||
X_MACHINE__TYPES_H_ = 0
|
||||
X_MODE_T_DECLARED = 0
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_OFF_T_DECLARED = 0
|
||||
X_PID_T_DECLARED = 0
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
X_SYS_FCNTL_H_ = 0
|
||||
X_SYS__TYPES_H_ = 0
|
||||
I386 = 1
|
||||
Unix = 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: */
|
||||
827
vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go
generated
vendored
Normal file
827
vendor/modernc.org/libc/fcntl/fcntl_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,827 @@
|
|||
// 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_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
|
||||
AT_FDCWD = -100
|
||||
AT_REMOVEDIR = 0x08
|
||||
AT_SYMLINK_FOLLOW = 0x04
|
||||
AT_SYMLINK_NOFOLLOW = 0x02
|
||||
BIG_ENDIAN = 4321
|
||||
BYTE_ORDER = 1234
|
||||
FAPPEND = 8
|
||||
FASYNC = 64
|
||||
FD_CLOEXEC = 1
|
||||
FFSYNC = 128
|
||||
FNDELAY = 4
|
||||
FNONBLOCK = 4
|
||||
FREAD = 0x0001
|
||||
FWRITE = 0x0002
|
||||
F_DUPFD = 0
|
||||
F_DUPFD_CLOEXEC = 10
|
||||
F_GETFD = 1
|
||||
F_GETFL = 3
|
||||
F_GETLK = 7
|
||||
F_GETOWN = 5
|
||||
F_ISATTY = 11
|
||||
F_RDLCK = 1
|
||||
F_SETFD = 2
|
||||
F_SETFL = 4
|
||||
F_SETLK = 8
|
||||
F_SETLKW = 9
|
||||
F_SETOWN = 6
|
||||
F_UNLCK = 2
|
||||
F_WRLCK = 3
|
||||
LITTLE_ENDIAN = 1234
|
||||
LOCK_EX = 0x02
|
||||
LOCK_NB = 0x04
|
||||
LOCK_SH = 0x01
|
||||
LOCK_UN = 0x08
|
||||
O_ACCMODE = 0x0003
|
||||
O_APPEND = 0x0008
|
||||
O_ASYNC = 0x0040
|
||||
O_CLOEXEC = 0x10000
|
||||
O_CREAT = 0x0200
|
||||
O_DIRECTORY = 0x20000
|
||||
O_DSYNC = 128
|
||||
O_EXCL = 0x0800
|
||||
O_EXLOCK = 0x0020
|
||||
O_FSYNC = 0x0080
|
||||
O_NDELAY = 4
|
||||
O_NOCTTY = 0x8000
|
||||
O_NOFOLLOW = 0x0100
|
||||
O_NONBLOCK = 0x0004
|
||||
O_RDONLY = 0x0000
|
||||
O_RDWR = 0x0002
|
||||
O_RSYNC = 128
|
||||
O_SHLOCK = 0x0010
|
||||
O_SYNC = 0x0080
|
||||
O_TRUNC = 0x0400
|
||||
O_WRONLY = 0x0001
|
||||
PDP_ENDIAN = 3412
|
||||
X_BIG_ENDIAN = 4321
|
||||
X_BYTE_ORDER = 1234
|
||||
X_CLOCKID_T_DEFINED_ = 0
|
||||
X_CLOCK_T_DEFINED_ = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_INT16_T_DEFINED_ = 0
|
||||
X_INT32_T_DEFINED_ = 0
|
||||
X_INT64_T_DEFINED_ = 0
|
||||
X_INT8_T_DEFINED_ = 0
|
||||
X_LITTLE_ENDIAN = 1234
|
||||
X_LP64 = 1
|
||||
X_MACHINE_CDEFS_H_ = 0
|
||||
X_MACHINE_ENDIAN_H_ = 0
|
||||
X_MACHINE__TYPES_H_ = 0
|
||||
X_MAX_PAGE_SHIFT = 12
|
||||
X_OFF_T_DEFINED_ = 0
|
||||
X_PDP_ENDIAN = 3412
|
||||
X_PID_T_DEFINED_ = 0
|
||||
X_QUAD_HIGHWORD = 1
|
||||
X_QUAD_LOWWORD = 0
|
||||
X_RET_PROTECTOR = 1
|
||||
X_SIZE_T_DEFINED_ = 0
|
||||
X_SSIZE_T_DEFINED_ = 0
|
||||
X_STACKALIGNBYTES = 15
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
X_SYS_ENDIAN_H_ = 0
|
||||
X_SYS_FCNTL_H_ = 0
|
||||
X_SYS_TYPES_H_ = 0
|
||||
X_SYS__ENDIAN_H_ = 0
|
||||
X_SYS__TYPES_H_ = 0
|
||||
X_TIMER_T_DEFINED_ = 0
|
||||
X_TIME_T_DEFINED_ = 0
|
||||
X_UINT16_T_DEFINED_ = 0
|
||||
X_UINT32_T_DEFINED_ = 0
|
||||
X_UINT64_T_DEFINED_ = 0
|
||||
X_UINT8_T_DEFINED_ = 0
|
||||
Unix = 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.48 2019/02/09 04:54:11 guenther 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.9 2014/08/22 23:05:15 krw 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__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset
|
||||
type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:67: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:76: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 Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset
|
||||
type Uid_t = X__uid_t /* types.h:148:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:159:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:164:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:169:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:179:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:184:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:189:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:194: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: */
|
||||
61
vendor/modernc.org/libc/fcntl/fcntl_windows_386.go
generated
vendored
61
vendor/modernc.org/libc/fcntl/fcntl_windows_386.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// 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_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
// 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_386.go -pkgname fcntl', DO NOT EDIT.
|
||||
|
||||
package fcntl
|
||||
|
||||
|
|
@ -33,7 +33,9 @@ const (
|
|||
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
|
||||
|
|
@ -81,7 +83,6 @@ const (
|
|||
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
|
||||
|
|
@ -89,8 +90,6 @@ const (
|
|||
X_FILE_OFFSET_BITS_SET_OFFT = 0
|
||||
X_FINDDATA_T_DEFINED = 0
|
||||
X_FSIZE_T_DEFINED = 0
|
||||
X_ILP32 = 1
|
||||
X_INC_CORECRT = 0
|
||||
X_INC_CRTDEFS = 0
|
||||
X_INC_CRTDEFS_MACRO = 0
|
||||
X_INC_FCNTL = 0
|
||||
|
|
@ -132,6 +131,7 @@ const (
|
|||
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
|
||||
|
|
@ -189,11 +189,6 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
|||
// 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
|
||||
|
|
@ -214,12 +209,6 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
|||
// 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.
|
||||
|
|
@ -260,28 +249,26 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
|||
// 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 Ssize_t = int32 /* crtdefs.h:47:13 */
|
||||
|
||||
type Rsize_t = Size_t /* corecrt.h:57:16 */
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
|
||||
type Intptr_t = int32 /* corecrt.h:69:13 */
|
||||
type Intptr_t = int32 /* crtdefs.h:64:13 */
|
||||
|
||||
type Uintptr_t = uint32 /* corecrt.h:82:22 */
|
||||
type Uintptr_t = uint32 /* crtdefs.h:77:22 */
|
||||
|
||||
type Wint_t = uint16 /* corecrt.h:111:24 */
|
||||
type Wctype_t = uint16 /* corecrt.h:112:24 */
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
|
||||
type Errno_t = int32 /* corecrt.h:118:13 */
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
|
||||
type X__time32_t = int32 /* corecrt.h:123:14 */
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
|
||||
type X__time64_t = int64 /* corecrt.h:128:35 */
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
|
||||
type Time_t = X__time32_t /* corecrt.h:141:20 */
|
||||
type Time_t = X__time32_t /* crtdefs.h:136:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
|
|
@ -307,29 +294,29 @@ type Threadlocaleinfostruct = struct {
|
|||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* corecrt.h:435:1 */
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */
|
||||
type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* corecrt.h:441:9 */
|
||||
} /* crtdefs.h:428:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */
|
||||
type X_locale_t = uintptr /* corecrt.h:444:19 */
|
||||
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
|
||||
} /* corecrt.h:435:1 */
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* corecrt.h:452:3 */
|
||||
type LPLC_ID = uintptr /* corecrt.h:452:9 */
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
type X_fsize_t = uint32 /* io.h:29:25 */
|
||||
|
||||
type X_finddata32_t = struct {
|
||||
|
|
|
|||
8
vendor/modernc.org/libc/fts/capi_darwin_amd64.go
generated
vendored
8
vendor/modernc.org/libc/fts/capi_darwin_amd64.go
generated
vendored
|
|
@ -2,4 +2,10 @@
|
|||
|
||||
package fts
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set": {},
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
}
|
||||
|
|
|
|||
8
vendor/modernc.org/libc/fts/capi_darwin_arm64.go
generated
vendored
8
vendor/modernc.org/libc/fts/capi_darwin_arm64.go
generated
vendored
|
|
@ -2,4 +2,10 @@
|
|||
|
||||
package fts
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set": {},
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
}
|
||||
|
|
|
|||
5
vendor/modernc.org/libc/fts/capi_freebsd_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fts/capi_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fts/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 fts/fts_freebsd_386.go -pkgname fts', DO NOT EDIT.
|
||||
|
||||
package fts
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
5
vendor/modernc.org/libc/fts/capi_openbsd_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/fts/capi_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo fts/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 fts/fts_openbsd_amd64.go -pkgname fts', DO NOT EDIT.
|
||||
|
||||
package fts
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
30
vendor/modernc.org/libc/fts/fts_darwin_amd64.go
generated
vendored
30
vendor/modernc.org/libc/fts/fts_darwin_amd64.go
generated
vendored
|
|
@ -27,6 +27,7 @@ const (
|
|||
EF_NO_XATTRS = 0x00000002
|
||||
FD_SETSIZE = 1024
|
||||
FTS_AGAIN = 1
|
||||
FTS_BLOCK_COMPAR = 0x80000000
|
||||
FTS_COMFOLLOW = 0x001
|
||||
FTS_COMFOLLOWDIR = 0x400
|
||||
FTS_D = 1
|
||||
|
|
@ -213,6 +214,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// Copyright (c) 2000-2008 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
|
|
@ -377,6 +380,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
|
|
@ -2944,15 +2954,6 @@ type Errno_t = int32 /* _errno_t.h:30:32 */
|
|||
|
||||
// __IPHONE_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable
|
||||
|
||||
// DO NOT EDIT THIS FILE.
|
||||
//
|
||||
// It has been auto-edited by fixincludes from:
|
||||
//
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/AvailabilityInternal.h"
|
||||
//
|
||||
// This had to be done to correct non-standard usages in the
|
||||
// original, manufacturer supplied header file.
|
||||
|
||||
// Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
|
|
@ -3223,15 +3224,6 @@ type Fd_set1 = struct{ Ffds_bits [32]X__int32_t } /* _fd_def.h:50:9 */
|
|||
|
||||
// __IPHONE_NA is not defined to a value but is uses as a token by macros to indicate that the API is unavailable
|
||||
|
||||
// DO NOT EDIT THIS FILE.
|
||||
//
|
||||
// It has been auto-edited by fixincludes from:
|
||||
//
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/AvailabilityInternal.h"
|
||||
//
|
||||
// This had to be done to correct non-standard usages in the
|
||||
// original, manufacturer supplied header file.
|
||||
|
||||
// Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
|
|
@ -5130,7 +5122,7 @@ type FTS = struct {
|
|||
Ffts_pathlen int32
|
||||
Ffts_nitems int32
|
||||
F__ccgo_pad2 [4]byte
|
||||
Ffts_compar uintptr
|
||||
F__56 struct{ Ffts_compar uintptr }
|
||||
Ffts_options int32
|
||||
F__ccgo_pad3 [4]byte
|
||||
} /* fts.h:111:3 */
|
||||
|
|
|
|||
776
vendor/modernc.org/libc/fts/fts_darwin_arm64.go
generated
vendored
776
vendor/modernc.org/libc/fts/fts_darwin_arm64.go
generated
vendored
|
|
@ -28,6 +28,7 @@ const (
|
|||
EF_NO_XATTRS = 0x00000002
|
||||
FD_SETSIZE = 1024
|
||||
FTS_AGAIN = 1
|
||||
FTS_BLOCK_COMPAR = 0x80000000
|
||||
FTS_CHDIRFD = 0x08
|
||||
FTS_COMFOLLOW = 0x001
|
||||
FTS_COMFOLLOWDIR = 0x400
|
||||
|
|
@ -229,7 +230,6 @@ const (
|
|||
X_FSBLKCNT_T = 0
|
||||
X_FSFILCNT_T = 0
|
||||
X_FTS_H_ = 0
|
||||
X_GCC_WRAP_STDINT_H = 0
|
||||
X_GID_T = 0
|
||||
X_ID_T = 0
|
||||
X_INO64_T = 0
|
||||
|
|
@ -238,7 +238,6 @@ const (
|
|||
X_INT32_T = 0
|
||||
X_INT64_T = 0
|
||||
X_INT8_T = 0
|
||||
X_INTMAX_T = 0
|
||||
X_INTPTR_T = 0
|
||||
X_IN_ADDR_T = 0
|
||||
X_IN_PORT_T = 0
|
||||
|
|
@ -269,7 +268,6 @@ const (
|
|||
X_RSIZE_T = 0
|
||||
X_SIZE_T = 0
|
||||
X_SSIZE_T = 0
|
||||
X_STDINT_H_ = 0
|
||||
X_SUSECONDS_T = 0
|
||||
X_SYS_STAT_H_ = 0
|
||||
X_SYS_TYPES_H_ = 0
|
||||
|
|
@ -278,11 +276,6 @@ const (
|
|||
X_SYS__TYPES_H_ = 0
|
||||
X_TIME_T = 0
|
||||
X_UID_T = 0
|
||||
X_UINT16_T = 0
|
||||
X_UINT32_T = 0
|
||||
X_UINT64_T = 0
|
||||
X_UINT8_T = 0
|
||||
X_UINTMAX_T = 0
|
||||
X_UINTPTR_T = 0
|
||||
X_USECONDS_T = 0
|
||||
X_U_CHAR = 0
|
||||
|
|
@ -313,6 +306,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// Copyright (c) 2000-2008 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
|
|
@ -477,6 +472,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
|
|
@ -1552,727 +1554,39 @@ type X__darwin_pthread_once_t = X_opaque_pthread_once_t /* _pthread_
|
|||
type X__darwin_pthread_rwlock_t = X_opaque_pthread_rwlock_t /* _pthread_types.h:116:41 */
|
||||
type X__darwin_pthread_rwlockattr_t = X_opaque_pthread_rwlockattr_t /* _pthread_types.h:117:45 */
|
||||
type X__darwin_pthread_t = uintptr /* _pthread_types.h:118:34 */
|
||||
type Uint64_t = uint64 /* stdint.h:98:25 */
|
||||
|
||||
// Copyright (c) 2000-2007 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright 1995 NeXT Computer, Inc. All rights reserved.
|
||||
type Int_least64_t = Int64_t /* stdint.h:110:25 */
|
||||
type Uint_least64_t = Uint64_t /* stdint.h:111:26 */
|
||||
type Int_fast64_t = Int64_t /* stdint.h:112:25 */
|
||||
type Uint_fast64_t = Uint64_t /* stdint.h:113:26 */
|
||||
|
||||
// Copyright (c) 2000-2007 Apple Inc. All rights reserved.
|
||||
// Copyright 1995 NeXT Computer, Inc. All rights reserved.
|
||||
// Copyright (c) 1987, 1991, 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.
|
||||
//
|
||||
// @(#)endian.h 8.1 (Berkeley) 6/11/93
|
||||
type Uint32_t = uint32 /* stdint.h:172:25 */
|
||||
|
||||
// Copyright (c) 2000-2018 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright 1995 NeXT Computer, Inc. All rights reserved.
|
||||
// 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. 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.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
type Int_least32_t = Int32_t /* stdint.h:184:25 */
|
||||
type Uint_least32_t = Uint32_t /* stdint.h:185:26 */
|
||||
type Int_fast32_t = Int32_t /* stdint.h:186:25 */
|
||||
type Uint_fast32_t = Uint32_t /* stdint.h:187:26 */
|
||||
type Uint16_t = uint16 /* stdint.h:207:25 */
|
||||
|
||||
// Define _NOQUAD if the compiler does NOT support 64-bit integers.
|
||||
// #define _NOQUAD
|
||||
type Int_least16_t = Int16_t /* stdint.h:215:25 */
|
||||
type Uint_least16_t = Uint16_t /* stdint.h:216:26 */
|
||||
type Int_fast16_t = Int16_t /* stdint.h:217:25 */
|
||||
type Uint_fast16_t = Uint16_t /* stdint.h:218:26 */
|
||||
type Uint8_t = uint8 /* stdint.h:226:24 */
|
||||
|
||||
// Define the order of 32-bit words in 64-bit words.
|
||||
type Int_least8_t = Int8_t /* stdint.h:232:24 */
|
||||
type Uint_least8_t = Uint8_t /* stdint.h:233:25 */
|
||||
type Int_fast8_t = Int8_t /* stdint.h:234:24 */
|
||||
type Uint_fast8_t = Uint8_t /* stdint.h:235:25 */
|
||||
|
||||
// Definitions for byte order, according to byte significance from low
|
||||
// address to high.
|
||||
// prevent glibc sys/types.h from defining conflicting types
|
||||
|
||||
// Copyright (c) 2004, 2006 Apple Computer, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// C99 7.18.1.4 Integer types capable of holding object pointers.
|
||||
|
||||
// Copyright (c) 1995 NeXT Computer, Inc. All rights reserved.
|
||||
// Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright (c) 1987, 1991, 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.
|
||||
|
||||
// Copyright (c) 2000-2018 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright 1995 NeXT Computer, Inc. All rights reserved.
|
||||
// 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. 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.
|
||||
//
|
||||
// @(#)cdefs.h 8.8 (Berkeley) 1/9/95
|
||||
|
||||
// Macros for network/external number representation conversion.
|
||||
|
||||
// Copyright (c) 2006 Apple Computer, Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
// This header is normally included from <libkern/OSByteOrder.h>. However,
|
||||
// <sys/_endian.h> also includes this in the case of little-endian
|
||||
// architectures, so that we can map OSByteOrder routines to the hton* and ntoh*
|
||||
// macros. This results in the asymmetry below; we only include
|
||||
// <libkern/arch/_OSByteOrder.h> for little-endian architectures.
|
||||
|
||||
// Copyright (c) 2003-2007 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
// Macros for swapping constant values in the preprocessing stage.
|
||||
|
||||
// Copyright (c) 1999-2007 Apple Inc. All rights reserved.
|
||||
|
||||
// DO NOT EDIT THIS FILE.
|
||||
//
|
||||
// It has been auto-edited by fixincludes from:
|
||||
//
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/stdint.h"
|
||||
//
|
||||
// This had to be done to correct non-standard usages in the
|
||||
// original, manufacturer supplied header file.
|
||||
|
||||
// Copyright (c) 2000-2010 Apple Inc.
|
||||
// All rights reserved.
|
||||
|
||||
// from ISO/IEC 988:1999 spec
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
type Uint8_t = uint8 /* _uint8_t.h:31:23 */
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
type Uint16_t = uint16 /* _uint16_t.h:31:24 */
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
type Uint32_t = uint32 /* _uint32_t.h:31:22 */
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
type Uint64_t = uint64 /* _uint64_t.h:31:28 */
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
type Int_least8_t = Int8_t /* stdint.h:38:26 */
|
||||
type Int_least16_t = Int16_t /* stdint.h:39:25 */
|
||||
type Int_least32_t = Int32_t /* stdint.h:40:25 */
|
||||
type Int_least64_t = Int64_t /* stdint.h:41:25 */
|
||||
type Uint_least8_t = Uint8_t /* stdint.h:42:25 */
|
||||
type Uint_least16_t = Uint16_t /* stdint.h:43:24 */
|
||||
type Uint_least32_t = Uint32_t /* stdint.h:44:24 */
|
||||
type Uint_least64_t = Uint64_t /* stdint.h:45:24 */
|
||||
|
||||
// 7.18.1.3 Fastest-width integer types
|
||||
type Int_fast8_t = Int8_t /* stdint.h:49:27 */
|
||||
type Int_fast16_t = Int16_t /* stdint.h:50:26 */
|
||||
type Int_fast32_t = Int32_t /* stdint.h:51:26 */
|
||||
type Int_fast64_t = Int64_t /* stdint.h:52:26 */
|
||||
type Uint_fast8_t = Uint8_t /* stdint.h:53:26 */
|
||||
type Uint_fast16_t = Uint16_t /* stdint.h:54:25 */
|
||||
type Uint_fast32_t = Uint32_t /* stdint.h:55:25 */
|
||||
type Uint_fast64_t = Uint64_t /* stdint.h:56:25 */
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
|
||||
// Copyright (c) 2003-2007 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
// Copyright (c) 2003-2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
// Copyright (c) 2003-2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
type Intmax_t = int64 /* _intmax_t.h:32:25 */
|
||||
// Copyright (c) 2012 Apple Inc. All rights reserved.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
||||
//
|
||||
// This file contains Original Code and/or Modifications of Original Code
|
||||
// as defined in and that are subject to the Apple Public Source License
|
||||
// Version 2.0 (the 'License'). You may not use this file except in
|
||||
// compliance with the License. The rights granted to you under the License
|
||||
// may not be used to create, or enable the creation or redistribution of,
|
||||
// unlawful or unlicensed copies of an Apple operating system, or to
|
||||
// circumvent, violate, or enable the circumvention or violation of, any
|
||||
// terms of an Apple operating system software license agreement.
|
||||
//
|
||||
// Please obtain a copy of the License at
|
||||
// http://www.opensource.apple.com/apsl/ and read it before using this file.
|
||||
//
|
||||
// The Original Code and all software distributed under the License are
|
||||
// distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
// EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
||||
// INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
||||
// Please see the License for the specific language governing rights and
|
||||
// limitations under the License.
|
||||
//
|
||||
// @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||
|
||||
type Uintmax_t = uint64 /* _uintmax_t.h:32:26 */
|
||||
// C99 7.18.1.5 Greatest-width integer types.
|
||||
type Intmax_t = int64 /* stdint.h:262:26 */
|
||||
type Uintmax_t = uint64 /* stdint.h:263:26 */
|
||||
|
||||
// Functions for byte reversed loads.
|
||||
|
||||
|
|
@ -3735,15 +3049,6 @@ type Errno_t = int32 /* _errno_t.h:30:32 */
|
|||
|
||||
// Set up standard Mac OS X versions
|
||||
|
||||
// DO NOT EDIT THIS FILE.
|
||||
//
|
||||
// It has been auto-edited by fixincludes from:
|
||||
//
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/AvailabilityInternal.h"
|
||||
//
|
||||
// This had to be done to correct non-standard usages in the
|
||||
// original, manufacturer supplied header file.
|
||||
|
||||
// Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
|
|
@ -4037,15 +3342,6 @@ type Fd_set1 = struct{ Ffds_bits [32]X__int32_t } /* _fd_def.h:50:9 */
|
|||
|
||||
// Set up standard Mac OS X versions
|
||||
|
||||
// DO NOT EDIT THIS FILE.
|
||||
//
|
||||
// It has been auto-edited by fixincludes from:
|
||||
//
|
||||
// "/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/AvailabilityInternal.h"
|
||||
//
|
||||
// This had to be done to correct non-standard usages in the
|
||||
// original, manufacturer supplied header file.
|
||||
|
||||
// Copyright (c) 2007-2016 by Apple Inc.. All rights reserved.
|
||||
//
|
||||
// @APPLE_LICENSE_HEADER_START@
|
||||
|
|
@ -5910,7 +5206,7 @@ type FTS = struct {
|
|||
Ffts_pathlen int32
|
||||
Ffts_nitems int32
|
||||
F__ccgo_pad2 [4]byte
|
||||
Ffts_compar uintptr
|
||||
F__56 struct{ Ffts_compar uintptr }
|
||||
Ffts_options int32
|
||||
F__ccgo_pad3 [4]byte
|
||||
} /* fts.h:111:3 */
|
||||
|
|
|
|||
2359
vendor/modernc.org/libc/fts/fts_freebsd_386.go
generated
vendored
Normal file
2359
vendor/modernc.org/libc/fts/fts_freebsd_386.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1272
vendor/modernc.org/libc/fts/fts_openbsd_amd64.go
generated
vendored
Normal file
1272
vendor/modernc.org/libc/fts/fts_openbsd_amd64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
4
vendor/modernc.org/libc/grp/capi_darwin_amd64.go
generated
vendored
4
vendor/modernc.org/libc/grp/capi_darwin_amd64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package grp
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
4
vendor/modernc.org/libc/grp/capi_darwin_arm64.go
generated
vendored
4
vendor/modernc.org/libc/grp/capi_darwin_arm64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package grp
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
5
vendor/modernc.org/libc/grp/capi_freebsd_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/grp/capi_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo grp/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 grp/grp_freebsd_386.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
5
vendor/modernc.org/libc/grp/capi_openbsd_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/grp/capi_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo grp/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 grp/grp_openbsd_amd64.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
9
vendor/modernc.org/libc/grp/grp_darwin_amd64.go
generated
vendored
9
vendor/modernc.org/libc/grp/grp_darwin_amd64.go
generated
vendored
|
|
@ -56,6 +56,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// -
|
||||
// Copyright (c) 1989, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -217,6 +219,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
|
|
|
|||
9
vendor/modernc.org/libc/grp/grp_darwin_arm64.go
generated
vendored
9
vendor/modernc.org/libc/grp/grp_darwin_arm64.go
generated
vendored
|
|
@ -58,6 +58,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// -
|
||||
// Copyright (c) 1989, 1993
|
||||
// The Regents of the University of California. All rights reserved.
|
||||
|
|
@ -219,6 +221,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
|
|
|
|||
607
vendor/modernc.org/libc/grp/grp_freebsd_386.go
generated
vendored
Normal file
607
vendor/modernc.org/libc/grp/grp_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,607 @@
|
|||
// Code generated by 'ccgo grp/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 grp/grp_freebsd_386.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_GID_T_DECLARED = 0
|
||||
X_GRP_H_ = 0
|
||||
X_ILP32 = 1
|
||||
X_MACHINE__LIMITS_H_ = 0
|
||||
X_MACHINE__TYPES_H_ = 0
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_PATH_GROUP = "/etc/group"
|
||||
X_SIZE_T_DECLARED = 0
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
X_SYS__TYPES_H_ = 0
|
||||
I386 = 1
|
||||
Unix = 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) 1989, 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.
|
||||
//
|
||||
// @(#)grp.h 8.2 (Berkeley) 1/21/94
|
||||
// $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$
|
||||
|
||||
// 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 Gid_t = X__gid_t /* grp.h:49:18 */
|
||||
|
||||
type Group = struct {
|
||||
Fgr_name uintptr
|
||||
Fgr_passwd uintptr
|
||||
Fgr_gid Gid_t
|
||||
Fgr_mem uintptr
|
||||
} /* grp.h:58:1 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
700
vendor/modernc.org/libc/grp/grp_openbsd_amd64.go
generated
vendored
Normal file
700
vendor/modernc.org/libc/grp/grp_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,700 @@
|
|||
// Code generated by 'ccgo grp/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 grp/grp_openbsd_amd64.go -pkgname grp', DO NOT EDIT.
|
||||
|
||||
package grp
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
BIG_ENDIAN = 4321
|
||||
BYTE_ORDER = 1234
|
||||
LITTLE_ENDIAN = 1234
|
||||
PDP_ENDIAN = 3412
|
||||
X_BIG_ENDIAN = 4321
|
||||
X_BYTE_ORDER = 1234
|
||||
X_CLOCKID_T_DEFINED_ = 0
|
||||
X_CLOCK_T_DEFINED_ = 0
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_GRP_H_ = 0
|
||||
X_INT16_T_DEFINED_ = 0
|
||||
X_INT32_T_DEFINED_ = 0
|
||||
X_INT64_T_DEFINED_ = 0
|
||||
X_INT8_T_DEFINED_ = 0
|
||||
X_LITTLE_ENDIAN = 1234
|
||||
X_LP64 = 1
|
||||
X_MACHINE_CDEFS_H_ = 0
|
||||
X_MACHINE_ENDIAN_H_ = 0
|
||||
X_MACHINE__TYPES_H_ = 0
|
||||
X_MAX_PAGE_SHIFT = 12
|
||||
X_OFF_T_DEFINED_ = 0
|
||||
X_PATH_GROUP = "/etc/group"
|
||||
X_PDP_ENDIAN = 3412
|
||||
X_PID_T_DEFINED_ = 0
|
||||
X_QUAD_HIGHWORD = 1
|
||||
X_QUAD_LOWWORD = 0
|
||||
X_RET_PROTECTOR = 1
|
||||
X_SIZE_T_DEFINED_ = 0
|
||||
X_SSIZE_T_DEFINED_ = 0
|
||||
X_STACKALIGNBYTES = 15
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
X_SYS_ENDIAN_H_ = 0
|
||||
X_SYS_TYPES_H_ = 0
|
||||
X_SYS__ENDIAN_H_ = 0
|
||||
X_SYS__TYPES_H_ = 0
|
||||
X_TIMER_T_DEFINED_ = 0
|
||||
X_TIME_T_DEFINED_ = 0
|
||||
X_UINT16_T_DEFINED_ = 0
|
||||
X_UINT32_T_DEFINED_ = 0
|
||||
X_UINT64_T_DEFINED_ = 0
|
||||
X_UINT8_T_DEFINED_ = 0
|
||||
Unix = 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: grp.h,v 1.13 2018/09/13 12:31:15 millert Exp $
|
||||
// $NetBSD: grp.h,v 1.7 1995/04/29 05:30:40 cgd Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1989, 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.
|
||||
//
|
||||
// @(#)grp.h 8.2 (Berkeley) 1/21/94
|
||||
|
||||
// $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther 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: 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: 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.9 2014/08/22 23:05:15 krw 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__swblk_t = X__int32_t /* _types.h:63:19 */ // swap offset
|
||||
type X__time_t = X__int64_t /* _types.h:64:19 */ // epoch time
|
||||
type X__timer_t = X__int32_t /* _types.h:65:19 */ // POSIX timer identifiers
|
||||
type X__uid_t = X__uint32_t /* _types.h:66:20 */ // user id
|
||||
type X__useconds_t = X__uint32_t /* _types.h:67: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:76: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 Swblk_t = X__swblk_t /* types.h:147:19 */ // swap offset
|
||||
type Uid_t = X__uid_t /* types.h:148:18 */ // user id
|
||||
type Useconds_t = X__useconds_t /* types.h:149:22 */ // microseconds
|
||||
type Suseconds_t = X__suseconds_t /* types.h:150:23 */ // microseconds (signed)
|
||||
type Fsblkcnt_t = X__fsblkcnt_t /* types.h:151:22 */ // file system block count
|
||||
type Fsfilcnt_t = X__fsfilcnt_t /* types.h:152:22 */ // file system file count
|
||||
|
||||
// The following types may be defined in multiple header files.
|
||||
type Clock_t = X__clock_t /* types.h:159:19 */
|
||||
|
||||
type Clockid_t = X__clockid_t /* types.h:164:21 */
|
||||
|
||||
type Pid_t = X__pid_t /* types.h:169:18 */
|
||||
|
||||
type Ssize_t = X__ssize_t /* types.h:179:19 */
|
||||
|
||||
type Time_t = X__time_t /* types.h:184:18 */
|
||||
|
||||
type Timer_t = X__timer_t /* types.h:189:19 */
|
||||
|
||||
type Off_t = X__off_t /* types.h:194:18 */
|
||||
|
||||
// Major, minor numbers, dev_t's.
|
||||
|
||||
type Group = struct {
|
||||
Fgr_name uintptr
|
||||
Fgr_passwd uintptr
|
||||
Fgr_gid Gid_t
|
||||
F__ccgo_pad1 [4]byte
|
||||
Fgr_mem uintptr
|
||||
} /* grp.h:50:1 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
2
vendor/modernc.org/libc/ioutil_darwin.go
generated
vendored
2
vendor/modernc.org/libc/ioutil_darwin.go
generated
vendored
|
|
@ -41,7 +41,7 @@ func nextRandom(x uintptr) {
|
|||
copy((*RawMem)(unsafe.Pointer(x))[:6:6], fmt.Sprintf("%06d", int(1e9+r%1e9)%1e6))
|
||||
}
|
||||
|
||||
func tempFile(s, x uintptr) (fd int, err error) {
|
||||
func tempFile(s, x uintptr, _ int32) (fd int, err error) {
|
||||
const maxTry = 10000
|
||||
nconflict := 0
|
||||
for i := 0; i < maxTry; i++ {
|
||||
|
|
|
|||
2
vendor/modernc.org/libc/ioutil_freebsd.go
generated
vendored
2
vendor/modernc.org/libc/ioutil_freebsd.go
generated
vendored
|
|
@ -41,7 +41,7 @@ func nextRandom(x uintptr) {
|
|||
copy((*RawMem)(unsafe.Pointer(x))[:6:6], fmt.Sprintf("%06d", int(1e9+r%1e9)%1e6))
|
||||
}
|
||||
|
||||
func tempFile(s, x uintptr) (fd int, err error) {
|
||||
func tempFile(s, x uintptr, _ int32) (fd int, err error) {
|
||||
const maxTry = 10000
|
||||
nconflict := 0
|
||||
for i := 0; i < maxTry; i++ {
|
||||
|
|
|
|||
8
vendor/modernc.org/libc/ioutil_linux.go
generated
vendored
8
vendor/modernc.org/libc/ioutil_linux.go
generated
vendored
|
|
@ -43,7 +43,7 @@ func nextRandom(x uintptr) {
|
|||
copy((*RawMem)(unsafe.Pointer(x))[:6:6], fmt.Sprintf("%06d", int(1e9+r%1e9)%1e6))
|
||||
}
|
||||
|
||||
func tempFile(s, x uintptr, flags int32) (fd, err int) {
|
||||
func tempFile(s, x uintptr, flags int32) (fd int, err error) {
|
||||
const maxTry = 10000
|
||||
nconflict := 0
|
||||
flags |= int32(os.O_RDWR | os.O_CREATE | os.O_EXCL | unix.O_LARGEFILE)
|
||||
|
|
@ -52,11 +52,11 @@ func tempFile(s, x uintptr, flags int32) (fd, err int) {
|
|||
fdcwd := fcntl.AT_FDCWD
|
||||
n, _, err := unix.Syscall6(unix.SYS_OPENAT, uintptr(fdcwd), s, uintptr(flags), 0600, 0, 0)
|
||||
if err == 0 {
|
||||
return int(n), 0
|
||||
return int(n), nil
|
||||
}
|
||||
|
||||
if err != errno.EEXIST {
|
||||
return -1, int(err)
|
||||
return -1, err
|
||||
}
|
||||
|
||||
if nconflict++; nconflict > 10 {
|
||||
|
|
@ -66,5 +66,5 @@ func tempFile(s, x uintptr, flags int32) (fd, err int) {
|
|||
randStateMu.Unlock()
|
||||
}
|
||||
}
|
||||
return -1, errno.EEXIST
|
||||
return -1, unix.Errno(errno.EEXIST)
|
||||
}
|
||||
|
|
|
|||
2
vendor/modernc.org/libc/ioutil_netbsd.go
generated
vendored
2
vendor/modernc.org/libc/ioutil_netbsd.go
generated
vendored
|
|
@ -41,7 +41,7 @@ func nextRandom(x uintptr) {
|
|||
copy((*RawMem)(unsafe.Pointer(x))[:6:6], fmt.Sprintf("%06d", int(1e9+r%1e9)%1e6))
|
||||
}
|
||||
|
||||
func tempFile(s, x uintptr) (fd int, err error) {
|
||||
func tempFile(s, x uintptr, _ int32) (fd int, err error) {
|
||||
const maxTry = 10000
|
||||
nconflict := 0
|
||||
for i := 0; i < maxTry; i++ {
|
||||
|
|
|
|||
65
vendor/modernc.org/libc/ioutil_openbsd.go
generated
vendored
Normal file
65
vendor/modernc.org/libc/ioutil_openbsd.go
generated
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
// Copyright 2010 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE-GO file.
|
||||
|
||||
// Modifications Copyright 2020 The Libc Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// Random number state.
|
||||
// We generate random temporary file names so that there's a good
|
||||
// chance the file doesn't exist yet - keeps the number of tries in
|
||||
// TempFile to a minimum.
|
||||
var randState uint32
|
||||
var randStateMu sync.Mutex
|
||||
|
||||
func reseed() uint32 {
|
||||
return uint32(time.Now().UnixNano() + int64(os.Getpid()))
|
||||
}
|
||||
|
||||
func nextRandom(x uintptr) {
|
||||
randStateMu.Lock()
|
||||
r := randState
|
||||
if r == 0 {
|
||||
r = reseed()
|
||||
}
|
||||
r = r*1664525 + 1013904223 // constants from Numerical Recipes
|
||||
randState = r
|
||||
randStateMu.Unlock()
|
||||
copy((*RawMem)(unsafe.Pointer(x))[:6:6], fmt.Sprintf("%06d", int(1e9+r%1e9)%1e6))
|
||||
}
|
||||
|
||||
func tempFile(s, x uintptr, _ int32) (fd int, err error) {
|
||||
const maxTry = 10000
|
||||
nconflict := 0
|
||||
for i := 0; i < maxTry; i++ {
|
||||
nextRandom(x)
|
||||
if fd, err = unix.Open(GoString(s), os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600); err == nil {
|
||||
return fd, nil
|
||||
}
|
||||
|
||||
if !os.IsExist(err) {
|
||||
return -1, err
|
||||
}
|
||||
|
||||
if nconflict++; nconflict > 10 {
|
||||
randStateMu.Lock()
|
||||
randState = reseed()
|
||||
nconflict = 0
|
||||
randStateMu.Unlock()
|
||||
}
|
||||
}
|
||||
return -1, err
|
||||
}
|
||||
4
vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go
generated
vendored
4
vendor/modernc.org/libc/langinfo/capi_darwin_amd64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package langinfo
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
4
vendor/modernc.org/libc/langinfo/capi_darwin_arm64.go
generated
vendored
4
vendor/modernc.org/libc/langinfo/capi_darwin_arm64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package langinfo
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
5
vendor/modernc.org/libc/langinfo/capi_freebsd_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/langinfo/capi_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo langinfo/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 langinfo/langinfo_freebsd_386.go -pkgname langinfo', DO NOT EDIT.
|
||||
|
||||
package langinfo
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
5
vendor/modernc.org/libc/langinfo/capi_openbsd_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/langinfo/capi_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo langinfo/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 langinfo/langinfo_openbsd_amd64.go -pkgname langinfo', DO NOT EDIT.
|
||||
|
||||
package langinfo
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
9
vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go
generated
vendored
9
vendor/modernc.org/libc/langinfo/langinfo_darwin_amd64.go
generated
vendored
|
|
@ -109,6 +109,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// -
|
||||
// Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
|
||||
// All rights reserved.
|
||||
|
|
@ -257,6 +259,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __unused denotes variables and functions that may not be used, preventing
|
||||
// the compiler from warning about it if not used.
|
||||
|
||||
|
|
|
|||
9
vendor/modernc.org/libc/langinfo/langinfo_darwin_arm64.go
generated
vendored
9
vendor/modernc.org/libc/langinfo/langinfo_darwin_arm64.go
generated
vendored
|
|
@ -111,6 +111,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// -
|
||||
// Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
|
||||
// All rights reserved.
|
||||
|
|
@ -259,6 +261,13 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
// in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
// strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
|
||||
// In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
// deleted from the program and old programs will want them left alone.
|
||||
// When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
// const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
// When using "gcc -traditional", we assume that this is the intent; if
|
||||
// __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
|
||||
// __pure2 can be used for functions that are only a function of their scalar
|
||||
// arguments (meaning they can't dereference pointers).
|
||||
//
|
||||
|
|
|
|||
695
vendor/modernc.org/libc/langinfo/langinfo_freebsd_386.go
generated
vendored
Normal file
695
vendor/modernc.org/libc/langinfo/langinfo_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,695 @@
|
|||
// Code generated by 'ccgo langinfo/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 langinfo/langinfo_freebsd_386.go -pkgname langinfo', DO NOT EDIT.
|
||||
|
||||
package langinfo
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
ABDAY_1 = 14
|
||||
ABDAY_2 = 15
|
||||
ABDAY_3 = 16
|
||||
ABDAY_4 = 17
|
||||
ABDAY_5 = 18
|
||||
ABDAY_6 = 19
|
||||
ABDAY_7 = 20
|
||||
ABMON_1 = 33
|
||||
ABMON_10 = 42
|
||||
ABMON_11 = 43
|
||||
ABMON_12 = 44
|
||||
ABMON_2 = 34
|
||||
ABMON_3 = 35
|
||||
ABMON_4 = 36
|
||||
ABMON_5 = 37
|
||||
ABMON_6 = 38
|
||||
ABMON_7 = 39
|
||||
ABMON_8 = 40
|
||||
ABMON_9 = 41
|
||||
ALTMON_1 = 58
|
||||
ALTMON_10 = 67
|
||||
ALTMON_11 = 68
|
||||
ALTMON_12 = 69
|
||||
ALTMON_2 = 59
|
||||
ALTMON_3 = 60
|
||||
ALTMON_4 = 61
|
||||
ALTMON_5 = 62
|
||||
ALTMON_6 = 63
|
||||
ALTMON_7 = 64
|
||||
ALTMON_8 = 65
|
||||
ALTMON_9 = 66
|
||||
ALT_DIGITS = 49
|
||||
AM_STR = 5
|
||||
CODESET = 0
|
||||
CRNCYSTR = 56
|
||||
DAY_1 = 7
|
||||
DAY_2 = 8
|
||||
DAY_3 = 9
|
||||
DAY_4 = 10
|
||||
DAY_5 = 11
|
||||
DAY_6 = 12
|
||||
DAY_7 = 13
|
||||
D_FMT = 2
|
||||
D_MD_ORDER = 57
|
||||
D_T_FMT = 1
|
||||
ERA = 45
|
||||
ERA_D_FMT = 46
|
||||
ERA_D_T_FMT = 47
|
||||
ERA_T_FMT = 48
|
||||
MON_1 = 21
|
||||
MON_10 = 30
|
||||
MON_11 = 31
|
||||
MON_12 = 32
|
||||
MON_2 = 22
|
||||
MON_3 = 23
|
||||
MON_4 = 24
|
||||
MON_5 = 25
|
||||
MON_6 = 26
|
||||
MON_7 = 27
|
||||
MON_8 = 28
|
||||
MON_9 = 29
|
||||
NOEXPR = 53
|
||||
NOSTR = 55
|
||||
PM_STR = 6
|
||||
RADIXCHAR = 50
|
||||
THOUSEP = 51
|
||||
T_FMT = 3
|
||||
T_FMT_AMPM = 4
|
||||
YESEXPR = 52
|
||||
YESSTR = 54
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_ILP32 = 1
|
||||
X_LANGINFO_H_ = 0
|
||||
X_LOCALE_T_DEFINED = 0
|
||||
X_MACHINE__LIMITS_H_ = 0
|
||||
X_MACHINE__TYPES_H_ = 0
|
||||
X_NL_ITEM_DECLARED = 0
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
X_SYS__TYPES_H_ = 0
|
||||
X_XLOCALE_LANGINFO_H = 0
|
||||
I386 = 1
|
||||
Unix = 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-2-Clause-FreeBSD
|
||||
//
|
||||
// Copyright (c) 2001 Alexey Zelkin <phantom@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$
|
||||
|
||||
// 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 Nl_item = X__nl_item /* langinfo.h:38:19 */
|
||||
|
||||
// -
|
||||
// SPDX-License-Identifier: BSD-2-Clause-FreeBSD
|
||||
//
|
||||
// Copyright (c) 2011, 2012 The FreeBSD Foundation
|
||||
// All rights reserved.
|
||||
//
|
||||
// This software was developed by David Chisnall under sponsorship from
|
||||
// the FreeBSD Foundation.
|
||||
//
|
||||
// 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$
|
||||
|
||||
type Locale_t = uintptr /* _langinfo.h:39:25 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
511
vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go
generated
vendored
Normal file
511
vendor/modernc.org/libc/langinfo/langinfo_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,511 @@
|
|||
// Code generated by 'ccgo langinfo/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 langinfo/langinfo_openbsd_amd64.go -pkgname langinfo', DO NOT EDIT.
|
||||
|
||||
package langinfo
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
ABDAY_1 = 13
|
||||
ABDAY_2 = 14
|
||||
ABDAY_3 = 15
|
||||
ABDAY_4 = 16
|
||||
ABDAY_5 = 17
|
||||
ABDAY_6 = 18
|
||||
ABDAY_7 = 19
|
||||
ABMON_1 = 32
|
||||
ABMON_10 = 41
|
||||
ABMON_11 = 42
|
||||
ABMON_12 = 43
|
||||
ABMON_2 = 33
|
||||
ABMON_3 = 34
|
||||
ABMON_4 = 35
|
||||
ABMON_5 = 36
|
||||
ABMON_6 = 37
|
||||
ABMON_7 = 38
|
||||
ABMON_8 = 39
|
||||
ABMON_9 = 40
|
||||
AM_STR = 4
|
||||
CODESET = 51
|
||||
CRNCYSTR = 50
|
||||
DAY_1 = 6
|
||||
DAY_2 = 7
|
||||
DAY_3 = 8
|
||||
DAY_4 = 9
|
||||
DAY_5 = 10
|
||||
DAY_6 = 11
|
||||
DAY_7 = 12
|
||||
D_FMT = 1
|
||||
D_T_FMT = 0
|
||||
MON_1 = 20
|
||||
MON_10 = 29
|
||||
MON_11 = 30
|
||||
MON_12 = 31
|
||||
MON_2 = 21
|
||||
MON_3 = 22
|
||||
MON_4 = 23
|
||||
MON_5 = 24
|
||||
MON_6 = 25
|
||||
MON_7 = 26
|
||||
MON_8 = 27
|
||||
MON_9 = 28
|
||||
NL_CAT_LOCALE = 1
|
||||
NL_SETD = 1
|
||||
NOEXPR = 49
|
||||
NOSTR = 48
|
||||
PM_STR = 5
|
||||
RADIXCHAR = 44
|
||||
THOUSEP = 45
|
||||
T_FMT = 2
|
||||
T_FMT_AMPM = 3
|
||||
YESEXPR = 47
|
||||
YESSTR = 46
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_LANGINFO_H_ = 0
|
||||
X_LOCALE_T_DEFINED_ = 0
|
||||
X_LP64 = 1
|
||||
X_MACHINE_CDEFS_H_ = 0
|
||||
X_NL_TYPES_H_ = 0
|
||||
X_RET_PROTECTOR = 1
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
Unix = 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: langinfo.h,v 1.8 2017/09/05 03:16:13 schwarze Exp $
|
||||
// $NetBSD: langinfo.h,v 1.3 1995/04/28 23:30:54 jtc Exp $
|
||||
|
||||
// Written by J.T. Conklin <jtc@netbsd.org>
|
||||
// Public domain.
|
||||
|
||||
// $OpenBSD: nl_types.h,v 1.8 2008/06/26 05:42:04 ray Exp $
|
||||
// $NetBSD: nl_types.h,v 1.6 1996/05/13 23:11:15 jtc Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to The NetBSD Foundation
|
||||
// by J.T. Conklin.
|
||||
//
|
||||
// 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 NETBSD FOUNDATION, INC. 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.
|
||||
|
||||
// $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.
|
||||
|
||||
type X_nl_catd = struct {
|
||||
F__data uintptr
|
||||
F__size int32
|
||||
F__ccgo_pad1 [4]byte
|
||||
} /* nl_types.h:78:9 */
|
||||
|
||||
// $OpenBSD: langinfo.h,v 1.8 2017/09/05 03:16:13 schwarze Exp $
|
||||
// $NetBSD: langinfo.h,v 1.3 1995/04/28 23:30:54 jtc Exp $
|
||||
|
||||
// Written by J.T. Conklin <jtc@netbsd.org>
|
||||
// Public domain.
|
||||
|
||||
// $OpenBSD: nl_types.h,v 1.8 2008/06/26 05:42:04 ray Exp $
|
||||
// $NetBSD: nl_types.h,v 1.6 1996/05/13 23:11:15 jtc Exp $
|
||||
|
||||
// -
|
||||
// Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
// All rights reserved.
|
||||
//
|
||||
// This code is derived from software contributed to The NetBSD Foundation
|
||||
// by J.T. Conklin.
|
||||
//
|
||||
// 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 NETBSD FOUNDATION, INC. 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.
|
||||
|
||||
// $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.
|
||||
|
||||
type Nl_catd = uintptr /* nl_types.h:81:3 */
|
||||
|
||||
type Nl_item = int64 /* nl_types.h:83:14 */
|
||||
|
||||
type Locale_t = uintptr /* langinfo.h:76:14 */
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
10
vendor/modernc.org/libc/libc.go
generated
vendored
10
vendor/modernc.org/libc/libc.go
generated
vendored
|
|
@ -161,6 +161,10 @@ func X_exit(_ *TLS, status int32) {
|
|||
}
|
||||
|
||||
func SetEnviron(t *TLS, env []string) {
|
||||
if environInitialized {
|
||||
return
|
||||
}
|
||||
|
||||
environInitialized = true
|
||||
p := Xcalloc(t, 1, types.Size_t((len(env)+1)*(int(uintptrSize))))
|
||||
if p == 0 {
|
||||
|
|
@ -232,6 +236,8 @@ func X__builtin_copysignl(t *TLS, x, y float64) float64 { return X
|
|||
func X__builtin_exit(t *TLS, status int32) { Xexit(t, status) }
|
||||
func X__builtin_expect(t *TLS, exp, c long) long { return exp }
|
||||
func X__builtin_fabs(t *TLS, x float64) float64 { return Xfabs(t, x) }
|
||||
func X__builtin_fabsf(t *TLS, x float32) float32 { return Xfabsf(t, x) }
|
||||
func X__builtin_fabsl(t *TLS, x float64) float64 { return Xfabsl(t, x) }
|
||||
func X__builtin_free(t *TLS, ptr uintptr) { Xfree(t, ptr) }
|
||||
func X__builtin_getentropy(t *TLS, buf uintptr, n types.Size_t) int32 { return Xgetentropy(t, buf, n) }
|
||||
func X__builtin_huge_val(t *TLS) float64 { return math.Inf(1) }
|
||||
|
|
@ -1405,3 +1411,7 @@ func Xrindex(t *TLS, s uintptr, c int32) uintptr {
|
|||
func Xisascii(t *TLS, c int32) int32 {
|
||||
return Bool32(c >= 0 && c <= 0x7f)
|
||||
}
|
||||
|
||||
func X__builtin_isunordered(t *TLS, a, b float64) int32 {
|
||||
return Bool32(math.IsNaN(a) || math.IsNaN(b))
|
||||
}
|
||||
|
|
|
|||
102
vendor/modernc.org/libc/libc_darwin.go
generated
vendored
102
vendor/modernc.org/libc/libc_darwin.go
generated
vendored
|
|
@ -19,6 +19,7 @@ import (
|
|||
"unicode"
|
||||
"unsafe"
|
||||
|
||||
guuid "github.com/google/uuid"
|
||||
"golang.org/x/sys/unix"
|
||||
"modernc.org/libc/errno"
|
||||
"modernc.org/libc/fcntl"
|
||||
|
|
@ -36,6 +37,7 @@ import (
|
|||
"modernc.org/libc/termios"
|
||||
"modernc.org/libc/time"
|
||||
"modernc.org/libc/unistd"
|
||||
"modernc.org/libc/uuid/uuid"
|
||||
"modernc.org/libc/wctype"
|
||||
)
|
||||
|
||||
|
|
@ -908,42 +910,6 @@ func Xfileno(t *TLS, stream uintptr) int32 {
|
|||
return -1
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
len := uintptr(Xstrlen(t, template))
|
||||
x := template + uintptr(len-6) - uintptr(suffixlen)
|
||||
for i := uintptr(0); i < 6; i++ {
|
||||
if *(*byte)(unsafe.Pointer(x + i)) != 'X' {
|
||||
if dmesgs {
|
||||
dmesg("%v: FAIL", origin(1))
|
||||
}
|
||||
t.setErrno(errno.EINVAL)
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
fd, err := tempFile(template, x)
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return int32(fd)
|
||||
}
|
||||
|
||||
// int mkstemp(char *template);
|
||||
func Xmkstemp(t *TLS, template uintptr) int32 {
|
||||
return Xmkstemps64(t, template, 0)
|
||||
}
|
||||
|
||||
func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) {
|
||||
var statp uintptr
|
||||
if stat != nil {
|
||||
|
|
@ -1214,14 +1180,16 @@ func Xfork(t *TLS) int32 {
|
|||
return -1
|
||||
}
|
||||
|
||||
var emptyStr = [1]byte{}
|
||||
|
||||
// char *setlocale(int category, const char *locale);
|
||||
func Xsetlocale(t *TLS, category int32, locale uintptr) uintptr {
|
||||
return 0 //TODO
|
||||
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
|
||||
}
|
||||
|
||||
// char *nl_langinfo(nl_item item);
|
||||
func Xnl_langinfo(t *TLS, item langinfo.Nl_item) uintptr {
|
||||
panic(todo(""))
|
||||
return uintptr(unsafe.Pointer(&emptyStr)) //TODO
|
||||
}
|
||||
|
||||
// FILE *popen(const char *command, const char *type);
|
||||
|
|
@ -2002,3 +1970,61 @@ func Xungetc(t *TLS, c int32, stream uintptr) int32 {
|
|||
func Xissetugid(t *TLS) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
var progname uintptr
|
||||
|
||||
// const char *getprogname(void);
|
||||
func Xgetprogname(t *TLS) uintptr {
|
||||
if progname != 0 {
|
||||
return progname
|
||||
}
|
||||
|
||||
var err error
|
||||
progname, err = CString(filepath.Base(os.Args[0]))
|
||||
if err != nil {
|
||||
t.setErrno(err)
|
||||
return 0
|
||||
}
|
||||
|
||||
return progname
|
||||
}
|
||||
|
||||
// void uuid_copy(uuid_t dst, uuid_t src);
|
||||
func Xuuid_copy(t *TLS, dst, src uintptr) {
|
||||
*(*uuid.Uuid_t)(unsafe.Pointer(dst)) = *(*uuid.Uuid_t)(unsafe.Pointer(src))
|
||||
}
|
||||
|
||||
// int uuid_parse( char *in, uuid_t uu);
|
||||
func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
|
||||
r, err := guuid.Parse(GoString(in))
|
||||
if err != nil {
|
||||
return -1
|
||||
}
|
||||
|
||||
copy((*RawMem)(unsafe.Pointer(uu))[:unsafe.Sizeof(uuid.Uuid_t{})], r[:])
|
||||
return 0
|
||||
}
|
||||
|
||||
// struct __float2 { float __sinval; float __cosval; };
|
||||
|
||||
// struct __float2 __sincosf_stret(float);
|
||||
func X__sincosf_stret(t *TLS, f float32) struct{ F__sinval, F__cosval float32 } {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// struct __double2 { double __sinval; double __cosval; };
|
||||
|
||||
// struct __double2 __sincos_stret(double);
|
||||
func X__sincos_stret(t *TLS, f float64) struct{ F__sinval, F__cosval float64 } {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// struct __float2 __sincospif_stret(float);
|
||||
func X__sincospif_stret(t *TLS, f float32) struct{ F__sinval, F__cosval float32 } {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// struct _double2 __sincospi_stret(double);
|
||||
func X__sincospi_stret(t *TLS, f float64) struct{ F__sinval, F__cosval float64 } {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
|
|
|||
25
vendor/modernc.org/libc/libc_darwin_arm64.go
generated
vendored
25
vendor/modernc.org/libc/libc_darwin_arm64.go
generated
vendored
|
|
@ -6,6 +6,7 @@ package libc // import "modernc.org/libc"
|
|||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
|
@ -48,7 +49,7 @@ func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) (r int32) {
|
|||
var p uintptr
|
||||
var i int
|
||||
switch cmd {
|
||||
case fcntl.F_GETLK, fcntl.F_SETLK:
|
||||
case fcntl.F_GETLK, fcntl.F_SETLK, fcntl.F_SETLKW:
|
||||
p = *(*uintptr)(unsafe.Pointer(args))
|
||||
err = unix.FcntlFlock(uintptr(fd), int(cmd), (*unix.Flock_t)(unsafe.Pointer(p)))
|
||||
case fcntl.F_GETFL, fcntl.F_FULLFSYNC:
|
||||
|
|
@ -206,12 +207,11 @@ func Xalarm(t *TLS, seconds uint32) uint32 {
|
|||
|
||||
// time_t time(time_t *tloc);
|
||||
func Xtime(t *TLS, tloc uintptr) types.Time_t {
|
||||
panic(todo(""))
|
||||
// n := time.Now().UTC().Unix()
|
||||
// if tloc != 0 {
|
||||
// *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n)
|
||||
// }
|
||||
// return types.Time_t(n)
|
||||
n := time.Now().UTC().Unix()
|
||||
if tloc != 0 {
|
||||
*(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n)
|
||||
}
|
||||
return types.Time_t(n)
|
||||
}
|
||||
|
||||
// // int getrlimit(int resource, struct rlimit *rlim);
|
||||
|
|
@ -366,13 +366,12 @@ func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int3
|
|||
|
||||
// int link(const char *oldpath, const char *newpath);
|
||||
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
// return 0
|
||||
return 0
|
||||
}
|
||||
|
||||
// int dup2(int oldfd, int newfd);
|
||||
|
|
|
|||
142
vendor/modernc.org/libc/libc_freebsd.go
generated
vendored
142
vendor/modernc.org/libc/libc_freebsd.go
generated
vendored
|
|
@ -16,6 +16,7 @@ import (
|
|||
gotime "time"
|
||||
"unsafe"
|
||||
|
||||
guuid "github.com/google/uuid"
|
||||
"golang.org/x/sys/unix"
|
||||
"modernc.org/libc/errno"
|
||||
"modernc.org/libc/fcntl"
|
||||
|
|
@ -34,17 +35,13 @@ import (
|
|||
"modernc.org/libc/termios"
|
||||
"modernc.org/libc/time"
|
||||
"modernc.org/libc/unistd"
|
||||
"modernc.org/libc/uuid"
|
||||
)
|
||||
|
||||
var (
|
||||
in6_addr_any in.In6_addr
|
||||
)
|
||||
|
||||
type (
|
||||
long = int64
|
||||
ulong = uint64
|
||||
)
|
||||
|
||||
// // Keep these outside of the var block otherwise go generate will miss them.
|
||||
var X__stderrp = Xstdout
|
||||
var X__stdinp = Xstdin
|
||||
|
|
@ -715,71 +712,6 @@ func Xfileno(t *TLS, stream uintptr) int32 {
|
|||
panic(todo(""))
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
return Xmkstemps64(t, template, suffixlen)
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
len := uintptr(Xstrlen(t, template))
|
||||
x := template + uintptr(len-6) - uintptr(suffixlen)
|
||||
for i := uintptr(0); i < 6; i++ {
|
||||
if *(*byte)(unsafe.Pointer(x + i)) != 'X' {
|
||||
if dmesgs {
|
||||
dmesg("%v: FAIL", origin(1))
|
||||
}
|
||||
t.setErrno(errno.EINVAL)
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
fd, err := tempFile(template, x)
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return int32(fd)
|
||||
}
|
||||
|
||||
// int mkstemp(char *template);
|
||||
func Xmkstemp(t *TLS, template uintptr) int32 {
|
||||
return Xmkstemp64(t, template)
|
||||
}
|
||||
|
||||
// int mkstemp(char *template);
|
||||
func Xmkstemp64(t *TLS, template uintptr) int32 {
|
||||
return Xmkstemps64(t, template, 0)
|
||||
}
|
||||
|
||||
func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) {
|
||||
var statp uintptr
|
||||
if stat != nil {
|
||||
statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{})))
|
||||
if statp == 0 {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
*(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat
|
||||
}
|
||||
csp, errx := CString(path)
|
||||
if errx != nil {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
return &fts.FTSENT{
|
||||
Ffts_info: int32(info),
|
||||
Ffts_path: csp,
|
||||
Ffts_pathlen: uint64(len(path)),
|
||||
Ffts_statp: statp,
|
||||
Ffts_errno: int32(err),
|
||||
}
|
||||
}
|
||||
|
||||
func newCFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) uintptr {
|
||||
p := Xcalloc(t, 1, types.Size_t(unsafe.Sizeof(fts.FTSENT{})))
|
||||
if p == 0 {
|
||||
|
|
@ -1354,11 +1286,6 @@ func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
|
|||
panic(todo(""))
|
||||
}
|
||||
|
||||
// void endpwent(void);
|
||||
func Xendpwent(t *TLS) {
|
||||
// nop
|
||||
}
|
||||
|
||||
// int __isoc99_sscanf(const char *str, const char *format, ...);
|
||||
func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
|
||||
r := Xsscanf(t, str, format, va)
|
||||
|
|
@ -1368,18 +1295,6 @@ func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
|
|||
return r
|
||||
}
|
||||
|
||||
var ctimeStaticBuf [32]byte
|
||||
|
||||
// char *ctime(const time_t *timep);
|
||||
func Xctime(t *TLS, timep uintptr) uintptr {
|
||||
return Xctime_r(t, timep, uintptr(unsafe.Pointer(&ctimeStaticBuf[0])))
|
||||
}
|
||||
|
||||
// char *ctime_r(const time_t *timep, char *buf);
|
||||
func Xctime_r(t *TLS, timep, buf uintptr) uintptr {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// void __assert(const char * func, const char * file, int line, const char *expr) __dead2;
|
||||
func X__assert(t *TLS, fn, file uintptr, line int32, expr uintptr) {
|
||||
X__assert_fail(t, expr, file, uint32(line), fn)
|
||||
|
|
@ -1464,53 +1379,11 @@ func Xclosedir(t *TLS, dir uintptr) int32 {
|
|||
return r
|
||||
}
|
||||
|
||||
// DIR *opendir(const char *name);
|
||||
func Xopendir(t *TLS, name uintptr) uintptr {
|
||||
p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{})))
|
||||
if p == 0 {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0))
|
||||
if fd < 0 {
|
||||
if dmesgs {
|
||||
dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd)
|
||||
}
|
||||
Xfree(t, p)
|
||||
return 0
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
(*darwinDir)(unsafe.Pointer(p)).fd = fd
|
||||
(*darwinDir)(unsafe.Pointer(p)).h = 0
|
||||
(*darwinDir)(unsafe.Pointer(p)).l = 0
|
||||
(*darwinDir)(unsafe.Pointer(p)).eof = false
|
||||
return p
|
||||
}
|
||||
|
||||
// int __xuname(int namesize, void *namebuf)
|
||||
func X__xuname(t *TLS, namesize int32, namebuf uintptr) int32 {
|
||||
return Xuname(t, namebuf)
|
||||
}
|
||||
|
||||
// int chflags(const char *path, u_int flags);
|
||||
func Xchflags(t *TLS, path uintptr, flags uint64) int32 {
|
||||
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int pipe(int pipefd[2]);
|
||||
func Xpipe(t *TLS, pipefd uintptr) int32 {
|
||||
var a [2]int
|
||||
|
|
@ -1623,3 +1496,14 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pth
|
|||
(*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1))
|
||||
return 0
|
||||
}
|
||||
|
||||
// int uuid_parse( char *in, uuid_t uu);
|
||||
func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
|
||||
r, err := guuid.Parse(GoString(in))
|
||||
if err != nil {
|
||||
return -1
|
||||
}
|
||||
|
||||
copy((*RawMem)(unsafe.Pointer(uu))[:unsafe.Sizeof(uuid.Uuid_t{})], r[:])
|
||||
return 0
|
||||
}
|
||||
|
|
|
|||
649
vendor/modernc.org/libc/libc_freebsd_386.go
generated
vendored
Normal file
649
vendor/modernc.org/libc/libc_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,649 @@
|
|||
// Copyright 2021 The Libc Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
"modernc.org/libc/fcntl"
|
||||
"modernc.org/libc/fts"
|
||||
"modernc.org/libc/sys/types"
|
||||
"modernc.org/libc/time"
|
||||
"modernc.org/libc/utime"
|
||||
)
|
||||
|
||||
type (
|
||||
long = int32
|
||||
ulong = uint32
|
||||
)
|
||||
|
||||
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
|
||||
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
|
||||
if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// FILE *fopen64(const char *pathname, const char *mode);
|
||||
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
|
||||
m := strings.ReplaceAll(GoString(mode), "b", "")
|
||||
var flags int
|
||||
switch m {
|
||||
case "r":
|
||||
flags = fcntl.O_RDONLY
|
||||
case "r+":
|
||||
flags = fcntl.O_RDWR
|
||||
case "w":
|
||||
flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC
|
||||
case "w+":
|
||||
flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC
|
||||
case "a":
|
||||
flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND
|
||||
case "a+":
|
||||
flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND
|
||||
default:
|
||||
panic(m)
|
||||
}
|
||||
fd, err := unix.Open(GoString(pathname), int(flags), 0666)
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return 0
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd)
|
||||
}
|
||||
if p := newFile(t, int32(fd)); p != 0 {
|
||||
return p
|
||||
}
|
||||
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
// int lstat(const char *pathname, struct stat *statbuf);
|
||||
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
|
||||
if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: ok", origin(1), GoString(pathname))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int stat(const char *pathname, struct stat *statbuf);
|
||||
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
|
||||
if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: ok", origin(1), GoString(pathname))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int mkdir(const char *path, mode_t mode);
|
||||
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
|
||||
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: ok", origin(1), GoString(path))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int access(const char *pathname, int mode);
|
||||
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
|
||||
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int unlink(const char *pathname);
|
||||
func Xunlink(t *TLS, pathname uintptr) int32 {
|
||||
if err := unix.Unlink(GoString(pathname)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize);
|
||||
func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
|
||||
var n int
|
||||
var err error
|
||||
switch {
|
||||
case buf == 0 || bufsize == 0:
|
||||
n, err = unix.Readlink(GoString(path), nil)
|
||||
default:
|
||||
n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize])
|
||||
}
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok")
|
||||
}
|
||||
return types.Ssize_t(n)
|
||||
}
|
||||
|
||||
// int symlink(const char *target, const char *linkpath);
|
||||
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
|
||||
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int chmod(const char *pathname, mode_t mode)
|
||||
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
|
||||
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// time_t time(time_t *tloc);
|
||||
func Xtime(t *TLS, tloc uintptr) time.Time_t {
|
||||
panic(todo(""))
|
||||
// n := time.Now().UTC().Unix()
|
||||
// if tloc != 0 {
|
||||
// *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n)
|
||||
// }
|
||||
// return types.Time_t(n)
|
||||
}
|
||||
|
||||
// int utimes(const char *filename, const struct timeval times[2]);
|
||||
func Xutimes(t *TLS, filename, times uintptr) int32 {
|
||||
var a []unix.Timeval
|
||||
if times != 0 {
|
||||
a = make([]unix.Timeval, 2)
|
||||
a[0] = *(*unix.Timeval)(unsafe.Pointer(times))
|
||||
a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{})))
|
||||
}
|
||||
if err := unix.Utimes(GoString(filename), a); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int fstat(int fd, struct stat *statbuf);
|
||||
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
|
||||
if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: fd %d: %v FAIL", origin(1), fd, err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: fd %d: ok", origin(1), fd)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// off64_t lseek64(int fd, off64_t offset, int whence);
|
||||
func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
|
||||
n, err := unix.Seek(int(fd), int64(offset), int(whence))
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return types.Off_t(n)
|
||||
}
|
||||
|
||||
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
|
||||
var arg uintptr
|
||||
if args != 0 {
|
||||
arg = *(*uintptr)(unsafe.Pointer(args))
|
||||
}
|
||||
n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg)
|
||||
if err != 0 {
|
||||
if dmesgs {
|
||||
dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n)
|
||||
}
|
||||
return int32(n)
|
||||
}
|
||||
|
||||
// int rename(const char *oldpath, const char *newpath);
|
||||
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
|
||||
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int mknod(const char *pathname, mode_t mode, dev_t dev);
|
||||
func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
|
||||
// return 0
|
||||
}
|
||||
|
||||
// int utime(const char *filename, const struct utimbuf *times);
|
||||
func Xutime(t *TLS, filename, times uintptr) int32 {
|
||||
var a []unix.Timeval
|
||||
if times != 0 {
|
||||
a = make([]unix.Timeval, 2)
|
||||
a[0].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Factime
|
||||
a[1].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime
|
||||
}
|
||||
if err := unix.Utimes(GoString(filename), a); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int chown(const char *pathname, uid_t owner, gid_t group);
|
||||
func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 {
|
||||
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// int link(const char *oldpath, const char *newpath);
|
||||
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
|
||||
// return 0
|
||||
}
|
||||
|
||||
// int dup2(int oldfd, int newfd);
|
||||
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
|
||||
panic(todo(""))
|
||||
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
// if err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
|
||||
// return int32(n)
|
||||
}
|
||||
|
||||
// unsigned int alarm(unsigned int seconds);
|
||||
func Xalarm(t *TLS, seconds uint32) uint32 {
|
||||
panic(todo(""))
|
||||
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
// if err != 0 {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// return uint32(n)
|
||||
}
|
||||
|
||||
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen size_t, serv uintptr, servlen size_t, flags int32) int32 { /* getnameinfo.c:125:5: */
|
||||
panic(todo(""))
|
||||
//TODO bp := tls.Alloc(347)
|
||||
//TODO defer tls.Free(347)
|
||||
|
||||
//TODO // var ptr [78]int8 at bp, 78
|
||||
|
||||
//TODO // var buf [256]int8 at bp+78, 256
|
||||
|
||||
//TODO // var num [13]int8 at bp+334, 13
|
||||
|
||||
//TODO var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family)
|
||||
//TODO var a uintptr
|
||||
//TODO var scopeid uint32
|
||||
|
||||
//TODO switch af {
|
||||
//TODO case 2:
|
||||
//TODO a = (sa1 + 4 /* &.sin_addr */)
|
||||
//TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{}))) {
|
||||
//TODO return -6
|
||||
//TODO }
|
||||
//TODO mkptr4(tls, bp /* &ptr[0] */, a)
|
||||
//TODO scopeid = uint32(0)
|
||||
//TODO break
|
||||
//TODO case 10:
|
||||
//TODO a = (sa1 + 8 /* &.sin6_addr */)
|
||||
//TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{}))) {
|
||||
//TODO return -6
|
||||
//TODO }
|
||||
//TODO if Xmemcmp(tls, a, ts+88 /* "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" */, uint64(12)) != 0 {
|
||||
//TODO mkptr6(tls, bp /* &ptr[0] */, a)
|
||||
//TODO } else {
|
||||
//TODO mkptr4(tls, bp /* &ptr[0] */, (a + uintptr(12)))
|
||||
//TODO }
|
||||
//TODO scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id
|
||||
//TODO break
|
||||
//TODO default:
|
||||
//TODO return -6
|
||||
//TODO }
|
||||
|
||||
//TODO if (node != 0) && (nodelen != 0) {
|
||||
//TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0)
|
||||
//TODO if !((flags & 0x01) != 0) {
|
||||
//TODO reverse_hosts(tls, bp+78 /* &buf[0] */, a, scopeid, af)
|
||||
//TODO }
|
||||
//TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) && !((flags & 0x01) != 0) {
|
||||
//TODO Xabort(tls) //TODO-
|
||||
//TODO // unsigned char query[18+PTR_MAX], reply[512];
|
||||
//TODO // int qlen = __res_mkquery(0, ptr, 1, RR_PTR,
|
||||
//TODO // 0, 0, 0, query, sizeof query);
|
||||
//TODO // query[3] = 0; /* don't need AD flag */
|
||||
//TODO // int rlen = __res_send(query, qlen, reply, sizeof reply);
|
||||
//TODO // buf[0] = 0;
|
||||
//TODO // if (rlen > 0)
|
||||
//TODO // __dns_parse(reply, rlen, dns_parse_callback, buf);
|
||||
//TODO }
|
||||
//TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) {
|
||||
//TODO if (flags & 0x08) != 0 {
|
||||
//TODO return -2
|
||||
//TODO }
|
||||
//TODO Xinet_ntop(tls, af, a, bp+78 /* &buf[0] */, uint32(unsafe.Sizeof([256]int8{})))
|
||||
//TODO if scopeid != 0 {
|
||||
//TODO Xabort(tls) //TODO-
|
||||
//TODO // char *p = 0, tmp[IF_NAMESIZE+1];
|
||||
//TODO // if (!(flags & NI_NUMERICSCOPE) &&
|
||||
//TODO // (IN6_IS_ADDR_LINKLOCAL(a) ||
|
||||
//TODO // IN6_IS_ADDR_MC_LINKLOCAL(a)))
|
||||
//TODO // p = if_indextoname(scopeid, tmp+1);
|
||||
//TODO // if (!p)
|
||||
//TODO // p = itoa(num, scopeid);
|
||||
//TODO // *--p = '%';
|
||||
//TODO // strcat(buf, p);
|
||||
//TODO }
|
||||
//TODO }
|
||||
//TODO if Xstrlen(tls, bp+78 /* &buf[0] */) >= size_t(nodelen) {
|
||||
//TODO return -12
|
||||
//TODO }
|
||||
//TODO Xstrcpy(tls, node, bp+78 /* &buf[0] */)
|
||||
//TODO }
|
||||
|
||||
//TODO if (serv != 0) && (servlen != 0) {
|
||||
//TODO var p uintptr = bp + 78 /* buf */
|
||||
//TODO var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port))
|
||||
//TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0)
|
||||
//TODO if !((flags & 0x02) != 0) {
|
||||
//TODO reverse_services(tls, bp+78 /* &buf[0] */, port, (flags & 0x10))
|
||||
//TODO }
|
||||
//TODO if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) {
|
||||
//TODO p = itoa(tls, bp+334 /* &num[0] */, uint32(port))
|
||||
//TODO }
|
||||
//TODO if Xstrlen(tls, p) >= size_t(servlen) {
|
||||
//TODO return -12
|
||||
//TODO }
|
||||
//TODO Xstrcpy(tls, serv, p)
|
||||
//TODO }
|
||||
|
||||
//TODO return 0
|
||||
}
|
||||
|
||||
func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyaddr_r.c:10:5: */
|
||||
panic(todo(""))
|
||||
//TODO bp := tls.Alloc(28)
|
||||
//TODO defer tls.Free(28)
|
||||
|
||||
//TODO //TODO union {
|
||||
//TODO //TODO struct sockaddr_in sin;
|
||||
//TODO //TODO struct sockaddr_in6 sin6;
|
||||
//TODO //TODO } sa = { .sin.sin_family = af };
|
||||
//TODO *(*struct {
|
||||
//TODO sin sockaddr_in
|
||||
//TODO _ [12]byte
|
||||
//TODO })(unsafe.Pointer(bp /* sa1 */)) = struct {
|
||||
//TODO sin sockaddr_in
|
||||
//TODO _ [12]byte
|
||||
//TODO }{} //TODO-
|
||||
//TODO (*sockaddr_in)(unsafe.Pointer(bp /* &sa1 */)).sin_family = sa_family_t(af) //TODO-
|
||||
//TODO var sl socklen_t
|
||||
//TODO if af == 10 {
|
||||
//TODO sl = uint32(unsafe.Sizeof(sockaddr_in6{}))
|
||||
//TODO } else {
|
||||
//TODO sl = uint32(unsafe.Sizeof(sockaddr_in{}))
|
||||
//TODO }
|
||||
//TODO var i int32
|
||||
|
||||
//TODO *(*uintptr)(unsafe.Pointer(res)) = uintptr(0)
|
||||
|
||||
//TODO // Load address argument into sockaddr structure
|
||||
//TODO if (af == 10) && (l == socklen_t(16)) {
|
||||
//TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin6 */ + 8 /* &.sin6_addr */), a, uint64(16))
|
||||
//TODO } else if (af == 2) && (l == socklen_t(4)) {
|
||||
//TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin */ + 4 /* &.sin_addr */), a, uint64(4))
|
||||
//TODO } else {
|
||||
//TODO *(*int32)(unsafe.Pointer(err)) = 3
|
||||
//TODO return 22
|
||||
//TODO }
|
||||
|
||||
//TODO // Align buffer and check for space for pointers and ip address
|
||||
//TODO i = (int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1))))
|
||||
//TODO if !(i != 0) {
|
||||
//TODO i = int32(unsafe.Sizeof(uintptr(0)))
|
||||
//TODO }
|
||||
//TODO if buflen <= (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) {
|
||||
//TODO return 34
|
||||
//TODO }
|
||||
//TODO buf += (uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i)))
|
||||
//TODO buflen = buflen - (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l))
|
||||
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_addr_list = buf
|
||||
//TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))))
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_aliases = buf
|
||||
//TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))))
|
||||
|
||||
//TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf
|
||||
//TODO Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l))
|
||||
//TODO buf += uintptr(l)
|
||||
//TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0)
|
||||
//TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf
|
||||
//TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0)
|
||||
|
||||
//TODO switch Xgetnameinfo(tls, bp /* &sa1 */, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) {
|
||||
//TODO case -3:
|
||||
//TODO *(*int32)(unsafe.Pointer(err)) = 2
|
||||
//TODO return 11
|
||||
//TODO case -12:
|
||||
//TODO return 34
|
||||
//TODO default:
|
||||
//TODO fallthrough
|
||||
//TODO case -10:
|
||||
//TODO fallthrough
|
||||
//TODO case -11:
|
||||
//TODO fallthrough
|
||||
//TODO case -4:
|
||||
//TODO *(*int32)(unsafe.Pointer(err)) = 3
|
||||
//TODO return *(*int32)(unsafe.Pointer(X___errno_location(tls)))
|
||||
//TODO case 0:
|
||||
//TODO break
|
||||
//TODO }
|
||||
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_addrtype = af
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_length = int32(l)
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases))
|
||||
//TODO *(*uintptr)(unsafe.Pointer(res)) = h
|
||||
//TODO return 0
|
||||
}
|
||||
|
||||
// int getrlimit(int resource, struct rlimit *rlim);
|
||||
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
|
||||
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) {
|
||||
var statp uintptr
|
||||
if stat != nil {
|
||||
statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{})))
|
||||
if statp == 0 {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
*(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat
|
||||
}
|
||||
csp, errx := CString(path)
|
||||
if errx != nil {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
return &fts.FTSENT{
|
||||
Ffts_info: int32(info),
|
||||
Ffts_path: csp,
|
||||
Ffts_pathlen: uint32(len(path)),
|
||||
Ffts_statp: statp,
|
||||
Ffts_errno: int32(err),
|
||||
}
|
||||
}
|
||||
|
||||
// DIR *opendir(const char *name);
|
||||
func Xopendir(t *TLS, name uintptr) uintptr {
|
||||
p := Xmalloc(t, uint32(unsafe.Sizeof(darwinDir{})))
|
||||
if p == 0 {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0))
|
||||
if fd < 0 {
|
||||
if dmesgs {
|
||||
dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd)
|
||||
}
|
||||
Xfree(t, p)
|
||||
return 0
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
(*darwinDir)(unsafe.Pointer(p)).fd = fd
|
||||
(*darwinDir)(unsafe.Pointer(p)).h = 0
|
||||
(*darwinDir)(unsafe.Pointer(p)).l = 0
|
||||
(*darwinDir)(unsafe.Pointer(p)).eof = false
|
||||
return p
|
||||
}
|
||||
|
||||
func X__srget(t *TLS, stream uintptr) int32 { return Xgetc(t, stream) }
|
||||
|
||||
// int chflags(const char *path, u_int flags);
|
||||
func Xchflags(t *TLS, path uintptr, flags uint32) int32 {
|
||||
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
73
vendor/modernc.org/libc/libc_freebsd_amd64.go
generated
vendored
73
vendor/modernc.org/libc/libc_freebsd_amd64.go
generated
vendored
|
|
@ -6,15 +6,22 @@ package libc // import "modernc.org/libc"
|
|||
|
||||
import (
|
||||
"strings"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
"modernc.org/libc/fcntl"
|
||||
"modernc.org/libc/fts"
|
||||
"modernc.org/libc/sys/types"
|
||||
"modernc.org/libc/time"
|
||||
"modernc.org/libc/utime"
|
||||
)
|
||||
|
||||
type (
|
||||
long = int64
|
||||
ulong = uint64
|
||||
)
|
||||
|
||||
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
|
||||
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
|
||||
if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
|
||||
|
|
@ -572,3 +579,69 @@ func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
|
|||
|
||||
return 0
|
||||
}
|
||||
|
||||
func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) {
|
||||
var statp uintptr
|
||||
if stat != nil {
|
||||
statp = Xmalloc(t, types.Size_t(unsafe.Sizeof(unix.Stat_t{})))
|
||||
if statp == 0 {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
*(*unix.Stat_t)(unsafe.Pointer(statp)) = *stat
|
||||
}
|
||||
csp, errx := CString(path)
|
||||
if errx != nil {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
return &fts.FTSENT{
|
||||
Ffts_info: int32(info),
|
||||
Ffts_path: csp,
|
||||
Ffts_pathlen: uint64(len(path)),
|
||||
Ffts_statp: statp,
|
||||
Ffts_errno: int32(err),
|
||||
}
|
||||
}
|
||||
|
||||
// DIR *opendir(const char *name);
|
||||
func Xopendir(t *TLS, name uintptr) uintptr {
|
||||
p := Xmalloc(t, uint64(unsafe.Sizeof(darwinDir{})))
|
||||
if p == 0 {
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
fd := int(Xopen(t, name, fcntl.O_RDONLY|fcntl.O_DIRECTORY|fcntl.O_CLOEXEC, 0))
|
||||
if fd < 0 {
|
||||
if dmesgs {
|
||||
dmesg("%v: FAIL %v", origin(1), (*darwinDir)(unsafe.Pointer(p)).fd)
|
||||
}
|
||||
Xfree(t, p)
|
||||
return 0
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
(*darwinDir)(unsafe.Pointer(p)).fd = fd
|
||||
(*darwinDir)(unsafe.Pointer(p)).h = 0
|
||||
(*darwinDir)(unsafe.Pointer(p)).l = 0
|
||||
(*darwinDir)(unsafe.Pointer(p)).eof = false
|
||||
return p
|
||||
}
|
||||
|
||||
// int chflags(const char *path, u_int flags);
|
||||
func Xchflags(t *TLS, path uintptr, flags uint64) int32 {
|
||||
if err := unix.Chflags(GoString(path), int(flags)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
|
|
|||
177
vendor/modernc.org/libc/libc_linux.go
generated
vendored
177
vendor/modernc.org/libc/libc_linux.go
generated
vendored
|
|
@ -7,13 +7,10 @@ package libc // import "modernc.org/libc"
|
|||
import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"math"
|
||||
"math/rand"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime/debug"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
|
@ -30,7 +27,6 @@ import (
|
|||
"modernc.org/libc/netinet/in"
|
||||
"modernc.org/libc/signal"
|
||||
"modernc.org/libc/stdio"
|
||||
"modernc.org/libc/stdlib"
|
||||
"modernc.org/libc/sys/socket"
|
||||
"modernc.org/libc/sys/stat"
|
||||
"modernc.org/libc/sys/types"
|
||||
|
|
@ -685,61 +681,6 @@ func Xfileno(t *TLS, stream uintptr) int32 {
|
|||
return -1
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
return Xmkstemps64(t, template, suffixlen)
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
len := uintptr(Xstrlen(t, template))
|
||||
x := template + uintptr(len-6) - uintptr(suffixlen)
|
||||
for i := uintptr(0); i < 6; i++ {
|
||||
if *(*byte)(unsafe.Pointer(x + i)) != 'X' {
|
||||
t.setErrno(errno.EINVAL)
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
fd, err := tempFile(template, x, 0)
|
||||
if err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return int32(fd)
|
||||
}
|
||||
|
||||
// int mkostemp(char *template, int flags);
|
||||
func Xmkostemp(t *TLS, template uintptr, flags int32) int32 {
|
||||
len := uintptr(Xstrlen(t, template))
|
||||
x := template + uintptr(len-6)
|
||||
for i := uintptr(0); i < 6; i++ {
|
||||
if *(*byte)(unsafe.Pointer(x + i)) != 'X' {
|
||||
t.setErrno(errno.EINVAL)
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
fd, err := tempFile(template, x, flags)
|
||||
if err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return int32(fd)
|
||||
}
|
||||
|
||||
// int mkstemp(char *template);
|
||||
func Xmkstemp(t *TLS, template uintptr) int32 {
|
||||
return Xmkstemp64(t, template)
|
||||
}
|
||||
|
||||
// int mkstemp(char *template);
|
||||
func Xmkstemp64(t *TLS, template uintptr) int32 {
|
||||
return Xmkstemps64(t, template, 0)
|
||||
}
|
||||
|
||||
func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) {
|
||||
var statp uintptr
|
||||
if stat != nil {
|
||||
|
|
@ -950,11 +891,6 @@ func Xstrerror(t *TLS, errnum int32) uintptr {
|
|||
return uintptr(unsafe.Pointer(&strerrorBuf[0]))
|
||||
}
|
||||
|
||||
// int strerror_r(int errnum, char *buf, size_t buflen);
|
||||
func Xstrerror_r(t *TLS, errnum int32, buf uintptr, buflen size_t) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// void *dlopen(const char *filename, int flags);
|
||||
func Xdlopen(t *TLS, filename uintptr, flags int32) uintptr {
|
||||
panic(todo("%q", GoString(filename)))
|
||||
|
|
@ -1377,11 +1313,6 @@ func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
|
|||
return types.Ssize_t(n)
|
||||
}
|
||||
|
||||
// void endpwent(void);
|
||||
func Xendpwent(t *TLS) {
|
||||
// nop
|
||||
}
|
||||
|
||||
// int __isoc99_sscanf(const char *str, const char *format, ...);
|
||||
func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
|
||||
r := Xsscanf(t, str, format, va)
|
||||
|
|
@ -1391,21 +1322,21 @@ func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
|
|||
return r
|
||||
}
|
||||
|
||||
var ctimeStaticBuf [32]byte
|
||||
|
||||
// char *ctime(const time_t *timep);
|
||||
func Xctime(t *TLS, timep uintptr) uintptr {
|
||||
return Xctime_r(t, timep, uintptr(unsafe.Pointer(&ctimeStaticBuf[0])))
|
||||
}
|
||||
|
||||
// char *ctime_r(const time_t *timep, char *buf);
|
||||
func Xctime_r(t *TLS, timep, buf uintptr) uintptr {
|
||||
ut := *(*unix.Time_t)(unsafe.Pointer(timep))
|
||||
tm := time.Unix(int64(ut), 0).Local()
|
||||
s := tm.Format(time.ANSIC) + "\n\x00"
|
||||
copy((*RawMem)(unsafe.Pointer(buf))[:26:26], s)
|
||||
return buf
|
||||
}
|
||||
// var ctimeStaticBuf [32]byte
|
||||
//
|
||||
// // char *ctime(const time_t *timep);
|
||||
// func Xctime(t *TLS, timep uintptr) uintptr {
|
||||
// return Xctime_r(t, timep, uintptr(unsafe.Pointer(&ctimeStaticBuf[0])))
|
||||
// }
|
||||
//
|
||||
// // char *ctime_r(const time_t *timep, char *buf);
|
||||
// func Xctime_r(t *TLS, timep, buf uintptr) uintptr {
|
||||
// ut := *(*unix.Time_t)(unsafe.Pointer(timep))
|
||||
// tm := time.Unix(int64(ut), 0).Local()
|
||||
// s := tm.Format(time.ANSIC) + "\n\x00"
|
||||
// copy((*RawMem)(unsafe.Pointer(buf))[:26:26], s)
|
||||
// return buf
|
||||
// }
|
||||
|
||||
// ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
|
||||
func Xpwrite(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t {
|
||||
|
|
@ -1464,16 +1395,20 @@ func Xposix_fadvise(t *TLS, fd int32, offset, len types.Off_t, advice int32) int
|
|||
return 0
|
||||
}
|
||||
|
||||
// void uuid_generate_random(uuid_t out);
|
||||
func Xuuid_generate_random(t *TLS, out uintptr) {
|
||||
panic(todo(""))
|
||||
// int fgetc(FILE *stream);
|
||||
func Xfgetc(t *TLS, stream uintptr) int32 {
|
||||
fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_fileno)
|
||||
var buf [1]byte
|
||||
if n, _ := unix.Read(fd, buf[:]); n != 0 {
|
||||
return int32(buf[0])
|
||||
}
|
||||
|
||||
return stdio.EOF
|
||||
}
|
||||
|
||||
// void uuid_unparse(uuid_t uu, char *out);
|
||||
func Xuuid_unparse(t *TLS, uu, out uintptr) {
|
||||
s := (*guuid.UUID)(unsafe.Pointer(uu)).String()
|
||||
copy((*RawMem)(unsafe.Pointer(out))[:], s)
|
||||
*(*byte)(unsafe.Pointer(out + uintptr(len(s)))) = 0
|
||||
// void uuid_copy(uuid_t dst, uuid_t src);
|
||||
func Xuuid_copy(t *TLS, dst, src uintptr) {
|
||||
*(*uuid.Uuid_t)(unsafe.Pointer(dst)) = *(*uuid.Uuid_t)(unsafe.Pointer(src))
|
||||
}
|
||||
|
||||
// int uuid_parse( char *in, uuid_t uu);
|
||||
|
|
@ -1486,61 +1421,3 @@ func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
|
|||
copy((*RawMem)(unsafe.Pointer(uu))[:unsafe.Sizeof(uuid.Uuid_t{})], r[:])
|
||||
return 0
|
||||
}
|
||||
|
||||
// The initstate_r() function is like initstate(3) except that it initializes
|
||||
// the state in the object pointed to by buf, rather than initializing the
|
||||
// global state variable. Before calling this function, the buf.state field
|
||||
// must be initialized to NULL. The initstate_r() function records a pointer
|
||||
// to the statebuf argument inside the structure pointed to by buf. Thus,
|
||||
// state‐ buf should not be deallocated so long as buf is still in use. (So,
|
||||
// statebuf should typically be allocated as a static variable, or allocated on
|
||||
// the heap using malloc(3) or similar.)
|
||||
//
|
||||
// char *initstate_r(unsigned int seed, char *statebuf, size_t statelen, struct random_data *buf);
|
||||
func Xinitstate_r(t *TLS, seed uint32, statebuf uintptr, statelen types.Size_t, buf uintptr) int32 {
|
||||
if buf == 0 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
randomDataMu.Lock()
|
||||
|
||||
defer randomDataMu.Unlock()
|
||||
|
||||
randomData[buf] = rand.New(rand.NewSource(int64(seed)))
|
||||
return 0
|
||||
}
|
||||
|
||||
var (
|
||||
randomData = map[uintptr]*rand.Rand{}
|
||||
randomDataMu sync.Mutex
|
||||
)
|
||||
|
||||
// int random_r(struct random_data *buf, int32_t *result);
|
||||
func Xrandom_r(t *TLS, buf, result uintptr) int32 {
|
||||
randomDataMu.Lock()
|
||||
|
||||
defer randomDataMu.Unlock()
|
||||
|
||||
mr := randomData[buf]
|
||||
if stdlib.RAND_MAX != math.MaxInt32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
*(*int32)(unsafe.Pointer(result)) = mr.Int31()
|
||||
return 0
|
||||
}
|
||||
|
||||
// void uuid_copy(uuid_t dst, uuid_t src);
|
||||
func Xuuid_copy(t *TLS, dst, src uintptr) {
|
||||
*(*uuid.Uuid_t)(unsafe.Pointer(dst)) = *(*uuid.Uuid_t)(unsafe.Pointer(src))
|
||||
}
|
||||
|
||||
// int fgetc(FILE *stream);
|
||||
func Xfgetc(t *TLS, stream uintptr) int32 {
|
||||
fd := int((*stdio.FILE)(unsafe.Pointer(stream)).F_fileno)
|
||||
var buf [1]byte
|
||||
if n, _ := unix.Read(fd, buf[:]); n != 0 {
|
||||
return int32(buf[0])
|
||||
}
|
||||
|
||||
return stdio.EOF
|
||||
}
|
||||
|
|
|
|||
71
vendor/modernc.org/libc/libc_netbsd.go
generated
vendored
71
vendor/modernc.org/libc/libc_netbsd.go
generated
vendored
|
|
@ -16,6 +16,7 @@ import (
|
|||
gotime "time"
|
||||
"unsafe"
|
||||
|
||||
guuid "github.com/google/uuid"
|
||||
"golang.org/x/sys/unix"
|
||||
"modernc.org/libc/errno"
|
||||
"modernc.org/libc/fcntl"
|
||||
|
|
@ -32,6 +33,7 @@ import (
|
|||
"modernc.org/libc/termios"
|
||||
"modernc.org/libc/time"
|
||||
"modernc.org/libc/unistd"
|
||||
"modernc.org/libc/uuid"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -751,47 +753,6 @@ func Xfileno(t *TLS, stream uintptr) int32 {
|
|||
panic(todo(""))
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
return Xmkstemps64(t, template, suffixlen)
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
len := uintptr(Xstrlen(t, template))
|
||||
x := template + uintptr(len-6) - uintptr(suffixlen)
|
||||
for i := uintptr(0); i < 6; i++ {
|
||||
if *(*byte)(unsafe.Pointer(x + i)) != 'X' {
|
||||
if dmesgs {
|
||||
dmesg("%v: FAIL", origin(1))
|
||||
}
|
||||
t.setErrno(errno.EINVAL)
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
fd, err := tempFile(template, x)
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return int32(fd)
|
||||
}
|
||||
|
||||
// int mkstemp(char *template);
|
||||
func Xmkstemp(t *TLS, template uintptr) int32 {
|
||||
return Xmkstemp64(t, template)
|
||||
}
|
||||
|
||||
// int mkstemp(char *template);
|
||||
func Xmkstemp64(t *TLS, template uintptr) int32 {
|
||||
return Xmkstemps64(t, template, 0)
|
||||
}
|
||||
|
||||
func newFtsent(t *TLS, info int, path string, stat *unix.Stat_t, err syscall.Errno) (r *fts.FTSENT) {
|
||||
var statp uintptr
|
||||
if stat != nil {
|
||||
|
|
@ -1391,11 +1352,6 @@ func Xwritev(t *TLS, fd int32, iov uintptr, iovcnt int32) types.Ssize_t {
|
|||
panic(todo(""))
|
||||
}
|
||||
|
||||
// void endpwent(void);
|
||||
func Xendpwent(t *TLS) {
|
||||
// nop
|
||||
}
|
||||
|
||||
// int __isoc99_sscanf(const char *str, const char *format, ...);
|
||||
func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
|
||||
r := Xsscanf(t, str, format, va)
|
||||
|
|
@ -1405,18 +1361,6 @@ func X__isoc99_sscanf(t *TLS, str, format, va uintptr) int32 {
|
|||
return r
|
||||
}
|
||||
|
||||
var ctimeStaticBuf [32]byte
|
||||
|
||||
// char *ctime(const time_t *timep);
|
||||
func Xctime(t *TLS, timep uintptr) uintptr {
|
||||
return Xctime_r(t, timep, uintptr(unsafe.Pointer(&ctimeStaticBuf[0])))
|
||||
}
|
||||
|
||||
// char *ctime_r(const time_t *timep, char *buf);
|
||||
func Xctime_r(t *TLS, timep, buf uintptr) uintptr {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// void __assert(const char * func, const char * file, int line, const char *expr) __dead2;
|
||||
func X__assert(t *TLS, fn, file uintptr, line int32, expr uintptr) {
|
||||
X__assert_fail(t, expr, file, uint32(line), fn)
|
||||
|
|
@ -1637,3 +1581,14 @@ func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pth
|
|||
(*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr = (((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & Uint32FromInt32(CplInt32(3))) | uint32(type1))
|
||||
return 0
|
||||
}
|
||||
|
||||
// int uuid_parse( char *in, uuid_t uu);
|
||||
func Xuuid_parse(t *TLS, in uintptr, uu uintptr) int32 {
|
||||
r, err := guuid.Parse(GoString(in))
|
||||
if err != nil {
|
||||
return -1
|
||||
}
|
||||
|
||||
copy((*RawMem)(unsafe.Pointer(uu))[:unsafe.Sizeof(uuid.Uuid_t{})], r[:])
|
||||
return 0
|
||||
}
|
||||
|
|
|
|||
1633
vendor/modernc.org/libc/libc_openbsd.go
generated
vendored
Normal file
1633
vendor/modernc.org/libc/libc_openbsd.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
576
vendor/modernc.org/libc/libc_openbsd_amd64.go
generated
vendored
Normal file
576
vendor/modernc.org/libc/libc_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,576 @@
|
|||
// Copyright 2021 The Libc Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
"modernc.org/libc/fcntl"
|
||||
"modernc.org/libc/sys/types"
|
||||
"modernc.org/libc/time"
|
||||
"modernc.org/libc/utime"
|
||||
)
|
||||
|
||||
// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
|
||||
func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_SIGACTION, uintptr(signum), act, oldact); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
|
||||
// return 0
|
||||
}
|
||||
|
||||
// FILE *fopen64(const char *pathname, const char *mode);
|
||||
func Xfopen64(t *TLS, pathname, mode uintptr) uintptr {
|
||||
m := strings.ReplaceAll(GoString(mode), "b", "")
|
||||
var flags int
|
||||
switch m {
|
||||
case "r":
|
||||
flags = fcntl.O_RDONLY
|
||||
case "r+":
|
||||
flags = fcntl.O_RDWR
|
||||
case "w":
|
||||
flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_TRUNC
|
||||
case "w+":
|
||||
flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_TRUNC
|
||||
case "a":
|
||||
flags = fcntl.O_WRONLY | fcntl.O_CREAT | fcntl.O_APPEND
|
||||
case "a+":
|
||||
flags = fcntl.O_RDWR | fcntl.O_CREAT | fcntl.O_APPEND
|
||||
default:
|
||||
panic(m)
|
||||
}
|
||||
fd, err := unix.Open(GoString(pathname), int(flags), 0666)
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %q: %v FAIL", origin(1), GoString(pathname), GoString(mode), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return 0
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %q: fd %v", origin(1), GoString(pathname), GoString(mode), fd)
|
||||
}
|
||||
if p := newFile(t, int32(fd)); p != 0 {
|
||||
return p
|
||||
}
|
||||
|
||||
panic("OOM")
|
||||
}
|
||||
|
||||
// int lstat(const char *pathname, struct stat *statbuf);
|
||||
func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 {
|
||||
if err := unix.Lstat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: ok", origin(1), GoString(pathname))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int stat(const char *pathname, struct stat *statbuf);
|
||||
func Xstat64(t *TLS, pathname, statbuf uintptr) int32 {
|
||||
if err := unix.Stat(GoString(pathname), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: %v FAIL", origin(1), GoString(pathname), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: ok", origin(1), GoString(pathname))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int mkdir(const char *path, mode_t mode);
|
||||
func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 {
|
||||
if err := unix.Mkdir(GoString(path), uint32(mode)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: %v FAIL", origin(1), GoString(path), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: ok", origin(1), GoString(path))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int access(const char *pathname, int mode);
|
||||
func Xaccess(t *TLS, pathname uintptr, mode int32) int32 {
|
||||
if err := unix.Access(GoString(pathname), uint32(mode)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int unlink(const char *pathname);
|
||||
func Xunlink(t *TLS, pathname uintptr) int32 {
|
||||
if err := unix.Unlink(GoString(pathname)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q: %v", origin(1), GoString(pathname), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize);
|
||||
func Xreadlink(t *TLS, path, buf uintptr, bufsize types.Size_t) types.Ssize_t {
|
||||
var n int
|
||||
var err error
|
||||
switch {
|
||||
case buf == 0 || bufsize == 0:
|
||||
n, err = unix.Readlink(GoString(path), nil)
|
||||
default:
|
||||
n, err = unix.Readlink(GoString(path), (*RawMem)(unsafe.Pointer(buf))[:bufsize:bufsize])
|
||||
}
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok")
|
||||
}
|
||||
return types.Ssize_t(n)
|
||||
}
|
||||
|
||||
// int symlink(const char *target, const char *linkpath);
|
||||
func Xsymlink(t *TLS, target, linkpath uintptr) int32 {
|
||||
if err := unix.Symlink(GoString(target), GoString(linkpath)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int chmod(const char *pathname, mode_t mode)
|
||||
func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 {
|
||||
if err := unix.Chmod(GoString(pathname), uint32(mode)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %#o: %v FAIL", origin(1), GoString(pathname), mode, err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// time_t time(time_t *tloc);
|
||||
func Xtime(t *TLS, tloc uintptr) time.Time_t {
|
||||
panic(todo(""))
|
||||
// n := time.Now().UTC().Unix()
|
||||
// if tloc != 0 {
|
||||
// *(*types.Time_t)(unsafe.Pointer(tloc)) = types.Time_t(n)
|
||||
// }
|
||||
// return types.Time_t(n)
|
||||
}
|
||||
|
||||
// int utimes(const char *filename, const struct timeval times[2]);
|
||||
func Xutimes(t *TLS, filename, times uintptr) int32 {
|
||||
var a []unix.Timeval
|
||||
if times != 0 {
|
||||
a = make([]unix.Timeval, 2)
|
||||
a[0] = *(*unix.Timeval)(unsafe.Pointer(times))
|
||||
a[1] = *(*unix.Timeval)(unsafe.Pointer(times + unsafe.Sizeof(unix.Timeval{})))
|
||||
}
|
||||
if err := unix.Utimes(GoString(filename), a); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int fstat(int fd, struct stat *statbuf);
|
||||
func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 {
|
||||
if err := unix.Fstat(int(fd), (*unix.Stat_t)(unsafe.Pointer(statbuf))); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: fd %d: %v FAIL", origin(1), fd, err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: fd %d: ok", origin(1), fd)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// off64_t lseek64(int fd, off64_t offset, int whence);
|
||||
func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t {
|
||||
n, err := unix.Seek(int(fd), int64(offset), int(whence))
|
||||
if err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return types.Off_t(n)
|
||||
}
|
||||
|
||||
func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 {
|
||||
var arg uintptr
|
||||
if args != 0 {
|
||||
arg = *(*uintptr)(unsafe.Pointer(args))
|
||||
}
|
||||
n, _, err := unix.Syscall(unix.SYS_FCNTL, uintptr(fd), uintptr(cmd), arg)
|
||||
if err != 0 {
|
||||
if dmesgs {
|
||||
dmesg("%v: fd %v cmd %v", origin(1), fcntlCmdStr(fd), cmd)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: %d %s %#x: %d", origin(1), fd, fcntlCmdStr(cmd), arg, n)
|
||||
}
|
||||
return int32(n)
|
||||
}
|
||||
|
||||
// int rename(const char *oldpath, const char *newpath);
|
||||
func Xrename(t *TLS, oldpath, newpath uintptr) int32 {
|
||||
if err := unix.Rename(GoString(oldpath), GoString(newpath)); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int mknod(const char *pathname, mode_t mode, dev_t dev);
|
||||
func Xmknod(t *TLS, pathname uintptr, mode types.Mode_t, dev types.Dev_t) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_MKNOD, pathname, uintptr(mode), uintptr(dev)); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
|
||||
// return 0
|
||||
}
|
||||
|
||||
// int utime(const char *filename, const struct utimbuf *times);
|
||||
func Xutime(t *TLS, filename, times uintptr) int32 {
|
||||
var a []unix.Timeval
|
||||
if times != 0 {
|
||||
a = make([]unix.Timeval, 2)
|
||||
a[0].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Factime
|
||||
a[1].Sec = (*utime.Utimbuf)(unsafe.Pointer(times)).Fmodtime
|
||||
}
|
||||
if err := unix.Utimes(GoString(filename), a); err != nil {
|
||||
if dmesgs {
|
||||
dmesg("%v: %v FAIL", origin(1), err)
|
||||
}
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
if dmesgs {
|
||||
dmesg("%v: ok", origin(1))
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// int chown(const char *pathname, uid_t owner, gid_t group);
|
||||
func Xchown(t *TLS, pathname uintptr, owner types.Uid_t, group types.Gid_t) int32 {
|
||||
if _, _, err := unix.Syscall(unix.SYS_CHOWN, pathname, uintptr(owner), uintptr(group)); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
// int link(const char *oldpath, const char *newpath);
|
||||
func Xlink(t *TLS, oldpath, newpath uintptr) int32 {
|
||||
panic(todo(""))
|
||||
// if _, _, err := unix.Syscall(unix.SYS_LINK, oldpath, newpath, 0); err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
|
||||
// return 0
|
||||
}
|
||||
|
||||
// int dup2(int oldfd, int newfd);
|
||||
func Xdup2(t *TLS, oldfd, newfd int32) int32 {
|
||||
panic(todo(""))
|
||||
// n, _, err := unix.Syscall(unix.SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
||||
// if err != 0 {
|
||||
// t.setErrno(err)
|
||||
// return -1
|
||||
// }
|
||||
|
||||
// return int32(n)
|
||||
}
|
||||
|
||||
// unsigned int alarm(unsigned int seconds);
|
||||
func Xalarm(t *TLS, seconds uint32) uint32 {
|
||||
panic(todo(""))
|
||||
// n, _, err := unix.Syscall(unix.SYS_ALARM, uintptr(seconds), 0, 0)
|
||||
// if err != 0 {
|
||||
// panic(todo(""))
|
||||
// }
|
||||
|
||||
// return uint32(n)
|
||||
}
|
||||
|
||||
// int getnameinfo(const struct sockaddr * restrict sa, socklen_t salen, char * restrict host, socklen_t hostlen, char * restrict serv, socklen_t servlen, int flags);
|
||||
func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen size_t, serv uintptr, servlen size_t, flags int32) int32 { /* getnameinfo.c:125:5: */
|
||||
panic(todo(""))
|
||||
//TODO bp := tls.Alloc(347)
|
||||
//TODO defer tls.Free(347)
|
||||
|
||||
//TODO // var ptr [78]int8 at bp, 78
|
||||
|
||||
//TODO // var buf [256]int8 at bp+78, 256
|
||||
|
||||
//TODO // var num [13]int8 at bp+334, 13
|
||||
|
||||
//TODO var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family)
|
||||
//TODO var a uintptr
|
||||
//TODO var scopeid uint32
|
||||
|
||||
//TODO switch af {
|
||||
//TODO case 2:
|
||||
//TODO a = (sa1 + 4 /* &.sin_addr */)
|
||||
//TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{}))) {
|
||||
//TODO return -6
|
||||
//TODO }
|
||||
//TODO mkptr4(tls, bp /* &ptr[0] */, a)
|
||||
//TODO scopeid = uint32(0)
|
||||
//TODO break
|
||||
//TODO case 10:
|
||||
//TODO a = (sa1 + 8 /* &.sin6_addr */)
|
||||
//TODO if (uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{}))) {
|
||||
//TODO return -6
|
||||
//TODO }
|
||||
//TODO if Xmemcmp(tls, a, ts+88 /* "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff" */, uint64(12)) != 0 {
|
||||
//TODO mkptr6(tls, bp /* &ptr[0] */, a)
|
||||
//TODO } else {
|
||||
//TODO mkptr4(tls, bp /* &ptr[0] */, (a + uintptr(12)))
|
||||
//TODO }
|
||||
//TODO scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id
|
||||
//TODO break
|
||||
//TODO default:
|
||||
//TODO return -6
|
||||
//TODO }
|
||||
|
||||
//TODO if (node != 0) && (nodelen != 0) {
|
||||
//TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0)
|
||||
//TODO if !((flags & 0x01) != 0) {
|
||||
//TODO reverse_hosts(tls, bp+78 /* &buf[0] */, a, scopeid, af)
|
||||
//TODO }
|
||||
//TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) && !((flags & 0x01) != 0) {
|
||||
//TODO Xabort(tls) //TODO-
|
||||
//TODO // unsigned char query[18+PTR_MAX], reply[512];
|
||||
//TODO // int qlen = __res_mkquery(0, ptr, 1, RR_PTR,
|
||||
//TODO // 0, 0, 0, query, sizeof query);
|
||||
//TODO // query[3] = 0; /* don't need AD flag */
|
||||
//TODO // int rlen = __res_send(query, qlen, reply, sizeof reply);
|
||||
//TODO // buf[0] = 0;
|
||||
//TODO // if (rlen > 0)
|
||||
//TODO // __dns_parse(reply, rlen, dns_parse_callback, buf);
|
||||
//TODO }
|
||||
//TODO if !(int32(*(*int8)(unsafe.Pointer(bp + 78 /* buf */))) != 0) {
|
||||
//TODO if (flags & 0x08) != 0 {
|
||||
//TODO return -2
|
||||
//TODO }
|
||||
//TODO Xinet_ntop(tls, af, a, bp+78 /* &buf[0] */, uint32(unsafe.Sizeof([256]int8{})))
|
||||
//TODO if scopeid != 0 {
|
||||
//TODO Xabort(tls) //TODO-
|
||||
//TODO // char *p = 0, tmp[IF_NAMESIZE+1];
|
||||
//TODO // if (!(flags & NI_NUMERICSCOPE) &&
|
||||
//TODO // (IN6_IS_ADDR_LINKLOCAL(a) ||
|
||||
//TODO // IN6_IS_ADDR_MC_LINKLOCAL(a)))
|
||||
//TODO // p = if_indextoname(scopeid, tmp+1);
|
||||
//TODO // if (!p)
|
||||
//TODO // p = itoa(num, scopeid);
|
||||
//TODO // *--p = '%';
|
||||
//TODO // strcat(buf, p);
|
||||
//TODO }
|
||||
//TODO }
|
||||
//TODO if Xstrlen(tls, bp+78 /* &buf[0] */) >= size_t(nodelen) {
|
||||
//TODO return -12
|
||||
//TODO }
|
||||
//TODO Xstrcpy(tls, node, bp+78 /* &buf[0] */)
|
||||
//TODO }
|
||||
|
||||
//TODO if (serv != 0) && (servlen != 0) {
|
||||
//TODO var p uintptr = bp + 78 /* buf */
|
||||
//TODO var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port))
|
||||
//TODO *(*int8)(unsafe.Pointer(bp + 78 /* &buf[0] */)) = int8(0)
|
||||
//TODO if !((flags & 0x02) != 0) {
|
||||
//TODO reverse_services(tls, bp+78 /* &buf[0] */, port, (flags & 0x10))
|
||||
//TODO }
|
||||
//TODO if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) {
|
||||
//TODO p = itoa(tls, bp+334 /* &num[0] */, uint32(port))
|
||||
//TODO }
|
||||
//TODO if Xstrlen(tls, p) >= size_t(servlen) {
|
||||
//TODO return -12
|
||||
//TODO }
|
||||
//TODO Xstrcpy(tls, serv, p)
|
||||
//TODO }
|
||||
|
||||
//TODO return 0
|
||||
}
|
||||
|
||||
func Xgethostbyaddr_r(tls *TLS, a uintptr, l socklen_t, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyaddr_r.c:10:5: */
|
||||
panic(todo(""))
|
||||
//TODO bp := tls.Alloc(28)
|
||||
//TODO defer tls.Free(28)
|
||||
|
||||
//TODO //TODO union {
|
||||
//TODO //TODO struct sockaddr_in sin;
|
||||
//TODO //TODO struct sockaddr_in6 sin6;
|
||||
//TODO //TODO } sa = { .sin.sin_family = af };
|
||||
//TODO *(*struct {
|
||||
//TODO sin sockaddr_in
|
||||
//TODO _ [12]byte
|
||||
//TODO })(unsafe.Pointer(bp /* sa1 */)) = struct {
|
||||
//TODO sin sockaddr_in
|
||||
//TODO _ [12]byte
|
||||
//TODO }{} //TODO-
|
||||
//TODO (*sockaddr_in)(unsafe.Pointer(bp /* &sa1 */)).sin_family = sa_family_t(af) //TODO-
|
||||
//TODO var sl socklen_t
|
||||
//TODO if af == 10 {
|
||||
//TODO sl = uint32(unsafe.Sizeof(sockaddr_in6{}))
|
||||
//TODO } else {
|
||||
//TODO sl = uint32(unsafe.Sizeof(sockaddr_in{}))
|
||||
//TODO }
|
||||
//TODO var i int32
|
||||
|
||||
//TODO *(*uintptr)(unsafe.Pointer(res)) = uintptr(0)
|
||||
|
||||
//TODO // Load address argument into sockaddr structure
|
||||
//TODO if (af == 10) && (l == socklen_t(16)) {
|
||||
//TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin6 */ + 8 /* &.sin6_addr */), a, uint64(16))
|
||||
//TODO } else if (af == 2) && (l == socklen_t(4)) {
|
||||
//TODO Xmemcpy(tls, (bp /* &sa1 */ /* &.sin */ + 4 /* &.sin_addr */), a, uint64(4))
|
||||
//TODO } else {
|
||||
//TODO *(*int32)(unsafe.Pointer(err)) = 3
|
||||
//TODO return 22
|
||||
//TODO }
|
||||
|
||||
//TODO // Align buffer and check for space for pointers and ip address
|
||||
//TODO i = (int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1))))
|
||||
//TODO if !(i != 0) {
|
||||
//TODO i = int32(unsafe.Sizeof(uintptr(0)))
|
||||
//TODO }
|
||||
//TODO if buflen <= (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l)) {
|
||||
//TODO return 34
|
||||
//TODO }
|
||||
//TODO buf += (uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i)))
|
||||
//TODO buflen = buflen - (((uint64(5) * uint64(unsafe.Sizeof(uintptr(0)))) - uint64(i)) + uint64(l))
|
||||
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_addr_list = buf
|
||||
//TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))))
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_aliases = buf
|
||||
//TODO buf += (uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))))
|
||||
|
||||
//TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf
|
||||
//TODO Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l))
|
||||
//TODO buf += uintptr(l)
|
||||
//TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0)
|
||||
//TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf
|
||||
//TODO *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0)
|
||||
|
||||
//TODO switch Xgetnameinfo(tls, bp /* &sa1 */, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) {
|
||||
//TODO case -3:
|
||||
//TODO *(*int32)(unsafe.Pointer(err)) = 2
|
||||
//TODO return 11
|
||||
//TODO case -12:
|
||||
//TODO return 34
|
||||
//TODO default:
|
||||
//TODO fallthrough
|
||||
//TODO case -10:
|
||||
//TODO fallthrough
|
||||
//TODO case -11:
|
||||
//TODO fallthrough
|
||||
//TODO case -4:
|
||||
//TODO *(*int32)(unsafe.Pointer(err)) = 3
|
||||
//TODO return *(*int32)(unsafe.Pointer(X___errno_location(tls)))
|
||||
//TODO case 0:
|
||||
//TODO break
|
||||
//TODO }
|
||||
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_addrtype = af
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_length = int32(l)
|
||||
//TODO (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases))
|
||||
//TODO *(*uintptr)(unsafe.Pointer(res)) = h
|
||||
//TODO return 0
|
||||
}
|
||||
|
||||
// int getrlimit(int resource, struct rlimit *rlim);
|
||||
func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 {
|
||||
if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
161
vendor/modernc.org/libc/libc_unix.go
generated
vendored
161
vendor/modernc.org/libc/libc_unix.go
generated
vendored
|
|
@ -2,22 +2,27 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build linux || darwin || freebsd || netbsd
|
||||
// +build linux darwin freebsd netbsd
|
||||
//go:build linux || darwin || freebsd || netbsd || openbsd
|
||||
// +build linux darwin freebsd netbsd openbsd
|
||||
|
||||
package libc // import "modernc.org/libc"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"math/rand"
|
||||
"os"
|
||||
gosignal "os/signal"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
guuid "github.com/google/uuid"
|
||||
"golang.org/x/sys/unix"
|
||||
"modernc.org/libc/errno"
|
||||
"modernc.org/libc/grp"
|
||||
|
|
@ -25,7 +30,9 @@ import (
|
|||
"modernc.org/libc/pwd"
|
||||
"modernc.org/libc/signal"
|
||||
"modernc.org/libc/stdio"
|
||||
"modernc.org/libc/stdlib"
|
||||
"modernc.org/libc/sys/types"
|
||||
ctime "modernc.org/libc/time"
|
||||
)
|
||||
|
||||
var staticGetpwnam pwd.Passwd
|
||||
|
|
@ -835,3 +842,153 @@ func Xgetpwuid_r(t *TLS, uid types.Uid_t, cpwd, buf uintptr, buflen types.Size_t
|
|||
*(*uintptr)(unsafe.Pointer(result)) = 0
|
||||
return 0
|
||||
}
|
||||
|
||||
// int mkostemp(char *template, int flags);
|
||||
func Xmkostemp(t *TLS, template uintptr, flags int32) int32 {
|
||||
len := uintptr(Xstrlen(t, template))
|
||||
x := template + uintptr(len-6)
|
||||
for i := uintptr(0); i < 6; i++ {
|
||||
if *(*byte)(unsafe.Pointer(x + i)) != 'X' {
|
||||
t.setErrno(errno.EINVAL)
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
fd, err := tempFile(template, x, flags)
|
||||
if err != nil {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return int32(fd)
|
||||
}
|
||||
|
||||
// void uuid_generate_random(uuid_t out);
|
||||
func Xuuid_generate_random(t *TLS, out uintptr) {
|
||||
x := guuid.New()
|
||||
copy((*RawMem)(unsafe.Pointer(out))[:], x[:])
|
||||
}
|
||||
|
||||
// void uuid_unparse(uuid_t uu, char *out);
|
||||
func Xuuid_unparse(t *TLS, uu, out uintptr) {
|
||||
s := (*guuid.UUID)(unsafe.Pointer(uu)).String()
|
||||
copy((*RawMem)(unsafe.Pointer(out))[:], s)
|
||||
*(*byte)(unsafe.Pointer(out + uintptr(len(s)))) = 0
|
||||
}
|
||||
|
||||
var staticRandomData = &rand.Rand{}
|
||||
|
||||
// char *initstate(unsigned seed, char *state, size_t size);
|
||||
func Xinitstate(t *TLS, seed uint32, statebuf uintptr, statelen types.Size_t) uintptr {
|
||||
staticRandomData = rand.New(rand.NewSource(int64(seed)))
|
||||
return 0
|
||||
}
|
||||
|
||||
// char *setstate(const char *state);
|
||||
func Xsetstate(t *TLS, state uintptr) uintptr {
|
||||
t.setErrno(errno.EINVAL) //TODO
|
||||
return 0
|
||||
}
|
||||
|
||||
// The initstate_r() function is like initstate(3) except that it initializes
|
||||
// the state in the object pointed to by buf, rather than initializing the
|
||||
// global state variable. Before calling this function, the buf.state field
|
||||
// must be initialized to NULL. The initstate_r() function records a pointer
|
||||
// to the statebuf argument inside the structure pointed to by buf. Thus,
|
||||
// state‐ buf should not be deallocated so long as buf is still in use. (So,
|
||||
// statebuf should typically be allocated as a static variable, or allocated on
|
||||
// the heap using malloc(3) or similar.)
|
||||
//
|
||||
// char *initstate_r(unsigned int seed, char *statebuf, size_t statelen, struct random_data *buf);
|
||||
func Xinitstate_r(t *TLS, seed uint32, statebuf uintptr, statelen types.Size_t, buf uintptr) int32 {
|
||||
if buf == 0 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
randomDataMu.Lock()
|
||||
|
||||
defer randomDataMu.Unlock()
|
||||
|
||||
randomData[buf] = rand.New(rand.NewSource(int64(seed)))
|
||||
return 0
|
||||
}
|
||||
|
||||
var (
|
||||
randomData = map[uintptr]*rand.Rand{}
|
||||
randomDataMu sync.Mutex
|
||||
)
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
return Xmkstemps64(t, template, suffixlen)
|
||||
}
|
||||
|
||||
// int mkstemps(char *template, int suffixlen);
|
||||
func Xmkstemps64(t *TLS, template uintptr, suffixlen int32) int32 {
|
||||
len := uintptr(Xstrlen(t, template))
|
||||
x := template + uintptr(len-6) - uintptr(suffixlen)
|
||||
for i := uintptr(0); i < 6; i++ {
|
||||
if *(*byte)(unsafe.Pointer(x + i)) != 'X' {
|
||||
t.setErrno(errno.EINVAL)
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
fd, err := tempFile(template, x, 0)
|
||||
if err != nil {
|
||||
t.setErrno(err)
|
||||
return -1
|
||||
}
|
||||
|
||||
return int32(fd)
|
||||
}
|
||||
|
||||
// int mkstemp(char *template);
|
||||
func Xmkstemp(t *TLS, template uintptr) int32 {
|
||||
return Xmkstemp64(t, template)
|
||||
}
|
||||
|
||||
// int mkstemp(char *template);
|
||||
func Xmkstemp64(t *TLS, template uintptr) int32 {
|
||||
return Xmkstemps64(t, template, 0)
|
||||
}
|
||||
|
||||
// int random_r(struct random_data *buf, int32_t *result);
|
||||
func Xrandom_r(t *TLS, buf, result uintptr) int32 {
|
||||
randomDataMu.Lock()
|
||||
|
||||
defer randomDataMu.Unlock()
|
||||
|
||||
mr := randomData[buf]
|
||||
if stdlib.RAND_MAX != math.MaxInt32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
*(*int32)(unsafe.Pointer(result)) = mr.Int31()
|
||||
return 0
|
||||
}
|
||||
|
||||
// int strerror_r(int errnum, char *buf, size_t buflen);
|
||||
func Xstrerror_r(t *TLS, errnum int32, buf uintptr, buflen size_t) int32 {
|
||||
panic(todo(""))
|
||||
}
|
||||
|
||||
// void endpwent(void);
|
||||
func Xendpwent(t *TLS) {
|
||||
// nop
|
||||
}
|
||||
|
||||
var ctimeStaticBuf [32]byte
|
||||
|
||||
// char *ctime(const time_t *timep);
|
||||
func Xctime(t *TLS, timep uintptr) uintptr {
|
||||
return Xctime_r(t, timep, uintptr(unsafe.Pointer(&ctimeStaticBuf[0])))
|
||||
}
|
||||
|
||||
// char *ctime_r(const time_t *timep, char *buf);
|
||||
func Xctime_r(t *TLS, timep, buf uintptr) uintptr {
|
||||
ut := *(*ctime.Time_t)(unsafe.Pointer(timep))
|
||||
tm := time.Unix(int64(ut), 0).Local()
|
||||
s := tm.Format(time.ANSIC) + "\n\x00"
|
||||
copy((*RawMem)(unsafe.Pointer(buf))[:26:26], s)
|
||||
return buf
|
||||
}
|
||||
|
|
|
|||
2
vendor/modernc.org/libc/libc_windows.go
generated
vendored
2
vendor/modernc.org/libc/libc_windows.go
generated
vendored
|
|
@ -5872,3 +5872,5 @@ func bootWinEnviron(t *TLS) {
|
|||
wenviron = uintptr(unsafe.Pointer(&winEnviron[0]))
|
||||
wenvValid = true
|
||||
}
|
||||
|
||||
func Xfabsl(t *TLS, x float64) float64 { return math.Abs(x) }
|
||||
|
|
|
|||
4
vendor/modernc.org/libc/limits/capi_darwin_amd64.go
generated
vendored
4
vendor/modernc.org/libc/limits/capi_darwin_amd64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package limits
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
4
vendor/modernc.org/libc/limits/capi_darwin_arm64.go
generated
vendored
4
vendor/modernc.org/libc/limits/capi_darwin_arm64.go
generated
vendored
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
package limits
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
}
|
||||
|
|
|
|||
5
vendor/modernc.org/libc/limits/capi_freebsd_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/limits/capi_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo limits/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 limits/limits_freebsd_386.go -pkgname limits', DO NOT EDIT.
|
||||
|
||||
package limits
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
5
vendor/modernc.org/libc/limits/capi_openbsd_amd64.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/limits/capi_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo limits/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 limits/limits_openbsd_amd64.go -pkgname limits', DO NOT EDIT.
|
||||
|
||||
package limits
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
2
vendor/modernc.org/libc/limits/capi_windows_386.go
generated
vendored
2
vendor/modernc.org/libc/limits/capi_windows_386.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo limits/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 limits/limits_windows_386.go -pkgname limits', DO NOT EDIT.
|
||||
// Code generated by 'ccgo limits\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 limits\limits_windows_386.go -pkgname limits', DO NOT EDIT.
|
||||
|
||||
package limits
|
||||
|
||||
|
|
|
|||
2
vendor/modernc.org/libc/limits/limits_darwin_amd64.go
generated
vendored
2
vendor/modernc.org/libc/limits/limits_darwin_amd64.go
generated
vendored
|
|
@ -167,6 +167,8 @@ type X__uint128_t = struct {
|
|||
type X__builtin_va_list = uintptr /* <builtin>:46:14 */
|
||||
type X__float128 = float64 /* <builtin>:47:21 */
|
||||
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
// Copyright (C) 1992-2021 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of GCC.
|
||||
|
|
|
|||
567
vendor/modernc.org/libc/limits/limits_freebsd_386.go
generated
vendored
Normal file
567
vendor/modernc.org/libc/limits/limits_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,567 @@
|
|||
// Code generated by 'ccgo limits/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 limits/limits_freebsd_386.go -pkgname limits', DO NOT EDIT.
|
||||
|
||||
package limits
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
ARG_MAX = 262144
|
||||
BC_BASE_MAX = 99
|
||||
BC_DIM_MAX = 2048
|
||||
BC_SCALE_MAX = 99
|
||||
BC_STRING_MAX = 1000
|
||||
CHARCLASS_NAME_MAX = 14
|
||||
CHAR_BIT = 8
|
||||
CHAR_MAX = 127
|
||||
CHAR_MIN = -128
|
||||
CHILD_MAX = 40
|
||||
COLL_WEIGHTS_MAX = 10
|
||||
EXPR_NEST_MAX = 32
|
||||
GID_MAX = 4294967295
|
||||
INT_MAX = 2147483647
|
||||
INT_MIN = -2147483648
|
||||
IOV_MAX = 1024
|
||||
LINE_MAX = 2048
|
||||
LLONG_MAX = 9223372036854775807
|
||||
LLONG_MIN = -9223372036854775808
|
||||
LONG_BIT = 32
|
||||
LONG_MAX = 2147483647
|
||||
LONG_MIN = -2147483648
|
||||
MAX_CANON = 255
|
||||
MAX_INPUT = 255
|
||||
MB_LEN_MAX = 6
|
||||
MQ_PRIO_MAX = 64
|
||||
NAME_MAX = 255
|
||||
NGROUPS_MAX = 1023
|
||||
NL_ARGMAX = 4096
|
||||
NL_LANGMAX = 31
|
||||
NL_MSGMAX = 32767
|
||||
NL_NMAX = 1
|
||||
NL_SETMAX = 255
|
||||
NL_TEXTMAX = 2048
|
||||
OFF_MAX = 9223372036854775807
|
||||
OFF_MIN = -9223372036854775808
|
||||
OPEN_MAX = 64
|
||||
PASS_MAX = 128
|
||||
PATH_MAX = 1024
|
||||
PIPE_BUF = 512
|
||||
QUAD_MAX = 9223372036854775807
|
||||
QUAD_MIN = -9223372036854775808
|
||||
RE_DUP_MAX = 255
|
||||
SCHAR_MAX = 127
|
||||
SCHAR_MIN = -128
|
||||
SHRT_MAX = 32767
|
||||
SHRT_MIN = -32768
|
||||
SIZE_T_MAX = 4294967295
|
||||
SSIZE_MAX = 2147483647
|
||||
UCHAR_MAX = 255
|
||||
UID_MAX = 4294967295
|
||||
UINT_MAX = 4294967295
|
||||
ULLONG_MAX = 18446744073709551615
|
||||
ULONG_MAX = 4294967295
|
||||
UQUAD_MAX = 18446744073709551615
|
||||
USHRT_MAX = 65535
|
||||
WORD_BIT = 32
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_ILP32 = 1
|
||||
X_LIMITS_H_ = 0
|
||||
X_MACHINE__LIMITS_H_ = 0
|
||||
X_Nonnull = 0
|
||||
X_Null_unspecified = 0
|
||||
X_Nullable = 0
|
||||
X_POSIX2_BC_BASE_MAX = 99
|
||||
X_POSIX2_BC_DIM_MAX = 2048
|
||||
X_POSIX2_BC_SCALE_MAX = 99
|
||||
X_POSIX2_BC_STRING_MAX = 1000
|
||||
X_POSIX2_CHARCLASS_NAME_MAX = 14
|
||||
X_POSIX2_COLL_WEIGHTS_MAX = 2
|
||||
X_POSIX2_EQUIV_CLASS_MAX = 2
|
||||
X_POSIX2_EXPR_NEST_MAX = 32
|
||||
X_POSIX2_LINE_MAX = 2048
|
||||
X_POSIX2_RE_DUP_MAX = 255
|
||||
X_POSIX_AIO_LISTIO_MAX = 2
|
||||
X_POSIX_AIO_MAX = 1
|
||||
X_POSIX_ARG_MAX = 4096
|
||||
X_POSIX_CHILD_MAX = 25
|
||||
X_POSIX_CLOCKRES_MIN = 20000000
|
||||
X_POSIX_DELAYTIMER_MAX = 32
|
||||
X_POSIX_HOST_NAME_MAX = 255
|
||||
X_POSIX_LINK_MAX = 8
|
||||
X_POSIX_LOGIN_NAME_MAX = 9
|
||||
X_POSIX_MAX_CANON = 255
|
||||
X_POSIX_MAX_INPUT = 255
|
||||
X_POSIX_MQ_OPEN_MAX = 8
|
||||
X_POSIX_MQ_PRIO_MAX = 32
|
||||
X_POSIX_NAME_MAX = 14
|
||||
X_POSIX_NGROUPS_MAX = 8
|
||||
X_POSIX_OPEN_MAX = 20
|
||||
X_POSIX_PATH_MAX = 256
|
||||
X_POSIX_PIPE_BUF = 512
|
||||
X_POSIX_RE_DUP_MAX = 255
|
||||
X_POSIX_RTSIG_MAX = 8
|
||||
X_POSIX_SEM_NSEMS_MAX = 256
|
||||
X_POSIX_SEM_VALUE_MAX = 32767
|
||||
X_POSIX_SIGQUEUE_MAX = 32
|
||||
X_POSIX_SSIZE_MAX = 32767
|
||||
X_POSIX_SS_REPL_MAX = 4
|
||||
X_POSIX_STREAM_MAX = 8
|
||||
X_POSIX_SYMLINK_MAX = 255
|
||||
X_POSIX_SYMLOOP_MAX = 8
|
||||
X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
|
||||
X_POSIX_THREAD_KEYS_MAX = 128
|
||||
X_POSIX_THREAD_THREADS_MAX = 64
|
||||
X_POSIX_TIMER_MAX = 32
|
||||
X_POSIX_TRACE_EVENT_NAME_MAX = 30
|
||||
X_POSIX_TRACE_NAME_MAX = 8
|
||||
X_POSIX_TRACE_SYS_MAX = 8
|
||||
X_POSIX_TRACE_USER_EVENT_MAX = 32
|
||||
X_POSIX_TTY_NAME_MAX = 9
|
||||
X_POSIX_TZNAME_MAX = 6
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
X_SYS_LIMITS_H_ = 0
|
||||
X_SYS_SYSLIMITS_H_ = 0
|
||||
X_XOPEN_IOV_MAX = 16
|
||||
X_XOPEN_NAME_MAX = 255
|
||||
X_XOPEN_PATH_MAX = 1024
|
||||
I386 = 1
|
||||
Unix = 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) 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.2 (Berkeley) 1/4/94
|
||||
// $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$
|
||||
|
||||
// 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-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.
|
||||
//
|
||||
// $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-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.
|
||||
|
||||
// -
|
||||
// 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.
|
||||
//
|
||||
// @(#)syslimits.h 8.1 (Berkeley) 6/2/93
|
||||
// $FreeBSD$
|
||||
|
||||
// Do not add any new variables here. (See the comment at the end of
|
||||
// the file for why.)
|
||||
|
||||
// We leave the following values undefined to force applications to either
|
||||
// assume conservative values or call sysconf() to get the current value.
|
||||
//
|
||||
// HOST_NAME_MAX
|
||||
//
|
||||
// (We should do this for most of the values currently defined here,
|
||||
// but many programs are not prepared to deal with this yet.)
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
540
vendor/modernc.org/libc/limits/limits_openbsd_amd64.go
generated
vendored
Normal file
540
vendor/modernc.org/libc/limits/limits_openbsd_amd64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,540 @@
|
|||
// Code generated by 'ccgo limits/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 limits/limits_openbsd_amd64.go -pkgname limits', DO NOT EDIT.
|
||||
|
||||
package limits
|
||||
|
||||
import (
|
||||
"math"
|
||||
"reflect"
|
||||
"sync/atomic"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var _ = math.Pi
|
||||
var _ reflect.Kind
|
||||
var _ atomic.Value
|
||||
var _ unsafe.Pointer
|
||||
|
||||
const (
|
||||
ARG_MAX = 524288
|
||||
BC_BASE_MAX = 2147483647
|
||||
BC_DIM_MAX = 65535
|
||||
BC_SCALE_MAX = 2147483647
|
||||
BC_STRING_MAX = 2147483647
|
||||
CHAR_BIT = 8
|
||||
CHAR_MAX = 0x7f
|
||||
CHAR_MIN = -128
|
||||
CHILD_MAX = 80
|
||||
COLL_WEIGHTS_MAX = 2
|
||||
EXPR_NEST_MAX = 32
|
||||
GID_MAX = 4294967295
|
||||
HOST_NAME_MAX = 255
|
||||
INT_MAX = 0x7fffffff
|
||||
INT_MIN = -2147483648
|
||||
IOV_MAX = 1024
|
||||
LINE_MAX = 2048
|
||||
LINK_MAX = 32767
|
||||
LLONG_MAX = 0x7fffffffffffffff
|
||||
LLONG_MIN = -9223372036854775808
|
||||
LOGIN_NAME_MAX = 32
|
||||
LONG_BIT = 64
|
||||
LONG_MAX = 0x7fffffffffffffff
|
||||
LONG_MIN = -9223372036854775808
|
||||
MAX_CANON = 255
|
||||
MAX_INPUT = 255
|
||||
MB_LEN_MAX = 4
|
||||
NAME_MAX = 255
|
||||
NGROUPS_MAX = 16
|
||||
NL_ARGMAX = 9
|
||||
NL_LANGMAX = 14
|
||||
NL_MSGMAX = 32767
|
||||
NL_SETMAX = 255
|
||||
NL_TEXTMAX = 255
|
||||
NZERO = 20
|
||||
OPEN_MAX = 64
|
||||
PATH_MAX = 1024
|
||||
PIPE_BUF = 512
|
||||
QUAD_MAX = 0x7fffffffffffffff
|
||||
QUAD_MIN = -9223372036854775808
|
||||
RE_DUP_MAX = 255
|
||||
SCHAR_MAX = 0x7f
|
||||
SCHAR_MIN = -128
|
||||
SEM_VALUE_MAX = 4294967295
|
||||
SHRT_MAX = 0x7fff
|
||||
SHRT_MIN = -32768
|
||||
SIZE_T_MAX = 18446744073709551615
|
||||
SSIZE_MAX = 9223372036854775807
|
||||
SYMLINK_MAX = 1024
|
||||
SYMLOOP_MAX = 32
|
||||
TTY_NAME_MAX = 260
|
||||
UCHAR_MAX = 0xff
|
||||
UID_MAX = 4294967295
|
||||
UINT_MAX = 0xffffffff
|
||||
ULLONG_MAX = 0xffffffffffffffff
|
||||
ULONG_MAX = 0xffffffffffffffff
|
||||
UQUAD_MAX = 0xffffffffffffffff
|
||||
USHRT_MAX = 0xffff
|
||||
WORD_BIT = 32
|
||||
X_FILE_OFFSET_BITS = 64
|
||||
X_LIMITS_H_ = 0
|
||||
X_LP64 = 1
|
||||
X_MACHINE_CDEFS_H_ = 0
|
||||
X_MACHINE_LIMITS_H_ = 0
|
||||
X_POSIX2_BC_BASE_MAX = 99
|
||||
X_POSIX2_BC_DIM_MAX = 2048
|
||||
X_POSIX2_BC_SCALE_MAX = 99
|
||||
X_POSIX2_BC_STRING_MAX = 1000
|
||||
X_POSIX2_CHARCLASS_NAME_MAX = 14
|
||||
X_POSIX2_COLL_WEIGHTS_MAX = 2
|
||||
X_POSIX2_EXPR_NEST_MAX = 32
|
||||
X_POSIX2_LINE_MAX = 2048
|
||||
X_POSIX2_RE_DUP_MAX = 255
|
||||
X_POSIX_ARG_MAX = 4096
|
||||
X_POSIX_CHILD_MAX = 25
|
||||
X_POSIX_CLOCKRES_MIN = 20000000
|
||||
X_POSIX_HOST_NAME_MAX = 255
|
||||
X_POSIX_LINK_MAX = 8
|
||||
X_POSIX_LOGIN_NAME_MAX = 9
|
||||
X_POSIX_MAX_CANON = 255
|
||||
X_POSIX_MAX_INPUT = 255
|
||||
X_POSIX_NAME_MAX = 14
|
||||
X_POSIX_NGROUPS_MAX = 8
|
||||
X_POSIX_OPEN_MAX = 20
|
||||
X_POSIX_PATH_MAX = 256
|
||||
X_POSIX_PIPE_BUF = 512
|
||||
X_POSIX_RE_DUP_MAX = 255
|
||||
X_POSIX_SEM_NSEMS_MAX = 256
|
||||
X_POSIX_SEM_VALUE_MAX = 32767
|
||||
X_POSIX_SSIZE_MAX = 32767
|
||||
X_POSIX_STREAM_MAX = 8
|
||||
X_POSIX_SYMLINK_MAX = 255
|
||||
X_POSIX_SYMLOOP_MAX = 8
|
||||
X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
|
||||
X_POSIX_THREAD_KEYS_MAX = 128
|
||||
X_POSIX_THREAD_THREADS_MAX = 4
|
||||
X_POSIX_TTY_NAME_MAX = 9
|
||||
X_POSIX_TZNAME_MAX = 6
|
||||
X_RET_PROTECTOR = 1
|
||||
X_SYS_CDEFS_H_ = 0
|
||||
X_SYS_LIMITS_H_ = 0
|
||||
X_XOPEN_IOV_MAX = 16
|
||||
X_XOPEN_NAME_MAX = 255
|
||||
X_XOPEN_PATH_MAX = 1024
|
||||
Unix = 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: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $
|
||||
// $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $
|
||||
|
||||
// Copyright (c) 1988 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 5.9 (Berkeley) 4/3/91
|
||||
|
||||
// $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: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $
|
||||
// Copyright (c) 2002 Marc Espie.
|
||||
//
|
||||
// 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 OPENBSD PROJECT 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 OPENBSD
|
||||
// PROJECT 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.
|
||||
|
||||
// $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
|
||||
|
||||
// Common definitions for limits.h.
|
||||
|
||||
// Legacy
|
||||
// $OpenBSD: limits.h,v 1.6 2015/04/30 13:42:08 millert Exp $
|
||||
|
||||
// Copyright (c) 1988 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 7.2 (Berkeley) 6/28/90
|
||||
|
||||
// $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
|
||||
|
||||
// max value for unsigned long
|
||||
// max value for a signed long
|
||||
// min value for a signed long
|
||||
|
||||
// max value for unsigned long long
|
||||
// max value for a signed long long
|
||||
// min value for a signed long long
|
||||
|
||||
// $OpenBSD: syslimits.h,v 1.14 2020/04/02 18:00:00 deraadt Exp $
|
||||
// $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $
|
||||
|
||||
// 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.
|
||||
//
|
||||
// @(#)syslimits.h 8.1 (Berkeley) 6/2/93
|
||||
|
||||
// $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
|
||||
|
||||
var _ int8 /* gen.c:2:13: */
|
||||
65
vendor/modernc.org/libc/limits/limits_windows_386.go
generated
vendored
65
vendor/modernc.org/libc/limits/limits_windows_386.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo limits/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 limits/limits_windows_386.go -pkgname limits', DO NOT EDIT.
|
||||
// Code generated by 'ccgo limits\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 limits\limits_windows_386.go -pkgname limits', DO NOT EDIT.
|
||||
|
||||
package limits
|
||||
|
||||
|
|
@ -44,7 +44,9 @@ const (
|
|||
LONG_MIN = -2147483648
|
||||
MB_LEN_MAX = 5
|
||||
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
|
||||
PATH_MAX = 260
|
||||
|
|
@ -79,7 +81,6 @@ const (
|
|||
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
|
||||
|
|
@ -92,8 +93,6 @@ const (
|
|||
X_I64_MIN = -9223372036854775808
|
||||
X_I8_MAX = 127
|
||||
X_I8_MIN = -128
|
||||
X_ILP32 = 1
|
||||
X_INC_CORECRT = 0
|
||||
X_INC_CRTDEFS = 0
|
||||
X_INC_CRTDEFS_MACRO = 0
|
||||
X_INC_LIMITS = 0
|
||||
|
|
@ -109,6 +108,7 @@ const (
|
|||
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
|
||||
|
|
@ -146,7 +146,7 @@ type X__float128 = float64 /* <builtin>:47:21 */
|
|||
|
||||
type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
||||
|
||||
// Copyright (C) 1992-2020 Free Software Foundation, Inc.
|
||||
// Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of GCC.
|
||||
//
|
||||
|
|
@ -200,11 +200,6 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
|||
// 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
|
||||
|
|
@ -225,12 +220,6 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
|||
// 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.
|
||||
|
|
@ -271,28 +260,26 @@ type Va_list = X__builtin_va_list /* <builtin>:50:27 */
|
|||
// 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 Ssize_t = int32 /* crtdefs.h:47:13 */
|
||||
|
||||
type Rsize_t = Size_t /* corecrt.h:57:16 */
|
||||
type Rsize_t = Size_t /* crtdefs.h:52:16 */
|
||||
|
||||
type Intptr_t = int32 /* corecrt.h:69:13 */
|
||||
type Intptr_t = int32 /* crtdefs.h:64:13 */
|
||||
|
||||
type Uintptr_t = uint32 /* corecrt.h:82:22 */
|
||||
type Uintptr_t = uint32 /* crtdefs.h:77:22 */
|
||||
|
||||
type Wint_t = uint16 /* corecrt.h:111:24 */
|
||||
type Wctype_t = uint16 /* corecrt.h:112:24 */
|
||||
type Wint_t = uint16 /* crtdefs.h:106:24 */
|
||||
type Wctype_t = uint16 /* crtdefs.h:107:24 */
|
||||
|
||||
type Errno_t = int32 /* corecrt.h:118:13 */
|
||||
type Errno_t = int32 /* crtdefs.h:113:13 */
|
||||
|
||||
type X__time32_t = int32 /* corecrt.h:123:14 */
|
||||
type X__time32_t = int32 /* crtdefs.h:118:14 */
|
||||
|
||||
type X__time64_t = int64 /* corecrt.h:128:35 */
|
||||
type X__time64_t = int64 /* crtdefs.h:123:35 */
|
||||
|
||||
type Time_t = X__time32_t /* corecrt.h:141:20 */
|
||||
type Time_t = X__time32_t /* crtdefs.h:136:20 */
|
||||
|
||||
type Threadlocaleinfostruct = struct {
|
||||
Frefcount int32
|
||||
|
|
@ -318,29 +305,29 @@ type Threadlocaleinfostruct = struct {
|
|||
Fpclmap uintptr
|
||||
Fpcumap uintptr
|
||||
Flc_time_curr uintptr
|
||||
} /* corecrt.h:435:1 */
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type Pthreadlocinfo = uintptr /* corecrt.h:437:39 */
|
||||
type Pthreadmbcinfo = uintptr /* corecrt.h:438:36 */
|
||||
type Pthreadlocinfo = uintptr /* crtdefs.h:424:39 */
|
||||
type Pthreadmbcinfo = uintptr /* crtdefs.h:425:36 */
|
||||
|
||||
type Localeinfo_struct = struct {
|
||||
Flocinfo Pthreadlocinfo
|
||||
Fmbcinfo Pthreadmbcinfo
|
||||
} /* corecrt.h:441:9 */
|
||||
} /* crtdefs.h:428:9 */
|
||||
|
||||
type X_locale_tstruct = Localeinfo_struct /* corecrt.h:444:3 */
|
||||
type X_locale_t = uintptr /* corecrt.h:444:19 */
|
||||
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
|
||||
} /* corecrt.h:435:1 */
|
||||
} /* crtdefs.h:422:1 */
|
||||
|
||||
type LC_ID = TagLC_ID /* corecrt.h:452:3 */
|
||||
type LPLC_ID = uintptr /* corecrt.h:452:9 */
|
||||
type LC_ID = TagLC_ID /* crtdefs.h:439:3 */
|
||||
type LPLC_ID = uintptr /* crtdefs.h:439:9 */
|
||||
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */
|
||||
type Threadlocinfo = Threadlocaleinfostruct /* crtdefs.h:468:3 */
|
||||
|
||||
// File system limits
|
||||
//
|
||||
|
|
@ -350,7 +337,7 @@ type Threadlocinfo = Threadlocaleinfostruct /* corecrt.h:487:3 */
|
|||
// are semantically identical, with a limit of 259 characters for the
|
||||
// path name, plus one for a terminating NUL, for a total of 260.
|
||||
|
||||
// Copyright (C) 1991-2020 Free Software Foundation, Inc.
|
||||
// Copyright (C) 1991-2018 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of GCC.
|
||||
//
|
||||
|
|
|
|||
442
vendor/modernc.org/libc/musl_darwin_amd64.go
generated
vendored
442
vendor/modernc.org/libc/musl_darwin_amd64.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_darwin_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -357,83 +357,289 @@ type size_t = uint64 /* <builtin>:9:23 */
|
|||
|
||||
type wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
|
||||
return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
|
||||
}
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
type locale_t = uintptr /* alltypes.h:343:32 */
|
||||
// pthread opaque structures
|
||||
|
||||
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
|
||||
return Bool32(func() int32 {
|
||||
if 0 != 0 {
|
||||
return Xisalpha(tls, c)
|
||||
type __darwin_pthread_handler_rec = struct {
|
||||
__routine uintptr
|
||||
__arg uintptr
|
||||
__next uintptr
|
||||
} /* table.c:1396:1 */
|
||||
|
||||
type _opaque_pthread_attr_t = struct {
|
||||
__sig int64
|
||||
__opaque [56]int8
|
||||
} /* table.c:1402:1 */
|
||||
|
||||
type _opaque_pthread_cond_t = struct {
|
||||
__sig int64
|
||||
__opaque [40]int8
|
||||
} /* table.c:1407:1 */
|
||||
|
||||
type _opaque_pthread_condattr_t = struct {
|
||||
__sig int64
|
||||
__opaque [8]int8
|
||||
} /* table.c:1412:1 */
|
||||
|
||||
type _opaque_pthread_mutex_t = struct {
|
||||
__sig int64
|
||||
__opaque [56]int8
|
||||
} /* table.c:1417:1 */
|
||||
|
||||
type _opaque_pthread_mutexattr_t = struct {
|
||||
__sig int64
|
||||
__opaque [8]int8
|
||||
} /* table.c:1422:1 */
|
||||
|
||||
type _opaque_pthread_once_t = struct {
|
||||
__sig int64
|
||||
__opaque [8]int8
|
||||
} /* table.c:1427:1 */
|
||||
|
||||
type _opaque_pthread_rwlock_t = struct {
|
||||
__sig int64
|
||||
__opaque [192]int8
|
||||
} /* table.c:1432:1 */
|
||||
|
||||
type _opaque_pthread_rwlockattr_t = struct {
|
||||
__sig int64
|
||||
__opaque [16]int8
|
||||
} /* table.c:1437:1 */
|
||||
|
||||
type _opaque_pthread_t = struct {
|
||||
__sig int64
|
||||
__cleanup_stack uintptr
|
||||
__opaque [8176]int8
|
||||
} /* table.c:1442:1 */
|
||||
|
||||
type ct_rune_t = int32 /* table.c:1527:28 */
|
||||
|
||||
type rune_t = int32 /* table.c:1536:25 */
|
||||
|
||||
type wint_t = int32 /* table.c:1558:25 */
|
||||
|
||||
type _RuneEntry = struct {
|
||||
__min int32
|
||||
__max int32
|
||||
__map int32
|
||||
_ [4]byte
|
||||
__types uintptr
|
||||
} /* table.c:1575:3 */
|
||||
|
||||
type _RuneRange = struct {
|
||||
__nranges int32
|
||||
_ [4]byte
|
||||
__ranges uintptr
|
||||
} /* table.c:1580:3 */
|
||||
|
||||
type _RuneCharClass = struct {
|
||||
__name [14]int8
|
||||
_ [2]byte
|
||||
__mask uint32
|
||||
} /* table.c:1585:3 */
|
||||
|
||||
type _RuneLocale = struct {
|
||||
__magic [8]int8
|
||||
__encoding [32]int8
|
||||
__sgetrune uintptr
|
||||
__sputrune uintptr
|
||||
__invalid_rune int32
|
||||
__runetype [256]uint32
|
||||
__maplower [256]int32
|
||||
__mapupper [256]int32
|
||||
_ [4]byte
|
||||
__runetype_ext _RuneRange
|
||||
__maplower_ext _RuneRange
|
||||
__mapupper_ext _RuneRange
|
||||
__variable uintptr
|
||||
__variable_len int32
|
||||
__ncharclasses int32
|
||||
__charclasses uintptr
|
||||
} /* table.c:1616:3 */
|
||||
|
||||
func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */
|
||||
|
||||
return func() int32 {
|
||||
if Xisascii(tls, _c) != 0 {
|
||||
return BoolInt32(!!(uint64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c)*4)))&_f != 0))
|
||||
}
|
||||
return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26))
|
||||
}() != 0 || func() int32 {
|
||||
if 0 != 0 {
|
||||
return Xisdigit(tls, c)
|
||||
return BoolInt32(!!(X__maskrune(tls, _c, _f) != 0))
|
||||
}()
|
||||
|
||||
}
|
||||
|
||||
func X__isctype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1681:1: */
|
||||
|
||||
if _c < 0 || _c >= int32(1)<<8 {
|
||||
return 0
|
||||
}
|
||||
return BoolInt32(!!(uint64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c)*4)))&_f != 0))
|
||||
|
||||
}
|
||||
|
||||
func X__wcwidth(tls *TLS, _c int32) int32 { /* table.c:1700:1: */
|
||||
var _x uint32
|
||||
|
||||
if _c == 0 {
|
||||
return 0
|
||||
}
|
||||
_x = uint32(X__maskrune(tls, _c, uint64(0xe0000000|0x00040000)))
|
||||
if int64(_x)&0xe0000000 != int64(0) {
|
||||
return int32(int64(_x) & 0xe0000000 >> 30)
|
||||
}
|
||||
return func() int32 {
|
||||
if int64(_x)&0x00040000 != int64(0) {
|
||||
return 1
|
||||
}
|
||||
return Bool32(uint32(c)-uint32('0') < uint32(10))
|
||||
}() != 0)
|
||||
return -1
|
||||
}()
|
||||
}
|
||||
|
||||
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
|
||||
return Xisalnum(tls, c)
|
||||
func Xisalnum(tls *TLS, _c int32) int32 { /* table.c:1718:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000100|0x00000400))
|
||||
}
|
||||
|
||||
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
|
||||
return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26))
|
||||
func Xisalpha(tls *TLS, _c int32) int32 { /* table.c:1724:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000100))
|
||||
}
|
||||
|
||||
func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */
|
||||
return Xisalpha(tls, c)
|
||||
func Xisblank(tls *TLS, _c int32) int32 { /* table.c:1730:1: */
|
||||
return X__istype(tls, _c, uint64(0x00020000))
|
||||
}
|
||||
|
||||
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32('0') < uint32(10))
|
||||
func Xiscntrl(tls *TLS, _c int32) int32 { /* table.c:1736:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000200))
|
||||
}
|
||||
|
||||
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
|
||||
return Xisdigit(tls, c)
|
||||
func Xisdigit(tls *TLS, _c int32) int32 { /* table.c:1743:1: */
|
||||
return X__isctype(tls, _c, uint64(0x00000400))
|
||||
}
|
||||
|
||||
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32('a') < uint32(26))
|
||||
func Xisgraph(tls *TLS, _c int32) int32 { /* table.c:1749:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000800))
|
||||
}
|
||||
|
||||
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
|
||||
return Xislower(tls, c)
|
||||
func Xislower(tls *TLS, _c int32) int32 { /* table.c:1755:1: */
|
||||
return X__istype(tls, _c, uint64(0x00001000))
|
||||
}
|
||||
|
||||
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
|
||||
func Xisprint(tls *TLS, _c int32) int32 { /* table.c:1761:1: */
|
||||
return X__istype(tls, _c, uint64(0x00040000))
|
||||
}
|
||||
|
||||
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
|
||||
return Xisprint(tls, c)
|
||||
func Xispunct(tls *TLS, _c int32) int32 { /* table.c:1767:1: */
|
||||
return X__istype(tls, _c, uint64(0x00002000))
|
||||
}
|
||||
|
||||
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32('A') < uint32(26))
|
||||
func Xisupper(tls *TLS, _c int32) int32 { /* table.c:1779:1: */
|
||||
return X__istype(tls, _c, uint64(0x00008000))
|
||||
}
|
||||
|
||||
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
|
||||
return Xisupper(tls, c)
|
||||
func Xisxdigit(tls *TLS, _c int32) int32 { /* table.c:1786:1: */
|
||||
return X__isctype(tls, _c, uint64(0x00010000))
|
||||
}
|
||||
|
||||
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
|
||||
return Bool32(func() int32 {
|
||||
if 0 != 0 {
|
||||
return Xisdigit(tls, c)
|
||||
}
|
||||
return Bool32(uint32(c)-uint32('0') < uint32(10))
|
||||
}() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6))
|
||||
func Xtoascii(tls *TLS, _c int32) int32 { /* table.c:1792:1: */
|
||||
return _c & 0x7F
|
||||
}
|
||||
|
||||
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
|
||||
return Xisxdigit(tls, c)
|
||||
func Xdigittoint(tls *TLS, _c int32) int32 { /* table.c:1811:1: */
|
||||
return X__maskrune(tls, _c, uint64(0x0F))
|
||||
}
|
||||
|
||||
func Xishexnumber(tls *TLS, _c int32) int32 { /* table.c:1817:1: */
|
||||
return X__istype(tls, _c, uint64(0x00010000))
|
||||
}
|
||||
|
||||
func Xisideogram(tls *TLS, _c int32) int32 { /* table.c:1823:1: */
|
||||
return X__istype(tls, _c, uint64(0x00080000))
|
||||
}
|
||||
|
||||
func Xisnumber(tls *TLS, _c int32) int32 { /* table.c:1829:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000400))
|
||||
}
|
||||
|
||||
func Xisphonogram(tls *TLS, _c int32) int32 { /* table.c:1835:1: */
|
||||
return X__istype(tls, _c, uint64(0x00200000))
|
||||
}
|
||||
|
||||
func Xisrune(tls *TLS, _c int32) int32 { /* table.c:1841:1: */
|
||||
return X__istype(tls, _c, uint64(0xFFFFFFF0))
|
||||
}
|
||||
|
||||
func Xisspecial(tls *TLS, _c int32) int32 { /* table.c:1847:1: */
|
||||
return X__istype(tls, _c, uint64(0x00100000))
|
||||
}
|
||||
|
||||
func X__maskrune(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1871:2: */
|
||||
return int32(uint32(int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c&0xff)*4)))) & uint32(_f))
|
||||
}
|
||||
|
||||
func X__toupper(tls *TLS, c int32) int32 { /* table.c:1876:20: */
|
||||
return Xtoupper(tls, c)
|
||||
}
|
||||
|
||||
func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */
|
||||
return Xtolower(tls, c)
|
||||
}
|
||||
|
||||
var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, __encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, __invalid_rune: 0xfffd, __runetype: [256]uint32{
|
||||
uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x24200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x200), uint32(0x200),
|
||||
uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200),
|
||||
uint32(0x64000), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800),
|
||||
uint32(0x50c00), uint32(0x50c01), uint32(0x50c02), uint32(0x50c03), uint32(0x50c04), uint32(0x50c05), uint32(0x50c06), uint32(0x50c07), uint32(0x50c08), uint32(0x50c09), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800),
|
||||
uint32(0x42800), uint32(0x5890a), uint32(0x5890b), uint32(0x5890c), uint32(0x5890d), uint32(0x5890e), uint32(0x5890f), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900),
|
||||
uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800),
|
||||
uint32(0x42800), uint32(0x5190a), uint32(0x5190b), uint32(0x5190c), uint32(0x5190d), uint32(0x5190e), uint32(0x5190f), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900),
|
||||
uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x200),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
}, __maplower: [256]int32{
|
||||
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
}, __mapupper: [256]int32{
|
||||
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
},
|
||||
} /* table.c:1879:13 */
|
||||
|
||||
var X_CurrentRuneLocale uintptr = 0 /* table.c:1940:13 */
|
||||
|
||||
type div_t = struct {
|
||||
quot int32
|
||||
rem int32
|
||||
|
|
@ -447,6 +653,8 @@ type lldiv_t = struct {
|
|||
rem int64
|
||||
} /* stdlib.h:64:41 */
|
||||
|
||||
type locale_t = uintptr /* alltypes.h:343:32 */
|
||||
|
||||
type ssize_t = int64 /* alltypes.h:65:15 */
|
||||
|
||||
type intptr_t = int64 /* alltypes.h:70:15 */
|
||||
|
|
@ -739,6 +947,10 @@ func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */
|
|||
return *(*uint64)(unsafe.Pointer(bp))
|
||||
}
|
||||
|
||||
func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
|
||||
return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
|
||||
}
|
||||
|
||||
type syscall_arg_t = int64 /* syscall.h:22:14 */
|
||||
|
||||
func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */
|
||||
|
|
@ -1851,6 +2063,49 @@ func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
|
|||
return c
|
||||
}
|
||||
|
||||
type lconv = struct {
|
||||
decimal_point uintptr
|
||||
thousands_sep uintptr
|
||||
grouping uintptr
|
||||
int_curr_symbol uintptr
|
||||
currency_symbol uintptr
|
||||
mon_decimal_point uintptr
|
||||
mon_thousands_sep uintptr
|
||||
mon_grouping uintptr
|
||||
positive_sign uintptr
|
||||
negative_sign uintptr
|
||||
int_frac_digits int8
|
||||
frac_digits int8
|
||||
p_cs_precedes int8
|
||||
p_sep_by_space int8
|
||||
n_cs_precedes int8
|
||||
n_sep_by_space int8
|
||||
p_sign_posn int8
|
||||
n_sign_posn int8
|
||||
int_p_cs_precedes int8
|
||||
int_p_sep_by_space int8
|
||||
int_n_cs_precedes int8
|
||||
int_n_sep_by_space int8
|
||||
int_p_sign_posn int8
|
||||
int_n_sign_posn int8
|
||||
_ [2]byte
|
||||
} /* locale.h:24:1 */
|
||||
|
||||
// Support signed or unsigned plain-char
|
||||
|
||||
// Implementation choices...
|
||||
|
||||
// Arbitrary numbers...
|
||||
|
||||
// POSIX/SUS requirements follow. These numbers come directly
|
||||
// from SUS and have nothing to do with the host system.
|
||||
|
||||
var posix_lconv = lconv{decimal_point: ts + 23, thousands_sep: ts + 13, grouping: ts + 13, int_curr_symbol: ts + 13, currency_symbol: ts + 13, mon_decimal_point: ts + 13, mon_thousands_sep: ts + 13, mon_grouping: ts + 13, positive_sign: ts + 13, negative_sign: ts + 13, int_frac_digits: Int8FromInt32(255), frac_digits: Int8FromInt32(255), p_cs_precedes: Int8FromInt32(255), p_sep_by_space: Int8FromInt32(255), n_cs_precedes: Int8FromInt32(255), n_sep_by_space: Int8FromInt32(255), p_sign_posn: Int8FromInt32(255), n_sign_posn: Int8FromInt32(255), int_p_cs_precedes: Int8FromInt32(255), int_p_sep_by_space: Int8FromInt32(255), int_n_cs_precedes: Int8FromInt32(255), int_n_sep_by_space: Int8FromInt32(255), int_p_sign_posn: Int8FromInt32(255), int_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */
|
||||
|
||||
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
|
||||
return uintptr(unsafe.Pointer(&posix_lconv))
|
||||
}
|
||||
|
||||
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
|
||||
bp := tls.Alloc(8)
|
||||
defer tls.Free(8)
|
||||
|
|
@ -3064,7 +3319,7 @@ func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */
|
|||
bp := tls.Alloc(32)
|
||||
defer tls.Free(32)
|
||||
|
||||
Xsprintf(tls, s, ts+23,
|
||||
Xsprintf(tls, s, ts+25,
|
||||
VaList(bp, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip)))))
|
||||
}
|
||||
|
||||
|
|
@ -3076,10 +3331,10 @@ func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */
|
|||
*(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4]
|
||||
*(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.')
|
||||
}
|
||||
Xstrcpy(tls, s, ts+48)
|
||||
Xstrcpy(tls, s, ts+50)
|
||||
}
|
||||
|
||||
var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 57)) /* getnameinfo.c:36:20 */
|
||||
var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 59)) /* getnameinfo.c:36:20 */
|
||||
|
||||
func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int32) { /* getnameinfo.c:45:13: */
|
||||
bp := tls.Alloc(556)
|
||||
|
|
@ -3096,13 +3351,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3
|
|||
// var iplit address at bp+528, 28
|
||||
|
||||
//TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf);
|
||||
var f uintptr = Xfopen(tls, ts+74, ts+85)
|
||||
var f uintptr = Xfopen(tls, ts+76, ts+87)
|
||||
if !(f != 0) {
|
||||
return
|
||||
}
|
||||
if family == 2 {
|
||||
Xmemcpy(tls, bp+uintptr(12), a, uint64(4))
|
||||
Xmemcpy(tls, bp, ts+88, uint64(12))
|
||||
Xmemcpy(tls, bp, ts+90, uint64(12))
|
||||
a = bp /* &atmp[0] */
|
||||
}
|
||||
for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 {
|
||||
|
|
@ -3120,7 +3375,7 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3
|
|||
|
||||
if (*address)(unsafe.Pointer(bp+528)).family == 2 {
|
||||
Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4))
|
||||
Xmemcpy(tls, bp+528+8, ts+88, uint64(12))
|
||||
Xmemcpy(tls, bp+528+8, ts+90, uint64(12))
|
||||
(*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0)
|
||||
}
|
||||
|
||||
|
|
@ -3196,7 +3451,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
|
|||
if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{})) {
|
||||
return -6
|
||||
}
|
||||
if Xmemcmp(tls, a, ts+88, uint64(12)) != 0 {
|
||||
if Xmemcmp(tls, a, ts+90, uint64(12)) != 0 {
|
||||
mkptr6(tls, bp, a)
|
||||
} else {
|
||||
mkptr4(tls, bp, a+uintptr(12))
|
||||
|
|
@ -3336,21 +3591,21 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr
|
|||
|
||||
switch af {
|
||||
case 2:
|
||||
if socklen_t(Xsnprintf(tls, s, uint64(l), ts+101, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l {
|
||||
if socklen_t(Xsnprintf(tls, s, uint64(l), ts+103, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l {
|
||||
return s
|
||||
}
|
||||
break
|
||||
case 10:
|
||||
if Xmemcmp(tls, a, ts+88, uint64(12)) != 0 {
|
||||
if Xmemcmp(tls, a, ts+90, uint64(12)) != 0 {
|
||||
Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})),
|
||||
ts+113,
|
||||
ts+115,
|
||||
VaList(bp+32, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), 256*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15)))))
|
||||
} else {
|
||||
Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})),
|
||||
ts+137,
|
||||
ts+139,
|
||||
VaList(bp+96, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))),
|
||||
|
|
@ -3363,7 +3618,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr
|
|||
if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' {
|
||||
continue
|
||||
}
|
||||
j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+167))
|
||||
j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+169))
|
||||
if j > max {
|
||||
best = i
|
||||
max = j
|
||||
|
|
@ -3632,7 +3887,7 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family
|
|||
//TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf);
|
||||
var _f FILE
|
||||
_ = _f
|
||||
var f uintptr = Xfopen(tls, ts+74, ts+85)
|
||||
var f uintptr = Xfopen(tls, ts+76, ts+87)
|
||||
if !(f != 0) {
|
||||
switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) {
|
||||
case 2:
|
||||
|
|
@ -3755,13 +4010,13 @@ type policy = struct {
|
|||
} /* lookup_name.c:237:14 */
|
||||
|
||||
var defpolicy = [6]policy{
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 172)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 189)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 205)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 221)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 237)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)},
|
||||
// Last rule must match all addresses to stop loop.
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), prec: uint8(40), label: uint8(1)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), prec: uint8(40), label: uint8(1)},
|
||||
} /* lookup_name.c:241:3 */
|
||||
|
||||
func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */
|
||||
|
|
@ -3929,10 +4184,10 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
|
|||
*(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{}))
|
||||
} else {
|
||||
Xmemcpy(tls, bp+28+8,
|
||||
ts+88, uint64(12))
|
||||
ts+90, uint64(12))
|
||||
Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4))
|
||||
Xmemcpy(tls, bp+8,
|
||||
ts+88, uint64(12))
|
||||
ts+90, uint64(12))
|
||||
Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4))
|
||||
Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint64(4))
|
||||
da = bp + 56 /* &da4 */
|
||||
|
|
@ -4160,6 +4415,26 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
|
|||
return -1
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > uint64(0) {
|
||||
try = base + uintptr(width*(nel/uint64(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / uint64(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/uint64(2) + uint64(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */
|
||||
bp := tls.Alloc(232)
|
||||
defer tls.Free(232)
|
||||
|
|
@ -4361,6 +4636,32 @@ finish:
|
|||
return size_t((int64(d)-int64(d0))/1) + Xstrlen(tls, s)
|
||||
}
|
||||
|
||||
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
|
||||
var l uintptr = _l
|
||||
var r uintptr = _r
|
||||
if !(int32(PostDecUint64(&n, 1)) != 0) {
|
||||
return 0
|
||||
}
|
||||
__1:
|
||||
if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) {
|
||||
goto __3
|
||||
}
|
||||
goto __2
|
||||
__2:
|
||||
l++
|
||||
r++
|
||||
n--
|
||||
goto __1
|
||||
goto __3
|
||||
__3:
|
||||
;
|
||||
return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r))))
|
||||
}
|
||||
|
||||
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
|
||||
return Xstrncasecmp(tls, l, r, n)
|
||||
}
|
||||
|
||||
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
|
||||
var a uintptr = d
|
||||
d += uintptr(Xstrlen(tls, d))
|
||||
|
|
@ -4422,5 +4723,10 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
|
|||
|
||||
var _sp uintptr /* strtok.c:5:14: */
|
||||
|
||||
var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
func init() {
|
||||
*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.c:1940:35:
|
||||
*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.c:1940:35:
|
||||
}
|
||||
|
||||
var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00.\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data
|
||||
|
|
|
|||
442
vendor/modernc.org/libc/musl_darwin_arm64.go
generated
vendored
442
vendor/modernc.org/libc/musl_darwin_arm64.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_darwin_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -hide isascii,isspace,tolower,toupper -nostdinc -nostdlib -o ../musl_darwin_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../darwin/table.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strchrnul.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -357,83 +357,289 @@ type size_t = uint64 /* <builtin>:9:23 */
|
|||
|
||||
type wchar_t = int32 /* <builtin>:15:24 */
|
||||
|
||||
func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
|
||||
return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
|
||||
}
|
||||
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */
|
||||
|
||||
type locale_t = uintptr /* alltypes.h:351:32 */
|
||||
// pthread opaque structures
|
||||
|
||||
func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */
|
||||
return Bool32(func() int32 {
|
||||
if 0 != 0 {
|
||||
return Xisalpha(tls, c)
|
||||
type __darwin_pthread_handler_rec = struct {
|
||||
__routine uintptr
|
||||
__arg uintptr
|
||||
__next uintptr
|
||||
} /* table.c:1396:1 */
|
||||
|
||||
type _opaque_pthread_attr_t = struct {
|
||||
__sig int64
|
||||
__opaque [56]int8
|
||||
} /* table.c:1402:1 */
|
||||
|
||||
type _opaque_pthread_cond_t = struct {
|
||||
__sig int64
|
||||
__opaque [40]int8
|
||||
} /* table.c:1407:1 */
|
||||
|
||||
type _opaque_pthread_condattr_t = struct {
|
||||
__sig int64
|
||||
__opaque [8]int8
|
||||
} /* table.c:1412:1 */
|
||||
|
||||
type _opaque_pthread_mutex_t = struct {
|
||||
__sig int64
|
||||
__opaque [56]int8
|
||||
} /* table.c:1417:1 */
|
||||
|
||||
type _opaque_pthread_mutexattr_t = struct {
|
||||
__sig int64
|
||||
__opaque [8]int8
|
||||
} /* table.c:1422:1 */
|
||||
|
||||
type _opaque_pthread_once_t = struct {
|
||||
__sig int64
|
||||
__opaque [8]int8
|
||||
} /* table.c:1427:1 */
|
||||
|
||||
type _opaque_pthread_rwlock_t = struct {
|
||||
__sig int64
|
||||
__opaque [192]int8
|
||||
} /* table.c:1432:1 */
|
||||
|
||||
type _opaque_pthread_rwlockattr_t = struct {
|
||||
__sig int64
|
||||
__opaque [16]int8
|
||||
} /* table.c:1437:1 */
|
||||
|
||||
type _opaque_pthread_t = struct {
|
||||
__sig int64
|
||||
__cleanup_stack uintptr
|
||||
__opaque [8176]int8
|
||||
} /* table.c:1442:1 */
|
||||
|
||||
type ct_rune_t = int32 /* table.c:1527:28 */
|
||||
|
||||
type rune_t = int32 /* table.c:1536:25 */
|
||||
|
||||
type wint_t = int32 /* table.c:1558:25 */
|
||||
|
||||
type _RuneEntry = struct {
|
||||
__min int32
|
||||
__max int32
|
||||
__map int32
|
||||
_ [4]byte
|
||||
__types uintptr
|
||||
} /* table.c:1575:3 */
|
||||
|
||||
type _RuneRange = struct {
|
||||
__nranges int32
|
||||
_ [4]byte
|
||||
__ranges uintptr
|
||||
} /* table.c:1580:3 */
|
||||
|
||||
type _RuneCharClass = struct {
|
||||
__name [14]int8
|
||||
_ [2]byte
|
||||
__mask uint32
|
||||
} /* table.c:1585:3 */
|
||||
|
||||
type _RuneLocale = struct {
|
||||
__magic [8]int8
|
||||
__encoding [32]int8
|
||||
__sgetrune uintptr
|
||||
__sputrune uintptr
|
||||
__invalid_rune int32
|
||||
__runetype [256]uint32
|
||||
__maplower [256]int32
|
||||
__mapupper [256]int32
|
||||
_ [4]byte
|
||||
__runetype_ext _RuneRange
|
||||
__maplower_ext _RuneRange
|
||||
__mapupper_ext _RuneRange
|
||||
__variable uintptr
|
||||
__variable_len int32
|
||||
__ncharclasses int32
|
||||
__charclasses uintptr
|
||||
} /* table.c:1616:3 */
|
||||
|
||||
func X__istype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1670:1: */
|
||||
|
||||
return func() int32 {
|
||||
if Xisascii(tls, _c) != 0 {
|
||||
return BoolInt32(!!(uint64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c)*4)))&_f != 0))
|
||||
}
|
||||
return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26))
|
||||
}() != 0 || func() int32 {
|
||||
if 0 != 0 {
|
||||
return Xisdigit(tls, c)
|
||||
return BoolInt32(!!(X__maskrune(tls, _c, _f) != 0))
|
||||
}()
|
||||
|
||||
}
|
||||
|
||||
func X__isctype(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1681:1: */
|
||||
|
||||
if _c < 0 || _c >= int32(1)<<8 {
|
||||
return 0
|
||||
}
|
||||
return BoolInt32(!!(uint64(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c)*4)))&_f != 0))
|
||||
|
||||
}
|
||||
|
||||
func X__wcwidth(tls *TLS, _c int32) int32 { /* table.c:1700:1: */
|
||||
var _x uint32
|
||||
|
||||
if _c == 0 {
|
||||
return 0
|
||||
}
|
||||
_x = uint32(X__maskrune(tls, _c, uint64(0xe0000000|0x00040000)))
|
||||
if int64(_x)&0xe0000000 != int64(0) {
|
||||
return int32(int64(_x) & 0xe0000000 >> 30)
|
||||
}
|
||||
return func() int32 {
|
||||
if int64(_x)&0x00040000 != int64(0) {
|
||||
return 1
|
||||
}
|
||||
return Bool32(uint32(c)-uint32('0') < uint32(10))
|
||||
}() != 0)
|
||||
return -1
|
||||
}()
|
||||
}
|
||||
|
||||
func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */
|
||||
return Xisalnum(tls, c)
|
||||
func Xisalnum(tls *TLS, _c int32) int32 { /* table.c:1718:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000100|0x00000400))
|
||||
}
|
||||
|
||||
func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */
|
||||
return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26))
|
||||
func Xisalpha(tls *TLS, _c int32) int32 { /* table.c:1724:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000100))
|
||||
}
|
||||
|
||||
func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */
|
||||
return Xisalpha(tls, c)
|
||||
func Xisblank(tls *TLS, _c int32) int32 { /* table.c:1730:1: */
|
||||
return X__istype(tls, _c, uint64(0x00020000))
|
||||
}
|
||||
|
||||
func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32('0') < uint32(10))
|
||||
func Xiscntrl(tls *TLS, _c int32) int32 { /* table.c:1736:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000200))
|
||||
}
|
||||
|
||||
func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
|
||||
return Xisdigit(tls, c)
|
||||
func Xisdigit(tls *TLS, _c int32) int32 { /* table.c:1743:1: */
|
||||
return X__isctype(tls, _c, uint64(0x00000400))
|
||||
}
|
||||
|
||||
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32('a') < uint32(26))
|
||||
func Xisgraph(tls *TLS, _c int32) int32 { /* table.c:1749:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000800))
|
||||
}
|
||||
|
||||
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
|
||||
return Xislower(tls, c)
|
||||
func Xislower(tls *TLS, _c int32) int32 { /* table.c:1755:1: */
|
||||
return X__istype(tls, _c, uint64(0x00001000))
|
||||
}
|
||||
|
||||
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
|
||||
func Xisprint(tls *TLS, _c int32) int32 { /* table.c:1761:1: */
|
||||
return X__istype(tls, _c, uint64(0x00040000))
|
||||
}
|
||||
|
||||
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
|
||||
return Xisprint(tls, c)
|
||||
func Xispunct(tls *TLS, _c int32) int32 { /* table.c:1767:1: */
|
||||
return X__istype(tls, _c, uint64(0x00002000))
|
||||
}
|
||||
|
||||
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32('A') < uint32(26))
|
||||
func Xisupper(tls *TLS, _c int32) int32 { /* table.c:1779:1: */
|
||||
return X__istype(tls, _c, uint64(0x00008000))
|
||||
}
|
||||
|
||||
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
|
||||
return Xisupper(tls, c)
|
||||
func Xisxdigit(tls *TLS, _c int32) int32 { /* table.c:1786:1: */
|
||||
return X__isctype(tls, _c, uint64(0x00010000))
|
||||
}
|
||||
|
||||
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
|
||||
return Bool32(func() int32 {
|
||||
if 0 != 0 {
|
||||
return Xisdigit(tls, c)
|
||||
}
|
||||
return Bool32(uint32(c)-uint32('0') < uint32(10))
|
||||
}() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6))
|
||||
func Xtoascii(tls *TLS, _c int32) int32 { /* table.c:1792:1: */
|
||||
return _c & 0x7F
|
||||
}
|
||||
|
||||
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
|
||||
return Xisxdigit(tls, c)
|
||||
func Xdigittoint(tls *TLS, _c int32) int32 { /* table.c:1811:1: */
|
||||
return X__maskrune(tls, _c, uint64(0x0F))
|
||||
}
|
||||
|
||||
func Xishexnumber(tls *TLS, _c int32) int32 { /* table.c:1817:1: */
|
||||
return X__istype(tls, _c, uint64(0x00010000))
|
||||
}
|
||||
|
||||
func Xisideogram(tls *TLS, _c int32) int32 { /* table.c:1823:1: */
|
||||
return X__istype(tls, _c, uint64(0x00080000))
|
||||
}
|
||||
|
||||
func Xisnumber(tls *TLS, _c int32) int32 { /* table.c:1829:1: */
|
||||
return X__istype(tls, _c, uint64(0x00000400))
|
||||
}
|
||||
|
||||
func Xisphonogram(tls *TLS, _c int32) int32 { /* table.c:1835:1: */
|
||||
return X__istype(tls, _c, uint64(0x00200000))
|
||||
}
|
||||
|
||||
func Xisrune(tls *TLS, _c int32) int32 { /* table.c:1841:1: */
|
||||
return X__istype(tls, _c, uint64(0xFFFFFFF0))
|
||||
}
|
||||
|
||||
func Xisspecial(tls *TLS, _c int32) int32 { /* table.c:1847:1: */
|
||||
return X__istype(tls, _c, uint64(0x00100000))
|
||||
}
|
||||
|
||||
func X__maskrune(tls *TLS, _c int32, _f uint64) int32 { /* table.c:1871:2: */
|
||||
return int32(uint32(int32(*(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) + 60 + uintptr(_c&0xff)*4)))) & uint32(_f))
|
||||
}
|
||||
|
||||
func X__toupper(tls *TLS, c int32) int32 { /* table.c:1876:20: */
|
||||
return Xtoupper(tls, c)
|
||||
}
|
||||
|
||||
func X__tolower(tls *TLS, c int32) int32 { /* table.c:1878:20: */
|
||||
return Xtolower(tls, c)
|
||||
}
|
||||
|
||||
var X_DefaultRuneLocale = _RuneLocale{__magic: [8]int8{int8(82), int8(117), int8(110), int8(101), int8(77), int8(97), int8(103), int8(65)}, __encoding: [32]int8{int8(78), int8(79), int8(78), int8(69), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)}, __invalid_rune: 0xfffd, __runetype: [256]uint32{
|
||||
uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x24200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x4200), uint32(0x200), uint32(0x200),
|
||||
uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200), uint32(0x200),
|
||||
uint32(0x64000), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800),
|
||||
uint32(0x50c00), uint32(0x50c01), uint32(0x50c02), uint32(0x50c03), uint32(0x50c04), uint32(0x50c05), uint32(0x50c06), uint32(0x50c07), uint32(0x50c08), uint32(0x50c09), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800),
|
||||
uint32(0x42800), uint32(0x5890a), uint32(0x5890b), uint32(0x5890c), uint32(0x5890d), uint32(0x5890e), uint32(0x5890f), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900),
|
||||
uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x48900), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800),
|
||||
uint32(0x42800), uint32(0x5190a), uint32(0x5190b), uint32(0x5190c), uint32(0x5190d), uint32(0x5190e), uint32(0x5190f), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900),
|
||||
uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x41900), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x42800), uint32(0x200),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0), uint32(0x0),
|
||||
}, __maplower: [256]int32{
|
||||
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
|
||||
0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
}, __mapupper: [256]int32{
|
||||
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
|
||||
0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
|
||||
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
|
||||
0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
|
||||
0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
|
||||
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
|
||||
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
|
||||
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
|
||||
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
|
||||
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
},
|
||||
} /* table.c:1879:13 */
|
||||
|
||||
var X_CurrentRuneLocale uintptr = 0 /* table.c:1940:13 */
|
||||
|
||||
type div_t = struct {
|
||||
quot int32
|
||||
rem int32
|
||||
|
|
@ -447,6 +653,8 @@ type lldiv_t = struct {
|
|||
rem int64
|
||||
} /* stdlib.h:64:41 */
|
||||
|
||||
type locale_t = uintptr /* alltypes.h:351:32 */
|
||||
|
||||
type ssize_t = int64 /* alltypes.h:73:15 */
|
||||
|
||||
type intptr_t = int64 /* alltypes.h:78:15 */
|
||||
|
|
@ -739,6 +947,10 @@ func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */
|
|||
return *(*uint64)(unsafe.Pointer(bp))
|
||||
}
|
||||
|
||||
func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */
|
||||
return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5))
|
||||
}
|
||||
|
||||
type syscall_arg_t = int64 /* syscall.h:22:14 */
|
||||
|
||||
func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */
|
||||
|
|
@ -1851,6 +2063,49 @@ func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */
|
|||
return c
|
||||
}
|
||||
|
||||
type lconv = struct {
|
||||
decimal_point uintptr
|
||||
thousands_sep uintptr
|
||||
grouping uintptr
|
||||
int_curr_symbol uintptr
|
||||
currency_symbol uintptr
|
||||
mon_decimal_point uintptr
|
||||
mon_thousands_sep uintptr
|
||||
mon_grouping uintptr
|
||||
positive_sign uintptr
|
||||
negative_sign uintptr
|
||||
int_frac_digits int8
|
||||
frac_digits int8
|
||||
p_cs_precedes int8
|
||||
p_sep_by_space int8
|
||||
n_cs_precedes int8
|
||||
n_sep_by_space int8
|
||||
p_sign_posn int8
|
||||
n_sign_posn int8
|
||||
int_p_cs_precedes int8
|
||||
int_p_sep_by_space int8
|
||||
int_n_cs_precedes int8
|
||||
int_n_sep_by_space int8
|
||||
int_p_sign_posn int8
|
||||
int_n_sign_posn int8
|
||||
_ [2]byte
|
||||
} /* locale.h:24:1 */
|
||||
|
||||
// Support signed or unsigned plain-char
|
||||
|
||||
// Implementation choices...
|
||||
|
||||
// Arbitrary numbers...
|
||||
|
||||
// POSIX/SUS requirements follow. These numbers come directly
|
||||
// from SUS and have nothing to do with the host system.
|
||||
|
||||
var posix_lconv = lconv{decimal_point: ts + 23, thousands_sep: ts + 13, grouping: ts + 13, int_curr_symbol: ts + 13, currency_symbol: ts + 13, mon_decimal_point: ts + 13, mon_thousands_sep: ts + 13, mon_grouping: ts + 13, positive_sign: ts + 13, negative_sign: ts + 13, int_frac_digits: Int8FromInt32(255), frac_digits: Int8FromInt32(255), p_cs_precedes: Int8FromInt32(255), p_sep_by_space: Int8FromInt32(255), n_cs_precedes: Int8FromInt32(255), n_sep_by_space: Int8FromInt32(255), p_sign_posn: Int8FromInt32(255), n_sign_posn: Int8FromInt32(255), int_p_cs_precedes: Int8FromInt32(255), int_p_sep_by_space: Int8FromInt32(255), int_n_cs_precedes: Int8FromInt32(255), int_n_sep_by_space: Int8FromInt32(255), int_p_sign_posn: Int8FromInt32(255), int_n_sign_posn: Int8FromInt32(255)} /* localeconv.c:4:27 */
|
||||
|
||||
func Xlocaleconv(tls *TLS) uintptr { /* localeconv.c:31:14: */
|
||||
return uintptr(unsafe.Pointer(&posix_lconv))
|
||||
}
|
||||
|
||||
func X__fpclassify(tls *TLS, x float64) int32 { /* __fpclassify.c:4:5: */
|
||||
bp := tls.Alloc(8)
|
||||
defer tls.Free(8)
|
||||
|
|
@ -3064,7 +3319,7 @@ func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */
|
|||
bp := tls.Alloc(32)
|
||||
defer tls.Free(32)
|
||||
|
||||
Xsprintf(tls, s, ts+23,
|
||||
Xsprintf(tls, s, ts+25,
|
||||
VaList(bp, int32(*(*uint8)(unsafe.Pointer(ip + 3))), int32(*(*uint8)(unsafe.Pointer(ip + 2))), int32(*(*uint8)(unsafe.Pointer(ip + 1))), int32(*(*uint8)(unsafe.Pointer(ip)))))
|
||||
}
|
||||
|
||||
|
|
@ -3076,10 +3331,10 @@ func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */
|
|||
*(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))>>4]
|
||||
*(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.')
|
||||
}
|
||||
Xstrcpy(tls, s, ts+48)
|
||||
Xstrcpy(tls, s, ts+50)
|
||||
}
|
||||
|
||||
var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 57)) /* getnameinfo.c:36:20 */
|
||||
var _sxdigits = *(*[17]int8)(unsafe.Pointer(ts + 59)) /* getnameinfo.c:36:20 */
|
||||
|
||||
func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int32) { /* getnameinfo.c:45:13: */
|
||||
bp := tls.Alloc(556)
|
||||
|
|
@ -3096,13 +3351,13 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3
|
|||
// var iplit address at bp+528, 28
|
||||
|
||||
//TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf);
|
||||
var f uintptr = Xfopen(tls, ts+74, ts+85)
|
||||
var f uintptr = Xfopen(tls, ts+76, ts+87)
|
||||
if !(f != 0) {
|
||||
return
|
||||
}
|
||||
if family == 2 {
|
||||
Xmemcpy(tls, bp+uintptr(12), a, uint64(4))
|
||||
Xmemcpy(tls, bp, ts+88, uint64(12))
|
||||
Xmemcpy(tls, bp, ts+90, uint64(12))
|
||||
a = bp /* &atmp[0] */
|
||||
}
|
||||
for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 {
|
||||
|
|
@ -3120,7 +3375,7 @@ func reverse_hosts(tls *TLS, buf uintptr, a uintptr, scopeid uint32, family int3
|
|||
|
||||
if (*address)(unsafe.Pointer(bp+528)).family == 2 {
|
||||
Xmemcpy(tls, bp+528+8+uintptr(12), bp+528+8, uint64(4))
|
||||
Xmemcpy(tls, bp+528+8, ts+88, uint64(12))
|
||||
Xmemcpy(tls, bp+528+8, ts+90, uint64(12))
|
||||
(*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0)
|
||||
}
|
||||
|
||||
|
|
@ -3196,7 +3451,7 @@ func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen soc
|
|||
if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{})) {
|
||||
return -6
|
||||
}
|
||||
if Xmemcmp(tls, a, ts+88, uint64(12)) != 0 {
|
||||
if Xmemcmp(tls, a, ts+90, uint64(12)) != 0 {
|
||||
mkptr6(tls, bp, a)
|
||||
} else {
|
||||
mkptr4(tls, bp, a+uintptr(12))
|
||||
|
|
@ -3336,21 +3591,21 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr
|
|||
|
||||
switch af {
|
||||
case 2:
|
||||
if socklen_t(Xsnprintf(tls, s, uint64(l), ts+101, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l {
|
||||
if socklen_t(Xsnprintf(tls, s, uint64(l), ts+103, VaList(bp, int32(*(*uint8)(unsafe.Pointer(a))), int32(*(*uint8)(unsafe.Pointer(a + 1))), int32(*(*uint8)(unsafe.Pointer(a + 2))), int32(*(*uint8)(unsafe.Pointer(a + 3)))))) < l {
|
||||
return s
|
||||
}
|
||||
break
|
||||
case 10:
|
||||
if Xmemcmp(tls, a, ts+88, uint64(12)) != 0 {
|
||||
if Xmemcmp(tls, a, ts+90, uint64(12)) != 0 {
|
||||
Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})),
|
||||
ts+113,
|
||||
ts+115,
|
||||
VaList(bp+32, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 12)))+int32(*(*uint8)(unsafe.Pointer(a + 13))), 256*int32(*(*uint8)(unsafe.Pointer(a + 14)))+int32(*(*uint8)(unsafe.Pointer(a + 15)))))
|
||||
} else {
|
||||
Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})),
|
||||
ts+137,
|
||||
ts+139,
|
||||
VaList(bp+96, 256*int32(*(*uint8)(unsafe.Pointer(a)))+int32(*(*uint8)(unsafe.Pointer(a + 1))), 256*int32(*(*uint8)(unsafe.Pointer(a + 2)))+int32(*(*uint8)(unsafe.Pointer(a + 3))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 4)))+int32(*(*uint8)(unsafe.Pointer(a + 5))), 256*int32(*(*uint8)(unsafe.Pointer(a + 6)))+int32(*(*uint8)(unsafe.Pointer(a + 7))),
|
||||
256*int32(*(*uint8)(unsafe.Pointer(a + 8)))+int32(*(*uint8)(unsafe.Pointer(a + 9))), 256*int32(*(*uint8)(unsafe.Pointer(a + 10)))+int32(*(*uint8)(unsafe.Pointer(a + 11))),
|
||||
|
|
@ -3363,7 +3618,7 @@ func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr
|
|||
if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' {
|
||||
continue
|
||||
}
|
||||
j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+167))
|
||||
j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+169))
|
||||
if j > max {
|
||||
best = i
|
||||
max = j
|
||||
|
|
@ -3632,7 +3887,7 @@ func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family
|
|||
//TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf);
|
||||
var _f FILE
|
||||
_ = _f
|
||||
var f uintptr = Xfopen(tls, ts+74, ts+85)
|
||||
var f uintptr = Xfopen(tls, ts+76, ts+87)
|
||||
if !(f != 0) {
|
||||
switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) {
|
||||
case 2:
|
||||
|
|
@ -3755,13 +4010,13 @@ type policy = struct {
|
|||
} /* lookup_name.c:237:14 */
|
||||
|
||||
var defpolicy = [6]policy{
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 170)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 187)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 203)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 219)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 235)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 172)), len: uint8(15), mask: uint8(0xff), prec: uint8(50)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 189)), len: uint8(11), mask: uint8(0xff), prec: uint8(35), label: uint8(4)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 205)), len: uint8(1), mask: uint8(0xff), prec: uint8(30), label: uint8(2)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 221)), len: uint8(3), mask: uint8(0xff), prec: uint8(5), label: uint8(5)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 237)), mask: uint8(0xfe), prec: uint8(3), label: uint8(13)},
|
||||
// Last rule must match all addresses to stop loop.
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 251)), prec: uint8(40), label: uint8(1)},
|
||||
{addr: *(*[16]uint8)(unsafe.Pointer(ts + 253)), prec: uint8(40), label: uint8(1)},
|
||||
} /* lookup_name.c:241:3 */
|
||||
|
||||
func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */
|
||||
|
|
@ -3929,10 +4184,10 @@ func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family i
|
|||
*(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{}))
|
||||
} else {
|
||||
Xmemcpy(tls, bp+28+8,
|
||||
ts+88, uint64(12))
|
||||
ts+90, uint64(12))
|
||||
Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4))
|
||||
Xmemcpy(tls, bp+8,
|
||||
ts+88, uint64(12))
|
||||
ts+90, uint64(12))
|
||||
Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4))
|
||||
Xmemcpy(tls, bp+56+4, buf+uintptr(i)*28+8, uint64(4))
|
||||
da = bp + 56 /* &da4 */
|
||||
|
|
@ -4160,6 +4415,26 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
|
|||
return -1
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > uint64(0) {
|
||||
try = base + uintptr(width*(nel/uint64(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / uint64(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/uint64(2) + uint64(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */
|
||||
bp := tls.Alloc(232)
|
||||
defer tls.Free(232)
|
||||
|
|
@ -4361,6 +4636,32 @@ finish:
|
|||
return size_t((int64(d)-int64(d0))/1) + Xstrlen(tls, s)
|
||||
}
|
||||
|
||||
func Xstrncasecmp(tls *TLS, _l uintptr, _r uintptr, n size_t) int32 { /* strncasecmp.c:4:5: */
|
||||
var l uintptr = _l
|
||||
var r uintptr = _r
|
||||
if !(int32(PostDecUint64(&n, 1)) != 0) {
|
||||
return 0
|
||||
}
|
||||
__1:
|
||||
if !(*(*uint8)(unsafe.Pointer(l)) != 0 && *(*uint8)(unsafe.Pointer(r)) != 0 && n != 0 && (int32(*(*uint8)(unsafe.Pointer(l))) == int32(*(*uint8)(unsafe.Pointer(r))) || Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) == Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r)))))) {
|
||||
goto __3
|
||||
}
|
||||
goto __2
|
||||
__2:
|
||||
l++
|
||||
r++
|
||||
n--
|
||||
goto __1
|
||||
goto __3
|
||||
__3:
|
||||
;
|
||||
return Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(l)))) - Xtolower(tls, int32(*(*uint8)(unsafe.Pointer(r))))
|
||||
}
|
||||
|
||||
func X__strncasecmp_l(tls *TLS, l uintptr, r uintptr, n size_t, loc locale_t) int32 { /* strncasecmp.c:12:5: */
|
||||
return Xstrncasecmp(tls, l, r, n)
|
||||
}
|
||||
|
||||
func Xstrncat(tls *TLS, d uintptr, s uintptr, n size_t) uintptr { /* strncat.c:3:6: */
|
||||
var a uintptr = d
|
||||
d += uintptr(Xstrlen(tls, d))
|
||||
|
|
@ -4422,5 +4723,10 @@ func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */
|
|||
|
||||
var _sp uintptr /* strtok.c:5:14: */
|
||||
|
||||
var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
func init() {
|
||||
*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.c:1940:35:
|
||||
*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&X_CurrentRuneLocale)) + 0)) = uintptr(unsafe.Pointer(&X_DefaultRuneLocale)) // table.c:1940:35:
|
||||
}
|
||||
|
||||
var ts1 = "infinity\x00nan\x00\x00\x00\x01\x02\x04\a\x03\x06\x05\x00.\x00%d.%d.%d.%d.in-addr.arpa\x00ip6.arpa\x000123456789abcdef\x00/etc/hosts\x00rb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00%d.%d.%d.%d\x00%x:%x:%x:%x:%x:%x:%x:%x\x00%x:%x:%x:%x:%x:%x:%d.%d.%d.%d\x00:0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00 \x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||
var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data
|
||||
|
|
|
|||
6726
vendor/modernc.org/libc/musl_freebsd_386.go
generated
vendored
Normal file
6726
vendor/modernc.org/libc/musl_freebsd_386.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
67
vendor/modernc.org/libc/musl_freebsd_amd64.go
generated
vendored
67
vendor/modernc.org/libc/musl_freebsd_amd64.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6,getnameinfo,gethostbyaddr_r, -nostdinc -nostdlib -o ../musl_freebsd_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c ../freebsd/table.cpp.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isupper.c src/ctype/isxdigit.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/stdio/__toread.c src/stdio/__uflow.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strnlen.c src/string/strspn.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -3356,6 +3356,51 @@ func X__isdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isdigit.c:9:5: */
|
|||
return Xisdigit(tls, c)
|
||||
}
|
||||
|
||||
func Xislower(tls *TLS, c int32) int32 { /* islower.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32('a') < uint32(26))
|
||||
}
|
||||
|
||||
func X__islower_l(tls *TLS, c int32, l locale_t) int32 { /* islower.c:9:5: */
|
||||
return Xislower(tls, c)
|
||||
}
|
||||
|
||||
func Xisprint(tls *TLS, c int32) int32 { /* isprint.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32(0x20) < uint32(0x5f))
|
||||
}
|
||||
|
||||
func X__isprint_l(tls *TLS, c int32, l locale_t) int32 { /* isprint.c:9:5: */
|
||||
return Xisprint(tls, c)
|
||||
}
|
||||
|
||||
func Xisspace(tls *TLS, c int32) int32 { /* isspace.c:4:5: */
|
||||
return Bool32(c == ' ' || uint32(c)-uint32('\t') < uint32(5))
|
||||
}
|
||||
|
||||
func X__isspace_l(tls *TLS, c int32, l locale_t) int32 { /* isspace.c:9:5: */
|
||||
return Xisspace(tls, c)
|
||||
}
|
||||
|
||||
func Xisupper(tls *TLS, c int32) int32 { /* isupper.c:4:5: */
|
||||
return Bool32(uint32(c)-uint32('A') < uint32(26))
|
||||
}
|
||||
|
||||
func X__isupper_l(tls *TLS, c int32, l locale_t) int32 { /* isupper.c:9:5: */
|
||||
return Xisupper(tls, c)
|
||||
}
|
||||
|
||||
func Xisxdigit(tls *TLS, c int32) int32 { /* isxdigit.c:3:5: */
|
||||
return Bool32(func() int32 {
|
||||
if 0 != 0 {
|
||||
return Xisdigit(tls, c)
|
||||
}
|
||||
return Bool32(uint32(c)-uint32('0') < uint32(10))
|
||||
}() != 0 || uint32(c)|uint32(32)-uint32('a') < uint32(6))
|
||||
}
|
||||
|
||||
func X__isxdigit_l(tls *TLS, c int32, l locale_t) int32 { /* isxdigit.c:8:5: */
|
||||
return Xisxdigit(tls, c)
|
||||
}
|
||||
|
||||
type uintptr_t = uint64 /* alltypes.h:55:24 */
|
||||
|
||||
type intptr_t = int64 /* alltypes.h:70:15 */
|
||||
|
|
@ -6667,6 +6712,26 @@ func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */
|
|||
return -1
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > uint64(0) {
|
||||
try = base + uintptr(width*(nel/uint64(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / uint64(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/uint64(2) + uint64(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */
|
||||
bp := tls.Alloc(232)
|
||||
defer tls.Free(232)
|
||||
|
|
|
|||
22
vendor/modernc.org/libc/musl_linux_386.go
generated
vendored
22
vendor/modernc.org/libc/musl_linux_386.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -6452,6 +6452,26 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
|
|||
return Xvfscanf(tls, bp, fmt, ap)
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > size_t(0) {
|
||||
try = base + uintptr(width*(nel/size_t(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / size_t(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/size_t(2) + size_t(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */
|
||||
bp := tls.Alloc(136)
|
||||
defer tls.Free(136)
|
||||
|
|
|
|||
22
vendor/modernc.org/libc/musl_linux_amd64.go
generated
vendored
22
vendor/modernc.org/libc/musl_linux_amd64.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_amd64.go -pkgname libc -static-locals-prefix _s -Iarch/x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -6507,6 +6507,26 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
|
|||
return Xvfscanf(tls, bp, fmt, ap)
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > uint64(0) {
|
||||
try = base + uintptr(width*(nel/uint64(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / uint64(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/uint64(2) + uint64(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */
|
||||
bp := tls.Alloc(232)
|
||||
defer tls.Free(232)
|
||||
|
|
|
|||
22
vendor/modernc.org/libc/musl_linux_arm.go
generated
vendored
22
vendor/modernc.org/libc/musl_linux_arm.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_arm.go -pkgname libc -static-locals-prefix _s -Iarch/arm -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_arm.go -pkgname libc -static-locals-prefix _s -Iarch/arm -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -6485,6 +6485,26 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
|
|||
return Xvfscanf(tls, bp, fmt, ap)
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > size_t(0) {
|
||||
try = base + uintptr(width*(nel/size_t(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / size_t(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/size_t(2) + size_t(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */
|
||||
bp := tls.Alloc(144)
|
||||
defer tls.Free(144)
|
||||
|
|
|
|||
22
vendor/modernc.org/libc/musl_linux_arm64.go
generated
vendored
22
vendor/modernc.org/libc/musl_linux_arm64.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_arm64.go -pkgname libc -static-locals-prefix _s -Iarch/aarch64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -6595,6 +6595,26 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
|
|||
return Xvfscanf(tls, bp, fmt, ap)
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > uint64(0) {
|
||||
try = base + uintptr(width*(nel/uint64(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / uint64(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/uint64(2) + uint64(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */
|
||||
bp := tls.Alloc(232)
|
||||
defer tls.Free(232)
|
||||
|
|
|
|||
22
vendor/modernc.org/libc/musl_linux_s390x.go
generated
vendored
22
vendor/modernc.org/libc/musl_linux_s390x.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_s390x.go -pkgname libc -static-locals-prefix _s -Iarch/s390x -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_linux_s390x.go -pkgname libc -static-locals-prefix _s -Iarch/s390x -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/__ctype_b_loc.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isupper.c src/ctype/isxdigit.c src/dirent/closedir.c src/dirent/opendir.c src/dirent/readdir.c src/internal/floatscan.c src/internal/intscan.c src/internal/shgetc.c src/locale/localeconv.c src/math/__fpclassify.c src/math/__fpclassifyf.c src/math/__fpclassifyl.c src/math/copysignl.c src/math/fabsl.c src/math/fmodl.c src/math/nanf.c src/math/rint.c src/math/scalbn.c src/math/scalbnl.c src/multibyte/internal.c src/multibyte/mbrtowc.c src/multibyte/mbsinit.c src/network/freeaddrinfo.c src/network/getaddrinfo.c src/network/gethostbyaddr.c src/network/gethostbyaddr_r.c src/network/gethostbyname.c src/network/gethostbyname2.c src/network/gethostbyname2_r.c src/network/gethostbyname_r.c src/network/getnameinfo.c src/network/h_errno.c src/network/inet_aton.c src/network/inet_ntop.c src/network/inet_pton.c src/network/lookup_ipliteral.c src/network/lookup_name.c src/network/lookup_serv.c src/prng/rand_r.c src/stdio/__lockfile.c src/stdio/__toread.c src/stdio/__uflow.c src/stdio/sscanf.c src/stdio/vfscanf.c src/stdio/vsscanf.c src/stdlib/bsearch.c src/stdlib/strtod.c src/stdlib/strtol.c src/string/strdup.c src/string/strlcat.c src/string/strlcpy.c src/string/strncasecmp.c src/string/strncat.c src/string/strnlen.c src/string/strspn.c src/string/strtok.c src/thread/pthread_attr_get.c src/thread/pthread_attr_setdetachstate.c src/thread/pthread_mutex_lock.c src/thread/pthread_mutexattr_destroy.c src/thread/pthread_mutexattr_init.c src/thread/pthread_mutexattr_settype.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -6535,6 +6535,26 @@ func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c
|
|||
return Xvfscanf(tls, bp, fmt, ap)
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > uint64(0) {
|
||||
try = base + uintptr(width*(nel/uint64(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / uint64(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/uint64(2) + uint64(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
func strtox(tls *TLS, s uintptr, p uintptr, prec int32) float64 { /* strtod.c:6:20: */
|
||||
bp := tls.Alloc(232)
|
||||
defer tls.Free(232)
|
||||
|
|
|
|||
1794
vendor/modernc.org/libc/musl_netbsd_amd64.go
generated
vendored
1794
vendor/modernc.org/libc/musl_netbsd_amd64.go
generated
vendored
File diff suppressed because it is too large
Load diff
6855
vendor/modernc.org/libc/musl_openbsd_amd64.go
generated
vendored
Normal file
6855
vendor/modernc.org/libc/musl_openbsd_amd64.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
36
vendor/modernc.org/libc/musl_windows_386.go
generated
vendored
36
vendor/modernc.org/libc/musl_windows_386.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_386.go -pkgname libc -static-locals-prefix _s -Iarch/i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/multibyte/wcrtomb.c src/multibyte/wcsrtombs.c src/multibyte/wcstombs.c src/string/strchrnul.c src/string/strdup.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_386.go -pkgname libc -static-locals-prefix _s -Iarch\i386 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/multibyte/wcrtomb.c src/multibyte/wcsrtombs.c src/multibyte/wcstombs.c src/stdlib/bsearch.c src/string/strchrnul.c src/string/strdup.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -863,32 +863,32 @@ type mode_t = uint32 /* alltypes.h:175:18 */
|
|||
type syscall_arg_t = int32 /* syscall.h:22:14 */
|
||||
|
||||
func a_cas(tls *TLS, p uintptr, t int32, s int32) int32 { /* atomic_arch.h:2:19: */
|
||||
panic(`arch/i386/atomic_arch.h:4:2: assembler statements not supported`)
|
||||
panic(`arch\i386\atomic_arch.h:4:2: assembler statements not supported`)
|
||||
return t
|
||||
}
|
||||
|
||||
func a_and(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:29:20: */
|
||||
panic(`arch/i386/atomic_arch.h:31:2: assembler statements not supported`)
|
||||
panic(`arch\i386\atomic_arch.h:31:2: assembler statements not supported`)
|
||||
}
|
||||
|
||||
func a_or(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:37:20: */
|
||||
panic(`arch/i386/atomic_arch.h:39:2: assembler statements not supported`)
|
||||
panic(`arch\i386\atomic_arch.h:39:2: assembler statements not supported`)
|
||||
}
|
||||
|
||||
func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic_arch.h:87:19: */
|
||||
var r int32
|
||||
panic(`arch/i386/atomic_arch.h:90:2: assembler statements not supported`)
|
||||
panic(`arch\i386\atomic_arch.h:90:2: assembler statements not supported`)
|
||||
return r
|
||||
}
|
||||
|
||||
func a_ctz_32(tls *TLS, x uint32_t) int32 { /* atomic_arch.h:96:19: */
|
||||
var r int32
|
||||
panic(`arch/i386/atomic_arch.h:99:2: assembler statements not supported`)
|
||||
panic(`arch\i386\atomic_arch.h:99:2: assembler statements not supported`)
|
||||
return r
|
||||
}
|
||||
|
||||
func a_clz_32(tls *TLS, x uint32_t) int32 { /* atomic_arch.h:104:19: */
|
||||
panic(`arch/i386/atomic_arch.h:106:2: assembler statements not supported`)
|
||||
panic(`arch\i386\atomic_arch.h:106:2: assembler statements not supported`)
|
||||
return int32(x)
|
||||
}
|
||||
|
||||
|
|
@ -917,7 +917,7 @@ type __timer = struct {
|
|||
|
||||
func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */
|
||||
var self uintptr
|
||||
panic(`arch/i386/pthread_arch.h:4:2: assembler statements not supported`)
|
||||
panic(`arch\i386\pthread_arch.h:4:2: assembler statements not supported`)
|
||||
return self
|
||||
}
|
||||
|
||||
|
|
@ -1039,6 +1039,26 @@ func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c
|
|||
return Xwcsrtombs(tls, s, bp, n, uintptr(0))
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > size_t(0) {
|
||||
try = base + uintptr(width*(nel/size_t(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / size_t(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/size_t(2) + size_t(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
// Support signed or unsigned plain-char
|
||||
|
||||
// Implementation choices...
|
||||
|
|
|
|||
22
vendor/modernc.org/libc/musl_windows_amd64.go
generated
vendored
22
vendor/modernc.org/libc/musl_windows_amd64.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_amd64.go -pkgname libc -static-locals-prefix _s -Iarch\x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/multibyte/wcrtomb.c src/multibyte/wcsrtombs.c src/multibyte/wcstombs.c src/string/strchrnul.c src/string/strdup.c', DO NOT EDIT.
|
||||
// Code generated by 'ccgo -D__environ=environ -export-externs X -hide __syscall0,__syscall1,__syscall2,__syscall3,__syscall4,__syscall5,__syscall6 -nostdinc -nostdlib -o ../musl_windows_amd64.go -pkgname libc -static-locals-prefix _s -Iarch\x86_64 -Iarch/generic -Iobj/src/internal -Isrc/include -Isrc/internal -Iobj/include -Iinclude copyright.c src/ctype/isalnum.c src/ctype/isalpha.c src/ctype/isdigit.c src/ctype/islower.c src/ctype/isprint.c src/ctype/isspace.c src/ctype/isxdigit.c src/env/putenv.c src/env/setenv.c src/env/unsetenv.c src/multibyte/wcrtomb.c src/multibyte/wcsrtombs.c src/multibyte/wcstombs.c src/stdlib/bsearch.c src/string/strchrnul.c src/string/strdup.c', DO NOT EDIT.
|
||||
|
||||
package libc
|
||||
|
||||
|
|
@ -1062,6 +1062,26 @@ func Xwcstombs(tls *TLS, s uintptr, ws uintptr, n size_t) size_t { /* wcstombs.c
|
|||
return Xwcsrtombs(tls, s, bp, n, uintptr(0))
|
||||
}
|
||||
|
||||
func Xbsearch(tls *TLS, key uintptr, base uintptr, nel size_t, width size_t, cmp uintptr) uintptr { /* bsearch.c:3:6: */
|
||||
var try uintptr
|
||||
var sign int32
|
||||
for nel > uint64(0) {
|
||||
try = base + uintptr(width*(nel/uint64(2)))
|
||||
sign = (*struct {
|
||||
f func(*TLS, uintptr, uintptr) int32
|
||||
})(unsafe.Pointer(&struct{ uintptr }{cmp})).f(tls, key, try)
|
||||
if sign < 0 {
|
||||
nel = nel / uint64(2)
|
||||
} else if sign > 0 {
|
||||
base = try + uintptr(width)
|
||||
nel = nel - (nel/uint64(2) + uint64(1))
|
||||
} else {
|
||||
return try
|
||||
}
|
||||
}
|
||||
return uintptr(0)
|
||||
}
|
||||
|
||||
// Support signed or unsigned plain-char
|
||||
|
||||
// Implementation choices...
|
||||
|
|
|
|||
8
vendor/modernc.org/libc/netdb/capi_darwin_amd64.go
generated
vendored
8
vendor/modernc.org/libc/netdb/capi_darwin_amd64.go
generated
vendored
|
|
@ -2,4 +2,10 @@
|
|||
|
||||
package netdb
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set": {},
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
}
|
||||
|
|
|
|||
8
vendor/modernc.org/libc/netdb/capi_darwin_arm64.go
generated
vendored
8
vendor/modernc.org/libc/netdb/capi_darwin_arm64.go
generated
vendored
|
|
@ -2,4 +2,10 @@
|
|||
|
||||
package netdb
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
var CAPI = map[string]struct{}{
|
||||
"__darwin_check_fd_set": {},
|
||||
"__darwin_check_fd_set_overflow": {},
|
||||
"__darwin_fd_clr": {},
|
||||
"__darwin_fd_isset": {},
|
||||
"__darwin_fd_set": {},
|
||||
}
|
||||
|
|
|
|||
5
vendor/modernc.org/libc/netdb/capi_freebsd_386.go
generated
vendored
Normal file
5
vendor/modernc.org/libc/netdb/capi_freebsd_386.go
generated
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Code generated by 'ccgo netdb/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 netdb/netdb_freebsd_386.go -pkgname netdb', DO NOT EDIT.
|
||||
|
||||
package netdb
|
||||
|
||||
var CAPI = map[string]struct{}{}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue