diff options
Diffstat (limited to 'vendor/modernc.org/libc')
84 files changed, 38922 insertions, 121 deletions
diff --git a/vendor/modernc.org/libc/build_all_targets.sh b/vendor/modernc.org/libc/build_all_targets.sh index 3fb79cf4..6d278e41 100644 --- a/vendor/modernc.org/libc/build_all_targets.sh +++ b/vendor/modernc.org/libc/build_all_targets.sh @@ -2,42 +2,67 @@ set -e for tag in none dmesg libc.membrk libc.memgrind do echo "-tags=$tag" + echo "GOOS=darwin GOARCH=amd64" GOOS=darwin GOARCH=amd64 go build -tags=$tag -v ./... GOOS=darwin GOARCH=amd64 go test -tags=$tag -c -o /dev/null + echo "GOOS=darwin GOARCH=arm64" GOOS=darwin GOARCH=arm64 go build -tags=$tag -v ./... GOOS=darwin GOARCH=arm64 go test -tags=$tag -c -o /dev/null + echo "GOOS=freebsd GOARCH=386" GOOS=freebsd GOARCH=386 go build -tags=$tag -v ./... GOOS=freebsd GOARCH=386 go test -tags=$tag -c -o /dev/null + echo "GOOS=freebsd GOARCH=amd64" GOOS=freebsd GOARCH=amd64 go build -tags=$tag -v ./... GOOS=freebsd GOARCH=amd64 go test -tags=$tag -c -o /dev/null + echo "GOOS=freebsd GOARCH=arm" GOOS=freebsd GOARCH=arm go build -tags=$tag -v ./... GOOS=freebsd GOARCH=arm go test -tags=$tag -c -o /dev/null + echo "GOOS=linux GOARCH=386" GOOS=linux GOARCH=386 go build -tags=$tag -v ./... GOOS=linux GOARCH=386 go test -tags=$tag -c -o /dev/null + echo "GOOS=linux GOARCH=amd64" GOOS=linux GOARCH=amd64 go build -tags=$tag -v ./... GOOS=linux GOARCH=amd64 go test -tags=$tag -c -o /dev/null + echo "GOOS=linux GOARCH=arm" GOOS=linux GOARCH=arm go build -tags=$tag -v ./... GOOS=linux GOARCH=arm go test -tags=$tag -c -o /dev/null + echo "GOOS=linux GOARCH=arm64" GOOS=linux GOARCH=arm64 go build -tags=$tag -v ./... GOOS=linux GOARCH=arm64 go test -tags=$tag -c -o /dev/null + echo "GOOS=linux GOARCH=loong64" + GOOS=linux GOARCH=loong64 go build -tags=$tag -v ./... + GOOS=linux GOARCH=loong64 go test -tags=$tag -c -o /dev/null + echo "GOOS=linux GOARCH=ppc64le" + GOOS=linux GOARCH=ppc64le go build -tags=$tag -v ./... GOOS=linux GOARCH=ppc64le go test -tags=$tag -c -o /dev/null + echo "GOOS=linux GOARCH=riscv64" GOOS=linux GOARCH=riscv64 go build -tags=$tag -v ./... + GOOS=linux GOARCH=riscv64 go test -tags=$tag -c -o /dev/null + echo "GOOS=linux GOARCH=s390x" GOOS=linux GOARCH=s390x go build -tags=$tag -v ./... GOOS=linux GOARCH=s390x go test -tags=$tag -c -o /dev/null + echo "GOOS=netbsd GOARCH=amd64" GOOS=netbsd GOARCH=amd64 go build -tags=$tag -v ./... GOOS=netbsd GOARCH=amd64 go test -tags=$tag -c -o /dev/null + echo "GOOS=netbsd GOARCH=arm" GOOS=netbsd GOARCH=arm go build -tags=$tag -v ./... GOOS=netbsd GOARCH=arm go test -tags=$tag -c -o /dev/null + echo "GOOS=openbsd GOARCH=386" GOOS=openbsd GOARCH=386 go build -tags=$tag -v ./... GOOS=openbsd GOARCH=386 go test -tags=$tag -c -o /dev/null + echo "GOOS=openbsd GOARCH=amd64" GOOS=openbsd GOARCH=amd64 go build -tags=$tag -v ./... GOOS=openbsd GOARCH=amd64 go test -tags=$tag -c -o /dev/null + echo "GOOS=openbsd GOARCH=arm64" GOOS=openbsd GOARCH=arm64 go build -tags=$tag -v ./... GOOS=openbsd GOARCH=arm64 go test -tags=$tag -c -o /dev/null + echo "GOOS=windows GOARCH=386" GOOS=windows GOARCH=386 go build -tags=$tag -v ./... GOOS=windows GOARCH=386 go test -tags=$tag -c -o /dev/null + echo "GOOS=windows GOARCH=amd64" GOOS=windows GOARCH=amd64 go build -tags=$tag -v ./... GOOS=windows GOARCH=amd64 go test -tags=$tag -c -o /dev/null + echo "GOOS=windows GOARCH=arm64" GOOS=windows GOARCH=arm64 go build -tags=$tag -v ./... GOOS=windows GOARCH=arm64 go test -tags=$tag -c -o /dev/null done diff --git a/vendor/modernc.org/libc/capi_freebsd_386.go b/vendor/modernc.org/libc/capi_freebsd_386.go index fb198405..49a67bff 100644 --- a/vendor/modernc.org/libc/capi_freebsd_386.go +++ b/vendor/modernc.org/libc/capi_freebsd_386.go @@ -343,6 +343,7 @@ var CAPI = map[string]struct{}{ "poll": {}, "popen": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_freebsd_amd64.go b/vendor/modernc.org/libc/capi_freebsd_amd64.go index fb198405..49a67bff 100644 --- a/vendor/modernc.org/libc/capi_freebsd_amd64.go +++ b/vendor/modernc.org/libc/capi_freebsd_amd64.go @@ -343,6 +343,7 @@ var CAPI = map[string]struct{}{ "poll": {}, "popen": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_freebsd_arm.go b/vendor/modernc.org/libc/capi_freebsd_arm.go index fb198405..49a67bff 100644 --- a/vendor/modernc.org/libc/capi_freebsd_arm.go +++ b/vendor/modernc.org/libc/capi_freebsd_arm.go @@ -343,6 +343,7 @@ var CAPI = map[string]struct{}{ "poll": {}, "popen": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_freebsd_arm64.go b/vendor/modernc.org/libc/capi_freebsd_arm64.go index fb198405..49a67bff 100644 --- a/vendor/modernc.org/libc/capi_freebsd_arm64.go +++ b/vendor/modernc.org/libc/capi_freebsd_arm64.go @@ -343,6 +343,7 @@ var CAPI = map[string]struct{}{ "poll": {}, "popen": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_linux_386.go b/vendor/modernc.org/libc/capi_linux_386.go index 47cef2b5..98263426 100644 --- a/vendor/modernc.org/libc/capi_linux_386.go +++ b/vendor/modernc.org/libc/capi_linux_386.go @@ -339,6 +339,7 @@ var CAPI = map[string]struct{}{ "popen": {}, "posix_fadvise": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_linux_amd64.go b/vendor/modernc.org/libc/capi_linux_amd64.go index 3741ba1f..c1ae9d02 100644 --- a/vendor/modernc.org/libc/capi_linux_amd64.go +++ b/vendor/modernc.org/libc/capi_linux_amd64.go @@ -350,6 +350,7 @@ var CAPI = map[string]struct{}{ "popen": {}, "posix_fadvise": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_linux_arm.go b/vendor/modernc.org/libc/capi_linux_arm.go index 47cef2b5..98263426 100644 --- a/vendor/modernc.org/libc/capi_linux_arm.go +++ b/vendor/modernc.org/libc/capi_linux_arm.go @@ -339,6 +339,7 @@ var CAPI = map[string]struct{}{ "popen": {}, "posix_fadvise": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_linux_arm64.go b/vendor/modernc.org/libc/capi_linux_arm64.go index 47cef2b5..98263426 100644 --- a/vendor/modernc.org/libc/capi_linux_arm64.go +++ b/vendor/modernc.org/libc/capi_linux_arm64.go @@ -339,6 +339,7 @@ var CAPI = map[string]struct{}{ "popen": {}, "posix_fadvise": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_linux_loong64.go b/vendor/modernc.org/libc/capi_linux_loong64.go new file mode 100644 index 00000000..c1ae9d02 --- /dev/null +++ b/vendor/modernc.org/libc/capi_linux_loong64.go @@ -0,0 +1,528 @@ +// Code generated by 'go generate' - DO NOT EDIT. + +package libc // import "modernc.org/libc" + +var CAPI = map[string]struct{}{ + "_IO_putc": {}, + "___errno_location": {}, + "__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_llabs": {}, + "__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_b_loc": {}, + "__ctype_get_mb_cur_max": {}, + "__errno_location": {}, + "__floatscan": {}, + "__fpclassify": {}, + "__fpclassifyf": {}, + "__fpclassifyl": {}, + "__fsmu8": {}, + "__h_errno_location": {}, + "__inet_aton": {}, + "__intscan": {}, + "__isalnum_l": {}, + "__isalpha_l": {}, + "__isdigit_l": {}, + "__islower_l": {}, + "__isnan": {}, + "__isnanf": {}, + "__isnanl": {}, + "__isoc99_sscanf": {}, + "__isprint_l": {}, + "__isupper_l": {}, + "__isxdigit_l": {}, + "__lockfile": {}, + "__lookup_ipliteral": {}, + "__lookup_name": {}, + "__lookup_serv": {}, + "__shgetc": {}, + "__shlim": {}, + "__strncasecmp_l": {}, + "__sync_add_and_fetch_uint32": {}, + "__sync_sub_and_fetch_uint32": {}, + "__syscall1": {}, + "__syscall3": {}, + "__syscall4": {}, + "__toread": {}, + "__toread_needs_stdio_exit": {}, + "__uflow": {}, + "__unlockfile": {}, + "_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": {}, + "bsearch": {}, + "bzero": {}, + "calloc": {}, + "ceil": {}, + "ceilf": {}, + "cfgetospeed": {}, + "cfsetispeed": {}, + "cfsetospeed": {}, + "chdir": {}, + "chmod": {}, + "chown": {}, + "clock_gettime": {}, + "close": {}, + "closedir": {}, + "confstr": {}, + "connect": {}, + "copysign": {}, + "copysignf": {}, + "copysignl": {}, + "cos": {}, + "cosf": {}, + "cosh": {}, + "ctime": {}, + "ctime_r": {}, + "dlclose": {}, + "dlerror": {}, + "dlopen": {}, + "dlsym": {}, + "dup2": {}, + "dup3": {}, + "endpwent": {}, + "environ": {}, + "execvp": {}, + "exit": {}, + "exp": {}, + "fabs": {}, + "fabsf": {}, + "fabsl": {}, + "faccessat": {}, + "fchmod": {}, + "fchmodat": {}, + "fchown": {}, + "fchownat": {}, + "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": {}, + "fstatfs": {}, + "fsync": {}, + "ftell": {}, + "ftruncate": {}, + "ftruncate64": {}, + "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": {}, + "gethostbyname_r": {}, + "gethostname": {}, + "getnameinfo": {}, + "getpeername": {}, + "getpid": {}, + "getpwnam": {}, + "getpwnam_r": {}, + "getpwuid": {}, + "getpwuid_r": {}, + "getrandom": {}, + "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": {}, + "isupper": {}, + "iswalnum": {}, + "iswspace": {}, + "isxdigit": {}, + "kill": {}, + "ldexp": {}, + "link": {}, + "linkat": {}, + "listen": {}, + "llabs": {}, + "localeconv": {}, + "localtime": {}, + "localtime_r": {}, + "log": {}, + "log10": {}, + "log2": {}, + "longjmp": {}, + "lrand48": {}, + "lseek": {}, + "lseek64": {}, + "lstat": {}, + "lstat64": {}, + "malloc": {}, + "mblen": {}, + "mbrtowc": {}, + "mbsinit": {}, + "mbstowcs": {}, + "mbtowc": {}, + "memchr": {}, + "memcmp": {}, + "memcpy": {}, + "memmove": {}, + "memset": {}, + "mkdir": {}, + "mkdirat": {}, + "mkfifo": {}, + "mknod": {}, + "mknodat": {}, + "mkostemp": {}, + "mkstemp": {}, + "mkstemp64": {}, + "mkstemps": {}, + "mkstemps64": {}, + "mktime": {}, + "mmap": {}, + "mmap64": {}, + "modf": {}, + "mremap": {}, + "munmap": {}, + "nanf": {}, + "nanosleep": {}, + "nl_langinfo": {}, + "ntohs": {}, + "obstack_free": {}, + "obstack_vprintf": {}, + "open": {}, + "open64": {}, + "openat": {}, + "opendir": {}, + "openpty": {}, + "pathconf": {}, + "pause": {}, + "pclose": {}, + "perror": {}, + "pipe": {}, + "pipe2": {}, + "poll": {}, + "popen": {}, + "posix_fadvise": {}, + "pow": {}, + "pread": {}, + "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": {}, + "pwrite": {}, + "qsort": {}, + "raise": {}, + "rand": {}, + "rand_r": {}, + "random": {}, + "random_r": {}, + "read": {}, + "readdir": {}, + "readdir64": {}, + "readlink": {}, + "readlinkat": {}, + "readv": {}, + "realloc": {}, + "reallocarray": {}, + "realpath": {}, + "recv": {}, + "recvfrom": {}, + "recvmsg": {}, + "remove": {}, + "rename": {}, + "renameat2": {}, + "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": {}, + "strlcat": {}, + "strlcpy": {}, + "strlen": {}, + "strncasecmp": {}, + "strncat": {}, + "strncmp": {}, + "strncpy": {}, + "strnlen": {}, + "strpbrk": {}, + "strrchr": {}, + "strspn": {}, + "strstr": {}, + "strtod": {}, + "strtof": {}, + "strtoimax": {}, + "strtok": {}, + "strtol": {}, + "strtold": {}, + "strtoll": {}, + "strtoul": {}, + "strtoull": {}, + "strtoumax": {}, + "symlink": {}, + "symlinkat": {}, + "sysconf": {}, + "system": {}, + "tan": {}, + "tanh": {}, + "tcgetattr": {}, + "tcsendbreak": {}, + "tcsetattr": {}, + "time": {}, + "tmpfile": {}, + "tolower": {}, + "toupper": {}, + "trunc": {}, + "tzset": {}, + "umask": {}, + "uname": {}, + "ungetc": {}, + "unlink": {}, + "unlinkat": {}, + "unsetenv": {}, + "usleep": {}, + "utime": {}, + "utimensat": {}, + "utimes": {}, + "uuid_copy": {}, + "uuid_generate_random": {}, + "uuid_parse": {}, + "uuid_unparse": {}, + "vasprintf": {}, + "vfprintf": {}, + "vfscanf": {}, + "vprintf": {}, + "vsnprintf": {}, + "vsprintf": {}, + "vsscanf": {}, + "waitpid": {}, + "wcschr": {}, + "wctomb": {}, + "wcwidth": {}, + "write": {}, + "writev": {}, + "zero_struct_address": {}, +} diff --git a/vendor/modernc.org/libc/capi_linux_ppc64le.go b/vendor/modernc.org/libc/capi_linux_ppc64le.go index 3741ba1f..c1ae9d02 100644 --- a/vendor/modernc.org/libc/capi_linux_ppc64le.go +++ b/vendor/modernc.org/libc/capi_linux_ppc64le.go @@ -350,6 +350,7 @@ var CAPI = map[string]struct{}{ "popen": {}, "posix_fadvise": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_linux_riscv64.go b/vendor/modernc.org/libc/capi_linux_riscv64.go index 6defbe83..669f86ea 100644 --- a/vendor/modernc.org/libc/capi_linux_riscv64.go +++ b/vendor/modernc.org/libc/capi_linux_riscv64.go @@ -341,6 +341,7 @@ var CAPI = map[string]struct{}{ "popen": {}, "posix_fadvise": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_linux_s390x.go b/vendor/modernc.org/libc/capi_linux_s390x.go index 47cef2b5..98263426 100644 --- a/vendor/modernc.org/libc/capi_linux_s390x.go +++ b/vendor/modernc.org/libc/capi_linux_s390x.go @@ -339,6 +339,7 @@ var CAPI = map[string]struct{}{ "popen": {}, "posix_fadvise": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_netbsd_amd64.go b/vendor/modernc.org/libc/capi_netbsd_amd64.go index 680fd730..7f827399 100644 --- a/vendor/modernc.org/libc/capi_netbsd_amd64.go +++ b/vendor/modernc.org/libc/capi_netbsd_amd64.go @@ -338,6 +338,7 @@ var CAPI = map[string]struct{}{ "poll": {}, "popen": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_netbsd_arm.go b/vendor/modernc.org/libc/capi_netbsd_arm.go index 680fd730..7f827399 100644 --- a/vendor/modernc.org/libc/capi_netbsd_arm.go +++ b/vendor/modernc.org/libc/capi_netbsd_arm.go @@ -338,6 +338,7 @@ var CAPI = map[string]struct{}{ "poll": {}, "popen": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_openbsd_386.go b/vendor/modernc.org/libc/capi_openbsd_386.go index ea4fbda9..cf0ce496 100644 --- a/vendor/modernc.org/libc/capi_openbsd_386.go +++ b/vendor/modernc.org/libc/capi_openbsd_386.go @@ -349,6 +349,7 @@ var CAPI = map[string]struct{}{ "poll": {}, "popen": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_openbsd_amd64.go b/vendor/modernc.org/libc/capi_openbsd_amd64.go index 1c9327fc..90a27e1f 100644 --- a/vendor/modernc.org/libc/capi_openbsd_amd64.go +++ b/vendor/modernc.org/libc/capi_openbsd_amd64.go @@ -350,6 +350,7 @@ var CAPI = map[string]struct{}{ "poll": {}, "popen": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/capi_openbsd_arm64.go b/vendor/modernc.org/libc/capi_openbsd_arm64.go index 1c9327fc..90a27e1f 100644 --- a/vendor/modernc.org/libc/capi_openbsd_arm64.go +++ b/vendor/modernc.org/libc/capi_openbsd_arm64.go @@ -350,6 +350,7 @@ var CAPI = map[string]struct{}{ "poll": {}, "popen": {}, "pow": {}, + "pread": {}, "printf": {}, "pselect": {}, "pthread_attr_destroy": {}, diff --git a/vendor/modernc.org/libc/errno/capi_linux_loong64.go b/vendor/modernc.org/libc/errno/capi_linux_loong64.go new file mode 100644 index 00000000..75a92265 --- /dev/null +++ b/vendor/modernc.org/libc/errno/capi_linux_loong64.go @@ -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 -ignore-unsupported-alignment -o errno/errno_linux_amd64.go -pkgname errno', DO NOT EDIT. + +package errno + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/errno/errno_linux_loong64.go b/vendor/modernc.org/libc/errno/errno_linux_loong64.go new file mode 100644 index 00000000..000cb720 --- /dev/null +++ b/vendor/modernc.org/libc/errno/errno_linux_loong64.go @@ -0,0 +1,187 @@ +// 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 -ignore-unsupported-alignment -o errno/errno_linux_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 // errno-base.h:11:1: + EACCES = 13 // errno-base.h:17:1: + EADDRINUSE = 98 // errno.h:81:1: + EADDRNOTAVAIL = 99 // errno.h:82:1: + EADV = 68 // errno.h:51:1: + EAFNOSUPPORT = 97 // errno.h:80:1: + EAGAIN = 11 // errno-base.h:15:1: + EALREADY = 114 // errno.h:97:1: + EBADE = 52 // errno.h:33:1: + EBADF = 9 // errno-base.h:13:1: + EBADFD = 77 // errno.h:60:1: + EBADMSG = 74 // errno.h:57:1: + EBADR = 53 // errno.h:34:1: + EBADRQC = 56 // errno.h:37:1: + EBADSLT = 57 // errno.h:38:1: + EBFONT = 59 // errno.h:42:1: + EBUSY = 16 // errno-base.h:20:1: + ECANCELED = 125 // errno.h:109:1: + ECHILD = 10 // errno-base.h:14:1: + ECHRNG = 44 // errno.h:25:1: + ECOMM = 70 // errno.h:53:1: + ECONNABORTED = 103 // errno.h:86:1: + ECONNREFUSED = 111 // errno.h:94:1: + ECONNRESET = 104 // errno.h:87:1: + EDEADLK = 35 // errno.h:7:1: + EDEADLOCK = 35 // errno.h:40:1: + EDESTADDRREQ = 89 // errno.h:72:1: + EDOM = 33 // errno-base.h:37:1: + EDOTDOT = 73 // errno.h:56:1: + EDQUOT = 122 // errno.h:105:1: + EEXIST = 17 // errno-base.h:21:1: + EFAULT = 14 // errno-base.h:18:1: + EFBIG = 27 // errno-base.h:31:1: + EHOSTDOWN = 112 // errno.h:95:1: + EHOSTUNREACH = 113 // errno.h:96:1: + EHWPOISON = 133 // errno.h:121:1: + EIDRM = 43 // errno.h:24:1: + EILSEQ = 84 // errno.h:67:1: + EINPROGRESS = 115 // errno.h:98:1: + EINTR = 4 // errno-base.h:8:1: + EINVAL = 22 // errno-base.h:26:1: + EIO = 5 // errno-base.h:9:1: + EISCONN = 106 // errno.h:89:1: + EISDIR = 21 // errno-base.h:25:1: + EISNAM = 120 // errno.h:103:1: + EKEYEXPIRED = 127 // errno.h:111:1: + EKEYREJECTED = 129 // errno.h:113:1: + EKEYREVOKED = 128 // errno.h:112:1: + EL2HLT = 51 // errno.h:32:1: + EL2NSYNC = 45 // errno.h:26:1: + EL3HLT = 46 // errno.h:27:1: + EL3RST = 47 // errno.h:28:1: + ELIBACC = 79 // errno.h:62:1: + ELIBBAD = 80 // errno.h:63:1: + ELIBEXEC = 83 // errno.h:66:1: + ELIBMAX = 82 // errno.h:65:1: + ELIBSCN = 81 // errno.h:64:1: + ELNRNG = 48 // errno.h:29:1: + ELOOP = 40 // errno.h:21:1: + EMEDIUMTYPE = 124 // errno.h:108:1: + EMFILE = 24 // errno-base.h:28:1: + EMLINK = 31 // errno-base.h:35:1: + EMSGSIZE = 90 // errno.h:73:1: + EMULTIHOP = 72 // errno.h:55:1: + ENAMETOOLONG = 36 // errno.h:8:1: + ENAVAIL = 119 // errno.h:102:1: + ENETDOWN = 100 // errno.h:83:1: + ENETRESET = 102 // errno.h:85:1: + ENETUNREACH = 101 // errno.h:84:1: + ENFILE = 23 // errno-base.h:27:1: + ENOANO = 55 // errno.h:36:1: + ENOBUFS = 105 // errno.h:88:1: + ENOCSI = 50 // errno.h:31:1: + ENODATA = 61 // errno.h:44:1: + ENODEV = 19 // errno-base.h:23:1: + ENOENT = 2 // errno-base.h:6:1: + ENOEXEC = 8 // errno-base.h:12:1: + ENOKEY = 126 // errno.h:110:1: + ENOLCK = 37 // errno.h:9:1: + ENOLINK = 67 // errno.h:50:1: + ENOMEDIUM = 123 // errno.h:107:1: + ENOMEM = 12 // errno-base.h:16:1: + ENOMSG = 42 // errno.h:23:1: + ENONET = 64 // errno.h:47:1: + ENOPKG = 65 // errno.h:48:1: + ENOPROTOOPT = 92 // errno.h:75:1: + ENOSPC = 28 // errno-base.h:32:1: + ENOSR = 63 // errno.h:46:1: + ENOSTR = 60 // errno.h:43:1: + ENOSYS = 38 // errno.h:18:1: + ENOTBLK = 15 // errno-base.h:19:1: + ENOTCONN = 107 // errno.h:90:1: + ENOTDIR = 20 // errno-base.h:24:1: + ENOTEMPTY = 39 // errno.h:20:1: + ENOTNAM = 118 // errno.h:101:1: + ENOTRECOVERABLE = 131 // errno.h:117:1: + ENOTSOCK = 88 // errno.h:71:1: + ENOTSUP = 95 // errno.h:30:1: + ENOTTY = 25 // errno-base.h:29:1: + ENOTUNIQ = 76 // errno.h:59:1: + ENXIO = 6 // errno-base.h:10:1: + EOPNOTSUPP = 95 // errno.h:78:1: + EOVERFLOW = 75 // errno.h:58:1: + EOWNERDEAD = 130 // errno.h:116:1: + EPERM = 1 // errno-base.h:5:1: + EPFNOSUPPORT = 96 // errno.h:79:1: + EPIPE = 32 // errno-base.h:36:1: + EPROTO = 71 // errno.h:54:1: + EPROTONOSUPPORT = 93 // errno.h:76:1: + EPROTOTYPE = 91 // errno.h:74:1: + ERANGE = 34 // errno-base.h:38:1: + EREMCHG = 78 // errno.h:61:1: + EREMOTE = 66 // errno.h:49:1: + EREMOTEIO = 121 // errno.h:104:1: + ERESTART = 85 // errno.h:68:1: + ERFKILL = 132 // errno.h:119:1: + EROFS = 30 // errno-base.h:34:1: + ESHUTDOWN = 108 // errno.h:91:1: + ESOCKTNOSUPPORT = 94 // errno.h:77:1: + ESPIPE = 29 // errno-base.h:33:1: + ESRCH = 3 // errno-base.h:7:1: + ESRMNT = 69 // errno.h:52:1: + ESTALE = 116 // errno.h:99:1: + ESTRPIPE = 86 // errno.h:69:1: + ETIME = 62 // errno.h:45:1: + ETIMEDOUT = 110 // errno.h:93:1: + ETOOMANYREFS = 109 // errno.h:92:1: + ETXTBSY = 26 // errno-base.h:30:1: + EUCLEAN = 117 // errno.h:100:1: + EUNATCH = 49 // errno.h:30:1: + EUSERS = 87 // errno.h:70:1: + EWOULDBLOCK = 11 // errno.h:22:1: + EXDEV = 18 // errno-base.h:22:1: + EXFULL = 54 // errno.h:35:1: + X_ASM_GENERIC_ERRNO_BASE_H = 0 // errno-base.h:3:1: + X_ASM_GENERIC_ERRNO_H = 0 // errno.h:3:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_ERRNO_H = 1 // errno.h:20:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_ERRNO_H = 1 // errno.h:23:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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: */ diff --git a/vendor/modernc.org/libc/fcntl/capi_linux_loong64.go b/vendor/modernc.org/libc/fcntl/capi_linux_loong64.go new file mode 100644 index 00000000..9db297f1 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fcntl/fcntl_linux_loong64.go b/vendor/modernc.org/libc/fcntl/fcntl_linux_loong64.go new file mode 100644 index 00000000..8de6ac32 --- /dev/null +++ b/vendor/modernc.org/libc/fcntl/fcntl_linux_loong64.go @@ -0,0 +1,1087 @@ +// Code generated by 'ccgo fcntl/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o fcntl/fcntl_linux_amd64.go -pkgname fcntl', DO NOT EDIT. + +package fcntl + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AT_EACCESS = 0x200 // fcntl-linux.h:388:1: + AT_FDCWD = -100 // fcntl-linux.h:371:1: + AT_REMOVEDIR = 0x200 // fcntl-linux.h:375:1: + AT_SYMLINK_FOLLOW = 0x400 // fcntl-linux.h:377:1: + AT_SYMLINK_NOFOLLOW = 0x100 // fcntl-linux.h:374:1: + FAPPEND = 1024 // fcntl-linux.h:304:1: + FASYNC = 8192 // fcntl-linux.h:306:1: + FD_CLOEXEC = 1 // fcntl-linux.h:219:1: + FFSYNC = 1052672 // fcntl-linux.h:305:1: + FNDELAY = 2048 // fcntl-linux.h:308:1: + FNONBLOCK = 2048 // fcntl-linux.h:307:1: + F_DUPFD = 0 // fcntl-linux.h:167:1: + F_DUPFD_CLOEXEC = 1030 // fcntl-linux.h:214:1: + F_EXLCK = 4 // fcntl-linux.h:231:1: + F_GETFD = 1 // fcntl-linux.h:168:1: + F_GETFL = 3 // fcntl-linux.h:170:1: + F_GETLK = 5 // fcntl-linux.h:109:1: + F_GETLK64 = 5 // fcntl.h:29:1: + F_GETOWN = 9 // fcntl-linux.h:180:1: + F_LOCK = 1 // fcntl.h:238:1: + F_OK = 0 // fcntl.h:131:1: + F_RDLCK = 0 // fcntl-linux.h:223:1: + F_SETFD = 2 // fcntl-linux.h:169:1: + F_SETFL = 4 // fcntl-linux.h:171:1: + F_SETLK = 6 // fcntl-linux.h:110:1: + F_SETLK64 = 6 // fcntl.h:30:1: + F_SETLKW = 7 // fcntl-linux.h:111:1: + F_SETLKW64 = 7 // fcntl.h:31:1: + F_SETOWN = 8 // fcntl-linux.h:179:1: + F_SHLCK = 8 // fcntl-linux.h:232:1: + F_TEST = 3 // fcntl.h:240:1: + F_TLOCK = 2 // fcntl.h:239:1: + F_ULOCK = 0 // fcntl.h:237:1: + F_UNLCK = 2 // fcntl-linux.h:225:1: + F_WRLCK = 1 // fcntl-linux.h:224:1: + LOCK_EX = 2 // fcntl-linux.h:238:1: + LOCK_NB = 4 // fcntl-linux.h:239:1: + LOCK_SH = 1 // fcntl-linux.h:237:1: + LOCK_UN = 8 // fcntl-linux.h:241:1: + O_ACCMODE = 0003 // fcntl-linux.h:42:1: + O_APPEND = 02000 // fcntl-linux.h:59:1: + O_ASYNC = 020000 // fcntl-linux.h:72:1: + O_CLOEXEC = 524288 // fcntl-linux.h:144:1: + O_CREAT = 0100 // fcntl-linux.h:47:1: + O_DIRECTORY = 65536 // fcntl-linux.h:142:1: + O_DSYNC = 4096 // fcntl-linux.h:158:1: + O_EXCL = 0200 // fcntl-linux.h:50:1: + O_FSYNC = 1052672 // fcntl-linux.h:70:1: + O_NDELAY = 2048 // fcntl-linux.h:65:1: + O_NOCTTY = 0400 // fcntl-linux.h:53:1: + O_NOFOLLOW = 131072 // fcntl-linux.h:143:1: + O_NONBLOCK = 04000 // fcntl-linux.h:62:1: + O_RDONLY = 00 // fcntl-linux.h:43:1: + O_RDWR = 02 // fcntl-linux.h:45:1: + O_RSYNC = 1052672 // fcntl-linux.h:162:1: + O_SYNC = 04010000 // fcntl-linux.h:68:1: + O_TRUNC = 01000 // fcntl-linux.h:56:1: + O_WRONLY = 01 // fcntl-linux.h:44:1: + POSIX_FADV_DONTNEED = 4 // fcntl-linux.h:321:1: + POSIX_FADV_NOREUSE = 5 // fcntl-linux.h:322:1: + POSIX_FADV_NORMAL = 0 // fcntl-linux.h:317:1: + POSIX_FADV_RANDOM = 1 // fcntl-linux.h:318:1: + POSIX_FADV_SEQUENTIAL = 2 // fcntl-linux.h:319:1: + POSIX_FADV_WILLNEED = 3 // fcntl-linux.h:320:1: + R_OK = 4 // fcntl.h:128:1: + SEEK_CUR = 1 // fcntl.h:138:1: + SEEK_END = 2 // fcntl.h:139:1: + SEEK_SET = 0 // fcntl.h:137:1: + S_IFBLK = 24576 // fcntl.h:83:1: + S_IFCHR = 8192 // fcntl.h:82:1: + S_IFDIR = 16384 // fcntl.h:81:1: + S_IFIFO = 4096 // fcntl.h:86:1: + S_IFLNK = 40960 // fcntl.h:89:1: + S_IFMT = 61440 // fcntl.h:80:1: + S_IFREG = 32768 // fcntl.h:84:1: + S_IFSOCK = 49152 // fcntl.h:92:1: + S_IRGRP = 32 // fcntl.h:111:1: + S_IROTH = 4 // fcntl.h:117:1: + S_IRUSR = 256 // fcntl.h:105:1: + S_IRWXG = 56 // fcntl.h:115:1: + S_IRWXO = 7 // fcntl.h:121:1: + S_IRWXU = 448 // fcntl.h:109:1: + S_ISGID = 1024 // fcntl.h:98:1: + S_ISUID = 2048 // fcntl.h:97:1: + S_ISVTX = 512 // fcntl.h:102:1: + S_IWGRP = 16 // fcntl.h:112:1: + S_IWOTH = 2 // fcntl.h:118:1: + S_IWUSR = 128 // fcntl.h:106:1: + S_IXGRP = 8 // fcntl.h:113:1: + S_IXOTH = 1 // fcntl.h:119:1: + S_IXUSR = 64 // fcntl.h:107:1: + UTIME_NOW = 1073741823 // stat.h:206:1: + UTIME_OMIT = 1073741822 // stat.h:207:1: + W_OK = 2 // fcntl.h:129:1: + X_OK = 1 // fcntl.h:130:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_STAT_H = 1 // stat.h:23:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FCNTL_H = 1 // fcntl.h:23:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:284:1: + X_MKNOD_VER_LINUX = 0 // stat.h:41:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_STATBUF_ST_BLKSIZE = 0 // stat.h:172:1: + X_STATBUF_ST_NSEC = 0 // stat.h:175:1: + X_STATBUF_ST_RDEV = 0 // stat.h:173:1: + X_STAT_VER = 1 // stat.h:44:1: + X_STAT_VER_KERNEL = 0 // stat.h:37:1: + X_STAT_VER_LINUX = 1 // stat.h:38:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 6.5 File Control Operations <fcntl.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// This must be early so <bits/fcntl.h> can define types winningly. + +// Get __mode_t, __dev_t and __off_t . +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// Get the definitions of O_*, F_*, FD_*: all the +// numbers and flag bits for `open', `fcntl', et al. +// O_*, F_*, FD_* bit values for Linux/x86. +// Copyright (C) 2001-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Not necessary, we always have 64-bit offsets. + +type Flock = struct { + Fl_type int16 + Fl_whence int16 + F__ccgo_pad1 [4]byte + Fl_start X__off64_t + Fl_len X__off64_t + Fl_pid X__pid_t + F__ccgo_pad2 [4]byte +} /* fcntl.h:35:1 */ + +// Include generic Linux declarations. +// O_*, F_*, FD_* bit values for Linux. +// Copyright (C) 2001-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This file contains shared definitions between Linux architectures +// and is included by <bits/fcntl.h> to declare them. The various +// #ifndef cases allow the architecture specific file to define those +// values with different values. +// +// A minimal <bits/fcntl.h> contains just: +// +// struct flock {...} +// #ifdef __USE_LARGEFILE64 +// struct flock64 {...} +// #endif +// #include <bits/fcntl-linux.h> + +// open/fcntl. + +// open file description locks. +// +// Usually record locks held by a process are released on *any* close and are +// not inherited across a fork. +// +// These cmd values will set locks that conflict with process-associated record +// locks, but are "owned" by the opened file description, not the process. +// This means that they are inherited across fork or clone with CLONE_FILES +// like BSD (flock) locks, and they are only released automatically when the +// last reference to the the file description against which they were acquired +// is put. + +// For now, Linux has no separate synchronicity options for read +// operations. We define O_RSYNC therefore as the same as O_SYNC +// since this is a superset. + +// Values for the second argument to `fcntl'. + +// For F_[GET|SET]FD. + +// For posix fcntl() and `l_type' field of a `struct flock' for lockf(). + +// For old implementation of BSD flock. + +// Operations for BSD flock, also used by the kernel implementation. + +// Define some more compatibility macros to be backward compatible with +// BSD systems which did not managed to hide these kernel macros. + +// Advise to `posix_fadvise'. + +// Values for `*at' functions. + +// Detect if open needs mode as a third argument (or for openat as a fourth +// argument). + +// POSIX.1-2001 specifies that these types are defined by <fcntl.h>. +// +// Earlier POSIX standards permitted any type ending in `_t' to be defined +// by any POSIX header, so we don't conditionalize the definitions here. +type Mode_t = X__mode_t /* fcntl.h:50:18 */ + +type Off_t = X__off64_t /* fcntl.h:58:19 */ + +type Pid_t = X__pid_t /* fcntl.h:69:17 */ + +// For XPG all symbols from <sys/stat.h> should also be available. +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// i386/x86_64 are little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +// Copyright (C) 1999-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Versions of the `struct stat' data structure. + +// x86-64 versions of the `xmknod' interface. + +type Stat = struct { + Fst_dev X__dev_t + Fst_ino X__ino_t + Fst_nlink X__nlink_t + Fst_mode X__mode_t + Fst_uid X__uid_t + Fst_gid X__gid_t + F__pad0 int32 + Fst_rdev X__dev_t + Fst_size X__off_t + Fst_blksize X__blksize_t + Fst_blocks X__blkcnt_t + Fst_atim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_mtim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_ctim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + F__glibc_reserved [3]X__syscall_slong_t +} /* stat.h:46:1 */ + +// Define some inlines helping to catch common problems. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/fts/capi_linux_loong64.go b/vendor/modernc.org/libc/fts/capi_linux_loong64.go new file mode 100644 index 00000000..5dc389ba --- /dev/null +++ b/vendor/modernc.org/libc/fts/capi_linux_loong64.go @@ -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 -ignore-unsupported-alignment -o fts/fts_linux_amd64.go -pkgname fts', DO NOT EDIT. + +package fts + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/fts/fts_linux_loong64.go b/vendor/modernc.org/libc/fts/fts_linux_loong64.go new file mode 100644 index 00000000..e12eb02c --- /dev/null +++ b/vendor/modernc.org/libc/fts/fts_linux_loong64.go @@ -0,0 +1,1904 @@ +// 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 -ignore-unsupported-alignment -o fts/fts_linux_amd64.go -pkgname fts', DO NOT EDIT. + +package fts + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:195:1: + ALLPERMS = 4095 // stat.h:196:1: + BIG_ENDIAN = 4321 // endian.h:28:1: + BYTE_ORDER = 1234 // endian.h:30:1: + DEFFILEMODE = 438 // stat.h:197:1: + FD_SETSIZE = 1024 // select.h:73:1: + FTS_AGAIN = 1 // fts.h:139:1: + FTS_COMFOLLOW = 0x0001 // fts.h:68:1: + FTS_D = 1 // fts.h:119:1: + FTS_DC = 2 // fts.h:120:1: + FTS_DEFAULT = 3 // fts.h:121:1: + FTS_DNR = 4 // fts.h:122:1: + FTS_DONTCHDIR = 0x01 // fts.h:135:1: + FTS_DOT = 5 // fts.h:123:1: + FTS_DP = 6 // fts.h:124:1: + FTS_ERR = 7 // fts.h:125:1: + FTS_F = 8 // fts.h:126:1: + FTS_FOLLOW = 2 // fts.h:140:1: + FTS_INIT = 9 // fts.h:127:1: + FTS_LOGICAL = 0x0002 // fts.h:69:1: + FTS_NAMEONLY = 0x0100 // fts.h:78:1: + FTS_NOCHDIR = 0x0004 // fts.h:70:1: + FTS_NOINSTR = 3 // fts.h:141:1: + FTS_NOSTAT = 0x0008 // fts.h:71:1: + FTS_NS = 10 // fts.h:128:1: + FTS_NSOK = 11 // fts.h:129:1: + FTS_OPTIONMASK = 0x00ff // fts.h:76:1: + FTS_PHYSICAL = 0x0010 // fts.h:72:1: + FTS_ROOTLEVEL = 0 // fts.h:116:1: + FTS_ROOTPARENTLEVEL = -1 // fts.h:115:1: + FTS_SEEDOT = 0x0020 // fts.h:73:1: + FTS_SKIP = 4 // fts.h:142:1: + FTS_SL = 12 // fts.h:130:1: + FTS_SLNONE = 13 // fts.h:131:1: + FTS_STOP = 0x0200 // fts.h:79:1: + FTS_SYMFOLLOW = 0x02 // fts.h:136:1: + FTS_W = 14 // fts.h:132:1: + FTS_WHITEOUT = 0x0080 // fts.h:75:1: + FTS_XDEV = 0x0040 // fts.h:74:1: + LITTLE_ENDIAN = 1234 // endian.h:27:1: + PDP_ENDIAN = 3412 // endian.h:29:1: + S_BLKSIZE = 512 // stat.h:199:1: + S_IEXEC = 64 // stat.h:177:1: + S_IFBLK = 24576 // stat.h:107:1: + S_IFCHR = 8192 // stat.h:106:1: + S_IFDIR = 16384 // stat.h:105:1: + S_IFIFO = 4096 // stat.h:110:1: + S_IFLNK = 40960 // stat.h:113:1: + S_IFMT = 61440 // stat.h:104:1: + S_IFREG = 32768 // stat.h:108:1: + S_IFSOCK = 49152 // stat.h:117:1: + S_IREAD = 256 // stat.h:175:1: + S_IRGRP = 32 // stat.h:180:1: + S_IROTH = 4 // stat.h:186:1: + S_IRUSR = 256 // stat.h:168:1: + S_IRWXG = 56 // stat.h:184:1: + S_IRWXO = 7 // stat.h:190:1: + S_IRWXU = 448 // stat.h:172:1: + S_ISGID = 1024 // stat.h:161:1: + S_ISUID = 2048 // stat.h:160:1: + S_ISVTX = 512 // stat.h:165:1: + S_IWGRP = 16 // stat.h:181:1: + S_IWOTH = 2 // stat.h:187:1: + S_IWRITE = 128 // stat.h:176:1: + S_IWUSR = 128 // stat.h:169:1: + S_IXGRP = 8 // stat.h:182:1: + S_IXOTH = 1 // stat.h:188:1: + S_IXUSR = 64 // stat.h:170:1: + UTIME_NOW = 1073741823 // stat.h:206:1: + UTIME_OMIT = 1073741822 // stat.h:207:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1: + X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1: + X_BITS_STAT_H = 1 // stat.h:23:1: + X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_ENDIAN_H = 1 // endian.h:19:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_FTS_H = 1 // fts.h:51:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LP64 = 1 // <predefined>:284:1: + X_MKNOD_VER = 0 // stat.h:390:1: + X_MKNOD_VER_LINUX = 0 // stat.h:41:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STATBUF_ST_BLKSIZE = 0 // stat.h:172:1: + X_STATBUF_ST_NSEC = 0 // stat.h:175:1: + X_STATBUF_ST_RDEV = 0 // stat.h:173:1: + X_STAT_VER = 1 // stat.h:44:1: + X_STAT_VER_KERNEL = 0 // stat.h:37:1: + X_STAT_VER_LINUX = 1 // stat.h:38:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SELECT_H = 1 // select.h:22:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_SYS_STAT_H = 1 // stat.h:23:1: + X_SYS_TYPES_H = 1 // types.h:23:1: + X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1: + X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// A time value that is accurate to the nearest +// +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of <linux/posix_types.h> define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 5.6 File Characteristics <sys/stat.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// NB: Include guard matches what <linux/time.h> uses. + +// The Single Unix specification says that some more types are +// available here. + +// Copyright (C) 1999-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Versions of the `struct stat' data structure. + +// x86-64 versions of the `xmknod' interface. + +type Stat = struct { + Fst_dev X__dev_t + Fst_ino X__ino_t + Fst_nlink X__nlink_t + Fst_mode X__mode_t + Fst_uid X__uid_t + Fst_gid X__gid_t + F__pad0 int32 + Fst_rdev X__dev_t + Fst_size X__off_t + Fst_blksize X__blksize_t + Fst_blocks X__blkcnt_t + Fst_atim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_mtim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_ctim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + F__glibc_reserved [3]X__syscall_slong_t +} /* stat.h:46:1 */ + +// File tree traversal functions declarations. +// Copyright (C) 1994-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (c) 1989, 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. +// 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. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> + +type X_ftsent = struct { + Ffts_cycle uintptr + Ffts_parent uintptr + Ffts_link uintptr + Ffts_number int64 + Ffts_pointer uintptr + Ffts_accpath uintptr + Ffts_path uintptr + Ffts_errno int32 + Ffts_symfd int32 + Ffts_pathlen uint16 + Ffts_namelen uint16 + F__ccgo_pad1 [4]byte + Ffts_ino Ino_t + Ffts_dev Dev_t + Ffts_nlink Nlink_t + Ffts_level int16 + Ffts_info uint16 + Ffts_flags uint16 + Ffts_instr uint16 + Ffts_statp uintptr + Ffts_name [1]int8 + F__ccgo_pad2 [7]byte +} /* fts.h:58:2 */ + +// File tree traversal functions declarations. +// Copyright (C) 1994-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (c) 1989, 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. +// 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. +// +// @(#)fts.h 8.3 (Berkeley) 8/14/94 + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> + +type FTS = struct { + Ffts_cur uintptr + Ffts_child uintptr + Ffts_array uintptr + Ffts_dev Dev_t + Ffts_path uintptr + Ffts_rfd int32 + Ffts_pathlen int32 + Ffts_nitems int32 + F__ccgo_pad1 [4]byte + Ffts_compar uintptr + Ffts_options int32 + F__ccgo_pad2 [4]byte +} /* fts.h:81:3 */ + +type FTSENT = X_ftsent /* fts.h:147:3 */ + +var _ int8 /* gen.c:5:13: */ diff --git a/vendor/modernc.org/libc/grp/capi_linux_loong64.go b/vendor/modernc.org/libc/grp/capi_linux_loong64.go new file mode 100644 index 00000000..39c1b899 --- /dev/null +++ b/vendor/modernc.org/libc/grp/capi_linux_loong64.go @@ -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 -ignore-unsupported-alignment -o grp/grp_linux_amd64.go -pkgname grp', DO NOT EDIT. + +package grp + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/grp/grp_linux_loong64.go b/vendor/modernc.org/libc/grp/grp_linux_loong64.go new file mode 100644 index 00000000..2a52cae7 --- /dev/null +++ b/vendor/modernc.org/libc/grp/grp_linux_loong64.go @@ -0,0 +1,783 @@ +// 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 -ignore-unsupported-alignment -o grp/grp_linux_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 ( + NSS_BUFLEN_GROUP = 1024 // grp.h:114:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_GRP_H = 1 // grp.h:23:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 9.2.1 Group Database Access <grp.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// For the Single Unix specification we must define this type here. +type Gid_t = X__gid_t /* grp.h:37:17 */ + +// The group structure. +type Group = struct { + Fgr_name uintptr + Fgr_passwd uintptr + Fgr_gid X__gid_t + F__ccgo_pad1 [4]byte + Fgr_mem uintptr +} /* grp.h:42:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/langinfo/capi_linux_loong64.go b/vendor/modernc.org/libc/langinfo/capi_linux_loong64.go new file mode 100644 index 00000000..f9c787ba --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/capi_linux_loong64.go @@ -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 -ignore-unsupported-alignment -o langinfo/langinfo_linux_amd64.go -pkgname langinfo', DO NOT EDIT. + +package langinfo + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/langinfo/langinfo_linux_loong64.go b/vendor/modernc.org/libc/langinfo/langinfo_linux_loong64.go new file mode 100644 index 00000000..dee83b91 --- /dev/null +++ b/vendor/modernc.org/libc/langinfo/langinfo_linux_loong64.go @@ -0,0 +1,1058 @@ +// 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 -ignore-unsupported-alignment -o langinfo/langinfo_linux_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 ( + NL_CAT_LOCALE = 1 // nl_types.h:27:1: + NL_SETD = 1 // nl_types.h:24:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_LOCALE_H = 1 // locale.h:24:1: + X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1: + X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LANGINFO_H = 1 // langinfo.h:20:1: + X_LP64 = 1 // <predefined>:284:1: + X_NL_TYPES_H = 1 // nl_types.h:19:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// Definition of locale category symbol values. +// Copyright (C) 2001-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Construct an `nl_item' value for `nl_langinfo' from a locale category +// (LC_*) and an item index within the category. Some code may depend on +// the item values within a category increasing monotonically with the +// indices. + +// Extract the category and item index from a constructed `nl_item' value. + +// Enumeration of locale items that can be queried with `nl_langinfo'. +const ( /* langinfo.h:41:1: */ + // LC_TIME category: date and time formatting. + + // Abbreviated days of the week. + ABDAY_1 = 131072 // Sun + ABDAY_2 = 131073 + ABDAY_3 = 131074 + ABDAY_4 = 131075 + ABDAY_5 = 131076 + ABDAY_6 = 131077 + ABDAY_7 = 131078 + + // Long-named days of the week. + DAY_1 = 131079 // Sunday + DAY_2 = 131080 // Monday + DAY_3 = 131081 // Tuesday + DAY_4 = 131082 // Wednesday + DAY_5 = 131083 // Thursday + DAY_6 = 131084 // Friday + DAY_7 = 131085 // Saturday + + // Abbreviated month names, in the grammatical form used when the month + // is a part of a complete date. + ABMON_1 = 131086 // Jan + ABMON_2 = 131087 + ABMON_3 = 131088 + ABMON_4 = 131089 + ABMON_5 = 131090 + ABMON_6 = 131091 + ABMON_7 = 131092 + ABMON_8 = 131093 + ABMON_9 = 131094 + ABMON_10 = 131095 + ABMON_11 = 131096 + ABMON_12 = 131097 + + // Long month names, in the grammatical form used when the month + // is a part of a complete date. + MON_1 = 131098 // January + MON_2 = 131099 + MON_3 = 131100 + MON_4 = 131101 + MON_5 = 131102 + MON_6 = 131103 + MON_7 = 131104 + MON_8 = 131105 + MON_9 = 131106 + MON_10 = 131107 + MON_11 = 131108 + MON_12 = 131109 + + AM_STR = 131110 // Ante meridiem string. + PM_STR = 131111 // Post meridiem string. + + D_T_FMT = 131112 // Date and time format for strftime. + D_FMT = 131113 // Date format for strftime. + T_FMT = 131114 // Time format for strftime. + T_FMT_AMPM = 131115 // 12-hour time format for strftime. + + ERA = 131116 // Alternate era. + X__ERA_YEAR = 131117 // Year in alternate era format. + ERA_D_FMT = 131118 // Date in alternate era format. + ALT_DIGITS = 131119 // Alternate symbols for digits. + ERA_D_T_FMT = 131120 // Date and time in alternate era format. + ERA_T_FMT = 131121 // Time in alternate era format. + + X_NL_TIME_ERA_NUM_ENTRIES = 131122 // Number entries in the era arrays. + X_NL_TIME_ERA_ENTRIES = 131123 // Structure with era entries in usable form. + + X_NL_WABDAY_1 = 131124 // Sun + X_NL_WABDAY_2 = 131125 + X_NL_WABDAY_3 = 131126 + X_NL_WABDAY_4 = 131127 + X_NL_WABDAY_5 = 131128 + X_NL_WABDAY_6 = 131129 + X_NL_WABDAY_7 = 131130 + + // Long-named days of the week. + X_NL_WDAY_1 = 131131 // Sunday + X_NL_WDAY_2 = 131132 // Monday + X_NL_WDAY_3 = 131133 // Tuesday + X_NL_WDAY_4 = 131134 // Wednesday + X_NL_WDAY_5 = 131135 // Thursday + X_NL_WDAY_6 = 131136 // Friday + X_NL_WDAY_7 = 131137 // Saturday + + // Abbreviated month names, in the grammatical form used when the month + // is a part of a complete date. + X_NL_WABMON_1 = 131138 // Jan + X_NL_WABMON_2 = 131139 + X_NL_WABMON_3 = 131140 + X_NL_WABMON_4 = 131141 + X_NL_WABMON_5 = 131142 + X_NL_WABMON_6 = 131143 + X_NL_WABMON_7 = 131144 + X_NL_WABMON_8 = 131145 + X_NL_WABMON_9 = 131146 + X_NL_WABMON_10 = 131147 + X_NL_WABMON_11 = 131148 + X_NL_WABMON_12 = 131149 + + // Long month names, in the grammatical form used when the month + // is a part of a complete date. + X_NL_WMON_1 = 131150 // January + X_NL_WMON_2 = 131151 + X_NL_WMON_3 = 131152 + X_NL_WMON_4 = 131153 + X_NL_WMON_5 = 131154 + X_NL_WMON_6 = 131155 + X_NL_WMON_7 = 131156 + X_NL_WMON_8 = 131157 + X_NL_WMON_9 = 131158 + X_NL_WMON_10 = 131159 + X_NL_WMON_11 = 131160 + X_NL_WMON_12 = 131161 + + X_NL_WAM_STR = 131162 // Ante meridiem string. + X_NL_WPM_STR = 131163 // Post meridiem string. + + X_NL_WD_T_FMT = 131164 // Date and time format for strftime. + X_NL_WD_FMT = 131165 // Date format for strftime. + X_NL_WT_FMT = 131166 // Time format for strftime. + X_NL_WT_FMT_AMPM = 131167 // 12-hour time format for strftime. + + X_NL_WERA_YEAR = 131168 // Year in alternate era format. + X_NL_WERA_D_FMT = 131169 // Date in alternate era format. + X_NL_WALT_DIGITS = 131170 // Alternate symbols for digits. + X_NL_WERA_D_T_FMT = 131171 // Date and time in alternate era format. + X_NL_WERA_T_FMT = 131172 // Time in alternate era format. + + X_NL_TIME_WEEK_NDAYS = 131173 + X_NL_TIME_WEEK_1STDAY = 131174 + X_NL_TIME_WEEK_1STWEEK = 131175 + X_NL_TIME_FIRST_WEEKDAY = 131176 + X_NL_TIME_FIRST_WORKDAY = 131177 + X_NL_TIME_CAL_DIRECTION = 131178 + X_NL_TIME_TIMEZONE = 131179 + + X_DATE_FMT = 131180 // strftime format for date. + X_NL_W_DATE_FMT = 131181 + + X_NL_TIME_CODESET = 131182 + + // Long month names, in the grammatical form used when the month + // is named by itself. + X__ALTMON_1 = 131183 // January + X__ALTMON_2 = 131184 + X__ALTMON_3 = 131185 + X__ALTMON_4 = 131186 + X__ALTMON_5 = 131187 + X__ALTMON_6 = 131188 + X__ALTMON_7 = 131189 + X__ALTMON_8 = 131190 + X__ALTMON_9 = 131191 + X__ALTMON_10 = 131192 + X__ALTMON_11 = 131193 + X__ALTMON_12 = 131194 + + // Long month names, in the grammatical form used when the month + // is named by itself. + X_NL_WALTMON_1 = 131195 // January + X_NL_WALTMON_2 = 131196 + X_NL_WALTMON_3 = 131197 + X_NL_WALTMON_4 = 131198 + X_NL_WALTMON_5 = 131199 + X_NL_WALTMON_6 = 131200 + X_NL_WALTMON_7 = 131201 + X_NL_WALTMON_8 = 131202 + X_NL_WALTMON_9 = 131203 + X_NL_WALTMON_10 = 131204 + X_NL_WALTMON_11 = 131205 + X_NL_WALTMON_12 = 131206 + + // Abbreviated month names, in the grammatical form used when the month + // is named by itself. + X_NL_ABALTMON_1 = 131207 // Jan + X_NL_ABALTMON_2 = 131208 + X_NL_ABALTMON_3 = 131209 + X_NL_ABALTMON_4 = 131210 + X_NL_ABALTMON_5 = 131211 + X_NL_ABALTMON_6 = 131212 + X_NL_ABALTMON_7 = 131213 + X_NL_ABALTMON_8 = 131214 + X_NL_ABALTMON_9 = 131215 + X_NL_ABALTMON_10 = 131216 + X_NL_ABALTMON_11 = 131217 + X_NL_ABALTMON_12 = 131218 + + // Abbreviated month names, in the grammatical form used when the month + // is named by itself. + X_NL_WABALTMON_1 = 131219 // Jan + X_NL_WABALTMON_2 = 131220 + X_NL_WABALTMON_3 = 131221 + X_NL_WABALTMON_4 = 131222 + X_NL_WABALTMON_5 = 131223 + X_NL_WABALTMON_6 = 131224 + X_NL_WABALTMON_7 = 131225 + X_NL_WABALTMON_8 = 131226 + X_NL_WABALTMON_9 = 131227 + X_NL_WABALTMON_10 = 131228 + X_NL_WABALTMON_11 = 131229 + X_NL_WABALTMON_12 = 131230 + + X_NL_NUM_LC_TIME = 131231 // Number of indices in LC_TIME category. + + // LC_COLLATE category: text sorting. + // This information is accessed by the strcoll and strxfrm functions. + // These `nl_langinfo' names are used only internally. + X_NL_COLLATE_NRULES = 196608 + X_NL_COLLATE_RULESETS = 196609 + X_NL_COLLATE_TABLEMB = 196610 + X_NL_COLLATE_WEIGHTMB = 196611 + X_NL_COLLATE_EXTRAMB = 196612 + X_NL_COLLATE_INDIRECTMB = 196613 + X_NL_COLLATE_GAP1 = 196614 + X_NL_COLLATE_GAP2 = 196615 + X_NL_COLLATE_GAP3 = 196616 + X_NL_COLLATE_TABLEWC = 196617 + X_NL_COLLATE_WEIGHTWC = 196618 + X_NL_COLLATE_EXTRAWC = 196619 + X_NL_COLLATE_INDIRECTWC = 196620 + X_NL_COLLATE_SYMB_HASH_SIZEMB = 196621 + X_NL_COLLATE_SYMB_TABLEMB = 196622 + X_NL_COLLATE_SYMB_EXTRAMB = 196623 + X_NL_COLLATE_COLLSEQMB = 196624 + X_NL_COLLATE_COLLSEQWC = 196625 + X_NL_COLLATE_CODESET = 196626 + X_NL_NUM_LC_COLLATE = 196627 + + // LC_CTYPE category: character classification. + // This information is accessed by the functions in <ctype.h>. + // These `nl_langinfo' names are used only internally. + X_NL_CTYPE_CLASS = 0 + X_NL_CTYPE_TOUPPER = 1 + X_NL_CTYPE_GAP1 = 2 + X_NL_CTYPE_TOLOWER = 3 + X_NL_CTYPE_GAP2 = 4 + X_NL_CTYPE_CLASS32 = 5 + X_NL_CTYPE_GAP3 = 6 + X_NL_CTYPE_GAP4 = 7 + X_NL_CTYPE_GAP5 = 8 + X_NL_CTYPE_GAP6 = 9 + X_NL_CTYPE_CLASS_NAMES = 10 + X_NL_CTYPE_MAP_NAMES = 11 + X_NL_CTYPE_WIDTH = 12 + X_NL_CTYPE_MB_CUR_MAX = 13 + X_NL_CTYPE_CODESET_NAME = 14 + CODESET = 14 + X_NL_CTYPE_TOUPPER32 = 15 + X_NL_CTYPE_TOLOWER32 = 16 + X_NL_CTYPE_CLASS_OFFSET = 17 + X_NL_CTYPE_MAP_OFFSET = 18 + X_NL_CTYPE_INDIGITS_MB_LEN = 19 + X_NL_CTYPE_INDIGITS0_MB = 20 + X_NL_CTYPE_INDIGITS1_MB = 21 + X_NL_CTYPE_INDIGITS2_MB = 22 + X_NL_CTYPE_INDIGITS3_MB = 23 + X_NL_CTYPE_INDIGITS4_MB = 24 + X_NL_CTYPE_INDIGITS5_MB = 25 + X_NL_CTYPE_INDIGITS6_MB = 26 + X_NL_CTYPE_INDIGITS7_MB = 27 + X_NL_CTYPE_INDIGITS8_MB = 28 + X_NL_CTYPE_INDIGITS9_MB = 29 + X_NL_CTYPE_INDIGITS_WC_LEN = 30 + X_NL_CTYPE_INDIGITS0_WC = 31 + X_NL_CTYPE_INDIGITS1_WC = 32 + X_NL_CTYPE_INDIGITS2_WC = 33 + X_NL_CTYPE_INDIGITS3_WC = 34 + X_NL_CTYPE_INDIGITS4_WC = 35 + X_NL_CTYPE_INDIGITS5_WC = 36 + X_NL_CTYPE_INDIGITS6_WC = 37 + X_NL_CTYPE_INDIGITS7_WC = 38 + X_NL_CTYPE_INDIGITS8_WC = 39 + X_NL_CTYPE_INDIGITS9_WC = 40 + X_NL_CTYPE_OUTDIGIT0_MB = 41 + X_NL_CTYPE_OUTDIGIT1_MB = 42 + X_NL_CTYPE_OUTDIGIT2_MB = 43 + X_NL_CTYPE_OUTDIGIT3_MB = 44 + X_NL_CTYPE_OUTDIGIT4_MB = 45 + X_NL_CTYPE_OUTDIGIT5_MB = 46 + X_NL_CTYPE_OUTDIGIT6_MB = 47 + X_NL_CTYPE_OUTDIGIT7_MB = 48 + X_NL_CTYPE_OUTDIGIT8_MB = 49 + X_NL_CTYPE_OUTDIGIT9_MB = 50 + X_NL_CTYPE_OUTDIGIT0_WC = 51 + X_NL_CTYPE_OUTDIGIT1_WC = 52 + X_NL_CTYPE_OUTDIGIT2_WC = 53 + X_NL_CTYPE_OUTDIGIT3_WC = 54 + X_NL_CTYPE_OUTDIGIT4_WC = 55 + X_NL_CTYPE_OUTDIGIT5_WC = 56 + X_NL_CTYPE_OUTDIGIT6_WC = 57 + X_NL_CTYPE_OUTDIGIT7_WC = 58 + X_NL_CTYPE_OUTDIGIT8_WC = 59 + X_NL_CTYPE_OUTDIGIT9_WC = 60 + X_NL_CTYPE_TRANSLIT_TAB_SIZE = 61 + X_NL_CTYPE_TRANSLIT_FROM_IDX = 62 + X_NL_CTYPE_TRANSLIT_FROM_TBL = 63 + X_NL_CTYPE_TRANSLIT_TO_IDX = 64 + X_NL_CTYPE_TRANSLIT_TO_TBL = 65 + X_NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN = 66 + X_NL_CTYPE_TRANSLIT_DEFAULT_MISSING = 67 + X_NL_CTYPE_TRANSLIT_IGNORE_LEN = 68 + X_NL_CTYPE_TRANSLIT_IGNORE = 69 + X_NL_CTYPE_MAP_TO_NONASCII = 70 + X_NL_CTYPE_NONASCII_CASE = 71 + X_NL_CTYPE_EXTRA_MAP_1 = 72 + X_NL_CTYPE_EXTRA_MAP_2 = 73 + X_NL_CTYPE_EXTRA_MAP_3 = 74 + X_NL_CTYPE_EXTRA_MAP_4 = 75 + X_NL_CTYPE_EXTRA_MAP_5 = 76 + X_NL_CTYPE_EXTRA_MAP_6 = 77 + X_NL_CTYPE_EXTRA_MAP_7 = 78 + X_NL_CTYPE_EXTRA_MAP_8 = 79 + X_NL_CTYPE_EXTRA_MAP_9 = 80 + X_NL_CTYPE_EXTRA_MAP_10 = 81 + X_NL_CTYPE_EXTRA_MAP_11 = 82 + X_NL_CTYPE_EXTRA_MAP_12 = 83 + X_NL_CTYPE_EXTRA_MAP_13 = 84 + X_NL_CTYPE_EXTRA_MAP_14 = 85 + X_NL_NUM_LC_CTYPE = 86 + + // LC_MONETARY category: formatting of monetary quantities. + // These items each correspond to a member of `struct lconv', + // defined in <locale.h>. + X__INT_CURR_SYMBOL = 262144 + X__CURRENCY_SYMBOL = 262145 + X__MON_DECIMAL_POINT = 262146 + X__MON_THOUSANDS_SEP = 262147 + X__MON_GROUPING = 262148 + X__POSITIVE_SIGN = 262149 + X__NEGATIVE_SIGN = 262150 + X__INT_FRAC_DIGITS = 262151 + X__FRAC_DIGITS = 262152 + X__P_CS_PRECEDES = 262153 + X__P_SEP_BY_SPACE = 262154 + X__N_CS_PRECEDES = 262155 + X__N_SEP_BY_SPACE = 262156 + X__P_SIGN_POSN = 262157 + X__N_SIGN_POSN = 262158 + X_NL_MONETARY_CRNCYSTR = 262159 + X__INT_P_CS_PRECEDES = 262160 + X__INT_P_SEP_BY_SPACE = 262161 + X__INT_N_CS_PRECEDES = 262162 + X__INT_N_SEP_BY_SPACE = 262163 + X__INT_P_SIGN_POSN = 262164 + X__INT_N_SIGN_POSN = 262165 + X_NL_MONETARY_DUO_INT_CURR_SYMBOL = 262166 + X_NL_MONETARY_DUO_CURRENCY_SYMBOL = 262167 + X_NL_MONETARY_DUO_INT_FRAC_DIGITS = 262168 + X_NL_MONETARY_DUO_FRAC_DIGITS = 262169 + X_NL_MONETARY_DUO_P_CS_PRECEDES = 262170 + X_NL_MONETARY_DUO_P_SEP_BY_SPACE = 262171 + X_NL_MONETARY_DUO_N_CS_PRECEDES = 262172 + X_NL_MONETARY_DUO_N_SEP_BY_SPACE = 262173 + X_NL_MONETARY_DUO_INT_P_CS_PRECEDES = 262174 + X_NL_MONETARY_DUO_INT_P_SEP_BY_SPACE = 262175 + X_NL_MONETARY_DUO_INT_N_CS_PRECEDES = 262176 + X_NL_MONETARY_DUO_INT_N_SEP_BY_SPACE = 262177 + X_NL_MONETARY_DUO_P_SIGN_POSN = 262178 + X_NL_MONETARY_DUO_N_SIGN_POSN = 262179 + X_NL_MONETARY_DUO_INT_P_SIGN_POSN = 262180 + X_NL_MONETARY_DUO_INT_N_SIGN_POSN = 262181 + X_NL_MONETARY_UNO_VALID_FROM = 262182 + X_NL_MONETARY_UNO_VALID_TO = 262183 + X_NL_MONETARY_DUO_VALID_FROM = 262184 + X_NL_MONETARY_DUO_VALID_TO = 262185 + X_NL_MONETARY_CONVERSION_RATE = 262186 + X_NL_MONETARY_DECIMAL_POINT_WC = 262187 + X_NL_MONETARY_THOUSANDS_SEP_WC = 262188 + X_NL_MONETARY_CODESET = 262189 + X_NL_NUM_LC_MONETARY = 262190 + + // LC_NUMERIC category: formatting of numbers. + // These also correspond to members of `struct lconv'; see <locale.h>. + X__DECIMAL_POINT = 65536 + RADIXCHAR = 65536 + X__THOUSANDS_SEP = 65537 + THOUSEP = 65537 + X__GROUPING = 65538 + X_NL_NUMERIC_DECIMAL_POINT_WC = 65539 + X_NL_NUMERIC_THOUSANDS_SEP_WC = 65540 + X_NL_NUMERIC_CODESET = 65541 + X_NL_NUM_LC_NUMERIC = 65542 + + X__YESEXPR = 327680 // Regex matching ``yes'' input. + X__NOEXPR = 327681 // Regex matching ``no'' input. + X__YESSTR = 327682 // Output string for ``yes''. + X__NOSTR = 327683 // Output string for ``no''. + X_NL_MESSAGES_CODESET = 327684 + X_NL_NUM_LC_MESSAGES = 327685 + + X_NL_PAPER_HEIGHT = 458752 + X_NL_PAPER_WIDTH = 458753 + X_NL_PAPER_CODESET = 458754 + X_NL_NUM_LC_PAPER = 458755 + + X_NL_NAME_NAME_FMT = 524288 + X_NL_NAME_NAME_GEN = 524289 + X_NL_NAME_NAME_MR = 524290 + X_NL_NAME_NAME_MRS = 524291 + X_NL_NAME_NAME_MISS = 524292 + X_NL_NAME_NAME_MS = 524293 + X_NL_NAME_CODESET = 524294 + X_NL_NUM_LC_NAME = 524295 + + X_NL_ADDRESS_POSTAL_FMT = 589824 + X_NL_ADDRESS_COUNTRY_NAME = 589825 + X_NL_ADDRESS_COUNTRY_POST = 589826 + X_NL_ADDRESS_COUNTRY_AB2 = 589827 + X_NL_ADDRESS_COUNTRY_AB3 = 589828 + X_NL_ADDRESS_COUNTRY_CAR = 589829 + X_NL_ADDRESS_COUNTRY_NUM = 589830 + X_NL_ADDRESS_COUNTRY_ISBN = 589831 + X_NL_ADDRESS_LANG_NAME = 589832 + X_NL_ADDRESS_LANG_AB = 589833 + X_NL_ADDRESS_LANG_TERM = 589834 + X_NL_ADDRESS_LANG_LIB = 589835 + X_NL_ADDRESS_CODESET = 589836 + X_NL_NUM_LC_ADDRESS = 589837 + + X_NL_TELEPHONE_TEL_INT_FMT = 655360 + X_NL_TELEPHONE_TEL_DOM_FMT = 655361 + X_NL_TELEPHONE_INT_SELECT = 655362 + X_NL_TELEPHONE_INT_PREFIX = 655363 + X_NL_TELEPHONE_CODESET = 655364 + X_NL_NUM_LC_TELEPHONE = 655365 + + X_NL_MEASUREMENT_MEASUREMENT = 720896 + X_NL_MEASUREMENT_CODESET = 720897 + X_NL_NUM_LC_MEASUREMENT = 720898 + + X_NL_IDENTIFICATION_TITLE = 786432 + X_NL_IDENTIFICATION_SOURCE = 786433 + X_NL_IDENTIFICATION_ADDRESS = 786434 + X_NL_IDENTIFICATION_CONTACT = 786435 + X_NL_IDENTIFICATION_EMAIL = 786436 + X_NL_IDENTIFICATION_TEL = 786437 + X_NL_IDENTIFICATION_FAX = 786438 + X_NL_IDENTIFICATION_LANGUAGE = 786439 + X_NL_IDENTIFICATION_TERRITORY = 786440 + X_NL_IDENTIFICATION_AUDIENCE = 786441 + X_NL_IDENTIFICATION_APPLICATION = 786442 + X_NL_IDENTIFICATION_ABBREVIATION = 786443 + X_NL_IDENTIFICATION_REVISION = 786444 + X_NL_IDENTIFICATION_DATE = 786445 + X_NL_IDENTIFICATION_CATEGORY = 786446 + X_NL_IDENTIFICATION_CODESET = 786447 + X_NL_NUM_LC_IDENTIFICATION = 786448 + + // This marks the highest value used. + X_NL_NUM = 786449 +) + +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 */ + +// Access to locale-dependent parameters. +// Copyright (C) 1995-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Get the type definition. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// The default message set used by the gencat program. + +// Value for FLAG parameter of `catgets' to say we want XPG4 compliance. + +// Message catalog descriptor type. +type Nl_catd = uintptr /* nl_types.h:33:14 */ + +// Type used by `nl_langinfo'. +type Nl_item = int32 /* nl_types.h:36:13 */ + +// POSIX.1-2008 extended locale interface (see locale.h). +// Definition of locale_t. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/libc.go b/vendor/modernc.org/libc/libc.go index e1c00b0f..01d6793a 100644 --- a/vendor/modernc.org/libc/libc.go +++ b/vendor/modernc.org/libc/libc.go @@ -970,13 +970,24 @@ func Xatol(t *TLS, nptr uintptr) long { } } -// time_t mktime(struct tm *tm); -func Xmktime(t *TLS, ptm uintptr) time.Time_t { - loc := gotime.Local +func getLocalLocation() (loc *gotime.Location) { + loc = gotime.Local if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, off) + zname := GoString(r) + zone, off := parseZone(zname) + loc = gotime.FixedZone(zone, -off) + loc2, _ := gotime.LoadLocation(zname) + if loc2 != nil { + loc = loc2 + } } + return loc + +} + +// time_t mktime(struct tm *tm); +func Xmktime(t *TLS, ptm uintptr) time.Time_t { + loc := getLocalLocation() tt := gotime.Date( int((*time.Tm)(unsafe.Pointer(ptm)).Ftm_year+1900), gotime.Month((*time.Tm)(unsafe.Pointer(ptm)).Ftm_mon+1), diff --git a/vendor/modernc.org/libc/libc64.go b/vendor/modernc.org/libc/libc64.go index 35d1443c..01690fe8 100644 --- a/vendor/modernc.org/libc/libc64.go +++ b/vendor/modernc.org/libc/libc64.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build amd64 || arm64 || ppc64le || riscv64 || s390x -// +build amd64 arm64 ppc64le riscv64 s390x +//go:build amd64 || arm64 || ppc64le || riscv64 || s390x || loong64 +// +build amd64 arm64 ppc64le riscv64 s390x loong64 package libc // import "modernc.org/libc" diff --git a/vendor/modernc.org/libc/libc_darwin.go b/vendor/modernc.org/libc/libc_darwin.go index 1dc5b926..334bf8fe 100644 --- a/vendor/modernc.org/libc/libc_darwin.go +++ b/vendor/modernc.org/libc/libc_darwin.go @@ -277,11 +277,7 @@ var localtime time.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { - loc := gotime.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) @@ -298,11 +294,7 @@ func Xlocaltime(_ *TLS, timep uintptr) uintptr { // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { - loc := gotime.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) (*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) @@ -1534,33 +1526,6 @@ func fcntlCmdStr(cmd int32) string { // panic(todo("")) // } -// ssize_t pread(int fd, void *buf, size_t count, off_t offset); -func Xpread(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t { - var n int - var err error - switch { - case count == 0: - n, err = unix.Pread(int(fd), nil, int64(offset)) - default: - n, err = unix.Pread(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count], int64(offset)) - if dmesgs && err == nil { - dmesg("%v: fd %v, off %#x, count %#x, n %#x\n%s", origin(1), fd, offset, count, n, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:n:n])) - } - } - 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.Ssize_t(n) -} - // 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 { var n int diff --git a/vendor/modernc.org/libc/libc_freebsd.go b/vendor/modernc.org/libc/libc_freebsd.go index 486f8ec4..96282190 100644 --- a/vendor/modernc.org/libc/libc_freebsd.go +++ b/vendor/modernc.org/libc/libc_freebsd.go @@ -171,11 +171,7 @@ var localtime time.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { - loc := gotime.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) @@ -192,11 +188,7 @@ func Xlocaltime(_ *TLS, timep uintptr) uintptr { // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { - loc := gotime.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*unix.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) (*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) diff --git a/vendor/modernc.org/libc/libc_linux.go b/vendor/modernc.org/libc/libc_linux.go index 1c2f4826..08f67be8 100644 --- a/vendor/modernc.org/libc/libc_linux.go +++ b/vendor/modernc.org/libc/libc_linux.go @@ -133,11 +133,7 @@ var localtime ctime.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { - loc := time.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = time.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*unix.Time_t)(unsafe.Pointer(timep)) t := time.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) @@ -154,11 +150,7 @@ func Xlocaltime(_ *TLS, timep uintptr) uintptr { // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { - loc := time.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = time.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*unix.Time_t)(unsafe.Pointer(timep)) t := time.Unix(int64(ut), 0).In(loc) (*ctime.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) @@ -645,16 +637,6 @@ func Xsetrlimit(t *TLS, resource int32, rlim uintptr) int32 { return Xsetrlimit64(t, resource, rlim) } -// int setrlimit(int resource, const struct rlimit *rlim); -func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { - if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { - t.setErrno(err) - return -1 - } - - return 0 -} - // uid_t getuid(void); func Xgetuid(t *TLS) types.Uid_t { return types.Uid_t(os.Getuid()) diff --git a/vendor/modernc.org/libc/libc_linux_386.go b/vendor/modernc.org/libc/libc_linux_386.go index a8e5c526..c1369dd5 100644 --- a/vendor/modernc.org/libc/libc_linux_386.go +++ b/vendor/modernc.org/libc/libc_linux_386.go @@ -455,3 +455,13 @@ func Xfopen64(t *TLS, pathname, mode uintptr) uintptr { t.setErrno(errno.ENOMEM) return 0 } + +// int setrlimit(int resource, const struct rlimit *rlim); +func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} diff --git a/vendor/modernc.org/libc/libc_linux_amd64.go b/vendor/modernc.org/libc/libc_linux_amd64.go index 23e4f853..4d3bf1a5 100644 --- a/vendor/modernc.org/libc/libc_linux_amd64.go +++ b/vendor/modernc.org/libc/libc_linux_amd64.go @@ -465,3 +465,13 @@ func Xiswspace(t *TLS, wc wctype.Wint_t) int32 { func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 { return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc))) } + +// int setrlimit(int resource, const struct rlimit *rlim); +func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} diff --git a/vendor/modernc.org/libc/libc_linux_arm.go b/vendor/modernc.org/libc/libc_linux_arm.go index cfabe77f..ce45b1ae 100644 --- a/vendor/modernc.org/libc/libc_linux_arm.go +++ b/vendor/modernc.org/libc/libc_linux_arm.go @@ -447,3 +447,13 @@ func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { //TODO- // } //TODO- return r //TODO- } + +// int setrlimit(int resource, const struct rlimit *rlim); +func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} diff --git a/vendor/modernc.org/libc/libc_linux_arm64.go b/vendor/modernc.org/libc/libc_linux_arm64.go index b8607c9c..1b83364e 100644 --- a/vendor/modernc.org/libc/libc_linux_arm64.go +++ b/vendor/modernc.org/libc/libc_linux_arm64.go @@ -437,3 +437,13 @@ func Xutime(t *TLS, filename, times uintptr) int32 { func Xalarm(t *TLS, seconds uint32) uint32 { panic(todo("")) } + +// int setrlimit(int resource, const struct rlimit *rlim); +func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} diff --git a/vendor/modernc.org/libc/libc_linux_loong64.go b/vendor/modernc.org/libc/libc_linux_loong64.go new file mode 100644 index 00000000..5dc8d5e0 --- /dev/null +++ b/vendor/modernc.org/libc/libc_linux_loong64.go @@ -0,0 +1,498 @@ +// 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 ( + "unicode" + "unsafe" + "os" + "strings" + + "golang.org/x/sys/unix" + "modernc.org/libc/errno" + "modernc.org/libc/fcntl" + "modernc.org/libc/signal" + "modernc.org/libc/sys/types" + "modernc.org/libc/wctype" +) + +// int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact); +func Xsigaction(t *TLS, signum int32, act, oldact uintptr) int32 { + // musl/arch/x86_64/ksigaction.h + // + // struct k_sigaction { + // void (*handler)(int); + // unsigned long flags; + // void (*restorer)(void); + // unsigned mask[2]; + // }; + type k_sigaction struct { + handler uintptr + flags ulong + restorer uintptr + mask [2]uint32 + } + + var kact, koldact uintptr + if act != 0 { + sz := int(unsafe.Sizeof(k_sigaction{})) + kact = t.Alloc(sz) + defer t.Free(sz) + *(*k_sigaction)(unsafe.Pointer(kact)) = k_sigaction{ + handler: (*signal.Sigaction)(unsafe.Pointer(act)).F__sigaction_handler.Fsa_handler, + flags: ulong((*signal.Sigaction)(unsafe.Pointer(act)).Fsa_flags), + restorer: (*signal.Sigaction)(unsafe.Pointer(act)).Fsa_restorer, + } + Xmemcpy(t, kact+unsafe.Offsetof(k_sigaction{}.mask), act+unsafe.Offsetof(signal.Sigaction{}.Fsa_mask), types.Size_t(unsafe.Sizeof(k_sigaction{}.mask))) + } + if oldact != 0 { + panic(todo("")) + } + + if _, _, err := unix.Syscall6(unix.SYS_RT_SIGACTION, uintptr(signum), kact, koldact, unsafe.Sizeof(k_sigaction{}.mask), 0, 0); err != 0 { + t.setErrno(err) + return -1 + } + + if oldact != 0 { + panic(todo("")) + } + + return 0 +} + +// int fcntl(int fd, int cmd, ... /* arg */ ); +func Xfcntl64(t *TLS, fd, cmd int32, args uintptr) int32 { + var arg uintptr + if args != 0 { + arg = *(*uintptr)(unsafe.Pointer(args)) + } + if cmd == fcntl.F_SETFL { + arg |= unix.O_LARGEFILE + } + 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 lstat(const char *pathname, struct stat *statbuf); +func Xlstat64(t *TLS, pathname, statbuf uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_LSTAT, pathname, statbuf, 0); err != 0 { + // // if dmesgs { + // // dmesg("%v: %q: %v", 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 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_STAT, pathname, statbuf, 0); err != 0 { + // // if dmesgs { + // // dmesg("%v: %q: %v", origin(1), GoString(pathname), err) + // // } + // t.setErrno(err) + // return -1 + // } + + // // if dmesgs { + // // dmesg("%v: %q: ok", origin(1), GoString(pathname)) + // // } + // return 0 +} + +// int fstat(int fd, struct stat *statbuf); +func Xfstat64(t *TLS, fd int32, statbuf uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_FSTAT, uintptr(fd), statbuf, 0); err != 0 { + // // if dmesgs { + // // dmesg("%v: fd %d: %v", origin(1), fd, err) + // // } + // t.setErrno(err) + // return -1 + // } + + // // if dmesgs { + // // dmesg("%v: %d size %#x: ok\n%+v", origin(1), fd, (*stat.Stat)(unsafe.Pointer(statbuf)).Fst_size, (*stat.Stat)(unsafe.Pointer(statbuf))) + // // } + // return 0 +} + +func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { + return Xmmap64(t, addr, length, prot, flags, fd, offset) +} + +// void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); +func Xmmap64(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { + data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + if err != 0 { + // if dmesgs { + // dmesg("%v: %v", origin(1), err) + // } + t.setErrno(err) + return ^uintptr(0) // (void*)-1 + } + + // if dmesgs { + // dmesg("%v: %#x", origin(1), data) + // } + return data +} + +// void *mremap(void *old_address, size_t old_size, size_t new_size, int flags, ... /* void *new_address */); +func Xmremap(t *TLS, old_address uintptr, old_size, new_size types.Size_t, flags int32, args uintptr) uintptr { + var arg uintptr + if args != 0 { + arg = *(*uintptr)(unsafe.Pointer(args)) + } + data, _, err := unix.Syscall6(unix.SYS_MREMAP, old_address, uintptr(old_size), uintptr(new_size), uintptr(flags), arg, 0) + if err != 0 { + // if dmesgs { + // dmesg("%v: %v", origin(1), err) + // } + t.setErrno(err) + return ^uintptr(0) // (void*)-1 + } + + // if dmesgs { + // dmesg("%v: %#x", origin(1), data) + // } + return data +} + +// int ftruncate(int fd, off_t length); +func Xftruncate64(t *TLS, fd int32, length types.Off_t) int32 { + if _, _, err := unix.Syscall(unix.SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); err != 0 { + // if dmesgs { + // dmesg("%v: fd %d: %v", origin(1), fd, err) + // } + t.setErrno(err) + return -1 + } + + // if dmesgs { + // dmesg("%v: %d %#x: ok", origin(1), fd, length) + // } + 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.Syscall(unix.SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + if err != 0 { + // if dmesgs { + // dmesg("%v: fd %v, off %#x, whence %v: %v", origin(1), fd, offset, whenceStr(whence), err) + // } + t.setErrno(err) + return -1 + } + + // if dmesgs { + // dmesg("%v: fd %v, off %#x, whence %v: %#x", origin(1), fd, offset, whenceStr(whence), n) + // } + return types.Off_t(n) +} + +// int utime(const char *filename, const struct utimbuf *times); +func Xutime(t *TLS, filename, times uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_UTIME, filename, times, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// 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) +} + +// time_t time(time_t *tloc); +func Xtime(t *TLS, tloc uintptr) types.Time_t { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_TIME, tloc, 0, 0) + // if err != 0 { + // t.setErrno(err) + // return types.Time_t(-1) + // } + + // 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); +func Xgetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_GETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} + +// int mkdir(const char *path, mode_t mode); +func Xmkdir(t *TLS, path uintptr, mode types.Mode_t) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_MKDIR, path, uintptr(mode), 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // // if dmesgs { + // // dmesg("%v: %q: ok", origin(1), GoString(path)) + // // } + // return 0 +} + +// int symlink(const char *target, const char *linkpath); +func Xsymlink(t *TLS, target, linkpath uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_SYMLINK, target, linkpath, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // // if dmesgs { + // // dmesg("%v: %q %q: ok", origin(1), GoString(target), GoString(linkpath)) + // // } + // return 0 +} + +// int chmod(const char *pathname, mode_t mode) +func Xchmod(t *TLS, pathname uintptr, mode types.Mode_t) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_CHMOD, pathname, uintptr(mode), 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // // if dmesgs { + // // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + // // } + // return 0 +} + +// int utimes(const char *filename, const struct timeval times[2]); +func Xutimes(t *TLS, filename, times uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_UTIMES, filename, times, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // // if dmesgs { + // // dmesg("%v: %q: ok", origin(1), GoString(filename)) + // // } + // return 0 +} + +// int unlink(const char *pathname); +func Xunlink(t *TLS, pathname uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_UNLINK, pathname, 0, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // // if dmesgs { + // // dmesg("%v: %q: ok", origin(1), GoString(pathname)) + // // } + // return 0 +} + +// int access(const char *pathname, int mode); +func Xaccess(t *TLS, pathname uintptr, mode int32) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_ACCESS, pathname, uintptr(mode), 0); err != 0 { + // // if dmesgs { + // // dmesg("%v: %q: %v", origin(1), GoString(pathname), err) + // // } + // t.setErrno(err) + // return -1 + // } + + // // if dmesgs { + // // dmesg("%v: %q %#o: ok", origin(1), GoString(pathname), mode) + // // } + // return 0 +} + +// int rmdir(const char *pathname); +func Xrmdir(t *TLS, pathname uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_RMDIR, pathname, 0, 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // // if dmesgs { + // // dmesg("%v: %q: ok", origin(1), GoString(pathname)) + // // } + // return 0 +} + +// int rename(const char *oldpath, const char *newpath); +func Xrename(t *TLS, oldpath, newpath uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_RENAME, oldpath, newpath, 0); err != 0 { + // t.setErrno(err) + // return -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 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 { + panic(todo("")) + // // 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 pipe(int pipefd[2]); +func Xpipe(t *TLS, pipefd uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_PIPE, pipefd, 0, 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) +} + +// 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 { + panic(todo("")) + // n, _, err := unix.Syscall(unix.SYS_READLINK, path, buf, uintptr(bufsize)) + // if err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return types.Ssize_t(n) +} + +// 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 = os.O_RDONLY + case "r+": + flags = os.O_RDWR + case "w": + flags = os.O_WRONLY | os.O_CREATE | os.O_TRUNC + case "w+": + flags = os.O_RDWR | os.O_CREATE | os.O_TRUNC + case "a": + flags = os.O_WRONLY | os.O_CREATE | os.O_APPEND + case "a+": + flags = os.O_RDWR | os.O_CREATE | os.O_APPEND + default: + panic(m) + } + fd, err := unix.Open(GoString(pathname), flags|unix.O_LARGEFILE, 0666) + if err != nil { + t.setErrno(err) + return 0 + } + + if p := newFile(t, int32(fd)); p != 0 { + return p + } + + Xclose(t, int32(fd)) + t.setErrno(errno.ENOMEM) + return 0 +} + +// int iswspace(wint_t wc); +func Xiswspace(t *TLS, wc wctype.Wint_t) int32 { + return Bool32(unicode.IsSpace(rune(wc))) +} + +// int iswalnum(wint_t wc); +func Xiswalnum(t *TLS, wc wctype.Wint_t) int32 { + return Bool32(unicode.IsLetter(rune(wc)) || unicode.IsNumber(rune(wc))) +} + +// int setrlimit(int resource, const struct rlimit *rlim); +func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + panic(todo("")) + // if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + // t.setErrno(err) + // return -1 + // } + + // return 0 +} diff --git a/vendor/modernc.org/libc/libc_linux_ppc64le.go b/vendor/modernc.org/libc/libc_linux_ppc64le.go index f04d1376..d23be04f 100644 --- a/vendor/modernc.org/libc/libc_linux_ppc64le.go +++ b/vendor/modernc.org/libc/libc_linux_ppc64le.go @@ -485,3 +485,13 @@ func __syscall3(t *TLS, trap, p1, p2, p3 long) long { func __syscall4(t *TLS, trap, p1, p2, p3, p4 long) long { return __syscall(unix.Syscall6(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3), uintptr(p4), 0, 0)) } + +// int setrlimit(int resource, const struct rlimit *rlim); +func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} diff --git a/vendor/modernc.org/libc/libc_linux_riscv64.go b/vendor/modernc.org/libc/libc_linux_riscv64.go index 0efb296a..e49c0f44 100644 --- a/vendor/modernc.org/libc/libc_linux_riscv64.go +++ b/vendor/modernc.org/libc/libc_linux_riscv64.go @@ -411,3 +411,13 @@ func __syscall3(t *TLS, trap, p1, p2, p3 long) long { func __syscall4(t *TLS, trap, p1, p2, p3, p4 long) long { return __syscall(unix.Syscall6(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3), uintptr(p4), 0, 0)) } + +// int setrlimit(int resource, const struct rlimit *rlim); +func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} diff --git a/vendor/modernc.org/libc/libc_linux_s390x.go b/vendor/modernc.org/libc/libc_linux_s390x.go index a877924c..d5a0aa6e 100644 --- a/vendor/modernc.org/libc/libc_linux_s390x.go +++ b/vendor/modernc.org/libc/libc_linux_s390x.go @@ -464,3 +464,13 @@ func __syscall3(t *TLS, trap, p1, p2, p3 long) long { func __syscall4(t *TLS, trap, p1, p2, p3, p4 long) long { return __syscall(unix.Syscall6(uintptr(trap), uintptr(p1), uintptr(p2), uintptr(p3), uintptr(p4), 0, 0)) } + +// int setrlimit(int resource, const struct rlimit *rlim); +func Xsetrlimit64(t *TLS, resource int32, rlim uintptr) int32 { + if _, _, err := unix.Syscall(unix.SYS_SETRLIMIT, uintptr(resource), uintptr(rlim), 0); err != 0 { + t.setErrno(err) + return -1 + } + + return 0 +} diff --git a/vendor/modernc.org/libc/libc_netbsd.go b/vendor/modernc.org/libc/libc_netbsd.go index 77a28cb5..f4ed268f 100644 --- a/vendor/modernc.org/libc/libc_netbsd.go +++ b/vendor/modernc.org/libc/libc_netbsd.go @@ -205,11 +205,7 @@ var localtime time.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { - loc := gotime.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) @@ -226,11 +222,7 @@ func Xlocaltime(_ *TLS, timep uintptr) uintptr { // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { - loc := gotime.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) (*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) diff --git a/vendor/modernc.org/libc/libc_openbsd.go b/vendor/modernc.org/libc/libc_openbsd.go index 62a820cd..767fddfe 100644 --- a/vendor/modernc.org/libc/libc_openbsd.go +++ b/vendor/modernc.org/libc/libc_openbsd.go @@ -205,11 +205,7 @@ var localtime time.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { - loc := gotime.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) @@ -226,11 +222,7 @@ func Xlocaltime(_ *TLS, timep uintptr) uintptr { // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { - loc := gotime.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) (*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) @@ -362,7 +354,7 @@ func Xftruncate(t *TLS, fd int32, length types.Off_t) int32 { } if dmesgs { - dmesg("%v: %d %#x: ok", origin(1), fd, length) + dmesg("%v: fd %d length %#0x: ok", origin(1), fd, length) } return 0 } @@ -380,10 +372,10 @@ func Xread(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t { return -1 } - // if dmesgs { - // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) - // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) - // } + if dmesgs { + // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) + dmesg("%v: fd %d, buf %#0x, count %#x: n %#x", origin(1), fd, count, n) + } return types.Ssize_t(n) } @@ -395,19 +387,19 @@ func Xwrite(t *TLS, fd int32, buf uintptr, count types.Size_t) types.Ssize_t { var n uintptr switch n, _, err = unix.Syscall(unix.SYS_WRITE, uintptr(fd), buf, uintptr(count)); err { case 0: - // if dmesgs { - // // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) - // dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) - // } + if dmesgs { + // dmesg("%v: %d %#x: %#x\n%s", origin(1), fd, count, n, hex.Dump(GoBytes(buf, int(n)))) + dmesg("%v: %d %#x: %#x", origin(1), fd, count, n) + } return types.Ssize_t(n) case errno.EAGAIN: // nop } } - // if dmesgs { - // dmesg("%v: fd %v, count %#x: %v", origin(1), fd, count, err) - // } + if dmesgs { + dmesg("%v: fd %v, buf %#0x, count %#x: %v", origin(1), fd, count, err) + } t.setErrno(err) return -1 } @@ -1468,8 +1460,16 @@ func X__inet_ntoa(t *TLS, in1 in.In_addr) uintptr { } func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, offset types.Off_t) uintptr { + // On 2021-12-23, a new syscall for mmap was introduced: + // + // 49 STD NOLOCK { void *sys_mmap(void *addr, size_t len, int prot, \ + // int flags, int fd, off_t pos); } + // src: https://github.com/golang/go/issues/59661 + + const unix_SYS_MMAP = 49 + // Cannot avoid the syscall here, addr sometimes matter. - data, _, err := unix.Syscall6(unix.SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + data, _, err := unix.Syscall6(unix_SYS_MMAP, addr, uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) if err != 0 { if dmesgs { dmesg("%v: %v FAIL", origin(1), err) @@ -1479,7 +1479,7 @@ func Xmmap(t *TLS, addr uintptr, length types.Size_t, prot, flags, fd int32, off } if dmesgs { - dmesg("%v: %#x", origin(1), data) + dmesg("%v: addr %#0x, length %#x0, prot %#0x, flags %#0x, fd %d, offset %#0x returns %#0x", origin(1), addr, length, prot, flags, fd, offset, data) } return data } diff --git a/vendor/modernc.org/libc/libc_openbsd_amd64.go b/vendor/modernc.org/libc/libc_openbsd_amd64.go index 8843f989..434f06bb 100644 --- a/vendor/modernc.org/libc/libc_openbsd_amd64.go +++ b/vendor/modernc.org/libc/libc_openbsd_amd64.go @@ -268,7 +268,7 @@ func Xlseek64(t *TLS, fd int32, offset types.Off_t, whence int32) types.Off_t { } if dmesgs { - dmesg("%v: ok", origin(1)) + dmesg("%v: fd %d, offset %#0x, whence %d, ok", origin(1), fd, offset, whence) } return types.Off_t(n) } diff --git a/vendor/modernc.org/libc/libc_unix.go b/vendor/modernc.org/libc/libc_unix.go index eb31f1d3..085c86b3 100644 --- a/vendor/modernc.org/libc/libc_unix.go +++ b/vendor/modernc.org/libc/libc_unix.go @@ -2,13 +2,14 @@ // 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 || openbsd -// +build linux darwin freebsd netbsd openbsd +//go:build unix +// +build unix package libc // import "modernc.org/libc" import ( "bufio" + "encoding/hex" "io/ioutil" "math" "math/rand" @@ -992,3 +993,30 @@ func Xctime_r(t *TLS, timep, buf uintptr) uintptr { copy((*RawMem)(unsafe.Pointer(buf))[:26:26], s) return buf } + +// ssize_t pread(int fd, void *buf, size_t count, off_t offset); +func Xpread(t *TLS, fd int32, buf uintptr, count types.Size_t, offset types.Off_t) types.Ssize_t { + var n int + var err error + switch { + case count == 0: + n, err = unix.Pread(int(fd), nil, int64(offset)) + default: + n, err = unix.Pread(int(fd), (*RawMem)(unsafe.Pointer(buf))[:count:count], int64(offset)) + if dmesgs && err == nil { + dmesg("%v: fd %v, off %#x, count %#x, n %#x\n%s", origin(1), fd, offset, count, n, hex.Dump((*RawMem)(unsafe.Pointer(buf))[:n:n])) + } + } + 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.Ssize_t(n) +} diff --git a/vendor/modernc.org/libc/libc_windows.go b/vendor/modernc.org/libc/libc_windows.go index dc947a55..fc36dc5a 100644 --- a/vendor/modernc.org/libc/libc_windows.go +++ b/vendor/modernc.org/libc/libc_windows.go @@ -399,11 +399,7 @@ var localtime time.Tm // struct tm *localtime(const time_t *timep); func Xlocaltime(_ *TLS, timep uintptr) uintptr { - loc := gotime.Local - if r := getenv(Environ(), "TZ"); r != 0 { - zone, off := parseZone(GoString(r)) - loc = gotime.FixedZone(zone, -off) - } + loc := getLocalLocation() ut := *(*time.Time_t)(unsafe.Pointer(timep)) t := gotime.Unix(int64(ut), 0).In(loc) localtime.Ftm_sec = int32(t.Second()) @@ -426,11 +422,7 @@ func X_localtime64(_ *TLS, timep uintptr) uintptr { // struct tm *localtime_r(const time_t *timep, struct tm *result); func Xlocaltime_r(_ *TLS, timep, result uintptr) uintptr { panic(todo("")) - // loc := gotime.Local - // if r := getenv(Environ(), "TZ"); r != 0 { - // zone, off := parseZone(GoString(r)) - // loc = gotime.FixedZone(zone, -off) - // } + // loc := getLocalLocation() // ut := *(*unix.Time_t)(unsafe.Pointer(timep)) // t := gotime.Unix(int64(ut), 0).In(loc) // (*time.Tm)(unsafe.Pointer(result)).Ftm_sec = int32(t.Second()) diff --git a/vendor/modernc.org/libc/limits/capi_linux_loong64.go b/vendor/modernc.org/libc/limits/capi_linux_loong64.go new file mode 100644 index 00000000..dbe66d82 --- /dev/null +++ b/vendor/modernc.org/libc/limits/capi_linux_loong64.go @@ -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 -ignore-unsupported-alignment -o limits/limits_linux_amd64.go -pkgname limits', DO NOT EDIT. + +package limits + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/limits/limits_linux_loong64.go b/vendor/modernc.org/libc/limits/limits_linux_loong64.go new file mode 100644 index 00000000..a9e1bafd --- /dev/null +++ b/vendor/modernc.org/libc/limits/limits_linux_loong64.go @@ -0,0 +1,943 @@ +// 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 -ignore-unsupported-alignment -o limits/limits_linux_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 ( + AIO_PRIO_DELTA_MAX = 20 // local_lim.h:78:1: + BC_BASE_MAX = 99 // posix2_lim.h:63:1: + BC_DIM_MAX = 2048 // posix2_lim.h:66:1: + BC_SCALE_MAX = 99 // posix2_lim.h:69:1: + BC_STRING_MAX = 1000 // posix2_lim.h:72:1: + CHARCLASS_NAME_MAX = 2048 // posix2_lim.h:84:1: + CHAR_BIT = 8 // limits.h:64:1: + CHAR_MAX = 127 // limits.h:99:1: + CHAR_MIN = -128 // limits.h:97:1: + COLL_WEIGHTS_MAX = 255 // posix2_lim.h:75:1: + DELAYTIMER_MAX = 2147483647 // local_lim.h:84:1: + EXPR_NEST_MAX = 32 // posix2_lim.h:78:1: + HOST_NAME_MAX = 64 // local_lim.h:93:1: + INT_MAX = 2147483647 // limits.h:120:1: + INT_MIN = -2147483648 // limits.h:118:1: + LINE_MAX = 2048 // posix2_lim.h:81:1: + LLONG_MAX = 9223372036854775807 // limits.h:142:1: + LLONG_MIN = -9223372036854775808 // limits.h:140:1: + LOGIN_NAME_MAX = 256 // local_lim.h:90:1: + LONG_MAX = 9223372036854775807 // limits.h:131:1: + LONG_MIN = -9223372036854775808 // limits.h:129:1: + MAX_CANON = 255 // limits.h:10:1: + MAX_INPUT = 255 // limits.h:11:1: + MB_LEN_MAX = 16 // limits.h:32:1: + MQ_PRIO_MAX = 32768 // local_lim.h:96:1: + NAME_MAX = 255 // limits.h:12:1: + NGROUPS_MAX = 65536 // limits.h:7:1: + PATH_MAX = 4096 // limits.h:13:1: + PIPE_BUF = 4096 // limits.h:14:1: + PTHREAD_DESTRUCTOR_ITERATIONS = 4 // local_lim.h:69:1: + PTHREAD_KEYS_MAX = 1024 // local_lim.h:64:1: + PTHREAD_STACK_MIN = 16384 // local_lim.h:81:1: + RE_DUP_MAX = 32767 // posix2_lim.h:88:1: + RTSIG_MAX = 32 // limits.h:19:1: + SCHAR_MAX = 127 // limits.h:75:1: + SCHAR_MIN = -128 // limits.h:73:1: + SEM_VALUE_MAX = 2147483647 // local_lim.h:99:1: + SHRT_MAX = 32767 // limits.h:106:1: + SHRT_MIN = -32768 // limits.h:104:1: + SSIZE_MAX = 9223372036854775807 // posix1_lim.h:169:1: + TTY_NAME_MAX = 32 // local_lim.h:87:1: + UCHAR_MAX = 255 // limits.h:82:1: + UINT_MAX = 4294967295 // limits.h:124:1: + ULLONG_MAX = 18446744073709551615 // limits.h:146:1: + ULONG_MAX = 18446744073709551615 // limits.h:135:1: + USHRT_MAX = 65535 // limits.h:113:1: + XATTR_LIST_MAX = 65536 // limits.h:17:1: + XATTR_NAME_MAX = 255 // limits.h:15:1: + XATTR_SIZE_MAX = 65536 // limits.h:16:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_POSIX1_LIM_H = 1 // posix1_lim.h:25:1: + X_BITS_POSIX2_LIM_H = 1 // posix2_lim.h:23:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_LIMITS_H_ = 0 // limits.h:30:1: + X_LIBC_LIMITS_H_ = 1 // limits.h:23:1: + X_LIMITS_H___ = 0 // limits.h:60:1: + X_LINUX_LIMITS_H = 0 // limits.h:3:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX2_BC_BASE_MAX = 99 // posix2_lim.h:27:1: + X_POSIX2_BC_DIM_MAX = 2048 // posix2_lim.h:30:1: + X_POSIX2_BC_SCALE_MAX = 99 // posix2_lim.h:33:1: + X_POSIX2_BC_STRING_MAX = 1000 // posix2_lim.h:36:1: + X_POSIX2_CHARCLASS_NAME_MAX = 14 // posix2_lim.h:55:1: + X_POSIX2_COLL_WEIGHTS_MAX = 2 // posix2_lim.h:40:1: + X_POSIX2_EXPR_NEST_MAX = 32 // posix2_lim.h:44:1: + X_POSIX2_LINE_MAX = 2048 // posix2_lim.h:47:1: + X_POSIX2_RE_DUP_MAX = 255 // posix2_lim.h:51:1: + X_POSIX_AIO_LISTIO_MAX = 2 // posix1_lim.h:32:1: + X_POSIX_AIO_MAX = 1 // posix1_lim.h:35:1: + X_POSIX_ARG_MAX = 4096 // posix1_lim.h:38:1: + X_POSIX_CHILD_MAX = 25 // posix1_lim.h:42:1: + X_POSIX_CLOCKRES_MIN = 20000000 // posix1_lim.h:157:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_DELAYTIMER_MAX = 32 // posix1_lim.h:48:1: + X_POSIX_HOST_NAME_MAX = 255 // posix1_lim.h:52:1: + X_POSIX_LINK_MAX = 8 // posix1_lim.h:55:1: + X_POSIX_LOGIN_NAME_MAX = 9 // posix1_lim.h:58:1: + X_POSIX_MAX_CANON = 255 // posix1_lim.h:61:1: + X_POSIX_MAX_INPUT = 255 // posix1_lim.h:65:1: + X_POSIX_MQ_OPEN_MAX = 8 // posix1_lim.h:68:1: + X_POSIX_MQ_PRIO_MAX = 32 // posix1_lim.h:71:1: + X_POSIX_NAME_MAX = 14 // posix1_lim.h:74:1: + X_POSIX_NGROUPS_MAX = 8 // posix1_lim.h:78:1: + X_POSIX_OPEN_MAX = 20 // posix1_lim.h:85:1: + X_POSIX_PATH_MAX = 256 // posix1_lim.h:97:1: + X_POSIX_PIPE_BUF = 512 // posix1_lim.h:100:1: + X_POSIX_RE_DUP_MAX = 255 // posix1_lim.h:104:1: + X_POSIX_RTSIG_MAX = 8 // posix1_lim.h:107:1: + X_POSIX_SEM_NSEMS_MAX = 256 // posix1_lim.h:110:1: + X_POSIX_SEM_VALUE_MAX = 32767 // posix1_lim.h:113:1: + X_POSIX_SIGQUEUE_MAX = 32 // posix1_lim.h:116:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_POSIX_SSIZE_MAX = 32767 // posix1_lim.h:119:1: + X_POSIX_STREAM_MAX = 8 // posix1_lim.h:122:1: + X_POSIX_SYMLINK_MAX = 255 // posix1_lim.h:125:1: + X_POSIX_SYMLOOP_MAX = 8 // posix1_lim.h:129:1: + X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // local_lim.h:67:1: + X_POSIX_THREAD_KEYS_MAX = 128 // local_lim.h:62:1: + X_POSIX_THREAD_THREADS_MAX = 64 // local_lim.h:72:1: + X_POSIX_TIMER_MAX = 32 // posix1_lim.h:132:1: + X_POSIX_TTY_NAME_MAX = 9 // posix1_lim.h:135:1: + X_POSIX_TZNAME_MAX = 6 // posix1_lim.h:139:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 3, or (at your option) any later +// version. +// +// GCC is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// This administrivia gets added to the beginning of limits.h +// if the system has its own version of limits.h. + +// We use _GCC_LIMITS_H_ because we want this not to match +// any macros that the system's limits.h uses for its own purposes. + +// Use "..." so that we find syslimits.h only in this same directory. +// syslimits.h stands for the system's own limits.h file. +// If we can use it ok unmodified, then we install this text. +// If fixincludes fixes it, then the fixed version is installed +// instead of this text. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h> + +// Handle feature test macros at the start of a header. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This header is internal to glibc and should not be included outside +// of glibc headers. Headers including it must define +// __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header +// cannot have multiple include guards because ISO C feature test +// macros depend on the definition of the macro when an affected +// header is included, not when the first system header is +// included. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ +// macro. + +// ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ +// macro. Most but not all symbols enabled by that macro in TS +// 18661-1 are enabled unconditionally in C2X; the symbols in Annex F +// still require that macro in C2X. + +// ISO/IEC TS 18661-4:2015 defines the +// __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction +// functions, the symbols from this TS are enabled unconditionally in +// C2X. + +// ISO/IEC TS 18661-3:2015 defines the +// __STDC_WANT_IEC_60559_TYPES_EXT__ macro. + +// Maximum length of any multibyte character in any locale. +// We define this value here since the gcc header does not define +// the correct value. + +// If we are not using GNU CC we have to define all the symbols ourself. +// Otherwise use gcc's definitions (see below). + +// Get the compiler's limits.h, which defines almost all the ISO constants. +// +// We put this #include_next outside the double inclusion check because +// it should be possible to include this file more than once and still get +// the definitions from gcc's header. + +// The <limits.h> files in some gcc versions don't define LLONG_MIN, +// LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for +// ages are available. + +// The integer width macros are not defined by GCC's <limits.h> before +// GCC 7, or if _GNU_SOURCE rather than +// __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. + +// POSIX adds things to <limits.h>. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> +// +// Never include this file directly; use <limits.h> instead. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// These are the standard-mandated minimum values. + +// Minimum number of operations in one list I/O call. + +// Minimal number of outstanding asynchronous I/O operations. + +// Maximum length of arguments to `execve', including environment. + +// Maximum simultaneous processes per real user ID. + +// Minimal number of timer expiration overruns. + +// Maximum length of a host name (not including the terminating null) +// as returned from the GETHOSTNAME function. + +// Maximum link count of a file. + +// Maximum length of login name. + +// Number of bytes in a terminal canonical input queue. + +// Number of bytes for which space will be +// available in a terminal input queue. + +// Maximum number of message queues open for a process. + +// Maximum number of supported message priorities. + +// Number of bytes in a filename. + +// Number of simultaneous supplementary group IDs per process. + +// Number of files one process can have open at once. + +// Number of bytes in a pathname. + +// Number of bytes than can be written atomically to a pipe. + +// The number of repeated occurrences of a BRE permitted by the +// REGEXEC and REGCOMP functions when using the interval notation. + +// Minimal number of realtime signals reserved for the application. + +// Number of semaphores a process can have. + +// Maximal value of a semaphore. + +// Number of pending realtime signals. + +// Largest value of a `ssize_t'. + +// Number of streams a process can have open at once. + +// The number of bytes in a symbolic link. + +// The number of symbolic links that can be traversed in the +// resolution of a pathname in the absence of a loop. + +// Number of timer for a process. + +// Maximum number of characters in a tty name. + +// Maximum length of a timezone name (element of `tzname'). + +// Maximum clock resolution in nanoseconds. + +// Get the implementation-specific values for the above. +// Minimum guaranteed maximum values for system limits. Linux version. +// Copyright (C) 1993-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; see the file COPYING.LIB. If +// not, see <https://www.gnu.org/licenses/>. + +// The kernel header pollutes the namespace with the NR_OPEN symbol +// and defines LINK_MAX although filesystems have different maxima. A +// similar thing is true for OPEN_MAX: the limit can be changed at +// runtime and therefore the macro must not be defined. Remove this +// after including the header if necessary. + +// The kernel sources contain a file with all the needed information. +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// Have to remove NR_OPEN? +// Have to remove LINK_MAX? +// Have to remove OPEN_MAX? +// Have to remove ARG_MAX? + +// The number of data keys per process. +// This is the value this implementation supports. + +// Controlling the iterations of destructors for thread-specific data. +// Number of iterations this implementation does. + +// The number of threads per process. +// We have no predefined limit on the number of threads. + +// Maximum amount by which a process can descrease its asynchronous I/O +// priority level. + +// Minimum size for a thread. We are free to choose a reasonable value. + +// Maximum number of timer expiration overruns. + +// Maximum tty name length. + +// Maximum login name length. This is arbitrary. + +// Maximum host name length. + +// Maximum message queue priority level. + +// Maximum value the semaphore can have. + +// ssize_t is not formally required to be the signed type +// corresponding to size_t, but it is for all configurations supported +// by glibc. + +// This value is a guaranteed minimum maximum. +// The current maximum can be got from `sysconf'. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; include <limits.h> instead. + +// The maximum `ibase' and `obase' values allowed by the `bc' utility. + +// The maximum number of elements allowed in an array by the `bc' utility. + +// The maximum `scale' value allowed by the `bc' utility. + +// The maximum length of a string constant accepted by the `bc' utility. + +// The maximum number of weights that can be assigned to an entry of +// the LC_COLLATE `order' keyword in the locale definition file. + +// The maximum number of expressions that can be nested +// within parentheses by the `expr' utility. + +// The maximum length, in bytes, of an input line. + +// The maximum number of repeated occurrences of a regular expression +// permitted when using the interval notation `\{M,N\}'. + +// The maximum number of bytes in a character class name. We have no +// fixed limit, 2048 is a high number. + +// These values are implementation-specific, +// and may vary within the implementation. +// Their precise values can be obtained from sysconf. + +// This value is defined like this in regex.h. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 3, or (at your option) any later +// version. +// +// GCC is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// Number of bits in a `char'. + +// Maximum length of a multibyte character. + +// Minimum and maximum values a `signed char' can hold. + +// Maximum value an `unsigned char' can hold. (Minimum is 0). + +// Minimum and maximum values a `char' can hold. + +// Minimum and maximum values a `signed short int' can hold. + +// Maximum value an `unsigned short int' can hold. (Minimum is 0). + +// Minimum and maximum values a `signed int' can hold. + +// Maximum value an `unsigned int' can hold. (Minimum is 0). + +// Minimum and maximum values a `signed long int' can hold. +// (Same as `int'). + +// Maximum value an `unsigned long int' can hold. (Minimum is 0). + +// Minimum and maximum values a `signed long long int' can hold. + +// Maximum value an `unsigned long long int' can hold. (Minimum is 0). + +// This administrivia gets added to the end of limits.h +// if the system has its own version of limits.h. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/musl_linux_loong64.go b/vendor/modernc.org/libc/musl_linux_loong64.go new file mode 100644 index 00000000..7921d992 --- /dev/null +++ b/vendor/modernc.org/libc/musl_linux_loong64.go @@ -0,0 +1,6940 @@ +// 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 + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +// musl as a whole is licensed under the following standard MIT license: +// +// ---------------------------------------------------------------------- +// Copyright © 2005-2020 Rich Felker, et al. +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// ---------------------------------------------------------------------- +// +// Authors/contributors include: +// +// A. Wilcox +// Ada Worcester +// Alex Dowad +// Alex Suykov +// Alexander Monakov +// Andre McCurdy +// Andrew Kelley +// Anthony G. Basile +// Aric Belsito +// Arvid Picciani +// Bartosz Brachaczek +// Benjamin Peterson +// Bobby Bingham +// Boris Brezillon +// Brent Cook +// Chris Spiegel +// Clément Vasseur +// Daniel Micay +// Daniel Sabogal +// Daurnimator +// David Carlier +// David Edelsohn +// Denys Vlasenko +// Dmitry Ivanov +// Dmitry V. Levin +// Drew DeVault +// Emil Renner Berthing +// Fangrui Song +// Felix Fietkau +// Felix Janda +// Gianluca Anzolin +// Hauke Mehrtens +// He X +// Hiltjo Posthuma +// Isaac Dunham +// Jaydeep Patil +// Jens Gustedt +// Jeremy Huntwork +// Jo-Philipp Wich +// Joakim Sindholt +// John Spencer +// Julien Ramseier +// Justin Cormack +// Kaarle Ritvanen +// Khem Raj +// Kylie McClain +// Leah Neukirchen +// Luca Barbato +// Luka Perkov +// M Farkas-Dyck (Strake) +// Mahesh Bodapati +// Markus Wichmann +// Masanori Ogino +// Michael Clark +// Michael Forney +// Mikhail Kremnyov +// Natanael Copa +// Nicholas J. Kain +// orc +// Pascal Cuoq +// Patrick Oppenlander +// Petr Hosek +// Petr Skocik +// Pierre Carrier +// Reini Urban +// Rich Felker +// Richard Pennington +// Ryan Fairfax +// Samuel Holland +// Segev Finer +// Shiz +// sin +// Solar Designer +// Stefan Kristiansson +// Stefan O'Rear +// Szabolcs Nagy +// Timo Teräs +// Trutz Behn +// Valentin Ochs +// Will Dietz +// William Haddon +// William Pitcock +// +// Portions of this software are derived from third-party works licensed +// under terms compatible with the above MIT license: +// +// The TRE regular expression implementation (src/regex/reg* and +// src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed +// under a 2-clause BSD license (license text in the source files). The +// included version has been heavily modified by Rich Felker in 2012, in +// the interests of size, simplicity, and namespace cleanliness. +// +// Much of the math library code (src/math/* and src/complex/*) is +// Copyright © 1993,2004 Sun Microsystems or +// Copyright © 2003-2011 David Schultz or +// Copyright © 2003-2009 Steven G. Kargl or +// Copyright © 2003-2009 Bruce D. Evans or +// Copyright © 2008 Stephen L. Moshier or +// Copyright © 2017-2018 Arm Limited +// and labelled as such in comments in the individual source files. All +// have been licensed under extremely permissive terms. +// +// The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008 +// The Android Open Source Project and is licensed under a two-clause BSD +// license. It was taken from Bionic libc, used on Android. +// +// The AArch64 memcpy and memset code (src/string/aarch64/*) are +// Copyright © 1999-2019, Arm Limited. +// +// The implementation of DES for crypt (src/crypt/crypt_des.c) is +// Copyright © 1994 David Burren. It is licensed under a BSD license. +// +// The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was +// originally written by Solar Designer and placed into the public +// domain. The code also comes with a fallback permissive license for use +// in jurisdictions that may not recognize the public domain. +// +// The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011 +// Valentin Ochs and is licensed under an MIT-style license. +// +// The x86_64 port was written by Nicholas J. Kain and is licensed under +// the standard MIT terms. +// +// The mips and microblaze ports were originally written by Richard +// Pennington for use in the ellcc project. The original code was adapted +// by Rich Felker for build system and code conventions during upstream +// integration. It is licensed under the standard MIT terms. +// +// The mips64 port was contributed by Imagination Technologies and is +// licensed under the standard MIT terms. +// +// The powerpc port was also originally written by Richard Pennington, +// and later supplemented and integrated by John Spencer. It is licensed +// under the standard MIT terms. +// +// All other files which have no copyright comments are original works +// produced specifically for use as part of this library, written either +// by Rich Felker, the main author of the library, or by one or more +// contibutors listed above. Details on authorship of individual files +// can be found in the git version control history of the project. The +// omission of copyright and license comments in each file is in the +// interest of source tree size. +// +// In addition, permission is hereby granted for all public header files +// (include/* and arch/*/bits/*) and crt files intended to be linked into +// applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit +// the copyright notice and permission notice otherwise required by the +// license, and to use these files without any requirement of +// attribution. These files include substantial contributions from: +// +// Bobby Bingham +// John Spencer +// Nicholas J. Kain +// Rich Felker +// Richard Pennington +// Stefan Kristiansson +// Szabolcs Nagy +// +// all of whom have explicitly granted such permission. +// +// This file previously contained text expressing a belief that most of +// the files covered by the above exception were sufficiently trivial not +// to be subject to copyright, resulting in confusion over whether it +// negated the permissions granted in the license. In the spirit of +// permissive licensing, and of not having licensing issues being an +// obstacle to adoption, that text has been removed. +const ( /* copyright.c:194:1: */ + __musl__copyright__ = 0 +) + +const ( /* nameser.h:117:1: */ + ns_uop_delete = 0 + ns_uop_add = 1 + ns_uop_max = 2 +) + +const ( /* nameser.h:147:1: */ + ns_t_invalid = 0 + ns_t_a = 1 + ns_t_ns = 2 + ns_t_md = 3 + ns_t_mf = 4 + ns_t_cname = 5 + ns_t_soa = 6 + ns_t_mb = 7 + ns_t_mg = 8 + ns_t_mr = 9 + ns_t_null = 10 + ns_t_wks = 11 + ns_t_ptr = 12 + ns_t_hinfo = 13 + ns_t_minfo = 14 + ns_t_mx = 15 + ns_t_txt = 16 + ns_t_rp = 17 + ns_t_afsdb = 18 + ns_t_x25 = 19 + ns_t_isdn = 20 + ns_t_rt = 21 + ns_t_nsap = 22 + ns_t_nsap_ptr = 23 + ns_t_sig = 24 + ns_t_key = 25 + ns_t_px = 26 + ns_t_gpos = 27 + ns_t_aaaa = 28 + ns_t_loc = 29 + ns_t_nxt = 30 + ns_t_eid = 31 + ns_t_nimloc = 32 + ns_t_srv = 33 + ns_t_atma = 34 + ns_t_naptr = 35 + ns_t_kx = 36 + ns_t_cert = 37 + ns_t_a6 = 38 + ns_t_dname = 39 + ns_t_sink = 40 + ns_t_opt = 41 + ns_t_apl = 42 + ns_t_tkey = 249 + ns_t_tsig = 250 + ns_t_ixfr = 251 + ns_t_axfr = 252 + ns_t_mailb = 253 + ns_t_maila = 254 + ns_t_any = 255 + ns_t_zxfr = 256 + ns_t_max = 65536 +) + +const ( /* nameser.h:210:1: */ + ns_c_invalid = 0 + ns_c_in = 1 + ns_c_2 = 2 + ns_c_chaos = 3 + ns_c_hs = 4 + ns_c_none = 254 + ns_c_any = 255 + ns_c_max = 65536 +) + +const ( /* nameser.h:221:1: */ + ns_kt_rsa = 1 + ns_kt_dh = 2 + ns_kt_dsa = 3 + ns_kt_private = 254 +) + +const ( /* nameser.h:228:1: */ + cert_t_pkix = 1 + cert_t_spki = 2 + cert_t_pgp = 3 + cert_t_url = 253 + cert_t_oid = 254 +) + +const ( /* nameser.h:28:1: */ + ns_s_qd = 0 + ns_s_zn = 0 + ns_s_an = 1 + ns_s_pr = 1 + ns_s_ns = 2 + ns_s_ud = 2 + ns_s_ar = 3 + ns_s_max = 4 +) + +const ( /* nameser.h:75:1: */ + ns_f_qr = 0 + ns_f_opcode = 1 + ns_f_aa = 2 + ns_f_tc = 3 + ns_f_rd = 4 + ns_f_ra = 5 + ns_f_z = 6 + ns_f_ad = 7 + ns_f_cd = 8 + ns_f_rcode = 9 + ns_f_max = 10 +) + +const ( /* nameser.h:89:1: */ + ns_o_query = 0 + ns_o_iquery = 1 + ns_o_status = 2 + ns_o_notify = 4 + ns_o_update = 5 + ns_o_max = 6 +) + +const ( /* nameser.h:98:1: */ + ns_r_noerror = 0 + ns_r_formerr = 1 + ns_r_servfail = 2 + ns_r_nxdomain = 3 + ns_r_notimpl = 4 + ns_r_refused = 5 + ns_r_yxdomain = 6 + ns_r_yxrrset = 7 + ns_r_nxrrset = 8 + ns_r_notauth = 9 + ns_r_notzone = 10 + ns_r_max = 11 + ns_r_badvers = 16 + ns_r_badsig = 16 + ns_r_badkey = 17 + ns_r_badtime = 18 +) + +const ( /* pthread_impl.h:58:1: */ + DT_EXITING = 0 + DT_JOINABLE = 1 + DT_DETACHED = 2 +) + +type ptrdiff_t = int64 /* <builtin>:3:26 */ + +type size_t = uint64 /* <builtin>:9:23 */ + +type wchar_t = int32 /* <builtin>:15:24 */ + +type uint16_t = uint16 /* alltypes.h:126:25 */ + +type uint32_t = uint32 /* alltypes.h:131:25 */ + +type uint64_t = uint64 /* alltypes.h:136:25 */ + +func __bswap32(tls *TLS, __x uint32_t) uint32_t { /* endian.h:24:26: */ + return __x>>24 | __x>>8&uint32_t(0xff00) | __x<<8&uint32_t(0xff0000) | __x<<24 +} + +var table = [384]uint16{ + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16((0x200/256 | 0x200*256) % 65536), uint16((0x320/256 | 0x320*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x220/256 | 0x220*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16((0x160/256 | 0x160*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), + uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), + uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), + uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x8d8/256 | 0x8d8*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), + uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8d5/256 | 0x8d5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), + uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), + uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), + uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x8c5/256 | 0x8c5*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), + uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8d6/256 | 0x8d6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), + uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), + uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), + uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x8c6/256 | 0x8c6*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x4c0/256 | 0x4c0*256) % 65536), uint16((0x200/256 | 0x200*256) % 65536), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), + uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), uint16(0), +} /* __ctype_b_loc.c:9:29 */ + +var ptable uintptr = 0 /* __ctype_b_loc.c:36:29 */ + +func X__ctype_b_loc(tls *TLS) uintptr { /* __ctype_b_loc.c:38:22: */ + return uintptr(unsafe.Pointer(&ptable)) +} + +func __isspace(tls *TLS, _c int32) int32 { /* ctype.h:26:21: */ + return Bool32(_c == ' ' || uint32(_c)-uint32('\t') < uint32(5)) +} + +type __locale_struct = struct{ cat [6]uintptr } /* alltypes.h:343:9 */ + +type locale_t = uintptr /* alltypes.h:343:32 */ + +func Xisalnum(tls *TLS, c int32) int32 { /* isalnum.c:3:5: */ + return Bool32(func() int32 { + if 0 != 0 { + return Xisalpha(tls, c) + } + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) + }() != 0 || func() int32 { + if 0 != 0 { + return Xisdigit(tls, c) + } + return Bool32(uint32(c)-uint32('0') < uint32(10)) + }() != 0) +} + +func X__isalnum_l(tls *TLS, c int32, l locale_t) int32 { /* isalnum.c:8:5: */ + return Xisalnum(tls, c) +} + +func Xisalpha(tls *TLS, c int32) int32 { /* isalpha.c:4:5: */ + return Bool32(uint32(c)|uint32(32)-uint32('a') < uint32(26)) +} + +func X__isalpha_l(tls *TLS, c int32, l locale_t) int32 { /* isalpha.c:9:5: */ + return Xisalpha(tls, c) +} + +func Xisdigit(tls *TLS, c int32) int32 { /* isdigit.c:4:5: */ + return Bool32(uint32(c)-uint32('0') < uint32(10)) +} + +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 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 off_t = int64 /* alltypes.h:162:16 */ + +type ino_t = uint64 /* alltypes.h:167:25 */ + +type dirent = struct { + d_ino ino_t + d_off off_t + d_reclen uint16 + d_type uint8 + d_name [256]int8 + _ [5]byte +} /* dirent.h:5:1 */ + +type __dirstream = struct { + tell off_t + fd int32 + buf_pos int32 + buf_end int32 + lock [1]int32 + buf [2048]int8 +} /* dirent.h:20:9 */ + +type DIR = __dirstream /* dirent.h:20:28 */ + +type ssize_t = int64 /* alltypes.h:65:15 */ + +type intptr_t = int64 /* alltypes.h:70:15 */ + +type pid_t = int32 /* alltypes.h:235:13 */ + +type uid_t = uint32 /* alltypes.h:245:18 */ + +type gid_t = uint32 /* alltypes.h:250:18 */ + +type useconds_t = uint32 /* alltypes.h:260:18 */ + +type div_t = struct { + quot int32 + rem int32 +} /* stdlib.h:62:35 */ +type ldiv_t = struct { + quot int64 + rem int64 +} /* stdlib.h:63:36 */ +type lldiv_t = struct { + quot int64 + rem int64 +} /* stdlib.h:64:41 */ + +func Xclosedir(tls *TLS, dir uintptr) int32 { /* closedir.c:6:5: */ + var ret int32 = Xclose(tls, (*DIR)(unsafe.Pointer(dir)).fd) + Xfree(tls, dir) + return ret +} + +type mode_t = uint32 /* alltypes.h:152:18 */ + +type iovec = struct { + iov_base uintptr + iov_len size_t +} /* alltypes.h:355:1 */ + +type flock = struct { + l_type int16 + l_whence int16 + _ [4]byte + l_start off_t + l_len off_t + l_pid pid_t + _ [4]byte +} /* fcntl.h:24:1 */ + +type file_handle = struct { + _ [0]uint32 + handle_bytes uint32 + handle_type int32 +} /* fcntl.h:167:1 */ + +type f_owner_ex = struct { + __type int32 + pid pid_t +} /* fcntl.h:172:1 */ + +type syscall_arg_t = int64 /* syscall.h:22:14 */ + +func Xopendir(tls *TLS, name uintptr) uintptr { /* opendir.c:8:5: */ + var fd int32 + var dir uintptr + + if AssignInt32(&fd, Xopen(tls, name, 00|0200000|02000000, 0)) < 0 { + return uintptr(0) + } + if !(int32(AssignUintptr(&dir, Xcalloc(tls, uint64(1), uint64(unsafe.Sizeof(DIR{}))))) != 0) { + X__syscall1(tls, int64(3), int64(fd)) + return uintptr(0) + } + (*DIR)(unsafe.Pointer(dir)).fd = fd + return dir +} + +type max_align_t = struct { + __ll int64 + __ld float64 +} /* alltypes.h:41:54 */ + +type dirstream_buf_alignment_check = [1]int8 /* readdir.c:7:14 */ + +func Xreaddir(tls *TLS, dir uintptr) uintptr { /* readdir.c:10:15: */ + var de uintptr + + if (*DIR)(unsafe.Pointer(dir)).buf_pos >= (*DIR)(unsafe.Pointer(dir)).buf_end { + var len int32 = int32(X__syscall3(tls, int64(217), int64((*DIR)(unsafe.Pointer(dir)).fd), int64(dir+24), int64(unsafe.Sizeof([2048]int8{})))) + if len <= 0 { + if len < 0 && len != -2 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = -len + } + return uintptr(0) + } + (*DIR)(unsafe.Pointer(dir)).buf_end = len + (*DIR)(unsafe.Pointer(dir)).buf_pos = 0 + } + de = dir + 24 + uintptr((*DIR)(unsafe.Pointer(dir)).buf_pos) + *(*int32)(unsafe.Pointer(dir + 12)) += int32((*dirent)(unsafe.Pointer(de)).d_reclen) + (*DIR)(unsafe.Pointer(dir)).tell = (*dirent)(unsafe.Pointer(de)).d_off + return de +} + +type uintptr_t = uint64 /* alltypes.h:55:24 */ + +type int8_t = int8 /* alltypes.h:96:25 */ + +type int16_t = int16 /* alltypes.h:101:25 */ + +type int32_t = int32 /* alltypes.h:106:25 */ + +type int64_t = int64 /* alltypes.h:111:25 */ + +type intmax_t = int64 /* alltypes.h:116:25 */ + +type uint8_t = uint8 /* alltypes.h:121:25 */ + +type uintmax_t = uint64 /* alltypes.h:146:25 */ + +type int_fast8_t = int8_t /* stdint.h:22:16 */ +type int_fast64_t = int64_t /* stdint.h:23:17 */ + +type int_least8_t = int8_t /* stdint.h:25:17 */ +type int_least16_t = int16_t /* stdint.h:26:17 */ +type int_least32_t = int32_t /* stdint.h:27:17 */ +type int_least64_t = int64_t /* stdint.h:28:17 */ + +type uint_fast8_t = uint8_t /* stdint.h:30:17 */ +type uint_fast64_t = uint64_t /* stdint.h:31:18 */ + +type uint_least8_t = uint8_t /* stdint.h:33:18 */ +type uint_least16_t = uint16_t /* stdint.h:34:18 */ +type uint_least32_t = uint32_t /* stdint.h:35:18 */ +type uint_least64_t = uint64_t /* stdint.h:36:18 */ + +type int_fast16_t = int32_t /* stdint.h:1:17 */ +type int_fast32_t = int32_t /* stdint.h:2:17 */ +type uint_fast16_t = uint32_t /* stdint.h:3:18 */ +type uint_fast32_t = uint32_t /* stdint.h:4:18 */ + +type _IO_FILE = struct { + flags uint32 + _ [4]byte + rpos uintptr + rend uintptr + close uintptr + wend uintptr + wpos uintptr + mustbezero_1 uintptr + wbase uintptr + read uintptr + write uintptr + seek uintptr + buf uintptr + buf_size size_t + prev uintptr + next uintptr + fd int32 + pipe_pid int32 + lockcount int64 + mode int32 + lock int32 + lbf int32 + _ [4]byte + cookie uintptr + off off_t + getln_buf uintptr + mustbezero_2 uintptr + shend uintptr + shlim off_t + shcnt off_t + prev_locked uintptr + next_locked uintptr + locale uintptr +} /* alltypes.h:320:9 */ + +type FILE = _IO_FILE /* alltypes.h:320:25 */ + +type va_list = uintptr /* alltypes.h:326:27 */ + +type _G_fpos64_t = struct { + _ [0]uint64 + __opaque [16]int8 +} /* stdio.h:54:9 */ + +type fpos_t = _G_fpos64_t /* stdio.h:58:3 */ + +type float_t = float32 /* alltypes.h:29:15 */ + +type double_t = float64 /* alltypes.h:34:16 */ + +func __FLOAT_BITS(tls *TLS, __f float32) uint32 { /* math.h:55:26: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + // var __u struct {__f float32;} at bp, 4 + + *(*float32)(unsafe.Pointer(bp)) = __f + return *(*uint32)(unsafe.Pointer(bp)) +} + +func __DOUBLE_BITS(tls *TLS, __f float64) uint64 { /* math.h:61:36: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var __u struct {__f float64;} at bp, 8 + + *(*float64)(unsafe.Pointer(bp)) = __f + return *(*uint64)(unsafe.Pointer(bp)) +} + +type __pthread = struct { + self uintptr + dtv uintptr + prev uintptr + next uintptr + sysinfo uintptr_t + canary uintptr_t + canary2 uintptr_t + tid int32 + errno_val int32 + detach_state int32 + cancel int32 + canceldisable uint8 + cancelasync uint8 + tsd_used uint8 /* unsigned char tsd_used: 1, unsigned char dlerror_flag: 1 */ + _ [5]byte + map_base uintptr + map_size size_t + stack uintptr + stack_size size_t + guard_size size_t + result uintptr + cancelbuf uintptr + tsd uintptr + robust_list struct { + head uintptr + off int64 + pending uintptr + } + timer_id int32 + _ [4]byte + locale locale_t + killlock [1]int32 + _ [4]byte + dlerror_buf uintptr + stdio_locks uintptr + canary_at_end uintptr_t + dtv_copy uintptr +} /* alltypes.h:273:9 */ + +func scanexp(tls *TLS, f uintptr, pok int32) int64 { /* floatscan.c:37:18: */ + var c int32 + var x int32 + var y int64 + var neg int32 = 0 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c == '+' || c == '-' { + neg = Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') >= 10 && pok != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + } + if uint32(c-'0') >= 10 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + return -0x7fffffffffffffff - int64(1) + } + for x = 0; uint32(c-'0') < 10 && x < 0x7fffffff/10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + x = 10*x + c - '0' + } + for y = int64(x); uint32(c-'0') < 10 && y < 0x7fffffffffffffff/int64(100); c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + y = int64(10)*y + int64(c) - int64('0') + } + for ; uint32(c-'0') < 10; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if neg != 0 { + return -y + } + return y +} + +func decfloat(tls *TLS, f uintptr, c int32, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:64:20: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var x [128]uint32_t at bp, 512 + + var i int32 + var j int32 + var k int32 + var a int32 + var z int32 + var lrp int64 = int64(0) + var dc int64 = int64(0) + var e10 int64 = int64(0) + var lnz int32 = 0 + var gotdig int32 = 0 + var gotrad int32 = 0 + var rp int32 + var e2 int32 + var emax int32 = -emin - bits + 3 + var denormal int32 = 0 + var y float64 + var frac float64 = float64(0) + var bias float64 = float64(0) + + j = 0 + k = 0 + + // Don't let leading zeros consume buffer space + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + if c == '.' { + gotrad = 1 + for c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }(); c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + lrp-- + } + } + + *(*uint32_t)(unsafe.Pointer(bp)) = uint32_t(0) + for ; uint32(c-'0') < 10 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + gotrad = 1 + lrp = dc + } else if k < 128-3 { + dc++ + if c != '0' { + lnz = int32(dc) + } + if j != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))*uint32_t(10) + uint32_t(c) - uint32_t('0') + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(c - '0') + } + if PreIncInt32(&j, 1) == 9 { + k++ + j = 0 + } + gotdig = 1 + } else { + dc++ + if c != '0' { + lnz = (128 - 4) * 9 + *(*uint32_t)(unsafe.Pointer(bp + 124*4)) |= uint32_t(1) + } + } + } + if !(gotrad != 0) { + lrp = dc + } + + if gotdig != 0 && c|32 == 'e' { + e10 = scanexp(tls, f, pok) + if e10 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e10 = int64(0) + } + lrp = lrp + e10 + } else if c >= 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + if !(gotdig != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + // Handle zero specially to avoid nasty special cases later + if !(int32(*(*uint32_t)(unsafe.Pointer(bp))) != 0) { + return float64(sign) * 0.0 + } + + // Optimize small integers (w/no exponent) and over/under-flow + if lrp == dc && dc < int64(10) && (bits > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bits == uint32_t(0)) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if lrp > int64(-emin/2) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if lrp < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + // Align incomplete final B1B digit + if j != 0 { + for ; j < 9; j++ { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) *= uint32_t(10) + } + k++ + j = 0 + } + + a = 0 + z = k + e2 = 0 + rp = int32(lrp) + + // Optimize small to mid-size integers (even in exp. notation) + if lnz < 9 && lnz <= rp && rp < 18 { + if rp == 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) + } + if rp < 9 { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) / float64(_sp10s[8-rp]) + } + var bitlim int32 = bits - 3*(rp-9) + if bitlim > 30 || *(*uint32_t)(unsafe.Pointer(bp))>>bitlim == uint32_t(0) { + return float64(sign) * float64(*(*uint32_t)(unsafe.Pointer(bp))) * float64(_sp10s[rp-10]) + } + } + + // Drop trailing zeros + for ; !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(z-1)*4))) != 0); z-- { + } + + // Align radix point to B1B digit boundary + if rp%9 != 0 { + var rpm9 int32 + if rp >= 0 { + rpm9 = rp % 9 + } else { + rpm9 = rp%9 + 9 + } + var p10 int32 = _sp10s[8-rpm9] + var carry uint32_t = uint32_t(0) + for k = a; k != z; k++ { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) % uint32_t(p10) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))/uint32_t(p10) + carry + carry = uint32_t(1000000000/p10) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + rp = rp - 9 + } + } + if carry != 0 { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(PostIncInt32(&z, 1))*4)) = carry + } + rp = rp + (9 - rpm9) + } + + // Upscale until desired number of bits are left of radix point + for rp < 9*2 || rp == 9*2 && *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) < _sth[0] { + var carry uint32_t = uint32_t(0) + e2 = e2 - 29 + for k = (z - 1) & (128 - 1); ; k = (k - 1) & (128 - 1) { + var tmp uint64_t = uint64_t(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)))<<29 + uint64_t(carry) + if tmp > uint64(1000000000) { + carry = uint32_t(tmp / uint64(1000000000)) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp % uint64(1000000000)) + } else { + carry = uint32_t(0) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = uint32_t(tmp) + } + if k == (z-1)&(128-1) && k != a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + z = k + } + if k == a { + break + } + } + if carry != 0 { + rp = rp + 9 + a = (a - 1) & (128 - 1) + if a == z { + z = (z - 1) & (128 - 1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) + } + *(*uint32_t)(unsafe.Pointer(bp + uintptr(a)*4)) = carry + } + } + + // Downscale until exactly number of bits are left of radix point + for { + var carry uint32_t = uint32_t(0) + var sh int32 = 1 + for i = 0; i < 2; i++ { + k = (a + i) & (128 - 1) + if k == z || *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) < _sth[i] { + i = 2 + break + } + if *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) > _sth[i] { + break + } + } + if i == 2 && rp == 9*2 { + break + } + // FIXME: find a way to compute optimal sh + if rp > 9+9*2 { + sh = 9 + } + e2 = e2 + sh + for k = a; k != z; k = (k + 1) & (128 - 1) { + var tmp uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) & uint32_t(int32(1)<<sh-1) + *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4)) = *(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))>>sh + carry + carry = uint32_t(int32(1000000000)>>sh) * tmp + if k == a && !(int32(*(*uint32_t)(unsafe.Pointer(bp + uintptr(k)*4))) != 0) { + a = (a + 1) & (128 - 1) + i-- + rp = rp - 9 + } + } + if carry != 0 { + if (z+1)&(128-1) != a { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(z)*4)) = carry + z = (z + 1) & (128 - 1) + } else { + *(*uint32_t)(unsafe.Pointer(bp + uintptr((z-1)&(128-1))*4)) |= uint32_t(1) + } + } + } + + // Assemble desired bits into floating point variable + for y = float64(AssignInt32(&i, 0)); i < 2; i++ { + if (a+i)&(128-1) == z { + *(*uint32_t)(unsafe.Pointer(bp + uintptr(AssignInt32(&z, (z+1)&(128-1))-1)*4)) = uint32_t(0) + } + y = 1000000000.0*y + float64(*(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4))) + } + + y = y * float64(sign) + + // Limit precision for denormal results + if bits > 53+e2-emin { + bits = 53 + e2 - emin + if bits < 0 { + bits = 0 + } + denormal = 1 + } + + // Calculate bias term to force rounding, move out lower bits + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 2*53-bits-1), y) + frac = Xfmodl(tls, y, Xscalbn(tls, float64(1), 53-bits)) + y = y - frac + y = y + bias + } + + // Process tail of decimal input so it can affect rounding + if (a+i)&(128-1) != z { + var t uint32_t = *(*uint32_t)(unsafe.Pointer(bp + uintptr((a+i)&(128-1))*4)) + if t < uint32_t(500000000) && (t != 0 || (a+i+1)&(128-1) != z) { + frac = frac + 0.25*float64(sign) + } else if t > uint32_t(500000000) { + frac = frac + 0.75*float64(sign) + } else if t == uint32_t(500000000) { + if (a+i+1)&(128-1) == z { + frac = frac + 0.5*float64(sign) + } else { + frac = frac + 0.75*float64(sign) + } + } + if 53-bits >= 2 && !(Xfmodl(tls, frac, float64(1)) != 0) { + frac += 1 + } + } + + y = y + frac + y = y - bias + + if (e2+53)&0x7fffffff > emax-5 { + if Xfabsl(tls, y) >= float64(float64(2))/2.22044604925031308085e-16 { + if denormal != 0 && bits == 53+e2-emin { + denormal = 0 + } + y = y * 0.5 + e2++ + } + if e2+53 > emax || denormal != 0 && frac != 0 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + } + + return Xscalbnl(tls, y, e2) +} + +var _sth = [2]uint32_t{uint32_t(9007199), uint32_t(254740991)} /* floatscan.c:67:24 */ +var _sp10s = [8]int32{10, 100, 1000, 10000, + 100000, 1000000, 10000000, 100000000} /* floatscan.c:80:19 */ + +func hexfloat(tls *TLS, f uintptr, bits int32, emin int32, sign int32, pok int32) float64 { /* floatscan.c:315:20: */ + var x uint32_t = uint32_t(0) + var y float64 = float64(0) + var scale float64 = float64(1) + var bias float64 = float64(0) + var gottail int32 = 0 + var gotrad int32 = 0 + var gotdig int32 = 0 + var rp int64 = int64(0) + var dc int64 = int64(0) + var e2 int64 = int64(0) + var d int32 + var c int32 + + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + + // Skip leading zeros + for ; c == '0'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + gotdig = 1 + } + + if c == '.' { + gotrad = 1 + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + // Count zeros after the radix point before significand + rp = int64(0) + __1: + if !(c == '0') { + goto __3 + } + gotdig = 1 + goto __2 + __2: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + rp-- + goto __1 + goto __3 + __3: + } + + for ; uint32(c-'0') < 10 || uint32(c|32-'a') < 6 || c == '.'; c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() { + if c == '.' { + if gotrad != 0 { + break + } + rp = dc + gotrad = 1 + } else { + gotdig = 1 + if c > '9' { + d = c | 32 + 10 - 'a' + } else { + d = c - '0' + } + if dc < int64(8) { + x = x*uint32_t(16) + uint32_t(d) + } else if dc < int64(53/4+1) { + y = y + float64(d)*AssignDivFloat64(&scale, float64(16)) + } else if d != 0 && !(gottail != 0) { + y = y + 0.5*scale + gottail = 1 + } + dc++ + } + } + if !(gotdig != 0) { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if gotrad != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + } else { + X__shlim(tls, f, int64(0)) + } + return float64(sign) * 0.0 + } + if !(gotrad != 0) { + rp = dc + } + for dc < int64(8) { + x = x * uint32_t(16) + dc++ + } + if c|32 == 'p' { + e2 = scanexp(tls, f, pok) + if e2 == -0x7fffffffffffffff-int64(1) { + if pok != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } else { + X__shlim(tls, f, int64(0)) + return float64(0) + } + e2 = int64(0) + } + } else { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + e2 = e2 + (int64(4)*rp - int64(32)) + + if !(x != 0) { + return float64(sign) * 0.0 + } + if e2 > int64(-emin) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 1.79769313486231570815e+308 * 1.79769313486231570815e+308 + } + if e2 < int64(emin-2*53) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return float64(sign) * 2.22507385850720138309e-308 * 2.22507385850720138309e-308 + } + + for x < 0x80000000 { + if y >= 0.5 { + x = x + (x + uint32_t(1)) + y = y + (y - float64(1)) + } else { + x = x + x + y = y + y + } + e2-- + } + + if int64(bits) > int64(32)+e2-int64(emin) { + bits = int32(int64(32) + e2 - int64(emin)) + if bits < 0 { + bits = 0 + } + } + + if bits < 53 { + bias = Xcopysignl(tls, Xscalbn(tls, float64(1), 32+53-bits-1), float64(sign)) + } + + if bits < 32 && y != 0 && !(x&uint32_t(1) != 0) { + x++ + y = float64(0) + } + + y = bias + float64(sign)*float64(x) + float64(sign)*y + y = y - bias + + if !(y != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + } + + return Xscalbnl(tls, y, int32(e2)) +} + +func X__floatscan(tls *TLS, f uintptr, prec int32, pok int32) float64 { /* floatscan.c:427:13: */ + var sign int32 = 1 + var i size_t + var bits int32 + var emin int32 + var c int32 + + switch prec { + case 0: + bits = 24 + emin = -125 - bits + break + case 1: + bits = 53 + emin = -1021 - bits + break + case 2: + bits = 53 + emin = -1021 - bits + break + default: + return float64(0) + } + + for __isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0 { + } + + if c == '+' || c == '-' { + sign = sign - 2*Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + + for i = uint64(0); i < uint64(8) && c|32 == int32(*(*int8)(unsafe.Pointer(ts /* "infinity" */ + uintptr(i)))); i++ { + if i < uint64(7) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { + if i != uint64(8) { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if pok != 0 { + for ; i > uint64(3); i-- { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + } + } + return float64(float32(sign) * X__builtin_inff(tls)) + } + if !(i != 0) { + for i = uint64(0); i < uint64(3) && c|32 == int32(*(*int8)(unsafe.Pointer(ts + 9 /* "nan" */ + uintptr(i)))); i++ { + if i < uint64(2) { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + } + } + } + if i == uint64(3) { + if func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() != '(' { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + return float64(X__builtin_nanf(tls, ts+13)) + } + for i = uint64(1); ; i++ { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if uint32(c-'0') < 10 || uint32(c-'A') < 26 || uint32(c-'a') < 26 || c == '_' { + continue + } + if c == ')' { + return float64(X__builtin_nanf(tls, ts+13)) + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !(pok != 0) { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + for PostDecUint64(&i, 1) != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + } + return float64(X__builtin_nanf(tls, ts+13)) + } + return float64(X__builtin_nanf(tls, ts+13)) + } + + if i != 0 { + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + X__shlim(tls, f, int64(0)) + return float64(0) + } + + if c == '0' { + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if c|32 == 'x' { + return hexfloat(tls, f, bits, emin, sign, pok) + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + c = '0' + } + + return decfloat(tls, f, c, bits, emin, sign, pok) +} + +// Lookup table for digit values. -1==255>=36 -> invalid +var table1 = [257]uint8{Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + uint8(0), uint8(1), uint8(2), uint8(3), uint8(4), uint8(5), uint8(6), uint8(7), uint8(8), uint8(9), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), uint8(10), uint8(11), uint8(12), uint8(13), uint8(14), uint8(15), uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(21), uint8(22), uint8(23), uint8(24), + uint8(25), uint8(26), uint8(27), uint8(28), uint8(29), uint8(30), uint8(31), uint8(32), uint8(33), uint8(34), uint8(35), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), + Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), Uint8FromInt32(-1), +} /* intscan.c:7:28 */ + +func X__intscan(tls *TLS, f uintptr, base uint32, pok int32, lim uint64) uint64 { /* intscan.c:26:20: */ + var val uintptr + var c int32 + var neg int32 + var x uint32 + var y uint64 + var bs int32 + val = uintptr(unsafe.Pointer(&table1)) + uintptr(1) + neg = 0 + if !(base > uint32(36) || base == uint32(1)) { + goto __1 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__1: + ; +__2: + if !(__isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0) { + goto __3 + } + goto __2 +__3: + ; + if !(c == '+' || c == '-') { + goto __4 + } + neg = -Bool32(c == '-') + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() +__4: + ; + if !((base == uint32(0) || base == uint32(16)) && c == '0') { + goto __5 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(c|32 == 'x') { + goto __7 + } + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + if !(int32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= 16) { + goto __9 + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !(pok != 0) { + goto __10 + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + goto __11 +__10: + X__shlim(tls, f, int64(0)) +__11: + ; + return uint64(0) +__9: + ; + base = uint32(16) + goto __8 +__7: + if !(base == uint32(0)) { + goto __12 + } + base = uint32(8) +__12: + ; +__8: + ; + goto __6 +__5: + if !(base == uint32(0)) { + goto __13 + } + base = uint32(10) +__13: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) >= base) { + goto __14 + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + X__shlim(tls, f, int64(0)) + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 22 + return uint64(0) +__14: + ; +__6: + ; + if !(base == uint32(10)) { + goto __15 + } + x = uint32(0) +__17: + if !(uint32(c-'0') < 10 && x <= 0xffffffff/uint32(10)-uint32(1)) { + goto __19 + } + x = x*uint32(10) + uint32(c-'0') + goto __18 +__18: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __17 + goto __19 +__19: + ; + y = uint64(x) +__20: + if !(uint32(c-'0') < 10 && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(10) && uint64(10)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(c-'0')) { + goto __22 + } + y = y*uint64(10) + uint64(c-'0') + goto __21 +__21: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __20 + goto __22 +__22: + ; + if !(uint32(c-'0') >= 10) { + goto __23 + } + goto done +__23: + ; + goto __16 +__15: + if !!(base&(base-uint32(1)) != 0) { + goto __24 + } + bs = int32(*(*int8)(unsafe.Pointer(ts + 14 + uintptr(uint32(0x17)*base>>5&uint32(7))))) + x = uint32(0) +__26: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(32)) { + goto __28 + } + x = x<<bs | uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __27 +__27: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __26 + goto __28 +__28: + ; + y = uint64(x) +__29: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= uint64(2*uint64(0x7fffffffffffffff)+uint64(1))>>bs) { + goto __31 + } + y = y<<bs | uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __30 +__30: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __29 + goto __31 +__31: + ; + goto __25 +__24: + x = uint32(0) +__32: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && x <= 0xffffffff/uint32(36)-uint32(1)) { + goto __34 + } + x = x*base + uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __33 +__33: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __32 + goto __34 +__34: + ; + y = uint64(x) +__35: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base && y <= (2*uint64(0x7fffffffffffffff)+uint64(1))/uint64(base) && uint64(base)*y <= 2*uint64(0x7fffffffffffffff)+uint64(1)-uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c))))) { + goto __37 + } + y = y*uint64(base) + uint64(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) + goto __36 +__36: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __35 + goto __37 +__37: + ; +__25: + ; +__16: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __38 + } +__39: + if !(uint32(*(*uint8)(unsafe.Pointer(val + uintptr(c)))) < base) { + goto __41 + } + goto __40 +__40: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() + goto __39 + goto __41 +__41: + ; + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + y = lim + if !(lim&uint64(1) != 0) { + goto __42 + } + neg = 0 +__42: + ; +__38: + ; +done: + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !(y >= lim) { + goto __43 + } + if !(!(lim&uint64(1) != 0) && !(neg != 0)) { + goto __44 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim - uint64(1) + goto __45 +__44: + if !(y > lim) { + goto __46 + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 34 + return lim +__46: + ; +__45: + ; +__43: + ; + return y ^ uint64(neg) - uint64(neg) +} + +// The shcnt field stores the number of bytes read so far, offset by +// the value of buf-rpos at the last function call (__shlim or __shgetc), +// so that between calls the inline shcnt macro can add rpos-buf to get +// the actual count. + +func X__shlim(tls *TLS, f uintptr, lim off_t) { /* shgetc.c:8:6: */ + (*FILE)(unsafe.Pointer(f)).shlim = lim + (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf) - int64((*FILE)(unsafe.Pointer(f)).rpos)) / 1 + // If lim is nonzero, rend must be a valid pointer. + if lim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > lim { + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr(lim) + } else { + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + } +} + +func X__shgetc(tls *TLS, f uintptr) int32 { /* shgetc.c:19:5: */ + var c int32 + var cnt off_t = (*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 + if (*FILE)(unsafe.Pointer(f)).shlim != 0 && cnt >= (*FILE)(unsafe.Pointer(f)).shlim || AssignInt32(&c, X__uflow(tls, f)) < 0 { + (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + (*FILE)(unsafe.Pointer(f)).shlim = int64(-1) + return -1 + } + cnt++ + if (*FILE)(unsafe.Pointer(f)).shlim != 0 && (int64((*FILE)(unsafe.Pointer(f)).rend)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 > (*FILE)(unsafe.Pointer(f)).shlim-cnt { + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rpos + uintptr((*FILE)(unsafe.Pointer(f)).shlim-cnt) + } else { + (*FILE)(unsafe.Pointer(f)).shend = (*FILE)(unsafe.Pointer(f)).rend + } + (*FILE)(unsafe.Pointer(f)).shcnt = (int64((*FILE)(unsafe.Pointer(f)).buf)-int64((*FILE)(unsafe.Pointer(f)).rpos))/1 + cnt + if (*FILE)(unsafe.Pointer(f)).rpos <= (*FILE)(unsafe.Pointer(f)).buf { + *(*uint8)(unsafe.Pointer((*FILE)(unsafe.Pointer(f)).rpos + UintptrFromInt32(-1))) = uint8(c) + } + 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) + + *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff)) + if !(e != 0) { + if *(*uint64_t)(unsafe.Pointer(bp))<<1 != 0 { + return 3 + } + return 2 + } + if e == 0x7ff { + if *(*uint64_t)(unsafe.Pointer(bp))<<12 != 0 { + return 0 + } + return 1 + } + return 4 +} + +func X__fpclassifyf(tls *TLS, x float32) int32 { /* __fpclassifyf.c:4:5: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + *(*struct{ f float32 })(unsafe.Pointer(bp)) = func() (r struct{ f float32 }) { + *(*float32)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint32_t)(unsafe.Pointer(bp)) >> 23 & uint32_t(0xff)) + if !(e != 0) { + if *(*uint32_t)(unsafe.Pointer(bp))<<1 != 0 { + return 3 + } + return 2 + } + if e == 0xff { + if *(*uint32_t)(unsafe.Pointer(bp))<<9 != 0 { + return 0 + } + return 1 + } + return 4 +} + +func X__fpclassifyl(tls *TLS, x float64) int32 { /* __fpclassifyl.c:4:5: */ + return X__fpclassify(tls, x) +} + +func Xcopysignl(tls *TLS, x float64, y float64) float64 { /* copysignl.c:4:13: */ + return Xcopysign(tls, x, y) +} + +func Xfabsl(tls *TLS, x float64) float64 { /* fabsl.c:3:13: */ + return Xfabs(tls, x) +} + +func Xfmodl(tls *TLS, x float64, y float64) float64 { /* fmodl.c:4:13: */ + return Xfmod(tls, x, y) +} + +func Xnanf(tls *TLS, s uintptr) float32 { /* nanf.c:3:7: */ + return X__builtin_nanf(tls, ts+13) +} + +var toint double_t = float64(float64(1)) / 2.22044604925031308085e-16 /* rint.c:10:23 */ + +func Xrint(tls *TLS, x float64) float64 { /* rint.c:12:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + *(*struct{ f float64 })(unsafe.Pointer(bp)) = func() (r struct{ f float64 }) { + *(*float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = x + return r + }() + var e int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 52 & uint64(0x7ff)) + var s int32 = int32(*(*uint64_t)(unsafe.Pointer(bp)) >> 63) + var y double_t + + if e >= 0x3ff+52 { + return x + } + if s != 0 { + y = x - toint + toint + } else { + y = x + toint - toint + } + if y == float64(0) { + if s != 0 { + return -Float64FromFloat64(0.0) + } + return float64(0) + } + return y +} + +func Xscalbn(tls *TLS, x float64, n int32) float64 { /* scalbn.c:4:8: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var u struct {f float64;} at bp, 8 + + var y double_t = x + + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + y = y * 0x1p1023 + n = n - 1023 + if n > 1023 { + n = 1023 + } + } + } else if n < -1022 { + // make sure final n < -53 to avoid double + // rounding in the subnormal range + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + y = y * (float64(0x1p-1022) * 0x1p53) + n = n + (1022 - 53) + if n < -1022 { + n = -1022 + } + } + } + *(*uint64_t)(unsafe.Pointer(bp)) = uint64_t(0x3ff+n) << 52 + x = y * *(*float64)(unsafe.Pointer(bp)) + return x +} + +func Xscalbnl(tls *TLS, x float64, n int32) float64 { /* scalbnl.c:4:13: */ + return Xscalbn(tls, x, n) +} + +// 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. + +type __locale_map = struct { + __map uintptr + map_size size_t + name [24]int8 + next uintptr +} /* alltypes.h:343:9 */ + +type tls_module = struct { + next uintptr + image uintptr + len size_t + size size_t + align size_t + offset size_t +} /* libc.h:14:1 */ + +type __libc = struct { + can_do_threads int8 + threaded int8 + secure int8 + need_locks int8 + threads_minus_1 int32 + auxv uintptr + tls_head uintptr + tls_size size_t + tls_align size_t + tls_cnt size_t + page_size size_t + global_locale struct{ cat [6]uintptr } +} /* libc.h:20:1 */ + +type time_t = int64 /* alltypes.h:85:16 */ + +type clockid_t = int32 /* alltypes.h:214:13 */ + +type timespec = struct { + tv_sec time_t + tv_nsec int64 +} /* alltypes.h:229:1 */ + +type pthread_t = uintptr /* alltypes.h:273:26 */ + +type pthread_once_t = int32 /* alltypes.h:279:13 */ + +type pthread_key_t = uint32 /* alltypes.h:284:18 */ + +type pthread_spinlock_t = int32 /* alltypes.h:289:13 */ + +type pthread_mutexattr_t = struct{ __attr uint32 } /* alltypes.h:294:37 */ + +type pthread_condattr_t = struct{ __attr uint32 } /* alltypes.h:299:37 */ + +type pthread_barrierattr_t = struct{ __attr uint32 } /* alltypes.h:304:37 */ + +type pthread_rwlockattr_t = struct{ __attr [2]uint32 } /* alltypes.h:309:40 */ + +type __sigset_t = struct{ __bits [16]uint64 } /* alltypes.h:349:9 */ + +type sigset_t = __sigset_t /* alltypes.h:349:71 */ + +type pthread_attr_t = struct { + __u struct { + _ [0]uint64 + __i [14]int32 + } +} /* alltypes.h:372:147 */ + +type pthread_mutex_t = struct { + __u struct { + _ [0]uint64 + __i [10]int32 + } +} /* alltypes.h:377:157 */ + +type pthread_cond_t = struct { + __u struct { + _ [0]uint64 + __i [12]int32 + } +} /* alltypes.h:387:112 */ + +type pthread_rwlock_t = struct { + __u struct { + _ [0]uint64 + __i [14]int32 + } +} /* alltypes.h:397:139 */ + +type pthread_barrier_t = struct { + __u struct { + _ [0]uint64 + __i [8]int32 + } +} /* alltypes.h:402:137 */ + +type sched_param = struct { + sched_priority int32 + __reserved1 int32 + __reserved2 [2]struct { + __reserved1 time_t + __reserved2 int64 + } + __reserved3 int32 + _ [4]byte +} /* sched.h:19:1 */ + +type timer_t = uintptr /* alltypes.h:209:14 */ + +type clock_t = int64 /* alltypes.h:219:14 */ + +type tm = struct { + tm_sec int32 + tm_min int32 + tm_hour int32 + tm_mday int32 + tm_mon int32 + tm_year int32 + tm_wday int32 + tm_yday int32 + tm_isdst int32 + _ [4]byte + tm_gmtoff int64 + tm_zone uintptr +} /* time.h:38:1 */ + +type itimerspec = struct { + it_interval struct { + tv_sec time_t + tv_nsec int64 + } + it_value struct { + tv_sec time_t + tv_nsec int64 + } +} /* time.h:80:1 */ + +type sigevent = struct { + sigev_value struct { + _ [0]uint64 + sival_int int32 + _ [4]byte + } + sigev_signo int32 + sigev_notify int32 + sigev_notify_function uintptr + sigev_notify_attributes uintptr + __pad [32]int8 +} /* time.h:107:1 */ + +type __ptcb = struct { + __f uintptr + __x uintptr + __next uintptr +} /* alltypes.h:273:9 */ + +type sigaltstack = struct { + ss_sp uintptr + ss_flags int32 + _ [4]byte + ss_size size_t +} /* signal.h:44:9 */ + +type stack_t = sigaltstack /* signal.h:44:28 */ + +type greg_t = int64 /* signal.h:59:19 */ +type gregset_t = [23]int64 /* signal.h:59:27 */ +type _fpstate = struct { + cwd uint16 + swd uint16 + ftw uint16 + fop uint16 + rip uint64 + rdp uint64 + mxcsr uint32 + mxcr_mask uint32 + _st [8]struct { + significand [4]uint16 + exponent uint16 + padding [3]uint16 + } + _xmm [16]struct{ element [4]uint32 } + padding [24]uint32 +} /* signal.h:60:9 */ + +type fpregset_t = uintptr /* signal.h:71:3 */ +type sigcontext = struct { + r8 uint64 + r9 uint64 + r10 uint64 + r11 uint64 + r12 uint64 + r13 uint64 + r14 uint64 + r15 uint64 + rdi uint64 + rsi uint64 + rbp uint64 + rbx uint64 + rdx uint64 + rax uint64 + rcx uint64 + rsp uint64 + rip uint64 + eflags uint64 + cs uint16 + gs uint16 + fs uint16 + __pad0 uint16 + err uint64 + trapno uint64 + oldmask uint64 + cr2 uint64 + fpstate uintptr + __reserved1 [8]uint64 +} /* signal.h:72:1 */ + +type mcontext_t = struct { + gregs gregset_t + fpregs fpregset_t + __reserved1 [8]uint64 +} /* signal.h:84:3 */ + +type __ucontext = struct { + uc_flags uint64 + uc_link uintptr + uc_stack stack_t + uc_mcontext mcontext_t + uc_sigmask sigset_t + __fpregs_mem [64]uint64 +} /* signal.h:97:9 */ + +type ucontext_t = __ucontext /* signal.h:104:3 */ + +type sigval = struct { + _ [0]uint64 + sival_int int32 + _ [4]byte +} /* time.h:107:1 */ + +type siginfo_t = struct { + si_signo int32 + si_errno int32 + si_code int32 + _ [4]byte + __si_fields struct { + _ [0]uint64 + __pad [112]int8 + } +} /* signal.h:145:3 */ + +type sigaction = struct { + __sa_handler struct{ sa_handler uintptr } + sa_mask sigset_t + sa_flags int32 + _ [4]byte + sa_restorer uintptr +} /* signal.h:167:1 */ + +type sig_t = uintptr /* signal.h:251:14 */ + +type sig_atomic_t = int32 /* signal.h:269:13 */ + +func a_cas(tls *TLS, p uintptr, t int32, s int32) int32 { /* atomic_arch.h:2:19: */ + panic(`arch/x86_64/atomic_arch.h:4:2: assembler statements not supported`) + return t +} + +func a_swap(tls *TLS, p uintptr, v int32) int32 { /* atomic_arch.h:20:19: */ + panic(`arch/x86_64/atomic_arch.h:22:2: assembler statements not supported`) + return v +} + +func a_or(tls *TLS, p uintptr, v int32) { /* atomic_arch.h:46:20: */ + panic(`arch/x86_64/atomic_arch.h:48:2: assembler statements not supported`) +} + +func a_or_64(tls *TLS, p uintptr, v uint64_t) { /* atomic_arch.h:62:20: */ + panic(`arch/x86_64/atomic_arch.h:64:2: assembler statements not supported`) +} + +func a_ctz_64(tls *TLS, x uint64_t) int32 { /* atomic_arch.h:112:19: */ + panic(`arch/x86_64/atomic_arch.h:114:2: assembler statements not supported`) + return int32(x) +} + +func a_ctz_32(tls *TLS, x uint32_t) int32 { /* atomic.h:256:19: */ + return int32(_sdebruijn328[x&-x*uint32_t(0x076be629)>>27]) +} + +var _sdebruijn328 = [32]int8{ + int8(0), int8(1), int8(23), int8(2), int8(29), int8(24), int8(19), int8(3), int8(30), int8(27), int8(25), int8(11), int8(20), int8(8), int8(4), int8(13), + int8(31), int8(22), int8(28), int8(18), int8(26), int8(10), int8(7), int8(12), int8(21), int8(17), int8(9), int8(6), int8(16), int8(5), int8(15), int8(14), +} /* atomic.h:261:20 */ + +type __timer = struct { + timerid int32 + _ [4]byte + thread pthread_t +} /* pthread_impl.h:64:1 */ + +func __pthread_self(tls *TLS) uintptr { /* pthread_arch.h:1:30: */ + var self uintptr + panic(`arch/x86_64/pthread_arch.h:4:2: assembler statements not supported`) + return self +} + +func __wake(tls *TLS, addr uintptr, cnt int32, priv int32) { /* pthread_impl.h:155:20: */ + if priv != 0 { + priv = 128 + } + if cnt < 0 { + cnt = 0x7fffffff + } + _ = Bool32(X__syscall3(tls, int64(202), int64(addr), int64(1|priv), int64(cnt)) != int64(-38) || X__syscall3(tls, int64(202), int64(addr), int64(1), int64(cnt)) != 0) +} + +func __futexwait(tls *TLS, addr uintptr, val int32, priv int32) { /* pthread_impl.h:162:20: */ + if priv != 0 { + priv = 128 + } + _ = Bool32(X__syscall4(tls, int64(202), int64(addr), int64(0|priv), int64(val), int64(0)) != int64(-38) || X__syscall4(tls, int64(202), int64(addr), int64(0), int64(val), int64(0)) != 0) +} + +var X__fsmu8 = [51]uint32_t{ + func() uint32 { + if 0x2 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x2) + }(), func() uint32 { + if 0x3 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x3) + }(), func() uint32 { + if 0x4 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x4) + }(), func() uint32 { + if 0x5 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x5) + }(), func() uint32 { + if 0x6 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x6) + }(), func() uint32 { + if 0x7 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x7) + }(), + func() uint32 { + if 0x8 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x8) + }(), func() uint32 { + if 0x9 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x9) + }(), func() uint32 { + if 0xa < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xa) + }(), func() uint32 { + if 0xb < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xb) + }(), func() uint32 { + if 0xc < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xc) + }(), func() uint32 { + if 0xd < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xd) + }(), func() uint32 { + if 0xe < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xe) + }(), func() uint32 { + if 0xf < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xf) + }(), + func() uint32 { + if 0x0+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x0+16) + }(), func() uint32 { + if 0x1+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x1+16) + }(), func() uint32 { + if 0x2+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x2+16) + }(), func() uint32 { + if 0x3+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x3+16) + }(), func() uint32 { + if 0x4+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x4+16) + }(), func() uint32 { + if 0x5+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x5+16) + }(), func() uint32 { + if 0x6+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x6+16) + }(), func() uint32 { + if 0x7+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x7+16) + }(), + func() uint32 { + if 0x8+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x8+16) + }(), func() uint32 { + if 0x9+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0x9+16) + }(), func() uint32 { + if 0xa+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xa+16) + }(), func() uint32 { + if 0xb+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xb+16) + }(), func() uint32 { + if 0xc+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xc+16) + }(), func() uint32 { + if 0xd+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xd+16) + }(), func() uint32 { + if 0xe+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xe+16) + }(), func() uint32 { + if 0xf+16 < 2 { + return Uint32FromInt32(-1) + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23 | uint32_t(0xf+16) + }(), + func() uint32 { + if 0x0 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x0 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x0), func() uint32 { + if 0x1 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x1 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x1), func() uint32 { + if 0x2 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x2 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x2), func() uint32 { + if 0x3 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x3 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x3), func() uint32 { + if 0x4 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x4 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x4), func() uint32 { + if 0x5 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x5 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x5), func() uint32 { + if 0x6 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x6 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x6), func() uint32 { + if 0x7 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x7 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x7), + func() uint32 { + if 0x8 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x8 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x8), func() uint32 { + if 0x9 == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0x9 == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0x9), func() uint32 { + if 0xa == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xa == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xa), func() uint32 { + if 0xb == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xb == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xb), func() uint32 { + if 0xc == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xc == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xc), func() uint32 { + if 0xd == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xd == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xd), func() uint32 { + if 0xe == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xe == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xe), func() uint32 { + if 0xf == 0 { + return func() uint32 { + if Int32(0xa0) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0xa0)) + }() << 23 + } + return func() uint32 { + if 0xf == 0xd { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xa0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(0xf), + func() uint32 { + if 0x0 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x0 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x0 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x0), func() uint32 { + if 0x1 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x1 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x1 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x1), func() uint32 { + if 0x2 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x2 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x2 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x2), func() uint32 { + if 0x3 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x3 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x3 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x3), func() uint32 { + if 0x4 >= 5 { + return uint32(0) + } + return func() uint32 { + if 0x4 == 0 { + return func() uint32 { + if Int32(0x90) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x90)) + }() << 23 + } + return func() uint32 { + if 0x4 == 4 { + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0x90)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + } + return func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }() << 23 + }() + }() + }() | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>6 | uint32_t(func() uint32 { + if Int32(0x80) == Int32(0x80) { + return Uint32(Uint32(0x40) - Uint32FromInt32(0xc0)) + } + return Uint32(Uint32(0) - Uint32FromInt32(0x80)) + }()<<23)>>12 | uint32_t(0x4), +} /* internal.c:18:16 */ + +type wint_t = uint32 /* alltypes.h:198:18 */ + +type wctype_t = uint64 /* alltypes.h:203:23 */ + +type __mbstate_t = struct { + __opaque1 uint32 + __opaque2 uint32 +} /* alltypes.h:337:9 */ + +type mbstate_t = __mbstate_t /* alltypes.h:337:63 */ + +func Xmbrtowc(tls *TLS, wc uintptr, src uintptr, n size_t, st uintptr) size_t { /* mbrtowc.c:6:8: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var c uint32 + var s uintptr + var N uint32 + // var dummy wchar_t at bp, 4 + s = src + N = uint32(n) + + if !!(st != 0) { + goto __1 + } + st = uintptr(unsafe.Pointer(&_sinternal_state)) +__1: + ; + c = *(*uint32)(unsafe.Pointer(st)) + + if !!(s != 0) { + goto __2 + } + if !(c != 0) { + goto __4 + } + goto ilseq +__4: + ; + return uint64(0) + goto __3 +__2: + if !!(wc != 0) { + goto __5 + } + wc = bp /* &dummy */ +__5: + ; +__3: + ; + + if !!(n != 0) { + goto __6 + } + return Uint64FromInt32(-2) +__6: + ; + if !!(c != 0) { + goto __7 + } + if !(int32(*(*uint8)(unsafe.Pointer(s))) < 0x80) { + goto __8 + } + return BoolUint64(!!(AssignPtrInt32(wc, wchar_t(*(*uint8)(unsafe.Pointer(s)))) != 0)) +__8: + ; + if !(func() int32 { + if !!(int32(*(*uintptr)(unsafe.Pointer((*__pthread)(unsafe.Pointer(__pthread_self(tls))).locale))) != 0) { + return 4 + } + return 1 + }() == 1) { + goto __9 + } + *(*wchar_t)(unsafe.Pointer(wc)) = 0xdfff & int32(int8(*(*uint8)(unsafe.Pointer(s)))) + return 1 +__9: + ; + if !(uint32(*(*uint8)(unsafe.Pointer(s)))-0xc2 > 0xf4-0xc2) { + goto __10 + } + goto ilseq +__10: + ; + c = X__fsmu8[uint32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))))-0xc2] + n-- +__7: + ; + + if !(n != 0) { + goto __11 + } + if !((int32(*(*uint8)(unsafe.Pointer(s)))>>3-0x10|(int32(*(*uint8)(unsafe.Pointer(s)))>>3+int32_t(c)>>26))&CplInt32(7) != 0) { + goto __12 + } + goto ilseq +__12: + ; +loop: + c = c<<6 | uint32(int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&s, 1))))-0x80) + n-- + if !!(c&(uint32(1)<<31) != 0) { + goto __13 + } + *(*uint32)(unsafe.Pointer(st)) = uint32(0) + *(*wchar_t)(unsafe.Pointer(wc)) = wchar_t(c) + return size_t(N) - n +__13: + ; + if !(n != 0) { + goto __14 + } + if !(uint32(*(*uint8)(unsafe.Pointer(s)))-0x80 >= uint32(0x40)) { + goto __15 + } + goto ilseq +__15: + ; + goto loop +__14: + ; +__11: + ; + + *(*uint32)(unsafe.Pointer(st)) = c + return Uint64FromInt32(-2) +ilseq: + *(*uint32)(unsafe.Pointer(st)) = uint32(0) + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 84 + return Uint64FromInt32(-1) +} + +var _sinternal_state uint32 /* mbrtowc.c:8:18: */ + +func Xmbsinit(tls *TLS, st uintptr) int32 { /* mbsinit.c:3:5: */ + return Bool32(!(st != 0) || !(int32(*(*uint32)(unsafe.Pointer(st))) != 0)) +} + +type imaxdiv_t = struct { + quot intmax_t + rem intmax_t +} /* inttypes.h:14:40 */ + +type socklen_t = uint32 /* alltypes.h:361:18 */ + +type sa_family_t = uint16 /* alltypes.h:366:24 */ + +type msghdr = struct { + msg_name uintptr + msg_namelen socklen_t + _ [4]byte + msg_iov uintptr + msg_iovlen int32 + __pad1 int32 + msg_control uintptr + msg_controllen socklen_t + __pad2 int32 + msg_flags int32 + _ [4]byte +} /* socket.h:22:1 */ + +type cmsghdr = struct { + cmsg_len socklen_t + __pad1 int32 + cmsg_level int32 + cmsg_type int32 +} /* socket.h:44:1 */ + +type linger = struct { + l_onoff int32 + l_linger int32 +} /* socket.h:74:1 */ + +type sockaddr = struct { + sa_family sa_family_t + sa_data [14]int8 +} /* socket.h:367:1 */ + +type sockaddr_storage = struct { + ss_family sa_family_t + __ss_padding [118]int8 + __ss_align uint64 +} /* socket.h:372:1 */ + +type in_port_t = uint16_t /* in.h:12:18 */ +type in_addr_t = uint32_t /* in.h:13:18 */ +type in_addr = struct{ s_addr in_addr_t } /* in.h:14:1 */ + +type sockaddr_in = struct { + sin_family sa_family_t + sin_port in_port_t + sin_addr struct{ s_addr in_addr_t } + sin_zero [8]uint8_t +} /* in.h:16:1 */ + +type in6_addr = struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } +} /* in.h:23:1 */ + +type sockaddr_in6 = struct { + sin6_family sa_family_t + sin6_port in_port_t + sin6_flowinfo uint32_t + sin6_addr struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } + } + sin6_scope_id uint32_t +} /* in.h:34:1 */ + +type ipv6_mreq = struct { + ipv6mr_multiaddr struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } + } + ipv6mr_interface uint32 +} /* in.h:42:1 */ + +type ip_opts = struct { + ip_dst struct{ s_addr in_addr_t } + ip_opts [40]int8 +} /* in.h:229:1 */ + +type ip_mreq = struct { + imr_multiaddr struct{ s_addr in_addr_t } + imr_interface struct{ s_addr in_addr_t } +} /* in.h:247:1 */ + +type ip_mreqn = struct { + imr_multiaddr struct{ s_addr in_addr_t } + imr_address struct{ s_addr in_addr_t } + imr_ifindex int32 +} /* in.h:252:1 */ + +type ip_mreq_source = struct { + imr_multiaddr struct{ s_addr in_addr_t } + imr_interface struct{ s_addr in_addr_t } + imr_sourceaddr struct{ s_addr in_addr_t } +} /* in.h:258:1 */ + +type ip_msfilter = struct { + imsf_multiaddr struct{ s_addr in_addr_t } + imsf_interface struct{ s_addr in_addr_t } + imsf_fmode uint32_t + imsf_numsrc uint32_t + imsf_slist [1]struct{ s_addr in_addr_t } +} /* in.h:264:1 */ + +type group_req = struct { + gr_interface uint32_t + _ [4]byte + gr_group struct { + ss_family sa_family_t + __ss_padding [118]int8 + __ss_align uint64 + } +} /* in.h:275:1 */ + +type group_source_req = struct { + gsr_interface uint32_t + _ [4]byte + gsr_group struct { + ss_family sa_family_t + __ss_padding [118]int8 + __ss_align uint64 + } + gsr_source struct { + ss_family sa_family_t + __ss_padding [118]int8 + __ss_align uint64 + } +} /* in.h:280:1 */ + +type group_filter = struct { + gf_interface uint32_t + _ [4]byte + gf_group struct { + ss_family sa_family_t + __ss_padding [118]int8 + __ss_align uint64 + } + gf_fmode uint32_t + gf_numsrc uint32_t + gf_slist [1]struct { + ss_family sa_family_t + __ss_padding [118]int8 + __ss_align uint64 + } +} /* in.h:286:1 */ + +type in_pktinfo = struct { + ipi_ifindex int32 + ipi_spec_dst struct{ s_addr in_addr_t } + ipi_addr struct{ s_addr in_addr_t } +} /* in.h:297:1 */ + +type in6_pktinfo = struct { + ipi6_addr struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } + } + ipi6_ifindex uint32 +} /* in.h:303:1 */ + +type ip6_mtuinfo = struct { + ip6m_addr struct { + sin6_family sa_family_t + sin6_port in_port_t + sin6_flowinfo uint32_t + sin6_addr struct { + __in6_union struct { + _ [0]uint32 + __s6_addr [16]uint8_t + } + } + sin6_scope_id uint32_t + } + ip6m_mtu uint32_t +} /* in.h:308:1 */ + +type addrinfo = struct { + ai_flags int32 + ai_family int32 + ai_socktype int32 + ai_protocol int32 + ai_addrlen socklen_t + _ [4]byte + ai_addr uintptr + ai_canonname uintptr + ai_next uintptr +} /* netdb.h:16:1 */ + +// Legacy functions follow (marked OBsolete in SUS) + +type netent = struct { + n_name uintptr + n_aliases uintptr + n_addrtype int32 + n_net uint32_t +} /* netdb.h:62:1 */ + +type hostent = struct { + h_name uintptr + h_aliases uintptr + h_addrtype int32 + h_length int32 + h_addr_list uintptr +} /* netdb.h:69:1 */ + +type servent = struct { + s_name uintptr + s_aliases uintptr + s_port int32 + _ [4]byte + s_proto uintptr +} /* netdb.h:78:1 */ + +type protoent = struct { + p_name uintptr + p_aliases uintptr + p_proto int32 + _ [4]byte +} /* netdb.h:85:1 */ + +type aibuf = struct { + ai struct { + ai_flags int32 + ai_family int32 + ai_socktype int32 + ai_protocol int32 + ai_addrlen socklen_t + _ [4]byte + ai_addr uintptr + ai_canonname uintptr + ai_next uintptr + } + sa struct { + sin struct { + sin_family sa_family_t + sin_port in_port_t + sin_addr struct{ s_addr in_addr_t } + sin_zero [8]uint8_t + } + _ [12]byte + } + lock [1]int32 + slot int16 + ref int16 + _ [4]byte +} /* lookup.h:10:1 */ + +type sa = struct { + sin struct { + sin_family sa_family_t + sin_port in_port_t + sin_addr struct{ s_addr in_addr_t } + sin_zero [8]uint8_t + } + _ [12]byte +} /* lookup.h:10:1 */ + +type address = struct { + family int32 + scopeid uint32 + addr [16]uint8_t + sortkey int32 +} /* lookup.h:20:1 */ + +type service = struct { + port uint16_t + proto uint8 + socktype uint8 +} /* lookup.h:27:1 */ + +type resolvconf = struct { + ns [3]struct { + family int32 + scopeid uint32 + addr [16]uint8_t + sortkey int32 + } + nns uint32 + attempts uint32 + ndots uint32 + timeout uint32 +} /* lookup.h:34:1 */ + +func Xfreeaddrinfo(tls *TLS, p uintptr) { /* freeaddrinfo.c:7:6: */ + var cnt size_t + cnt = uint64(1) +__1: + if !((*addrinfo)(unsafe.Pointer(p)).ai_next != 0) { + goto __3 + } + goto __2 +__2: + cnt++ + p = (*addrinfo)(unsafe.Pointer(p)).ai_next + goto __1 + goto __3 +__3: + ; + var b uintptr = p - uintptr(uint64(uintptr(0))) + b -= 88 * uintptr((*aibuf)(unsafe.Pointer(b)).slot) + //TODO LOCK(b->lock); + if !(int32(AssignSubPtrInt16(b+82, int16(cnt))) != 0) { + Xfree(tls, b) + } + //TODO else UNLOCK(b->lock); +} + +func Xgetaddrinfo(tls *TLS, host uintptr, serv uintptr, hint uintptr, res uintptr) int32 { /* getaddrinfo.c:12:5: */ + bp := tls.Alloc(1608) + defer tls.Free(1608) + + // var ports [2]service at bp, 8 + + // var addrs [48]address at bp+8, 1344 + + // var canon [256]int8 at bp+1352, 256 + + var outcanon uintptr + var nservs int32 + var naddrs int32 + var nais int32 + var canon_len int32 + var i int32 + var j int32 + var k int32 + var family int32 = 0 + var flags int32 = 0 + var proto int32 = 0 + var socktype int32 = 0 + var out uintptr + + if !(host != 0) && !(serv != 0) { + return -2 + } + + if hint != 0 { + family = (*addrinfo)(unsafe.Pointer(hint)).ai_family + flags = (*addrinfo)(unsafe.Pointer(hint)).ai_flags + proto = (*addrinfo)(unsafe.Pointer(hint)).ai_protocol + socktype = (*addrinfo)(unsafe.Pointer(hint)).ai_socktype + + var mask int32 = 0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x400 + if flags&mask != flags { + return -1 + } + + switch family { + case 2: + fallthrough + case 10: + fallthrough + case 0: + break + fallthrough + default: + return -6 + } + } + + if flags&0x20 != 0 { + Xabort(tls) //TODO- + // /* Define the "an address is configured" condition for address + // * families via ability to create a socket for the family plus + // * routability of the loopback address for the family. */ + // static const struct sockaddr_in lo4 = { + // .sin_family = AF_INET, .sin_port = 65535, + // .sin_addr.s_addr = __BYTE_ORDER == __BIG_ENDIAN + // ? 0x7f000001 : 0x0100007f + // }; + // static const struct sockaddr_in6 lo6 = { + // .sin6_family = AF_INET6, .sin6_port = 65535, + // .sin6_addr = IN6ADDR_LOOPBACK_INIT + // }; + // int tf[2] = { AF_INET, AF_INET6 }; + // const void *ta[2] = { &lo4, &lo6 }; + // socklen_t tl[2] = { sizeof lo4, sizeof lo6 }; + // for (i=0; i<2; i++) { + // if (family==tf[1-i]) continue; + // int s = socket(tf[i], SOCK_CLOEXEC|SOCK_DGRAM, + // IPPROTO_UDP); + // if (s>=0) { + // int cs; + // pthread_setcancelstate( + // PTHREAD_CANCEL_DISABLE, &cs); + // int r = connect(s, ta[i], tl[i]); + // pthread_setcancelstate(cs, 0); + // close(s); + // if (!r) continue; + // } + // switch (errno) { + // case EADDRNOTAVAIL: + // case EAFNOSUPPORT: + // case EHOSTUNREACH: + // case ENETDOWN: + // case ENETUNREACH: + // break; + // default: + // return EAI_SYSTEM; + // } + // if (family == tf[i]) return EAI_NONAME; + // family = tf[1-i]; + // } + } + + nservs = X__lookup_serv(tls, bp, serv, proto, socktype, flags) + if nservs < 0 { + return nservs + } + + naddrs = X__lookup_name(tls, bp+8, bp+1352, host, family, flags) + if naddrs < 0 { + return naddrs + } + + nais = nservs * naddrs + canon_len = int32(Xstrlen(tls, bp+1352)) + out = Xcalloc(tls, uint64(1), uint64(nais)*uint64(unsafe.Sizeof(aibuf{}))+uint64(canon_len)+uint64(1)) + if !(out != 0) { + return -10 + } + + if canon_len != 0 { + outcanon = out + uintptr(nais)*88 + Xmemcpy(tls, outcanon, bp+1352, uint64(canon_len+1)) + } else { + outcanon = uintptr(0) + } + + for k = AssignInt32(&i, 0); i < naddrs; i++ { + j = 0 + __1: + if !(j < nservs) { + goto __3 + } + { + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).slot = int16(k) + //TODO out[k].ai = (struct addrinfo){ + //TODO .ai_family = addrs[i].family, + //TODO .ai_socktype = ports[j].socktype, + //TODO .ai_protocol = ports[j].proto, + //TODO .ai_addrlen = addrs[i].family == AF_INET + //TODO ? sizeof(struct sockaddr_in) + //TODO : sizeof(struct sockaddr_in6), + //TODO .ai_addr = (void *)&out[k].sa, + //TODO .ai_canonname = outcanon }; + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_family = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_socktype = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).socktype) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_protocol = int32((*service)(unsafe.Pointer(bp + uintptr(j)*4)).proto) + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addrlen = func() uint32 { + if (*address)(unsafe.Pointer(bp+8+uintptr(i)*28)).family == 2 { + return uint32(unsafe.Sizeof(sockaddr_in{})) + } + return uint32(unsafe.Sizeof(sockaddr_in6{})) + }() + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_addr = out + uintptr(k)*88 + 48 + (*aibuf)(unsafe.Pointer(out + uintptr(k)*88)).ai.ai_canonname = outcanon + if k != 0 { + (*aibuf)(unsafe.Pointer(out + uintptr(k-1)*88)).ai.ai_next = out + uintptr(k)*88 + } + switch (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).family { + case 2: + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_family = sa_family_t(2) + (*sockaddr_in)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + Xmemcpy(tls, out+uintptr(k)*88+48+4, bp+8+uintptr(i)*28+8, uint64(4)) + break + case 10: + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_family = sa_family_t(10) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_port = Xhtons(tls, (*service)(unsafe.Pointer(bp+uintptr(j)*4)).port) + (*sockaddr_in6)(unsafe.Pointer(out + uintptr(k)*88 + 48)).sin6_scope_id = (*address)(unsafe.Pointer(bp + 8 + uintptr(i)*28)).scopeid + Xmemcpy(tls, out+uintptr(k)*88+48+8, bp+8+uintptr(i)*28+8, uint64(16)) + break + } + + } + goto __2 + __2: + j++ + k++ + goto __1 + goto __3 + __3: + } + (*aibuf)(unsafe.Pointer(out)).ref = int16(nais) + *(*uintptr)(unsafe.Pointer(res)) = out + return 0 +} + +type ucred = struct { + pid pid_t + uid uid_t + gid gid_t +} /* socket.h:57:1 */ + +type mmsghdr = struct { + msg_hdr struct { + msg_name uintptr + msg_namelen socklen_t + _ [4]byte + msg_iov uintptr + msg_iovlen int32 + __pad1 int32 + msg_control uintptr + msg_controllen socklen_t + __pad2 int32 + msg_flags int32 + _ [4]byte + } + msg_len uint32 + _ [4]byte +} /* socket.h:63:1 */ + +func Xgethostbyaddr(tls *TLS, a uintptr, l socklen_t, af int32) uintptr { /* gethostbyaddr.c:7:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var size size_t = uint64(63) + // var res uintptr at bp, 8 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh) + _sh = Xmalloc(tls, AssignAddUint64(&size, size+uint64(1))) + if !(_sh != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyaddr_r(tls, a, l, af, _sh, + _sh+uintptr(1)*32, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh +} + +var _sh uintptr /* gethostbyaddr.c:9:24: */ + +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: */ + bp := tls.Alloc(28) + defer tls.Free(28) + + //TODO union { + //TODO struct sockaddr_in sin; + //TODO struct sockaddr_in6 sin6; + //TODO } sa = { .sin.sin_family = af }; + *(*struct { + sin sockaddr_in + _ [12]byte + })(unsafe.Pointer(bp)) = struct { + sin sockaddr_in + _ [12]byte + }{} //TODO- + (*sockaddr_in)(unsafe.Pointer(bp)).sin_family = sa_family_t(af) //TODO- + var sl socklen_t + if af == 10 { + sl = uint32(unsafe.Sizeof(sockaddr_in6{})) + } else { + sl = uint32(unsafe.Sizeof(sockaddr_in{})) + } + var i int32 + + *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + + // Load address argument into sockaddr structure + if af == 10 && l == socklen_t(16) { + Xmemcpy(tls, bp+8, a, uint64(16)) + } else if af == 2 && l == socklen_t(4) { + Xmemcpy(tls, bp+4, a, uint64(4)) + } else { + *(*int32)(unsafe.Pointer(err)) = 3 + return 22 + } + + // Align buffer and check for space for pointers and ip address + i = int32(uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1))) + if !(i != 0) { + i = int32(unsafe.Sizeof(uintptr(0))) + } + if buflen <= uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))-uint64(i)+uint64(l) { + return 34 + } + buf += uintptr(uint64(unsafe.Sizeof(uintptr(0))) - uint64(i)) + buflen = buflen - (uint64(5)*uint64(unsafe.Sizeof(uintptr(0))) - uint64(i) + uint64(l)) + + (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) + (*hostent)(unsafe.Pointer(h)).h_aliases = buf + buf += uintptr(uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) + + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)) = buf + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list)), a, uint64(l)) + buf += uintptr(l) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + 1*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) = buf + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + + switch Xgetnameinfo(tls, bp, sl, buf, uint32(buflen), uintptr(0), uint32(0), 0) { + case -3: + *(*int32)(unsafe.Pointer(err)) = 2 + return 11 + case -12: + return 34 + default: + fallthrough + case -10: + fallthrough + case -11: + fallthrough + case -4: + *(*int32)(unsafe.Pointer(err)) = 3 + return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + case 0: + break + } + + (*hostent)(unsafe.Pointer(h)).h_addrtype = af + (*hostent)(unsafe.Pointer(h)).h_length = int32(l) + (*hostent)(unsafe.Pointer(h)).h_name = *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases)) + *(*uintptr)(unsafe.Pointer(res)) = h + return 0 +} + +func Xgethostbyname(tls *TLS, name uintptr) uintptr { /* gethostbyname.c:8:16: */ + return Xgethostbyname2(tls, name, 2) +} + +func Xgethostbyname2(tls *TLS, name uintptr, af int32) uintptr { /* gethostbyname2.c:8:16: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var size size_t = uint64(63) + // var res uintptr at bp, 8 + + var err int32 + for __ccgo := true; __ccgo; __ccgo = err == 34 { + Xfree(tls, _sh1) + _sh1 = Xmalloc(tls, AssignAddUint64(&size, size+uint64(1))) + if !(_sh1 != 0) { + *(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3 + return uintptr(0) + } + err = Xgethostbyname2_r(tls, name, af, _sh1, + _sh1+uintptr(1)*32, size-size_t(unsafe.Sizeof(hostent{})), bp, X__h_errno_location(tls)) + } + if err != 0 { + return uintptr(0) + } + return _sh1 +} + +var _sh1 uintptr /* gethostbyname2.c:10:24: */ + +func Xgethostbyname2_r(tls *TLS, name uintptr, af int32, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname2_r.c:11:5: */ + bp := tls.Alloc(1600) + defer tls.Free(1600) + + // var addrs [48]address at bp, 1344 + + // var canon [256]int8 at bp+1344, 256 + + var i int32 + var cnt int32 + var align size_t + var need size_t + + *(*uintptr)(unsafe.Pointer(res)) = uintptr(0) + cnt = X__lookup_name(tls, bp, bp+1344, name, af, 0x02) + if cnt < 0 { + switch cnt { + case -2: + *(*int32)(unsafe.Pointer(err)) = 1 + return 2 + fallthrough + case -3: + *(*int32)(unsafe.Pointer(err)) = 2 + return 11 + fallthrough + default: + fallthrough + case -4: + *(*int32)(unsafe.Pointer(err)) = 3 + return 74 + fallthrough + case -10: + fallthrough + case -11: + *(*int32)(unsafe.Pointer(err)) = 3 + return *(*int32)(unsafe.Pointer(X___errno_location(tls))) + } + } + + (*hostent)(unsafe.Pointer(h)).h_addrtype = af + (*hostent)(unsafe.Pointer(h)).h_length = func() int32 { + if af == 10 { + return 16 + } + return 4 + }() + + // Align buffer + align = -uintptr_t(buf) & (uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) + + need = uint64(4) * uint64(unsafe.Sizeof(uintptr(0))) + need = need + uint64(cnt+1)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64((*hostent)(unsafe.Pointer(h)).h_length)) + need = need + (Xstrlen(tls, name) + uint64(1)) + need = need + (Xstrlen(tls, bp+1344) + uint64(1)) + need = need + align + + if need > buflen { + return 34 + } + + buf += uintptr(align) + (*hostent)(unsafe.Pointer(h)).h_aliases = buf + buf += uintptr(uint64(3) * uint64(unsafe.Sizeof(uintptr(0)))) + (*hostent)(unsafe.Pointer(h)).h_addr_list = buf + buf += uintptr(uint64(cnt+1) * uint64(unsafe.Sizeof(uintptr(0)))) + + for i = 0; i < cnt; i++ { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = buf + buf += uintptr((*hostent)(unsafe.Pointer(h)).h_length) + Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)), bp+uintptr(i)*28+8, uint64((*hostent)(unsafe.Pointer(h)).h_length)) + } + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_addr_list + uintptr(i)*8)) = uintptr(0) + + (*hostent)(unsafe.Pointer(h)).h_name = AssignPtrUintptr((*hostent)(unsafe.Pointer(h)).h_aliases, buf) + Xstrcpy(tls, (*hostent)(unsafe.Pointer(h)).h_name, bp+1344) + buf += uintptr(Xstrlen(tls, (*hostent)(unsafe.Pointer(h)).h_name) + uint64(1)) + + if Xstrcmp(tls, (*hostent)(unsafe.Pointer(h)).h_name, name) != 0 { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = buf + Xstrcpy(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)), name) + buf += uintptr(Xstrlen(tls, *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8))) + uint64(1)) + } else { + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 1*8)) = uintptr(0) + } + + *(*uintptr)(unsafe.Pointer((*hostent)(unsafe.Pointer(h)).h_aliases + 2*8)) = uintptr(0) + + *(*uintptr)(unsafe.Pointer(res)) = h + return 0 +} + +func Xgethostbyname_r(tls *TLS, name uintptr, h uintptr, buf uintptr, buflen size_t, res uintptr, err uintptr) int32 { /* gethostbyname_r.c:6:5: */ + return Xgethostbyname2_r(tls, name, 2, h, buf, buflen, res, err) +} + +type if_nameindex = struct { + if_index uint32 + _ [4]byte + if_name uintptr +} /* if.h:12:1 */ + +type ifaddr = struct { + ifa_addr struct { + sa_family sa_family_t + sa_data [14]int8 + } + ifa_ifu struct { + ifu_broadaddr struct { + sa_family sa_family_t + sa_data [14]int8 + } + } + ifa_ifp uintptr + ifa_next uintptr +} /* if.h:51:1 */ + +type ifmap = struct { + mem_start uint64 + mem_end uint64 + base_addr uint16 + irq uint8 + dma uint8 + port uint8 + _ [3]byte +} /* if.h:64:1 */ + +type ifreq = struct { + ifr_ifrn struct{ ifrn_name [16]int8 } + ifr_ifru struct { + _ [0]uint64 + ifru_addr struct { + sa_family sa_family_t + sa_data [14]int8 + } + _ [8]byte + } +} /* if.h:76:1 */ + +type ifconf = struct { + ifc_len int32 + _ [4]byte + ifc_ifcu struct{ ifcu_buf uintptr } +} /* if.h:116:1 */ + +type ns_sect = uint32 /* nameser.h:37:3 */ + +type __ns_msg = struct { + _msg uintptr + _eom uintptr + _id uint16_t + _flags uint16_t + _counts [4]uint16_t + _ [4]byte + _sections [4]uintptr + _sect ns_sect + _rrnum int32 + _msg_ptr uintptr +} /* nameser.h:39:9 */ + +type ns_msg = __ns_msg /* nameser.h:46:3 */ + +type _ns_flagdata = struct { + mask int32 + shift int32 +} /* nameser.h:48:1 */ + +type __ns_rr = struct { + name [1025]int8 + _ [1]byte + __type uint16_t + rr_class uint16_t + _ [2]byte + ttl uint32_t + rdlength uint16_t + _ [2]byte + rdata uintptr +} /* nameser.h:59:9 */ + +type ns_rr = __ns_rr /* nameser.h:66:3 */ + +type ns_flag = uint32 /* nameser.h:87:3 */ + +type ns_opcode = uint32 /* nameser.h:96:3 */ + +type ns_rcode = uint32 /* nameser.h:115:3 */ + +type ns_update_operation = uint32 /* nameser.h:121:3 */ + +type ns_tsig_key1 = struct { + name [1025]int8 + alg [1025]int8 + _ [6]byte + data uintptr + len int32 + _ [4]byte +} /* nameser.h:123:1 */ + +type ns_tsig_key = ns_tsig_key1 /* nameser.h:128:28 */ + +type ns_tcp_tsig_state1 = struct { + counter int32 + _ [4]byte + key uintptr + ctx uintptr + sig [512]uint8 + siglen int32 + _ [4]byte +} /* nameser.h:130:1 */ + +type ns_tcp_tsig_state = ns_tcp_tsig_state1 /* nameser.h:137:34 */ + +type ns_type = uint32 /* nameser.h:200:3 */ + +type ns_class = uint32 /* nameser.h:219:3 */ + +type ns_key_types = uint32 /* nameser.h:226:3 */ + +type ns_cert_types = uint32 /* nameser.h:234:3 */ + +type HEADER = struct { + _ [0]uint32 + id uint32 /* unsigned id: 16, unsigned rd: 1, unsigned tc: 1, unsigned aa: 1, unsigned opcode: 4, unsigned qr: 1, unsigned rcode: 4, unsigned cd: 1, unsigned ad: 1, unsigned unused: 1, unsigned ra: 1 */ + qdcount uint32 /* unsigned qdcount: 16, unsigned ancount: 16 */ + nscount uint32 /* unsigned nscount: 16, unsigned arcount: 16 */ +} /* nameser.h:353:3 */ + +// unused; purely for broken apps +type __res_state = struct { + retrans int32 + retry int32 + options uint64 + nscount int32 + nsaddr_list [3]struct { + sin_family sa_family_t + sin_port in_port_t + sin_addr struct{ s_addr in_addr_t } + sin_zero [8]uint8_t + } + id uint16 + _ [2]byte + dnsrch [7]uintptr + defdname [256]int8 + pfcode uint64 + ndots uint32 /* unsigned ndots: 4, unsigned nsort: 4, unsigned ipv6_unavail: 1, unsigned unused: 23 */ + _ [4]byte + sort_list [10]struct { + addr struct{ s_addr in_addr_t } + mask uint32_t + } + qhook uintptr + rhook uintptr + res_h_errno int32 + _vcsock int32 + _flags uint32 + _ [4]byte + _u struct { + _ [0]uint64 + pad [52]int8 + _ [4]byte + } +} /* resolv.h:26:9 */ + +// unused; purely for broken apps +type res_state = uintptr /* resolv.h:62:3 */ + +type res_sym = struct { + number int32 + _ [4]byte + name uintptr + humanname uintptr +} /* resolv.h:70:1 */ + +func itoa(tls *TLS, p uintptr, x uint32) uintptr { /* getnameinfo.c:18:13: */ + p += uintptr(uint64(3) * uint64(unsafe.Sizeof(int32(0)))) + *(*int8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = int8(0) + for __ccgo := true; __ccgo; __ccgo = x != 0 { + *(*int8)(unsafe.Pointer(PreDecUintptr(&p, 1))) = int8(uint32('0') + x%uint32(10)) + x = x / uint32(10) + } + return p +} + +func mkptr4(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:28:13: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + 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))))) +} + +func mkptr6(tls *TLS, s uintptr, ip uintptr) { /* getnameinfo.c:34:13: */ + var i int32 + for i = 15; i >= 0; i-- { + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = _sxdigits[int32(*(*uint8)(unsafe.Pointer(ip + uintptr(i))))&15] + *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) = int8('.') + *(*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+50) +} + +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) + defer tls.Free(556) + + // var line [512]int8 at bp+16, 512 + + var p uintptr + var z uintptr + var _buf [1032]uint8 + _ = _buf + // var atmp [16]uint8 at bp, 16 + + // 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+76, ts+87) + if !(f != 0) { + return + } + if family == 2 { + Xmemcpy(tls, bp+uintptr(12), a, uint64(4)) + Xmemcpy(tls, bp, ts+90, uint64(12)) + a = bp /* &atmp[0] */ + } + for Xfgets(tls, bp+16, int32(unsafe.Sizeof([512]int8{})), f) != 0 { + if AssignUintptr(&p, Xstrchr(tls, bp+16, '#')) != 0 { + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8('\n') + *(*int8)(unsafe.Pointer(p)) = int8(0) + } + + for p = bp + 16; /* &line[0] */ *(*int8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8(0) + if X__lookup_ipliteral(tls, bp+528, bp+16, 0) <= 0 { + continue + } + + 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+90, uint64(12)) + (*address)(unsafe.Pointer(bp + 528 /* &iplit */)).scopeid = uint32(0) + } + + if Xmemcmp(tls, a, bp+528+8, uint64(16)) != 0 || (*address)(unsafe.Pointer(bp+528)).scopeid != scopeid { + continue + } + + for ; *(*int8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*int8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*int8)(unsafe.Pointer(z)) = int8(0) + if (int64(z)-int64(p))/1 < int64(256) { + Xmemcpy(tls, buf, p, uint64((int64(z)-int64(p))/1+int64(1))) + break + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) +} + +func reverse_services(tls *TLS, buf uintptr, port int32, dgram int32) { /* getnameinfo.c:87:13: */ + Xabort(tls) //TODO- + // unsigned long svport; + // char line[128], *p, *z; + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) return; + // while (fgets(line, sizeof line, f)) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // for (p=line; *p && !isspace(*p); p++); + // if (!*p) continue; + // *p++ = 0; + // svport = strtoul(p, &z, 10); + + // if (svport != port || z==p) continue; + // if (dgram && strncmp(z, "/udp", 4)) continue; + // if (!dgram && strncmp(z, "/tcp", 4)) continue; + // if (p-line > 32) continue; + + // memcpy(buf, line, p-line); + // break; + // } + // __fclose_ca(f); +} + +func Xgetnameinfo(tls *TLS, sa1 uintptr, sl socklen_t, node uintptr, nodelen socklen_t, serv uintptr, servlen socklen_t, flags int32) int32 { /* getnameinfo.c:125:5: */ + bp := tls.Alloc(347) + defer tls.Free(347) + + // var ptr [78]int8 at bp, 78 + + // var buf [256]int8 at bp+78, 256 + + // var num [13]int8 at bp+334, 13 + + var af int32 = int32((*sockaddr)(unsafe.Pointer(sa1)).sa_family) + var a uintptr + var scopeid uint32 + + switch af { + case 2: + a = sa1 + 4 + if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in{})) { + return -6 + } + mkptr4(tls, bp, a) + scopeid = uint32(0) + break + case 10: + a = sa1 + 8 + if uint64(sl) < uint64(unsafe.Sizeof(sockaddr_in6{})) { + return -6 + } + if Xmemcmp(tls, a, ts+90, uint64(12)) != 0 { + mkptr6(tls, bp, a) + } else { + mkptr4(tls, bp, a+uintptr(12)) + } + scopeid = (*sockaddr_in6)(unsafe.Pointer(sa1)).sin6_scope_id + break + default: + return -6 + } + + if node != 0 && nodelen != 0 { + *(*int8)(unsafe.Pointer(bp + 78)) = int8(0) + if !(flags&0x01 != 0) { + reverse_hosts(tls, bp+78, a, scopeid, af) + } + if !(int32(*(*int8)(unsafe.Pointer(bp + 78))) != 0) && !(flags&0x01 != 0) { + Xabort(tls) //TODO- + // unsigned char query[18+PTR_MAX], reply[512]; + // int qlen = __res_mkquery(0, ptr, 1, RR_PTR, + // 0, 0, 0, query, sizeof query); + // query[3] = 0; /* don't need AD flag */ + // int rlen = __res_send(query, qlen, reply, sizeof reply); + // buf[0] = 0; + // if (rlen > 0) + // __dns_parse(reply, rlen, dns_parse_callback, buf); + } + if !(int32(*(*int8)(unsafe.Pointer(bp + 78))) != 0) { + if flags&0x08 != 0 { + return -2 + } + Xinet_ntop(tls, af, a, bp+78, uint32(unsafe.Sizeof([256]int8{}))) + if scopeid != 0 { + Xabort(tls) //TODO- + // char *p = 0, tmp[IF_NAMESIZE+1]; + // if (!(flags & NI_NUMERICSCOPE) && + // (IN6_IS_ADDR_LINKLOCAL(a) || + // IN6_IS_ADDR_MC_LINKLOCAL(a))) + // p = if_indextoname(scopeid, tmp+1); + // if (!p) + // p = itoa(num, scopeid); + // *--p = '%'; + // strcat(buf, p); + } + } + if Xstrlen(tls, bp+78) >= size_t(nodelen) { + return -12 + } + Xstrcpy(tls, node, bp+78) + } + + if serv != 0 && servlen != 0 { + var p uintptr = bp + 78 /* buf */ + var port int32 = int32(Xntohs(tls, (*sockaddr_in)(unsafe.Pointer(sa1)).sin_port)) + *(*int8)(unsafe.Pointer(bp + 78)) = int8(0) + if !(flags&0x02 != 0) { + reverse_services(tls, bp+78, port, flags&0x10) + } + if !(int32(*(*int8)(unsafe.Pointer(p))) != 0) { + p = itoa(tls, bp+334, uint32(port)) + } + if Xstrlen(tls, p) >= size_t(servlen) { + return -12 + } + Xstrcpy(tls, serv, p) + } + + return 0 +} + +var Xh_errno int32 /* h_errno.c:4:5: */ + +func X__h_errno_location(tls *TLS) uintptr { /* h_errno.c:6:5: */ + return uintptr(unsafe.Pointer(&Xh_errno)) +} + +func X__inet_aton(tls *TLS, s0 uintptr, dest uintptr) int32 { /* inet_aton.c:7:5: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + var s uintptr = s0 + var d uintptr = dest + *(*[4]uint64)(unsafe.Pointer(bp /* a */)) = [4]uint64{0: uint64(0)} + // var z uintptr at bp+32, 8 + + var i int32 + + for i = 0; i < 4; i++ { + *(*uint64)(unsafe.Pointer(bp + uintptr(i)*8)) = Xstrtoul(tls, s, bp+32, 0) + if *(*uintptr)(unsafe.Pointer(bp + 32)) == s || *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))) != 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != '.' || !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(s)))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(s)))-uint32('0') < uint32(10)) + }() != 0) { + return 0 + } + if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32))))) != 0) { + break + } + s = *(*uintptr)(unsafe.Pointer(bp + 32)) + uintptr(1) + } + if i == 4 { + return 0 + } + switch i { + case 0: + *(*uint64)(unsafe.Pointer(bp + 1*8)) = *(*uint64)(unsafe.Pointer(bp)) & uint64(0xffffff) + AssignShrPtrUint64(bp, int(24)) + fallthrough + case 1: + *(*uint64)(unsafe.Pointer(bp + 2*8)) = *(*uint64)(unsafe.Pointer(bp + 1*8)) & uint64(0xffff) + AssignShrPtrUint64(bp+1*8, int(16)) + fallthrough + case 2: + *(*uint64)(unsafe.Pointer(bp + 3*8)) = *(*uint64)(unsafe.Pointer(bp + 2*8)) & uint64(0xff) + AssignShrPtrUint64(bp+2*8, int(8)) + } + for i = 0; i < 4; i++ { + if *(*uint64)(unsafe.Pointer(bp + uintptr(i)*8)) > uint64(255) { + return 0 + } + *(*uint8)(unsafe.Pointer(d + uintptr(i))) = uint8(*(*uint64)(unsafe.Pointer(bp + uintptr(i)*8))) + } + return 1 +} + +func Xinet_ntop(tls *TLS, af int32, a0 uintptr, s uintptr, l socklen_t) uintptr { /* inet_ntop.c:7:12: */ + bp := tls.Alloc(276) + defer tls.Free(276) + + var a uintptr = a0 + var i int32 + var j int32 + var max int32 + var best int32 + // var buf [100]int8 at bp+176, 100 + + switch af { + case 2: + 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+90, uint64(12)) != 0 { + Xsnprintf(tls, bp+176, uint64(unsafe.Sizeof([100]int8{})), + 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+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))), + int32(*(*uint8)(unsafe.Pointer(a + 12))), int32(*(*uint8)(unsafe.Pointer(a + 13))), int32(*(*uint8)(unsafe.Pointer(a + 14))), int32(*(*uint8)(unsafe.Pointer(a + 15))))) + } + // Replace longest /(^0|:)[:0]{2,}/ with "::" + i = AssignInt32(&best, 0) + max = 2 + for ; *(*int8)(unsafe.Pointer(bp + 176 + uintptr(i))) != 0; i++ { + if i != 0 && int32(*(*int8)(unsafe.Pointer(bp + 176 + uintptr(i)))) != ':' { + continue + } + j = int32(Xstrspn(tls, bp+176+uintptr(i), ts+169)) + if j > max { + best = i + max = j + } + } + if max > 3 { + *(*int8)(unsafe.Pointer(bp + 176 + uintptr(best))) = AssignPtrInt8(bp+176+uintptr(best+1), int8(':')) + Xmemmove(tls, bp+176+uintptr(best)+uintptr(2), bp+176+uintptr(best)+uintptr(max), uint64(i-best-max+1)) + } + if Xstrlen(tls, bp+176) < size_t(l) { + Xstrcpy(tls, s, bp+176) + return s + } + break + default: + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return uintptr(0) + } + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 28 + return uintptr(0) +} + +func hexval(tls *TLS, c uint32) int32 { /* inet_pton.c:7:12: */ + if c-uint32('0') < uint32(10) { + return int32(c - uint32('0')) + } + c = c | uint32(32) + if c-uint32('a') < uint32(6) { + return int32(c - uint32('a') + uint32(10)) + } + return -1 +} + +func Xinet_pton(tls *TLS, af int32, s uintptr, a0 uintptr) int32 { /* inet_pton.c:15:5: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + // var ip [8]uint16_t at bp, 16 + + var a uintptr = a0 + var i int32 + var j int32 + var v int32 + var d int32 + var brk int32 = -1 + var need_v4 int32 = 0 + + if af == 2 { + for i = 0; i < 4; i++ { + for v = AssignInt32(&j, 0); j < 3 && func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(s + uintptr(j))))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(s + uintptr(j))))-uint32('0') < uint32(10)) + }() != 0; j++ { + v = 10*v + int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) - '0' + } + if j == 0 || j > 1 && int32(*(*int8)(unsafe.Pointer(s))) == '0' || v > 255 { + return 0 + } + *(*uint8)(unsafe.Pointer(a + uintptr(i))) = uint8(v) + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) == 0 && i == 3 { + return 1 + } + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != '.' { + return 0 + } + s += uintptr(j + 1) + } + return 0 + } else if af != 10 { + *(*int32)(unsafe.Pointer(X___errno_location(tls))) = 97 + return -1 + } + + if int32(*(*int8)(unsafe.Pointer(s))) == ':' && int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != ':' { + return 0 + } + + for i = 0; ; i++ { + if int32(*(*int8)(unsafe.Pointer(s))) == ':' && brk < 0 { + brk = i + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(0) + if !(int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&s, 1)))) != 0) { + break + } + if i == 7 { + return 0 + } + continue + } + for v = AssignInt32(&j, 0); j < 4 && AssignInt32(&d, hexval(tls, uint32(*(*int8)(unsafe.Pointer(s + uintptr(j)))))) >= 0; j++ { + v = 16*v + d + } + if j == 0 { + return 0 + } + *(*uint16_t)(unsafe.Pointer(bp + uintptr(i&7)*2)) = uint16_t(v) + if !(int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != 0) && (brk >= 0 || i == 7) { + break + } + if i == 7 { + return 0 + } + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != ':' { + if int32(*(*int8)(unsafe.Pointer(s + uintptr(j)))) != '.' || i < 6 && brk < 0 { + return 0 + } + need_v4 = 1 + i++ + break + } + s += uintptr(j + 1) + } + if brk >= 0 { + Xmemmove(tls, bp+uintptr(brk)*2+uintptr(7)*2-uintptr(i)*2, bp+uintptr(brk)*2, uint64(2*(i+1-brk))) + for j = 0; j < 7-i; j++ { + *(*uint16_t)(unsafe.Pointer(bp + uintptr(brk+j)*2)) = uint16_t(0) + } + } + for j = 0; j < 8; j++ { + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(int32(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) >> 8) + *(*uint8)(unsafe.Pointer(PostIncUintptr(&a, 1))) = uint8(*(*uint16_t)(unsafe.Pointer(bp + uintptr(j)*2))) + } + if need_v4 != 0 && Xinet_pton(tls, 2, s, a-uintptr(4)) <= 0 { + return 0 + } + return 1 +} + +func X__lookup_ipliteral(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_ipliteral.c:12:5: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + // var a4 in_addr at bp, 4 + + // var a6 in6_addr at bp+68, 16 + + if X__inet_aton(tls, name, bp) > 0 { + if family == 10 { // wrong family + return -2 + } + Xmemcpy(tls, buf+8, bp, uint64(unsafe.Sizeof(in_addr{}))) + (*address)(unsafe.Pointer(buf)).family = 2 + (*address)(unsafe.Pointer(buf)).scopeid = uint32(0) + return 1 + } + // var tmp [64]int8 at bp+4, 64 + + var p uintptr = Xstrchr(tls, name, '%') + // var z uintptr at bp+88, 8 + + var scopeid uint64 = uint64(0) + if p != 0 && (int64(p)-int64(name))/1 < int64(64) { + Xmemcpy(tls, bp+4, name, uint64((int64(p)-int64(name))/1)) + *(*int8)(unsafe.Pointer(bp + 4 + uintptr((int64(p)-int64(name))/1))) = int8(0) + name = bp + 4 /* &tmp[0] */ + } + + if Xinet_pton(tls, 10, name, bp+68) <= 0 { + return 0 + } + if family == 2 { // wrong family + return -2 + } + + Xmemcpy(tls, buf+8, bp+68, uint64(unsafe.Sizeof(in6_addr{}))) + (*address)(unsafe.Pointer(buf)).family = 10 + if p != 0 { + if func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*int8)(unsafe.Pointer(PreIncUintptr(&p, 1))))) + } + return Bool32(uint32(*(*int8)(unsafe.Pointer(PreIncUintptr(&p, 1))))-uint32('0') < uint32(10)) + }() != 0 { + scopeid = Xstrtoull(tls, p, bp+88, 10) + } else { + *(*uintptr)(unsafe.Pointer(bp + 88 /* z */)) = p - uintptr(1) + } + if *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 88)))) != 0 { + Xabort(tls) //TODO- + // if (!IN6_IS_ADDR_LINKLOCAL(&a6) && + // !IN6_IS_ADDR_MC_LINKLOCAL(&a6)) + // return EAI_NONAME; + // scopeid = if_nametoindex(p); + // if (!scopeid) return EAI_NONAME; + } + if scopeid > uint64(0xffffffff) { + return -2 + } + } + (*address)(unsafe.Pointer(buf)).scopeid = uint32(scopeid) + return 1 +} + +func is_valid_hostname(tls *TLS, host uintptr) int32 { /* lookup_name.c:18:12: */ + var s uintptr + //TODO if (strnlen(host, 255)-1 >= 254 || mbstowcs(0, host, 0) == -1) return 0; + if Xstrnlen(tls, host, uint64(255))-uint64(1) >= uint64(254) { + return 0 + } + for s = host; int32(*(*uint8)(unsafe.Pointer(s))) >= 0x80 || int32(*(*uint8)(unsafe.Pointer(s))) == '.' || int32(*(*uint8)(unsafe.Pointer(s))) == '-' || Xisalnum(tls, int32(*(*uint8)(unsafe.Pointer(s)))) != 0; s++ { + } + return BoolInt32(!(*(*uint8)(unsafe.Pointer(s)) != 0)) +} + +var Xzero_struct_address address /* lookup_name.c:27:16: */ + +func name_from_null(tls *TLS, buf uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:29:12: */ + var cnt int32 = 0 + if name != 0 { + return 0 + } + if flags&0x01 != 0 { + //TODO if (family != AF_INET6) + //TODO buf[cnt++] = (struct address){ .family = AF_INET }; + if family != 10 { + var x = Xzero_struct_address + x.family = 2 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + //TODO if (family != AF_INET) + //TODO buf[cnt++] = (struct address){ .family = AF_INET6 }; + if family != 2 { + var x = Xzero_struct_address + x.family = 10 + *(*address)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*28)) = x + } + } else { + Xabort(tls) //TODO- + // if (family != AF_INET6) + // buf[cnt++] = (struct address){ .family = AF_INET, .addr = { 127,0,0,1 } }; + // if (family != AF_INET) + // buf[cnt++] = (struct address){ .family = AF_INET6, .addr = { [15] = 1 } }; + } + return cnt +} + +func name_from_numeric(tls *TLS, buf uintptr, name uintptr, family int32) int32 { /* lookup_name.c:58:12: */ + return X__lookup_ipliteral(tls, buf, name, family) +} + +func name_from_hosts(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:63:12: */ + bp := tls.Alloc(512) + defer tls.Free(512) + + // var line [512]int8 at bp, 512 + + var l size_t = Xstrlen(tls, name) + var cnt int32 = 0 + var badfam int32 = 0 + var _buf [1032]uint8 + _ = _buf + //TODO FILE _f, *f = __fopen_rb_ca("/etc/hosts", &_f, _buf, sizeof _buf); + var _f FILE + _ = _f + var f uintptr = Xfopen(tls, ts+76, ts+87) + if !(f != 0) { + switch *(*int32)(unsafe.Pointer(X___errno_location(tls))) { + case 2: + fallthrough + case 20: + fallthrough + case 13: + return 0 + fallthrough + default: + return -11 + } + } + for Xfgets(tls, bp, int32(unsafe.Sizeof([512]int8{})), f) != 0 && cnt < 48 { + var p uintptr + var z uintptr + + if AssignUintptr(&p, Xstrchr(tls, bp, '#')) != 0 { + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8('\n') + *(*int8)(unsafe.Pointer(p)) = int8(0) + } + for p = bp + uintptr(1); AssignUintptr(&p, Xstrstr(tls, p, name)) != 0 && (!(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p + UintptrFromInt32(-1))))) != 0) || !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p + uintptr(l))))) != 0)); p++ { + } + if !(p != 0) { + continue + } + + // Isolate IP address to parse + for p = bp; /* &line[0] */ *(*int8)(unsafe.Pointer(p)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0); p++ { + } + *(*int8)(unsafe.Pointer(PostIncUintptr(&p, 1))) = int8(0) + switch name_from_numeric(tls, buf+uintptr(cnt)*28, bp, family) { + case 1: + cnt++ + break + case 0: + continue + default: + badfam = -2 + continue + } + + // Extract first name as canonical name + for ; *(*int8)(unsafe.Pointer(p)) != 0 && __isspace(tls, int32(*(*int8)(unsafe.Pointer(p)))) != 0; p++ { + } + for z = p; *(*int8)(unsafe.Pointer(z)) != 0 && !(__isspace(tls, int32(*(*int8)(unsafe.Pointer(z)))) != 0); z++ { + } + *(*int8)(unsafe.Pointer(z)) = int8(0) + if is_valid_hostname(tls, p) != 0 { + Xmemcpy(tls, canon, p, uint64((int64(z)-int64(p))/1+int64(1))) + } + } + //TODO __fclose_ca(f); + Xfclose(tls, f) + if cnt != 0 { + return cnt + } + return badfam +} + +type dpc_ctx = struct { + addrs uintptr + canon uintptr + cnt int32 + _ [4]byte +} /* lookup_name.c:112:1 */ + +func name_from_dns_search(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32) int32 { /* lookup_name.c:191:12: */ + return -1 //TODO- + Xabort(tls) + return int32(0) //TODO- + // char search[256]; + // struct resolvconf conf; + // size_t l, dots; + // char *p, *z; + + // if (__get_resolv_conf(&conf, search, sizeof search) < 0) return -1; + + // /* Count dots, suppress search when >=ndots or name ends in + // * a dot, which is an explicit request for global scope. */ + // for (dots=l=0; name[l]; l++) if (name[l]=='.') dots++; + // if (dots >= conf.ndots || name[l-1]=='.') *search = 0; + + // /* Strip final dot for canon, fail if multiple trailing dots. */ + // if (name[l-1]=='.') l--; + // if (!l || name[l-1]=='.') return EAI_NONAME; + + // /* This can never happen; the caller already checked length. */ + // if (l >= 256) return EAI_NONAME; + + // /* Name with search domain appended is setup in canon[]. This both + // * provides the desired default canonical name (if the requested + // * name is not a CNAME record) and serves as a buffer for passing + // * the full requested name to name_from_dns. */ + // memcpy(canon, name, l); + // canon[l] = '.'; + + // for (p=search; *p; p=z) { + // for (; isspace(*p); p++); + // for (z=p; *z && !isspace(*z); z++); + // if (z==p) break; + // if (z-p < 256 - l - 1) { + // memcpy(canon+l+1, p, z-p); + // canon[z-p+1+l] = 0; + // int cnt = name_from_dns(buf, canon, canon, family, &conf); + // if (cnt) return cnt; + // } + // } + + // canon[l] = 0; + // return name_from_dns(buf, canon, name, family, &conf); +} + +type policy = struct { + addr [16]uint8 + len uint8 + mask uint8 + prec uint8 + label uint8 +} /* lookup_name.c:237:14 */ + +var defpolicy = [6]policy{ + {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 + 253)), prec: uint8(40), label: uint8(1)}, +} /* lookup_name.c:241:3 */ + +func policyof(tls *TLS, a uintptr) uintptr { /* lookup_name.c:259:28: */ + var i int32 + for i = 0; ; i++ { + if Xmemcmp(tls, a, uintptr(unsafe.Pointer(&defpolicy))+uintptr(i)*20, uint64(defpolicy[i].len)) != 0 { + continue + } + if int32(*(*uint8_t)(unsafe.Pointer(a + uintptr(defpolicy[i].len))))&int32(defpolicy[i].mask) != + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + uintptr(defpolicy[i].len)))) { + continue + } + return uintptr(unsafe.Pointer(&defpolicy)) + uintptr(i)*20 + } + return uintptr(0) +} + +func labelof(tls *TLS, a uintptr) int32 { /* lookup_name.c:272:12: */ + return int32((*policy)(unsafe.Pointer(policyof(tls, a))).label) +} + +func scopeof(tls *TLS, a uintptr) int32 { /* lookup_name.c:277:12: */ + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xff { + return int32(*(*uint8_t)(unsafe.Pointer(a + 1))) & 15 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0x80 { + return 2 + } + if *(*uint32_t)(unsafe.Pointer(a)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 1*4)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 2*4)) == uint32_t(0) && int32(*(*uint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 15))) == 1 { + return 2 + } + if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0xc0 { + return 5 + } + return 14 +} + +func prefixmatch(tls *TLS, s uintptr, d uintptr) int32 { /* lookup_name.c:286:12: */ + // FIXME: The common prefix length should be limited to no greater + // than the nominal length of the prefix portion of the source + // address. However the definition of the source prefix length is + // not clear and thus this limiting is not yet implemented. + var i uint32 + for i = uint32(0); i < uint32(128) && !((int32(*(*uint8_t)(unsafe.Pointer(s /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8)))))^int32(*(*uint8_t)(unsafe.Pointer(d /* &.__in6_union */ /* &.__s6_addr */ + uintptr(i/uint32(8))))))&(int32(128)>>(i%uint32(8))) != 0); i++ { + } + return int32(i) +} + +func addrcmp(tls *TLS, _a uintptr, _b uintptr) int32 { /* lookup_name.c:305:12: */ + var a uintptr = _a + var b uintptr = _b + return (*address)(unsafe.Pointer(b)).sortkey - (*address)(unsafe.Pointer(a)).sortkey +} + +func X__lookup_name(tls *TLS, buf uintptr, canon uintptr, name uintptr, family int32, flags int32) int32 { /* lookup_name.c:311:5: */ + bp := tls.Alloc(92) + defer tls.Free(92) + + var cnt int32 = 0 + var i int32 + var j int32 + _ = j + + *(*int8)(unsafe.Pointer(canon)) = int8(0) + if name != 0 { + // reject empty name and check len so it fits into temp bufs + var l size_t = Xstrnlen(tls, name, uint64(255)) + if l-uint64(1) >= uint64(254) { + return -2 + } + Xmemcpy(tls, canon, name, l+uint64(1)) + } + + // Procedurally, a request for v6 addresses with the v4-mapped + // flag set is like a request for unspecified family, followed + // by filtering of the results. + if flags&0x08 != 0 { + if family == 10 { + family = 0 + } else { + flags = flags - 0x08 + } + } + + // Try each backend until there's at least one result. + cnt = name_from_null(tls, buf, name, family, flags) + if !(cnt != 0) { + cnt = name_from_numeric(tls, buf, name, family) + } + if !(cnt != 0) && !(flags&0x04 != 0) { + cnt = name_from_hosts(tls, buf, canon, name, family) + if !(cnt != 0) { + cnt = name_from_dns_search(tls, buf, canon, name, family) + } + } + if cnt <= 0 { + if cnt != 0 { + return cnt + } + return -2 + } + + // Filter/transform results for v4-mapped lookup, if requested. + if flags&0x08 != 0 { + Xabort(tls) //TODO- + // if (!(flags & AI_ALL)) { + // /* If any v6 results exist, remove v4 results. */ + // for (i=0; i<cnt && buf[i].family != AF_INET6; i++); + // if (i<cnt) { + // for (j=0; i<cnt; i++) { + // if (buf[i].family == AF_INET6) + // buf[j++] = buf[i]; + // } + // cnt = i = j; + // } + // } + // /* Translate any remaining v4 results to v6 */ + // for (i=0; i<cnt; i++) { + // if (buf[i].family != AF_INET) continue; + // memcpy(buf[i].addr+12, buf[i].addr, 4); + // memcpy(buf[i].addr, "\0\0\0\0\0\0\0\0\0\0\xff\xff", 12); + // buf[i].family = AF_INET6; + // } + } + + // No further processing is needed if there are fewer than 2 + // results or if there are only IPv4 results. + if cnt < 2 || family == 2 { + return cnt + } + for i = 0; i < cnt; i++ { + if (*address)(unsafe.Pointer(buf+uintptr(i)*28)).family != 2 { + break + } + } + if i == cnt { + return cnt + } + var cs int32 + _ = cs + //TODO pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs); + + // The following implements a subset of RFC 3484/6724 destination + // address selection by generating a single 31-bit sort key for + // each address. Rules 3, 4, and 7 are omitted for having + // excessive runtime and code size cost and dubious benefit. + // So far the label/precedence table cannot be customized. + for i = 0; i < cnt; i++ { + var family int32 = (*address)(unsafe.Pointer(buf + uintptr(i)*28)).family + var key int32 = 0 + *(*sockaddr_in6)(unsafe.Pointer(bp + 28 /* sa6 */)) = sockaddr_in6{} + *(*sockaddr_in6)(unsafe.Pointer(bp /* da6 */)) = sockaddr_in6{sin6_family: sa_family_t(10), sin6_port: in_port_t(65535), sin6_scope_id: (*address)(unsafe.Pointer(buf + uintptr(i)*28)).scopeid} + *(*sockaddr_in)(unsafe.Pointer(bp + 72 /* sa4 */)) = sockaddr_in{} + *(*sockaddr_in)(unsafe.Pointer(bp + 56 /* da4 */)) = sockaddr_in{sin_family: sa_family_t(2), sin_port: in_port_t(65535)} + var sa1 uintptr + var da uintptr + // var salen socklen_t at bp+88, 4 + + var dalen socklen_t + if family == 10 { + Xmemcpy(tls, bp+8, buf+uintptr(i)*28+8, uint64(16)) + da = bp /* &da6 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + sa1 = bp + 28 /* &sa6 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in6{})) + } else { + Xmemcpy(tls, bp+28+8, + ts+90, uint64(12)) + Xmemcpy(tls, bp+8+uintptr(12), buf+uintptr(i)*28+8, uint64(4)) + Xmemcpy(tls, bp+8, + 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 */ + dalen = socklen_t(unsafe.Sizeof(sockaddr_in{})) + sa1 = bp + 72 /* &sa4 */ + *(*socklen_t)(unsafe.Pointer(bp + 88 /* salen */)) = socklen_t(unsafe.Sizeof(sockaddr_in{})) + } + var dpolicy uintptr = policyof(tls, bp+8) + var dscope int32 = scopeof(tls, bp+8) + var dlabel int32 = int32((*policy)(unsafe.Pointer(dpolicy)).label) + var dprec int32 = int32((*policy)(unsafe.Pointer(dpolicy)).prec) + var prefixlen int32 = 0 + var fd int32 = Xsocket(tls, family, 2|02000000, 17) + if fd >= 0 { + if !(Xconnect(tls, fd, da, dalen) != 0) { + key = key | 0x40000000 + if !(Xgetsockname(tls, fd, sa1, bp+88) != 0) { + if family == 2 { + Xmemcpy(tls, + bp+28+8+uintptr(12), + bp+72+4, uint64(4)) + } + if dscope == scopeof(tls, bp+28+8) { + key = key | 0x20000000 + } + if dlabel == labelof(tls, bp+28+8) { + key = key | 0x10000000 + } + prefixlen = prefixmatch(tls, bp+28+8, + bp+8) + } + } + Xclose(tls, fd) + } + key = key | dprec<<20 + key = key | (15-dscope)<<16 + key = key | prefixlen<<8 + key = key | (48-i)<<0 + (*address)(unsafe.Pointer(buf + uintptr(i)*28)).sortkey = key + } + Xqsort(tls, buf, uint64(cnt), uint64(unsafe.Sizeof(address{})), *(*uintptr)(unsafe.Pointer(&struct { + f func(*TLS, uintptr, uintptr) int32 + }{addrcmp}))) + + //TODO pthread_setcancelstate(cs, 0); + + return cnt +} + +func X__lookup_serv(tls *TLS, buf uintptr, name uintptr, proto int32, socktype int32, flags int32) int32 { /* lookup_serv.c:12:5: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var line [128]int8 + _ = line + var cnt int32 = 0 + var p uintptr + _ = p + *(*uintptr)(unsafe.Pointer(bp /* z */)) = ts + 13 /* "" */ + var port uint64 = uint64(0) + + switch socktype { + case 1: + switch proto { + case 0: + proto = 6 + fallthrough + case 6: + break + default: + return -8 + } + break + case 2: + switch proto { + case 0: + proto = 17 + fallthrough + case 17: + break + default: + return -8 + } + fallthrough + case 0: + break + default: + if name != 0 { + return -8 + } + (*service)(unsafe.Pointer(buf)).port = uint16_t(0) + (*service)(unsafe.Pointer(buf)).proto = uint8(proto) + (*service)(unsafe.Pointer(buf)).socktype = uint8(socktype) + return 1 + } + + if name != 0 { + if !(int32(*(*int8)(unsafe.Pointer(name))) != 0) { + return -8 + } + port = Xstrtoul(tls, name, bp, 10) + } + if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0) { + if port > uint64(65535) { + return -8 + } + if proto != 17 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(1) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(6) + } + if proto != 6 { + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).port = uint16_t(port) + (*service)(unsafe.Pointer(buf + uintptr(cnt)*4)).socktype = uint8(2) + (*service)(unsafe.Pointer(buf + uintptr(PostIncInt32(&cnt, 1))*4)).proto = uint8(17) + } + return cnt + } + + if flags&0x400 != 0 { + return -2 + } + + var l size_t = Xstrlen(tls, name) + _ = l + + Xabort(tls) //TODO- + // unsigned char _buf[1032]; + // FILE _f, *f = __fopen_rb_ca("/etc/services", &_f, _buf, sizeof _buf); + // if (!f) switch (errno) { + // case ENOENT: + // case ENOTDIR: + // case EACCES: + // return EAI_SERVICE; + // default: + // return EAI_SYSTEM; + // } + + Xabort(tls) //TODO- + // while (fgets(line, sizeof line, f) && cnt < MAXSERVS) { + // if ((p=strchr(line, '#'))) *p++='\n', *p=0; + + // /* Find service name */ + // for(p=line; (p=strstr(p, name)); p++) { + // if (p>line && !isspace(p[-1])) continue; + // if (p[l] && !isspace(p[l])) continue; + // break; + // } + // if (!p) continue; + + // /* Skip past canonical name at beginning of line */ + // for (p=line; *p && !isspace(*p); p++); + + // port = strtoul(p, &z, 10); + // if (port > 65535 || z==p) continue; + // if (!strncmp(z, "/udp", 4)) { + // if (proto == IPPROTO_TCP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_DGRAM; + // buf[cnt++].proto = IPPROTO_UDP; + // } + // if (!strncmp(z, "/tcp", 4)) { + // if (proto == IPPROTO_UDP) continue; + // buf[cnt].port = port; + // buf[cnt].socktype = SOCK_STREAM; + // buf[cnt++].proto = IPPROTO_TCP; + // } + // } + // __fclose_ca(f); + // return cnt > 0 ? cnt : EAI_SERVICE; + Xabort(tls) + return int32(0) //TODO- +} + +func temper(tls *TLS, x uint32) uint32 { /* rand_r.c:3:17: */ + x = x ^ x>>11 + x = x ^ x<<7&0x9D2C5680 + x = x ^ x<<15&0xEFC60000 + x = x ^ x>>18 + return x +} + +func Xrand_r(tls *TLS, seed uintptr) int32 { /* rand_r.c:12:5: */ + return int32(temper(tls, AssignPtrUint32(seed, *(*uint32)(unsafe.Pointer(seed))*uint32(1103515245)+uint32(12345))) / uint32(2)) +} + +func X__lockfile(tls *TLS, f uintptr) int32 { /* __lockfile.c:4:5: */ + var owner int32 = (*FILE)(unsafe.Pointer(f)).lock + var tid int32 = (*__pthread)(unsafe.Pointer(__pthread_self(tls))).tid + if owner&CplInt32(0x40000000) == tid { + return 0 + } + owner = a_cas(tls, f+140, 0, tid) + if !(owner != 0) { + return 1 + } + for AssignInt32(&owner, a_cas(tls, f+140, 0, tid|0x40000000)) != 0 { + if owner&0x40000000 != 0 || a_cas(tls, f+140, owner, owner|0x40000000) == owner { + __futexwait(tls, f+140, owner|0x40000000, 1) + } + } + return 1 +} + +func X__unlockfile(tls *TLS, f uintptr) { /* __lockfile.c:19:6: */ + if a_swap(tls, f+140, 0)&0x40000000 != 0 { + __wake(tls, f+140, 1, 1) + } +} + +func X__toread(tls *TLS, f uintptr) int32 { /* __toread.c:3:5: */ + *(*int32)(unsafe.Pointer(f + 136)) |= (*FILE)(unsafe.Pointer(f)).mode - 1 + if (*FILE)(unsafe.Pointer(f)).wpos != (*FILE)(unsafe.Pointer(f)).wbase { + (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).write})).f(tls, f, uintptr(0), uint64(0)) + } + (*FILE)(unsafe.Pointer(f)).wpos = AssignPtrUintptr(f+56, AssignPtrUintptr(f+32, uintptr(0))) + if (*FILE)(unsafe.Pointer(f)).flags&uint32(4) != 0 { + *(*uint32)(unsafe.Pointer(f)) |= uint32(32) + return -1 + } + (*FILE)(unsafe.Pointer(f)).rpos = AssignPtrUintptr(f+16, (*FILE)(unsafe.Pointer(f)).buf+uintptr((*FILE)(unsafe.Pointer(f)).buf_size)) + if (*FILE)(unsafe.Pointer(f)).flags&uint32(16) != 0 { + return -1 + } + return 0 +} + +func X__toread_needs_stdio_exit(tls *TLS) { /* __toread.c:16:13: */ + X__builtin_abort(tls) //TODO- + // __stdio_exit_needed(); +} + +// This function assumes it will never be called if there is already +// data buffered for reading. + +func X__uflow(tls *TLS, f uintptr) int32 { /* __uflow.c:6:5: */ + bp := tls.Alloc(1) + defer tls.Free(1) + + // var c uint8 at bp, 1 + + if !(X__toread(tls, f) != 0) && (*struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + })(unsafe.Pointer(&struct{ uintptr }{(*FILE)(unsafe.Pointer(f)).read})).f(tls, f, bp, uint64(1)) == uint64(1) { + return int32(*(*uint8)(unsafe.Pointer(bp))) + } + return -1 +} + +func Xsscanf(tls *TLS, s uintptr, fmt uintptr, va uintptr) int32 { /* sscanf.c:4:5: */ + var ret int32 + var ap va_list + _ = ap + ap = va + ret = Xvsscanf(tls, s, fmt, ap) + _ = ap + return ret +} + +type wctrans_t = uintptr /* wctype.h:20:19 */ + +func store_int(tls *TLS, dest uintptr, size int32, i uint64) { /* vfscanf.c:22:13: */ + if !(dest != 0) { + return + } + switch size { + case -2: + *(*int8)(unsafe.Pointer(dest)) = int8(i) + break + case -1: + *(*int16)(unsafe.Pointer(dest)) = int16(i) + break + case 0: + *(*int32)(unsafe.Pointer(dest)) = int32(i) + break + case 1: + *(*int64)(unsafe.Pointer(dest)) = int64(i) + break + case 3: + *(*int64)(unsafe.Pointer(dest)) = int64(i) + break + } +} + +func arg_n(tls *TLS, ap va_list, n uint32) uintptr { /* vfscanf.c:44:13: */ + var p uintptr + var i uint32 + var ap2 va_list + _ = ap2 + ap2 = ap + for i = n; i > uint32(1); i-- { + VaUintptr(&ap2) + } + p = VaUintptr(&ap2) + _ = ap2 + return p +} + +func Xvfscanf(tls *TLS, f uintptr, fmt uintptr, ap va_list) int32 { /* vfscanf.c:56:5: */ + bp := tls.Alloc(276) + defer tls.Free(276) + + var width int32 + var size int32 + var alloc int32 + var base int32 + var p uintptr + var c int32 + var t int32 + var s uintptr + var wcs uintptr + // var st mbstate_t at bp+268, 8 + + var dest uintptr + var invert int32 + var matches int32 + var x uint64 + var y float64 + var pos off_t + // var scanset [257]uint8 at bp, 257 + + var i size_t + var k size_t + // var wc wchar_t at bp+260, 4 + + var __need_unlock int32 + var tmp uintptr + var tmp1 uintptr + alloc = 0 + dest = uintptr(0) + matches = 0 + pos = int64(0) + __need_unlock = func() int32 { + if (*FILE)(unsafe.Pointer(f)).lock >= 0 { + return X__lockfile(tls, f) + } + return 0 + }() + + if !!(int32((*FILE)(unsafe.Pointer(f)).rpos) != 0) { + goto __1 + } + X__toread(tls, f) +__1: + ; + if !!(int32((*FILE)(unsafe.Pointer(f)).rpos) != 0) { + goto __2 + } + goto input_fail +__2: + ; + + p = fmt +__3: + if !(*(*uint8)(unsafe.Pointer(p)) != 0) { + goto __5 + } + + alloc = 0 + + if !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p)))) != 0) { + goto __6 + } +__7: + if !(__isspace(tls, int32(*(*uint8)(unsafe.Pointer(p + 1)))) != 0) { + goto __8 + } + p++ + goto __7 +__8: + ; + X__shlim(tls, f, int64(0)) +__9: + if !(__isspace(tls, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }()) != 0) { + goto __10 + } + goto __9 +__10: + ; + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1) + goto __4 +__6: + ; + if !(int32(*(*uint8)(unsafe.Pointer(p))) != '%' || int32(*(*uint8)(unsafe.Pointer(p + 1))) == '%') { + goto __11 + } + X__shlim(tls, f, int64(0)) + if !(int32(*(*uint8)(unsafe.Pointer(p))) == '%') { + goto __12 + } + p++ +__14: + if !(__isspace(tls, AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())) != 0) { + goto __15 + } + goto __14 +__15: + ; + goto __13 +__12: + c = func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() +__13: + ; + if !(c != int32(*(*uint8)(unsafe.Pointer(p)))) { + goto __16 + } + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !(c < 0) { + goto __17 + } + goto input_fail +__17: + ; + goto match_fail +__16: + ; + pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1) + goto __4 +__11: + ; + + p++ + if !(int32(*(*uint8)(unsafe.Pointer(p))) == '*') { + goto __18 + } + dest = uintptr(0) + p++ + goto __19 +__18: + if !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(p)))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) + }() != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) == '$') { + goto __20 + } + dest = arg_n(tls, ap, uint32(int32(*(*uint8)(unsafe.Pointer(p)))-'0')) + p += uintptr(2) + goto __21 +__20: + dest = VaUintptr(&ap) +__21: + ; +__19: + ; + + width = 0 +__22: + if !(func() int32 { + if 0 != 0 { + return Xisdigit(tls, int32(*(*uint8)(unsafe.Pointer(p)))) + } + return Bool32(uint32(*(*uint8)(unsafe.Pointer(p)))-uint32('0') < uint32(10)) + }() != 0) { + goto __24 + } + width = 10*width + int32(*(*uint8)(unsafe.Pointer(p))) - '0' + goto __23 +__23: + p++ + goto __22 + goto __24 +__24: + ; + + if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'm') { + goto __25 + } + wcs = uintptr(0) + s = uintptr(0) + alloc = BoolInt32(!!(dest != 0)) + p++ + goto __26 +__25: + alloc = 0 +__26: + ; + + size = 0 + switch int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1)))) { + case 'h': + goto __28 + case 'l': + goto __29 + case 'j': + goto __30 + case 'z': + goto __31 + case 't': + goto __32 + case 'L': + goto __33 + case 'd': + goto __34 + case 'i': + goto __35 + case 'o': + goto __36 + case 'u': + goto __37 + case 'x': + goto __38 + case 'a': + goto __39 + case 'e': + goto __40 + case 'f': + goto __41 + case 'g': + goto __42 + case 'A': + goto __43 + case 'E': + goto __44 + case 'F': + goto __45 + case 'G': + goto __46 + case 'X': + goto __47 + case 's': + goto __48 + case 'c': + goto __49 + case '[': + goto __50 + case 'S': + goto __51 + case 'C': + goto __52 + case 'p': + goto __53 + case 'n': + goto __54 + default: + goto __55 + } + goto __27 +__28: + if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'h') { + goto __56 + } + p++ + size = -2 + goto __57 +__56: + size = -1 +__57: + ; + goto __27 +__29: + if !(int32(*(*uint8)(unsafe.Pointer(p))) == 'l') { + goto __58 + } + p++ + size = 3 + goto __59 +__58: + size = 1 +__59: + ; + goto __27 +__30: + size = 3 + goto __27 +__31: +__32: + size = 1 + goto __27 +__33: + size = 2 + goto __27 +__34: +__35: +__36: +__37: +__38: +__39: +__40: +__41: +__42: +__43: +__44: +__45: +__46: +__47: +__48: +__49: +__50: +__51: +__52: +__53: +__54: + p-- + goto __27 +__55: + goto fmt_fail +__27: + ; + + t = int32(*(*uint8)(unsafe.Pointer(p))) + + // C or S + if !(t&0x2f == 3) { + goto __60 + } + t = t | 32 + size = 1 +__60: + ; + + switch t { + case 'c': + goto __62 + case '[': + goto __63 + case 'n': + goto __64 + default: + goto __65 + } + goto __61 +__62: + if !(width < 1) { + goto __66 + } + width = 1 +__66: + ; +__63: + goto __61 +__64: + store_int(tls, dest, size, uint64(pos)) + // do not increment match count, etc! + goto __4 +__65: + X__shlim(tls, f, int64(0)) +__67: + if !(__isspace(tls, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }()) != 0) { + goto __68 + } + goto __67 +__68: + ; + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1) +__61: + ; + + X__shlim(tls, f, int64(width)) + if !(func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }() < 0) { + goto __69 + } + goto input_fail +__69: + ; + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + + switch t { + case 's': + goto __71 + case 'c': + goto __72 + case '[': + goto __73 + case 'p': + goto __74 + case 'X': + goto __75 + case 'x': + goto __76 + case 'o': + goto __77 + case 'd': + goto __78 + case 'u': + goto __79 + case 'i': + goto __80 + case 'a': + goto __81 + case 'A': + goto __82 + case 'e': + goto __83 + case 'E': + goto __84 + case 'f': + goto __85 + case 'F': + goto __86 + case 'g': + goto __87 + case 'G': + goto __88 + } + goto __70 +__71: +__72: +__73: + if !(t == 'c' || t == 's') { + goto __89 + } + Xmemset(tls, bp, -1, uint64(unsafe.Sizeof([257]uint8{}))) + *(*uint8)(unsafe.Pointer(bp)) = uint8(0) + if !(t == 's') { + goto __91 + } + *(*uint8)(unsafe.Pointer(bp + 10)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 11)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 12)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 13)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 14)) = uint8(0) + *(*uint8)(unsafe.Pointer(bp + 33)) = uint8(0) +__91: + ; + goto __90 +__89: + if !(int32(*(*uint8)(unsafe.Pointer(PreIncUintptr(&p, 1)))) == '^') { + goto __92 + } + p++ + invert = 1 + goto __93 +__92: + invert = 0 +__93: + ; + Xmemset(tls, bp, invert, uint64(unsafe.Sizeof([257]uint8{}))) + *(*uint8)(unsafe.Pointer(bp)) = uint8(0) + if !(int32(*(*uint8)(unsafe.Pointer(p))) == '-') { + goto __94 + } + p++ + *(*uint8)(unsafe.Pointer(bp + 46)) = uint8(1 - invert) + goto __95 +__94: + if !(int32(*(*uint8)(unsafe.Pointer(p))) == ']') { + goto __96 + } + p++ + *(*uint8)(unsafe.Pointer(bp + 94)) = uint8(1 - invert) +__96: + ; +__95: + ; +__97: + if !(int32(*(*uint8)(unsafe.Pointer(p))) != ']') { + goto __99 + } + if !!(int32(*(*uint8)(unsafe.Pointer(p))) != 0) { + goto __100 + } + goto fmt_fail +__100: + ; + if !(int32(*(*uint8)(unsafe.Pointer(p))) == '-' && *(*uint8)(unsafe.Pointer(p + 1)) != 0 && int32(*(*uint8)(unsafe.Pointer(p + 1))) != ']') { + goto __101 + } + c = int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&p, 1) + UintptrFromInt32(-1)))) +__102: + if !(c < int32(*(*uint8)(unsafe.Pointer(p)))) { + goto __104 + } + *(*uint8)(unsafe.Pointer(bp + uintptr(1+c))) = uint8(1 - invert) + goto __103 +__103: + c++ + goto __102 + goto __104 +__104: + ; +__101: + ; + *(*uint8)(unsafe.Pointer(bp + uintptr(1+int32(*(*uint8)(unsafe.Pointer(p)))))) = uint8(1 - invert) + goto __98 +__98: + p++ + goto __97 + goto __99 +__99: + ; +__90: + ; + wcs = uintptr(0) + s = uintptr(0) + i = uint64(0) + if t == 'c' { + k = uint64(uint32(width) + 1) + } else { + k = uint64(31) + } + if !(size == 1) { + goto __105 + } + if !(alloc != 0) { + goto __107 + } + wcs = Xmalloc(tls, k*size_t(unsafe.Sizeof(wchar_t(0)))) + if !!(wcs != 0) { + goto __109 + } + goto alloc_fail +__109: + ; + goto __108 +__107: + wcs = dest +__108: + ; + *(*mbstate_t)(unsafe.Pointer(bp + 268 /* st */)) = mbstate_t{} +__110: + if !(*(*uint8)(unsafe.Pointer(bp + uintptr(AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())+1))) != 0) { + goto __111 + } + switch Xmbrtowc(tls, bp+260, func() uintptr { *(*int8)(unsafe.Pointer(bp + 264)) = int8(c); return bp + 264 }(), uint64(1), bp+268 /* &st */) { + case Uint64FromInt32(-1): + goto __113 + case Uint64FromInt32(-2): + goto __114 + } + goto __112 +__113: + goto input_fail +__114: + goto __110 +__112: + ; + if !(wcs != 0) { + goto __115 + } + *(*wchar_t)(unsafe.Pointer(wcs + uintptr(PostIncUint64(&i, 1))*4)) = *(*wchar_t)(unsafe.Pointer(bp + 260 /* wc */)) +__115: + ; + if !(alloc != 0 && i == k) { + goto __116 + } + k = k + (k + uint64(1)) + tmp = Xrealloc(tls, wcs, k*size_t(unsafe.Sizeof(wchar_t(0)))) + if !!(tmp != 0) { + goto __117 + } + goto alloc_fail +__117: + ; + wcs = tmp +__116: + ; + goto __110 +__111: + ; + if !!(Xmbsinit(tls, bp+268) != 0) { + goto __118 + } + goto input_fail +__118: + ; + goto __106 +__105: + if !(alloc != 0) { + goto __119 + } + s = Xmalloc(tls, k) + if !!(s != 0) { + goto __121 + } + goto alloc_fail +__121: + ; +__122: + if !(*(*uint8)(unsafe.Pointer(bp + uintptr(AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())+1))) != 0) { + goto __123 + } + *(*int8)(unsafe.Pointer(s + uintptr(PostIncUint64(&i, 1)))) = int8(c) + if !(i == k) { + goto __124 + } + k = k + (k + uint64(1)) + tmp1 = Xrealloc(tls, s, k) + if !!(tmp1 != 0) { + goto __125 + } + goto alloc_fail +__125: + ; + s = tmp1 +__124: + ; + goto __122 +__123: + ; + goto __120 +__119: + if !(AssignUintptr(&s, dest) != 0) { + goto __126 + } +__128: + if !(*(*uint8)(unsafe.Pointer(bp + uintptr(AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())+1))) != 0) { + goto __129 + } + *(*int8)(unsafe.Pointer(s + uintptr(PostIncUint64(&i, 1)))) = int8(c) + goto __128 +__129: + ; + goto __127 +__126: +__130: + if !(*(*uint8)(unsafe.Pointer(bp + uintptr(AssignInt32(&c, func() int32 { + if (*FILE)(unsafe.Pointer(f)).rpos != (*FILE)(unsafe.Pointer(f)).shend { + return int32(*(*uint8)(unsafe.Pointer(PostIncUintptr(&(*FILE)(unsafe.Pointer(f)).rpos, 1)))) + } + return X__shgetc(tls, f) + }())+1))) != 0) { + goto __131 + } + goto __130 +__131: + ; +__127: + ; +__120: + ; +__106: + ; + if (*FILE)(unsafe.Pointer(f)).shlim >= int64(0) { + (*FILE)(unsafe.Pointer(f)).rpos-- + } else { + } + if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) { + goto __132 + } + goto match_fail +__132: + ; + if !(t == 'c' && (*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != off_t(width)) { + goto __133 + } + goto match_fail +__133: + ; + if !(alloc != 0) { + goto __134 + } + if !(size == 1) { + goto __135 + } + *(*uintptr)(unsafe.Pointer(dest)) = wcs + goto __136 +__135: + *(*uintptr)(unsafe.Pointer(dest)) = s +__136: + ; +__134: + ; + if !(t != 'c') { + goto __137 + } + if !(wcs != 0) { + goto __138 + } + *(*wchar_t)(unsafe.Pointer(wcs + uintptr(i)*4)) = 0 +__138: + ; + if !(s != 0) { + goto __139 + } + *(*int8)(unsafe.Pointer(s + uintptr(i))) = int8(0) +__139: + ; +__137: + ; + goto __70 +__74: +__75: +__76: + base = 16 + goto int_common +__77: + base = 8 + goto int_common +__78: +__79: + base = 10 + goto int_common +__80: + base = 0 +int_common: + x = X__intscan(tls, f, uint32(base), 0, 2*uint64(0x7fffffffffffffff)+uint64(1)) + if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) { + goto __140 + } + goto match_fail +__140: + ; + if !(t == 'p' && dest != 0) { + goto __141 + } + *(*uintptr)(unsafe.Pointer(dest)) = uintptr(uintptr_t(x)) + goto __142 +__141: + store_int(tls, dest, size, x) +__142: + ; + goto __70 +__81: +__82: +__83: +__84: +__85: +__86: +__87: +__88: + y = X__floatscan(tls, f, size, 0) + if !!((*FILE)(unsafe.Pointer(f)).shcnt+(int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1 != 0) { + goto __143 + } + goto match_fail +__143: + ; + if !(dest != 0) { + goto __144 + } + switch size { + case 0: + goto __146 + case 1: + goto __147 + case 2: + goto __148 + } + goto __145 +__146: + *(*float32)(unsafe.Pointer(dest)) = float32(y) + goto __145 +__147: + *(*float64)(unsafe.Pointer(dest)) = y + goto __145 +__148: + *(*float64)(unsafe.Pointer(dest)) = y + goto __145 +__145: + ; +__144: + ; + goto __70 +__70: + ; + + pos = pos + ((*FILE)(unsafe.Pointer(f)).shcnt + (int64((*FILE)(unsafe.Pointer(f)).rpos)-int64((*FILE)(unsafe.Pointer(f)).buf))/1) + if !(dest != 0) { + goto __149 + } + matches++ +__149: + ; + goto __4 +__4: + p++ + goto __3 + goto __5 +__5: + ; + if !(0 != 0) { + goto __150 + } +fmt_fail: +alloc_fail: +input_fail: + if !!(matches != 0) { + goto __151 + } + matches-- +__151: + ; +match_fail: + if !(alloc != 0) { + goto __152 + } + Xfree(tls, s) + Xfree(tls, wcs) +__152: + ; +__150: + ; +__153: + if !(__need_unlock != 0) { + goto __156 + } + X__unlockfile(tls, f) +__156: + ; + goto __154 +__154: + if 0 != 0 { + goto __153 + } + goto __155 +__155: + ; + return matches +} + +func string_read(tls *TLS, f uintptr, buf uintptr, len size_t) size_t { /* vsscanf.c:4:15: */ + var src uintptr = (*FILE)(unsafe.Pointer(f)).cookie + var k size_t = len + uint64(256) + var end uintptr = Xmemchr(tls, src, 0, k) + if end != 0 { + k = size_t((int64(end) - int64(src)) / 1) + } + if k < len { + len = k + } + Xmemcpy(tls, buf, src, len) + (*FILE)(unsafe.Pointer(f)).rpos = src + uintptr(len) + (*FILE)(unsafe.Pointer(f)).rend = src + uintptr(k) + (*FILE)(unsafe.Pointer(f)).cookie = src + uintptr(k) + return len +} + +func Xvsscanf(tls *TLS, s uintptr, fmt uintptr, ap va_list) int32 { /* vsscanf.c:18:5: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + *(*FILE)(unsafe.Pointer(bp /* f */)) = FILE{read: *(*uintptr)(unsafe.Pointer(&struct { + f func(*TLS, uintptr, uintptr, size_t) size_t + }{string_read})), buf: s, lock: -1, cookie: s} + 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) + + // var f FILE at bp, 232 + + (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y float64 = X__floatscan(tls, bp, prec, 1) + var cnt off_t = (*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1 + if p != 0 { + *(*uintptr)(unsafe.Pointer(p)) = func() uintptr { + if cnt != 0 { + return s + uintptr(cnt) + } + return s + }() + } + return y +} + +func Xstrtof(tls *TLS, s uintptr, p uintptr) float32 { /* strtod.c:17:7: */ + return float32(strtox(tls, s, p, 0)) +} + +func Xstrtod(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:22:8: */ + return strtox(tls, s, p, 1) +} + +func Xstrtold(tls *TLS, s uintptr, p uintptr) float64 { /* strtod.c:27:13: */ + return strtox(tls, s, p, 2) +} + +func strtox1(tls *TLS, s uintptr, p uintptr, base int32, lim uint64) uint64 { /* strtol.c:8:27: */ + bp := tls.Alloc(232) + defer tls.Free(232) + + // var f FILE at bp, 232 + + (*FILE)(unsafe.Pointer(bp)).buf = AssignPtrUintptr(bp+8, s) + (*FILE)(unsafe.Pointer(bp)).rend = UintptrFromInt32(-1) + X__shlim(tls, bp, int64(0)) + var y uint64 = X__intscan(tls, bp, uint32(base), 1, lim) + if p != 0 { + var cnt size_t = size_t((*FILE)(unsafe.Pointer(bp)).shcnt + (int64((*FILE)(unsafe.Pointer(bp)).rpos)-int64((*FILE)(unsafe.Pointer(bp)).buf))/1) + *(*uintptr)(unsafe.Pointer(p)) = s + uintptr(cnt) + } + return y +} + +func Xstrtoull(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:21:20: */ + return strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1)) +} + +func Xstrtoll(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:26:11: */ + return int64(strtox1(tls, s, p, base, Uint64FromInt64(-0x7fffffffffffffff-int64(1)))) +} + +func Xstrtoul(tls *TLS, s uintptr, p uintptr, base int32) uint64 { /* strtol.c:31:15: */ + return uint64(strtox1(tls, s, p, base, 2*uint64(0x7fffffffffffffff)+uint64(1))) +} + +func Xstrtol(tls *TLS, s uintptr, p uintptr, base int32) int64 { /* strtol.c:36:6: */ + return int64(strtox1(tls, s, p, base, 0+Uint64FromInt64(Int64(-Int64(0x7fffffffffffffff))-Int64FromInt32(1)))) +} + +func Xstrtoimax(tls *TLS, s uintptr, p uintptr, base int32) intmax_t { /* strtol.c:41:10: */ + return intmax_t(Xstrtoll(tls, s, p, base)) +} + +func Xstrtoumax(tls *TLS, s uintptr, p uintptr, base int32) uintmax_t { /* strtol.c:46:11: */ + return uintmax_t(Xstrtoull(tls, s, p, base)) +} + +func Xstrdup(tls *TLS, s uintptr) uintptr { /* strdup.c:4:6: */ + var l size_t = Xstrlen(tls, s) + var d uintptr = Xmalloc(tls, l+uint64(1)) + if !(d != 0) { + return uintptr(0) + } + return Xmemcpy(tls, d, s, l+uint64(1)) +} + +func Xstrlcat(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcat.c:4:8: */ + var l size_t = Xstrnlen(tls, d, n) + if l == n { + return l + Xstrlen(tls, s) + } + return l + Xstrlcpy(tls, d+uintptr(l), s, n-l) +} + +// 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. + +func Xstrlcpy(tls *TLS, d uintptr, s uintptr, n size_t) size_t { /* strlcpy.c:11:8: */ + var d0 uintptr + var wd uintptr + var ws uintptr + d0 = d + + if !!(int32(PostDecUint64(&n, 1)) != 0) { + goto __1 + } + goto finish +__1: + ; + if !(uintptr_t(s)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1)) == uintptr_t(d)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1))) { + goto __2 + } +__3: + if !(uintptr_t(s)&(uint64(unsafe.Sizeof(size_t(0)))-uint64(1)) != 0 && n != 0 && AssignPtrInt8(d, *(*int8)(unsafe.Pointer(s))) != 0) { + goto __5 + } + goto __4 +__4: + n-- + s++ + d++ + goto __3 + goto __5 +__5: + ; + if !(n != 0 && *(*int8)(unsafe.Pointer(s)) != 0) { + goto __6 + } + wd = d + ws = s +__7: + if !(n >= size_t(unsafe.Sizeof(size_t(0))) && !((*(*uint64)(unsafe.Pointer(ws))-Uint64(Uint64FromInt32(-1))/uint64(255)) & ^*(*uint64)(unsafe.Pointer(ws)) & (Uint64(Uint64FromInt32(-1))/uint64(255)*uint64(255/2+1)) != 0)) { + goto __9 + } + *(*size_t)(unsafe.Pointer(wd)) = *(*uint64)(unsafe.Pointer(ws)) + goto __8 +__8: + n = n - size_t(unsafe.Sizeof(size_t(0))) + ws += 8 + wd += 8 + goto __7 + goto __9 +__9: + ; + d = wd + s = ws +__6: + ; +__2: + ; +__10: + if !(n != 0 && AssignPtrInt8(d, *(*int8)(unsafe.Pointer(s))) != 0) { + goto __12 + } + goto __11 +__11: + n-- + s++ + d++ + goto __10 + goto __12 +__12: + ; + *(*int8)(unsafe.Pointer(d)) = int8(0) +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)) + for n != 0 && *(*int8)(unsafe.Pointer(s)) != 0 { + n-- + *(*int8)(unsafe.Pointer(PostIncUintptr(&d, 1))) = *(*int8)(unsafe.Pointer(PostIncUintptr(&s, 1))) + } + *(*int8)(unsafe.Pointer(PostIncUintptr(&d, 1))) = int8(0) + return a +} + +func Xstrnlen(tls *TLS, s uintptr, n size_t) size_t { /* strnlen.c:3:8: */ + var p uintptr = Xmemchr(tls, s, 0, n) + if p != 0 { + return uint64((int64(p) - int64(s)) / 1) + } + return n +} + +func Xstrspn(tls *TLS, s uintptr, c uintptr) size_t { /* strspn.c:6:8: */ + bp := tls.Alloc(32) + defer tls.Free(32) + + var a uintptr = s + *(*[4]size_t)(unsafe.Pointer(bp /* byteset */)) = [4]size_t{0: uint64(0)} + + if !(int32(*(*int8)(unsafe.Pointer(c))) != 0) { + return uint64(0) + } + if !(int32(*(*int8)(unsafe.Pointer(c + 1))) != 0) { + for ; int32(*(*int8)(unsafe.Pointer(s))) == int32(*(*int8)(unsafe.Pointer(c))); s++ { + } + return size_t((int64(s) - int64(a)) / 1) + } + + for ; *(*int8)(unsafe.Pointer(c)) != 0 && AssignOrPtrUint64(bp+uintptr(size_t(*(*uint8)(unsafe.Pointer(c)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8, size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(c)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; c++ { + } + for ; *(*int8)(unsafe.Pointer(s)) != 0 && *(*size_t)(unsafe.Pointer(bp + uintptr(size_t(*(*uint8)(unsafe.Pointer(s)))/(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))*8))&(size_t(uint64(1))<<(size_t(*(*uint8)(unsafe.Pointer(s)))%(uint64(8)*uint64(unsafe.Sizeof(size_t(0)))))) != 0; s++ { + } + return size_t((int64(s) - int64(a)) / 1) +} + +func Xstrtok(tls *TLS, s uintptr, sep uintptr) uintptr { /* strtok.c:3:6: */ + if !(s != 0) && !(int32(AssignUintptr(&s, _sp)) != 0) { + return uintptr(0) + } + s += uintptr(Xstrspn(tls, s, sep)) + if !(int32(*(*int8)(unsafe.Pointer(s))) != 0) { + return AssignPtrUintptr(uintptr(unsafe.Pointer(&_sp)), uintptr(0)) + } + _sp = s + uintptr(Xstrcspn(tls, s, sep)) + if *(*int8)(unsafe.Pointer(_sp)) != 0 { + *(*int8)(unsafe.Pointer(PostIncUintptr(&_sp, 1))) = int8(0) + } else { + _sp = uintptr(0) + } + return s +} + +var _sp uintptr /* strtok.c:5:14: */ + +func X__ccgo_pthreadAttrGetDetachState(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:3:5: */ + return *(*int32)(unsafe.Pointer(a + 6*4)) +} + +func Xpthread_attr_getdetachstate(tls *TLS, a uintptr, state uintptr) int32 { /* pthread_attr_get.c:7:5: */ + *(*int32)(unsafe.Pointer(state)) = *(*int32)(unsafe.Pointer(a + 6*4)) + return 0 +} + +// +// int pthread_attr_getguardsize(const pthread_attr_t *restrict a, size_t *restrict size) +// { +// *size = a->_a_guardsize; +// return 0; +// } +// +// int pthread_attr_getinheritsched(const pthread_attr_t *restrict a, int *restrict inherit) +// { +// *inherit = a->_a_sched; +// return 0; +// } +// +// int pthread_attr_getschedparam(const pthread_attr_t *restrict a, struct sched_param *restrict param) +// { +// param->sched_priority = a->_a_prio; +// return 0; +// } +// +// int pthread_attr_getschedpolicy(const pthread_attr_t *restrict a, int *restrict policy) +// { +// *policy = a->_a_policy; +// return 0; +// } +// +// int pthread_attr_getscope(const pthread_attr_t *restrict a, int *restrict scope) +// { +// *scope = PTHREAD_SCOPE_SYSTEM; +// return 0; +// } +// +// int pthread_attr_getstack(const pthread_attr_t *restrict a, void **restrict addr, size_t *restrict size) +// { +// if (!a->_a_stackaddr) +// return EINVAL; +// *size = a->_a_stacksize; +// *addr = (void *)(a->_a_stackaddr - *size); +// return 0; +// } +// +// int pthread_attr_getstacksize(const pthread_attr_t *restrict a, size_t *restrict size) +// { +// *size = a->_a_stacksize; +// return 0; +// } +// +// int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict a, int *restrict pshared) +// { +// *pshared = !!a->__attr; +// return 0; +// } +// +// int pthread_condattr_getclock(const pthread_condattr_t *restrict a, clockid_t *restrict clk) +// { +// *clk = a->__attr & 0x7fffffff; +// return 0; +// } +// +// int pthread_condattr_getpshared(const pthread_condattr_t *restrict a, int *restrict pshared) +// { +// *pshared = a->__attr>>31; +// return 0; +// } +// +// int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *restrict protocol) +// { +// *protocol = PTHREAD_PRIO_NONE; +// return 0; +// } +// int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict a, int *restrict pshared) +// { +// *pshared = a->__attr / 128U % 2; +// return 0; +// } +// +// int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict a, int *restrict robust) +// { +// *robust = a->__attr / 4U % 2; +// return 0; +// } + +func X__ccgo_pthreadMutexattrGettype(tls *TLS, a uintptr) int32 { /* pthread_attr_get.c:93:5: */ + return int32((*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr & uint32(3)) +} + +// int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict a, int *restrict type) +// { +// *type = a->__attr & 3; +// return 0; +// } +// +// int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict a, int *restrict pshared) +// { +// *pshared = a->__attr[0]; +// return 0; +// } + +func Xpthread_attr_setdetachstate(tls *TLS, a uintptr, state int32) int32 { /* pthread_attr_setdetachstate.c:3:5: */ + if uint32(state) > 1 { + return 22 + } + *(*int32)(unsafe.Pointer(a + 6*4)) = state + return 0 +} + +func X__ccgo_getMutexType(tls *TLS, m uintptr) int32 { /* pthread_mutex_lock.c:3:5: */ + return *(*int32)(unsafe.Pointer(m)) & 15 +} + +// int __pthread_mutex_lock(pthread_mutex_t *m) +// { +// if ((m->_m_type&15) == PTHREAD_MUTEX_NORMAL +// && !a_cas(&m->_m_lock, 0, EBUSY)) +// return 0; +// +// return __pthread_mutex_timedlock(m, 0); +// } +// +// weak_alias(__pthread_mutex_lock, pthread_mutex_lock); + +func Xpthread_mutexattr_destroy(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_destroy.c:3:5: */ + return 0 +} + +func Xpthread_mutexattr_init(tls *TLS, a uintptr) int32 { /* pthread_mutexattr_init.c:3:5: */ + *(*pthread_mutexattr_t)(unsafe.Pointer(a)) = pthread_mutexattr_t{} + return 0 +} + +func Xpthread_mutexattr_settype(tls *TLS, a uintptr, type1 int32) int32 { /* pthread_mutexattr_settype.c:3:5: */ + if uint32(type1) > uint32(2) { + return 22 + } + (*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr = (*pthread_mutexattr_t)(unsafe.Pointer(a)).__attr&Uint32FromInt32(CplInt32(3)) | uint32(type1) + return 0 +} + +func init() { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&ptable)) + 0)) = uintptr(unsafe.Pointer(&table)) + uintptr(128)*2 // __ctype_b_loc.c:36:45: +} + +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 diff --git a/vendor/modernc.org/libc/netdb/capi_linux_loong64.go b/vendor/modernc.org/libc/netdb/capi_linux_loong64.go new file mode 100644 index 00000000..8be6cacf --- /dev/null +++ b/vendor/modernc.org/libc/netdb/capi_linux_loong64.go @@ -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 -ignore-unsupported-alignment -o netdb/netdb_linux_amd64.go -pkgname netdb', DO NOT EDIT. + +package netdb + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netdb/netdb_linux_loong64.go b/vendor/modernc.org/libc/netdb/netdb_linux_loong64.go new file mode 100644 index 00000000..a995ad8d --- /dev/null +++ b/vendor/modernc.org/libc/netdb/netdb_linux_loong64.go @@ -0,0 +1,3081 @@ +// 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 -ignore-unsupported-alignment -o netdb/netdb_linux_amd64.go -pkgname netdb', DO NOT EDIT. + +package netdb + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_ALG = 38 // socket.h:133:1: + AF_APPLETALK = 5 // socket.h:99:1: + AF_ASH = 18 // socket.h:113:1: + AF_ATMPVC = 8 // socket.h:102:1: + AF_ATMSVC = 20 // socket.h:115:1: + AF_AX25 = 3 // socket.h:97:1: + AF_BLUETOOTH = 31 // socket.h:126:1: + AF_BRIDGE = 7 // socket.h:101:1: + AF_CAIF = 37 // socket.h:132:1: + AF_CAN = 29 // socket.h:124:1: + AF_DECnet = 12 // socket.h:106:1: + AF_ECONET = 19 // socket.h:114:1: + AF_FILE = 1 // socket.h:95:1: + AF_IB = 27 // socket.h:122:1: + AF_IEEE802154 = 36 // socket.h:131:1: + AF_INET = 2 // socket.h:96:1: + AF_INET6 = 10 // socket.h:104:1: + AF_IPX = 4 // socket.h:98:1: + AF_IRDA = 23 // socket.h:118:1: + AF_ISDN = 34 // socket.h:129:1: + AF_IUCV = 32 // socket.h:127:1: + AF_KCM = 41 // socket.h:136:1: + AF_KEY = 15 // socket.h:109:1: + AF_LLC = 26 // socket.h:121:1: + AF_LOCAL = 1 // socket.h:93:1: + AF_MAX = 45 // socket.h:140:1: + AF_MPLS = 28 // socket.h:123:1: + AF_NETBEUI = 13 // socket.h:107:1: + AF_NETLINK = 16 // socket.h:110:1: + AF_NETROM = 6 // socket.h:100:1: + AF_NFC = 39 // socket.h:134:1: + AF_PACKET = 17 // socket.h:112:1: + AF_PHONET = 35 // socket.h:130:1: + AF_PPPOX = 24 // socket.h:119:1: + AF_QIPCRTR = 42 // socket.h:137:1: + AF_RDS = 21 // socket.h:116:1: + AF_ROSE = 11 // socket.h:105:1: + AF_ROUTE = 16 // socket.h:111:1: + AF_RXRPC = 33 // socket.h:128:1: + AF_SECURITY = 14 // socket.h:108:1: + AF_SMC = 43 // socket.h:138:1: + AF_SNA = 22 // socket.h:117:1: + AF_TIPC = 30 // socket.h:125:1: + AF_UNIX = 1 // socket.h:94:1: + AF_UNSPEC = 0 // socket.h:92:1: + AF_VSOCK = 40 // socket.h:135:1: + AF_WANPIPE = 25 // socket.h:120:1: + AF_X25 = 9 // socket.h:103:1: + AF_XDP = 44 // socket.h:139:1: + AI_ADDRCONFIG = 0x0020 // netdb.h:601:1: + AI_ALL = 0x0010 // netdb.h:600:1: + AI_CANONNAME = 0x0002 // netdb.h:597:1: + AI_NUMERICHOST = 0x0004 // netdb.h:598:1: + AI_NUMERICSERV = 0x0400 // netdb.h:613:1: + AI_PASSIVE = 0x0001 // netdb.h:596:1: + AI_V4MAPPED = 0x0008 // netdb.h:599:1: + BIG_ENDIAN = 4321 // endian.h:28:1: + BYTE_ORDER = 1234 // endian.h:30:1: + EAI_AGAIN = -3 // netdb.h:618:1: + EAI_BADFLAGS = -1 // netdb.h:616:1: + EAI_FAIL = -4 // netdb.h:619:1: + EAI_FAMILY = -6 // netdb.h:620:1: + EAI_MEMORY = -10 // netdb.h:623:1: + EAI_NONAME = -2 // netdb.h:617:1: + EAI_OVERFLOW = -12 // netdb.h:625:1: + EAI_SERVICE = -8 // netdb.h:622:1: + EAI_SOCKTYPE = -7 // netdb.h:621:1: + EAI_SYSTEM = -11 // netdb.h:624:1: + FD_SETSIZE = 1024 // select.h:73:1: + FIOGETOWN = 0x8903 // sockios.h:8:1: + FIOSETOWN = 0x8901 // sockios.h:6:1: + HOST_NOT_FOUND = 1 // netdb.h:63:1: + INET6_ADDRSTRLEN = 46 // in.h:234:1: + INET_ADDRSTRLEN = 16 // in.h:233:1: + IN_CLASSA_HOST = 16777215 // in.h:169:1: + IN_CLASSA_MAX = 128 // in.h:170:1: + IN_CLASSA_NET = 0xff000000 // in.h:167:1: + IN_CLASSA_NSHIFT = 24 // in.h:168:1: + IN_CLASSB_HOST = 65535 // in.h:175:1: + IN_CLASSB_MAX = 65536 // in.h:176:1: + IN_CLASSB_NET = 0xffff0000 // in.h:173:1: + IN_CLASSB_NSHIFT = 16 // in.h:174:1: + IN_CLASSC_HOST = 255 // in.h:181:1: + IN_CLASSC_NET = 0xffffff00 // in.h:179:1: + IN_CLASSC_NSHIFT = 8 // in.h:180:1: + IN_LOOPBACKNET = 127 // in.h:197:1: + IPPORT_RESERVED1 = 1024 // netdb.h:79:1: + IPV6_2292DSTOPTS = 4 // in.h:171:1: + IPV6_2292HOPLIMIT = 8 // in.h:175:1: + IPV6_2292HOPOPTS = 3 // in.h:170:1: + IPV6_2292PKTINFO = 2 // in.h:169:1: + IPV6_2292PKTOPTIONS = 6 // in.h:173:1: + IPV6_2292RTHDR = 5 // in.h:172:1: + IPV6_ADDRFORM = 1 // in.h:168:1: + IPV6_ADDR_PREFERENCES = 72 // in.h:223:1: + IPV6_ADD_MEMBERSHIP = 20 // in.h:237:1: + IPV6_AUTHHDR = 10 // in.h:180:1: + IPV6_AUTOFLOWLABEL = 70 // in.h:220:1: + IPV6_CHECKSUM = 7 // in.h:174:1: + IPV6_DONTFRAG = 62 // in.h:214:1: + IPV6_DROP_MEMBERSHIP = 21 // in.h:238:1: + IPV6_DSTOPTS = 59 // in.h:211:1: + IPV6_FREEBIND = 78 // in.h:233:1: + IPV6_HDRINCL = 36 // in.h:198:1: + IPV6_HOPLIMIT = 52 // in.h:204:1: + IPV6_HOPOPTS = 54 // in.h:206:1: + IPV6_IPSEC_POLICY = 34 // in.h:196:1: + IPV6_JOIN_ANYCAST = 27 // in.h:192:1: + IPV6_JOIN_GROUP = 20 // in.h:185:1: + IPV6_LEAVE_ANYCAST = 28 // in.h:193:1: + IPV6_LEAVE_GROUP = 21 // in.h:186:1: + IPV6_MINHOPCOUNT = 73 // in.h:226:1: + IPV6_MTU = 24 // in.h:189:1: + IPV6_MTU_DISCOVER = 23 // in.h:188:1: + IPV6_MULTICAST_ALL = 29 // in.h:194:1: + IPV6_MULTICAST_HOPS = 18 // in.h:183:1: + IPV6_MULTICAST_IF = 17 // in.h:182:1: + IPV6_MULTICAST_LOOP = 19 // in.h:184:1: + IPV6_NEXTHOP = 9 // in.h:179:1: + IPV6_ORIGDSTADDR = 74 // in.h:228:1: + IPV6_PATHMTU = 61 // in.h:213:1: + IPV6_PKTINFO = 50 // in.h:202:1: + IPV6_PMTUDISC_DO = 2 // in.h:246:1: + IPV6_PMTUDISC_DONT = 0 // in.h:244:1: + IPV6_PMTUDISC_INTERFACE = 4 // in.h:248:1: + IPV6_PMTUDISC_OMIT = 5 // in.h:249:1: + IPV6_PMTUDISC_PROBE = 3 // in.h:247:1: + IPV6_PMTUDISC_WANT = 1 // in.h:245:1: + IPV6_RECVDSTOPTS = 58 // in.h:210:1: + IPV6_RECVERR = 25 // in.h:190:1: + IPV6_RECVFRAGSIZE = 77 // in.h:232:1: + IPV6_RECVHOPLIMIT = 51 // in.h:203:1: + IPV6_RECVHOPOPTS = 53 // in.h:205:1: + IPV6_RECVORIGDSTADDR = 74 // in.h:229:1: + IPV6_RECVPATHMTU = 60 // in.h:212:1: + IPV6_RECVPKTINFO = 49 // in.h:201:1: + IPV6_RECVRTHDR = 56 // in.h:208:1: + IPV6_RECVTCLASS = 66 // in.h:217:1: + IPV6_ROUTER_ALERT = 22 // in.h:187:1: + IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:195:1: + IPV6_RTHDR = 57 // in.h:209:1: + IPV6_RTHDRDSTOPTS = 55 // in.h:207:1: + IPV6_RTHDR_LOOSE = 0 // in.h:256:1: + IPV6_RTHDR_STRICT = 1 // in.h:257:1: + IPV6_RTHDR_TYPE_0 = 0 // in.h:259:1: + IPV6_RXDSTOPTS = 59 // in.h:241:1: + IPV6_RXHOPOPTS = 54 // in.h:240:1: + IPV6_TCLASS = 67 // in.h:218:1: + IPV6_TRANSPARENT = 75 // in.h:230:1: + IPV6_UNICAST_HOPS = 16 // in.h:181:1: + IPV6_UNICAST_IF = 76 // in.h:231:1: + IPV6_V6ONLY = 26 // in.h:191:1: + IPV6_XFRM_POLICY = 35 // in.h:197:1: + IP_ADD_MEMBERSHIP = 35 // in.h:121:1: + IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:125:1: + IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1: + IP_BLOCK_SOURCE = 38 // in.h:124:1: + IP_CHECKSUM = 23 // in.h:102:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:135:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:134:1: + IP_DROP_MEMBERSHIP = 36 // in.h:122:1: + IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:126:1: + IP_FREEBIND = 15 // in.h:89:1: + IP_HDRINCL = 3 // in.h:48:1: + IP_IPSEC_POLICY = 16 // in.h:90:1: + IP_MAX_MEMBERSHIPS = 20 // in.h:136:1: + IP_MINTTL = 21 // in.h:100:1: + IP_MSFILTER = 41 // in.h:127:1: + IP_MTU = 14 // in.h:88:1: + IP_MTU_DISCOVER = 10 // in.h:84:1: + IP_MULTICAST_ALL = 49 // in.h:128:1: + IP_MULTICAST_IF = 32 // in.h:118:1: + IP_MULTICAST_LOOP = 34 // in.h:120:1: + IP_MULTICAST_TTL = 33 // in.h:119:1: + IP_NODEFRAG = 22 // in.h:101:1: + IP_OPTIONS = 4 // in.h:47:1: + IP_ORIGDSTADDR = 20 // in.h:97:1: + IP_PASSSEC = 18 // in.h:92:1: + IP_PKTINFO = 8 // in.h:81:1: + IP_PKTOPTIONS = 9 // in.h:82:1: + IP_PMTUDISC = 10 // in.h:83:1: + IP_PMTUDISC_DO = 2 // in.h:109:1: + IP_PMTUDISC_DONT = 0 // in.h:107:1: + IP_PMTUDISC_INTERFACE = 4 // in.h:114:1: + IP_PMTUDISC_OMIT = 5 // in.h:116:1: + IP_PMTUDISC_PROBE = 3 // in.h:110:1: + IP_PMTUDISC_WANT = 1 // in.h:108:1: + IP_RECVERR = 11 // in.h:85:1: + IP_RECVFRAGSIZE = 25 // in.h:104:1: + IP_RECVOPTS = 6 // in.h:51:1: + IP_RECVORIGDSTADDR = 20 // in.h:98:1: + IP_RECVRETOPTS = 7 // in.h:53:1: + IP_RECVTOS = 13 // in.h:87:1: + IP_RECVTTL = 12 // in.h:86:1: + IP_RETOPTS = 7 // in.h:54:1: + IP_ROUTER_ALERT = 5 // in.h:80:1: + IP_TOS = 1 // in.h:49:1: + IP_TRANSPARENT = 19 // in.h:93:1: + IP_TTL = 2 // in.h:50:1: + IP_UNBLOCK_SOURCE = 37 // in.h:123:1: + IP_UNICAST_IF = 50 // in.h:129:1: + IP_XFRM_POLICY = 17 // in.h:91:1: + LITTLE_ENDIAN = 1234 // endian.h:27:1: + MCAST_BLOCK_SOURCE = 43 // in.h:67:1: + MCAST_EXCLUDE = 0 // in.h:76:1: + MCAST_INCLUDE = 1 // in.h:77:1: + MCAST_JOIN_GROUP = 42 // in.h:66:1: + MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1: + MCAST_LEAVE_GROUP = 45 // in.h:69:1: + MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1: + MCAST_MSFILTER = 48 // in.h:72:1: + MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1: + NETDB_INTERNAL = -1 // netdb.h:72:1: + NETDB_SUCCESS = 0 // netdb.h:73:1: + NI_DGRAM = 16 // netdb.h:646:1: + NI_MAXHOST = 1025 // netdb.h:638:1: + NI_MAXSERV = 32 // netdb.h:639:1: + NI_NAMEREQD = 8 // netdb.h:645:1: + NI_NOFQDN = 4 // netdb.h:644:1: + NI_NUMERICHOST = 1 // netdb.h:642:1: + NI_NUMERICSERV = 2 // netdb.h:643:1: + NO_ADDRESS = 4 // netdb.h:74:1: + NO_DATA = 4 // netdb.h:68:1: + NO_RECOVERY = 3 // netdb.h:66:1: + PDP_ENDIAN = 3412 // endian.h:29:1: + PF_ALG = 38 // socket.h:82:1: + PF_APPLETALK = 5 // socket.h:48:1: + PF_ASH = 18 // socket.h:62:1: + PF_ATMPVC = 8 // socket.h:51:1: + PF_ATMSVC = 20 // socket.h:64:1: + PF_AX25 = 3 // socket.h:46:1: + PF_BLUETOOTH = 31 // socket.h:75:1: + PF_BRIDGE = 7 // socket.h:50:1: + PF_CAIF = 37 // socket.h:81:1: + PF_CAN = 29 // socket.h:73:1: + PF_DECnet = 12 // socket.h:55:1: + PF_ECONET = 19 // socket.h:63:1: + PF_FILE = 1 // socket.h:44:1: + PF_IB = 27 // socket.h:71:1: + PF_IEEE802154 = 36 // socket.h:80:1: + PF_INET = 2 // socket.h:45:1: + PF_INET6 = 10 // socket.h:53:1: + PF_IPX = 4 // socket.h:47:1: + PF_IRDA = 23 // socket.h:67:1: + PF_ISDN = 34 // socket.h:78:1: + PF_IUCV = 32 // socket.h:76:1: + PF_KCM = 41 // socket.h:85:1: + PF_KEY = 15 // socket.h:58:1: + PF_LLC = 26 // socket.h:70:1: + PF_LOCAL = 1 // socket.h:42:1: + PF_MAX = 45 // socket.h:89:1: + PF_MPLS = 28 // socket.h:72:1: + PF_NETBEUI = 13 // socket.h:56:1: + PF_NETLINK = 16 // socket.h:59:1: + PF_NETROM = 6 // socket.h:49:1: + PF_NFC = 39 // socket.h:83:1: + PF_PACKET = 17 // socket.h:61:1: + PF_PHONET = 35 // socket.h:79:1: + PF_PPPOX = 24 // socket.h:68:1: + PF_QIPCRTR = 42 // socket.h:86:1: + PF_RDS = 21 // socket.h:65:1: + PF_ROSE = 11 // socket.h:54:1: + PF_ROUTE = 16 // socket.h:60:1: + PF_RXRPC = 33 // socket.h:77:1: + PF_SECURITY = 14 // socket.h:57:1: + PF_SMC = 43 // socket.h:87:1: + PF_SNA = 22 // socket.h:66:1: + PF_TIPC = 30 // socket.h:74:1: + PF_UNIX = 1 // socket.h:43:1: + PF_UNSPEC = 0 // socket.h:41:1: + PF_VSOCK = 40 // socket.h:84:1: + PF_WANPIPE = 25 // socket.h:69:1: + PF_X25 = 9 // socket.h:52:1: + PF_XDP = 44 // socket.h:88:1: + SCM_TIMESTAMP = 29 // socket.h:140:1: + SCM_TIMESTAMPING = 37 // socket.h:142:1: + SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1: + SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1: + SCM_TIMESTAMPNS = 35 // socket.h:141:1: + SCM_TXTIME = 61 // socket.h:105:1: + SCM_WIFI_STATUS = 41 // socket.h:64:1: + SIOCATMARK = 0x8905 // sockios.h:10:1: + SIOCGPGRP = 0x8904 // sockios.h:9:1: + SIOCGSTAMP = 0x8906 // sockios.h:11:1: + SIOCGSTAMPNS = 0x8907 // sockios.h:12:1: + SIOCSPGRP = 0x8902 // sockios.h:7:1: + SOL_AAL = 265 // socket.h:151:1: + SOL_ALG = 279 // socket.h:165:1: + SOL_ATM = 264 // socket.h:150:1: + SOL_BLUETOOTH = 274 // socket.h:160:1: + SOL_CAIF = 278 // socket.h:164:1: + SOL_DCCP = 269 // socket.h:155:1: + SOL_DECNET = 261 // socket.h:147:1: + SOL_ICMPV6 = 58 // in.h:253:1: + SOL_IP = 0 // in.h:132:1: + SOL_IPV6 = 41 // in.h:252:1: + SOL_IRDA = 266 // socket.h:152:1: + SOL_IUCV = 277 // socket.h:163:1: + SOL_KCM = 281 // socket.h:167:1: + SOL_LLC = 268 // socket.h:154:1: + SOL_NETBEUI = 267 // socket.h:153:1: + SOL_NETLINK = 270 // socket.h:156:1: + SOL_NFC = 280 // socket.h:166:1: + SOL_PACKET = 263 // socket.h:149:1: + SOL_PNPIPE = 275 // socket.h:161:1: + SOL_PPPOL2TP = 273 // socket.h:159:1: + SOL_RAW = 255 // socket.h:146:1: + SOL_RDS = 276 // socket.h:162:1: + SOL_RXRPC = 272 // socket.h:158:1: + SOL_SOCKET = 1 // socket.h:9:1: + SOL_TIPC = 271 // socket.h:157:1: + SOL_TLS = 282 // socket.h:168:1: + SOL_X25 = 262 // socket.h:148:1: + SOL_XDP = 283 // socket.h:169:1: + SOMAXCONN = 4096 // socket.h:172:1: + SO_ACCEPTCONN = 30 // socket.h:51:1: + SO_ATTACH_BPF = 50 // socket.h:82:1: + SO_ATTACH_FILTER = 26 // socket.h:45:1: + SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1: + SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1: + SO_BINDTODEVICE = 25 // socket.h:42:1: + SO_BINDTOIFINDEX = 62 // socket.h:107:1: + SO_BPF_EXTENSIONS = 48 // socket.h:78:1: + SO_BROADCAST = 6 // socket.h:16:1: + SO_BSDCOMPAT = 14 // socket.h:26:1: + SO_BUSY_POLL = 46 // socket.h:74:1: + SO_CNX_ADVICE = 53 // socket.h:88:1: + SO_COOKIE = 57 // socket.h:96:1: + SO_DEBUG = 1 // socket.h:11:1: + SO_DETACH_BPF = 27 // socket.h:83:1: + SO_DETACH_FILTER = 27 // socket.h:46:1: + SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1: + SO_DOMAIN = 39 // socket.h:59:1: + SO_DONTROUTE = 5 // socket.h:15:1: + SO_ERROR = 4 // socket.h:14:1: + SO_GET_FILTER = 26 // socket.h:47:1: + SO_INCOMING_CPU = 49 // socket.h:80:1: + SO_INCOMING_NAPI_ID = 56 // socket.h:94:1: + SO_KEEPALIVE = 9 // socket.h:21:1: + SO_LINGER = 13 // socket.h:25:1: + SO_LOCK_FILTER = 44 // socket.h:70:1: + SO_MARK = 36 // socket.h:56:1: + SO_MAX_PACING_RATE = 47 // socket.h:76:1: + SO_MEMINFO = 55 // socket.h:92:1: + SO_NOFCS = 43 // socket.h:68:1: + SO_NO_CHECK = 11 // socket.h:23:1: + SO_OOBINLINE = 10 // socket.h:22:1: + SO_PASSCRED = 16 // socket.h:29:1: + SO_PASSSEC = 34 // socket.h:54:1: + SO_PEEK_OFF = 42 // socket.h:65:1: + SO_PEERCRED = 17 // socket.h:30:1: + SO_PEERGROUPS = 59 // socket.h:100:1: + SO_PEERNAME = 28 // socket.h:49:1: + SO_PEERSEC = 31 // socket.h:53:1: + SO_PRIORITY = 12 // socket.h:24:1: + SO_PROTOCOL = 38 // socket.h:58:1: + SO_RCVBUF = 8 // socket.h:18:1: + SO_RCVBUFFORCE = 33 // socket.h:20:1: + SO_RCVLOWAT = 18 // socket.h:31:1: + SO_RCVTIMEO = 20 // socket.h:129:1: + SO_RCVTIMEO_NEW = 66 // socket.h:117:1: + SO_RCVTIMEO_OLD = 20 // socket.h:33:1: + SO_REUSEADDR = 2 // socket.h:12:1: + SO_REUSEPORT = 15 // socket.h:27:1: + SO_RXQ_OVFL = 40 // socket.h:61:1: + SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1: + SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1: + SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1: + SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1: + SO_SNDBUF = 7 // socket.h:17:1: + SO_SNDBUFFORCE = 32 // socket.h:19:1: + SO_SNDLOWAT = 19 // socket.h:32:1: + SO_SNDTIMEO = 21 // socket.h:130:1: + SO_SNDTIMEO_NEW = 67 // socket.h:118:1: + SO_SNDTIMEO_OLD = 21 // socket.h:34:1: + SO_TIMESTAMP = 29 // socket.h:125:1: + SO_TIMESTAMPING = 37 // socket.h:127:1: + SO_TIMESTAMPING_NEW = 65 // socket.h:115:1: + SO_TIMESTAMPING_OLD = 37 // socket.h:111:1: + SO_TIMESTAMPNS = 35 // socket.h:126:1: + SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1: + SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1: + SO_TIMESTAMP_NEW = 63 // socket.h:113:1: + SO_TIMESTAMP_OLD = 29 // socket.h:109:1: + SO_TXTIME = 61 // socket.h:104:1: + SO_TYPE = 3 // socket.h:13:1: + SO_WIFI_STATUS = 41 // socket.h:63:1: + SO_ZEROCOPY = 60 // socket.h:102:1: + TRY_AGAIN = 2 // netdb.h:64:1: + X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1: + X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1: + X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1: + X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1: + X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_ENDIAN_H = 1 // endian.h:19:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1: + X_LP64 = 1 // <predefined>:284:1: + X_NETDB_H = 1 // netdb.h:23:1: + X_NETINET_IN_H = 1 // in.h:19:1: + X_PATH_HEQUIV = "/etc/hosts.equiv" // netdb.h:43:1: + X_PATH_HOSTS = "/etc/hosts" // netdb.h:44:1: + X_PATH_NETWORKS = "/etc/networks" // netdb.h:45:1: + X_PATH_NSSWITCH_CONF = "/etc/nsswitch.conf" // netdb.h:46:1: + X_PATH_PROTOCOLS = "/etc/protocols" // netdb.h:47:1: + X_PATH_SERVICES = "/etc/services" // netdb.h:48:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_RPC_NETDB_H = 1 // netdb.h:37:1: + X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_SS_SIZE = 128 // sockaddr.h:40:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SELECT_H = 1 // select.h:22:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_SYS_SOCKET_H = 1 // socket.h:20:1: + X_SYS_TYPES_H = 1 // types.h:23:1: + X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1: + X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// Standard well-known ports. +const ( /* in.h:122:1: */ + IPPORT_ECHO = 7 // Echo service. + IPPORT_DISCARD = 9 // Discard transmissions service. + IPPORT_SYSTAT = 11 // System status service. + IPPORT_DAYTIME = 13 // Time of day service. + IPPORT_NETSTAT = 15 // Network status service. + IPPORT_FTP = 21 // File Transfer Protocol. + IPPORT_TELNET = 23 // Telnet protocol. + IPPORT_SMTP = 25 // Simple Mail Transfer Protocol. + IPPORT_TIMESERVER = 37 // Timeserver service. + IPPORT_NAMESERVER = 42 // Domain Name Service. + IPPORT_WHOIS = 43 // Internet Whois service. + IPPORT_MTP = 57 + + IPPORT_TFTP = 69 // Trivial File Transfer Protocol. + IPPORT_RJE = 77 + IPPORT_FINGER = 79 // Finger service. + IPPORT_TTYLINK = 87 + IPPORT_SUPDUP = 95 // SUPDUP protocol. + + IPPORT_EXECSERVER = 512 // execd service. + IPPORT_LOGINSERVER = 513 // rlogind service. + IPPORT_CMDSERVER = 514 + IPPORT_EFSSERVER = 520 + + // UDP ports. + IPPORT_BIFFUDP = 512 + IPPORT_WHOSERVER = 513 + IPPORT_ROUTESERVER = 520 + + // Ports less than this value are reserved for privileged processes. + IPPORT_RESERVED = 1024 + + // Ports greater this value are reserved for (non-privileged) servers. + IPPORT_USERRESERVED = 5000 +) + +// Options for use with `getsockopt' and `setsockopt' at the IPv6 level. +// The first word in the comment at the right is the data type used; +// "bool" means a boolean value stored in an `int'. + +// Advanced API (RFC3542) (1). + +// Advanced API (RFC3542) (2). + +// RFC5014. + +// RFC5082. + +// Obsolete synonyms for the above. + +// IPV6_MTU_DISCOVER values. + +// Socket level values for IPv6. + +// Routing header options for IPv6. + +// Standard well-defined IP protocols. +const ( /* in.h:40:1: */ + IPPROTO_IP = 0 // Dummy protocol for TCP. + IPPROTO_ICMP = 1 // Internet Control Message Protocol. + IPPROTO_IGMP = 2 // Internet Group Management Protocol. + IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94). + IPPROTO_TCP = 6 // Transmission Control Protocol. + IPPROTO_EGP = 8 // Exterior Gateway Protocol. + IPPROTO_PUP = 12 // PUP protocol. + IPPROTO_UDP = 17 // User Datagram Protocol. + IPPROTO_IDP = 22 // XNS IDP protocol. + IPPROTO_TP = 29 // SO Transport Protocol Class 4. + IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol. + IPPROTO_IPV6 = 41 // IPv6 header. + IPPROTO_RSVP = 46 // Reservation Protocol. + IPPROTO_GRE = 47 // General Routing Encapsulation. + IPPROTO_ESP = 50 // encapsulating security payload. + IPPROTO_AH = 51 // authentication header. + IPPROTO_MTP = 92 // Multicast Transport Protocol. + IPPROTO_BEETPH = 94 // IP option pseudo header for BEET. + IPPROTO_ENCAP = 98 // Encapsulation Header. + IPPROTO_PIM = 103 // Protocol Independent Multicast. + IPPROTO_COMP = 108 // Compression Header Protocol. + IPPROTO_SCTP = 132 // Stream Control Transmission Protocol. + IPPROTO_UDPLITE = 136 // UDP-Lite protocol. + IPPROTO_MPLS = 137 // MPLS in IP. + IPPROTO_RAW = 255 // Raw IP packets. + IPPROTO_MAX = 256 +) + +// If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. +const ( /* in.h:99:1: */ + IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. + IPPROTO_ROUTING = 43 // IPv6 routing header. + IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header. + IPPROTO_ICMPV6 = 58 // ICMPv6. + IPPROTO_NONE = 59 // IPv6 no next header. + IPPROTO_DSTOPTS = 60 // IPv6 destination options. + IPPROTO_MH = 135 +) + +// Bits in the FLAGS argument to `send', `recv', et al. +const ( /* socket.h:200:1: */ + MSG_OOB = 1 // Process out-of-band data. + MSG_PEEK = 2 // Peek at incoming messages. + MSG_DONTROUTE = 4 // Don't use local routing. + MSG_CTRUNC = 8 // Control data lost before delivery. + MSG_PROXY = 16 // Supply or ask second address. + MSG_TRUNC = 32 + MSG_DONTWAIT = 64 // Nonblocking IO. + MSG_EOR = 128 // End of record. + MSG_WAITALL = 256 // Wait for a full request. + MSG_FIN = 512 + MSG_SYN = 1024 + MSG_CONFIRM = 2048 // Confirm path validity. + MSG_RST = 4096 + MSG_ERRQUEUE = 8192 // Fetch message from error queue. + MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE. + MSG_MORE = 32768 // Sender will send more. + MSG_WAITFORONE = 65536 // Wait for at least one packet to return. + MSG_BATCH = 262144 // sendmmsg: more messages coming. + MSG_ZEROCOPY = 67108864 // Use user data in kernel path. + MSG_FASTOPEN = 536870912 // Send data in TCP SYN. + + MSG_CMSG_CLOEXEC = 1073741824 +) + +// Socket level message types. This must match the definitions in +// +// <linux/socket.h>. +const ( /* socket.h:332:1: */ + SCM_RIGHTS = 1 +) + +// Get the architecture-dependent definition of enum __socket_type. +// Define enum __socket_type for generic Linux. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Types of sockets. +const ( /* socket_type.h:24:1: */ + SOCK_STREAM = 1 // Sequenced, reliable, connection-based + // byte streams. + SOCK_DGRAM = 2 // Connectionless, unreliable datagrams + // of fixed maximum length. + SOCK_RAW = 3 // Raw protocol interface. + SOCK_RDM = 4 // Reliably-delivered messages. + SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based, + // datagrams of fixed maximum length. + SOCK_DCCP = 6 // Datagram Congestion Control Protocol. + SOCK_PACKET = 10 // Linux specific way of getting packets + // at the dev level. For writing rarp and + // other similar things on the user level. + + // Flags to be ORed into the type parameter of socket and socketpair and + // used for the flags parameter of paccept. + + SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the + // new descriptor(s). + SOCK_NONBLOCK = 2048 +) + +// The following constants should be used for the second parameter of +// +// `shutdown'. +const ( /* socket.h:41:1: */ + SHUT_RD = 0 // No more receptions. + SHUT_WR = 1 // No more transmissions. + SHUT_RDWR = 2 +) + +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 */ + +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// All data returned by the network data base library are supplied in +// host order and returned in network order (suitable for use in +// system calls). + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define uintN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */ +type Uint16_t = X__uint16_t /* stdint-uintn.h:25:20 */ +type Uint32_t = X__uint32_t /* stdint-uintn.h:26:20 */ +type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Structure for scatter/gather I/O. +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* struct_iovec.h:26:1 */ + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This operating system-specific header file defines the SOCK_*, PF_*, +// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', +// `struct msghdr', and `struct linger' types. +// System-specific socket constants and types. Linux version. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// A time value that is accurate to the nearest +// +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of <linux/posix_types.h> define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +// Type for length arguments in socket calls. +type Socklen_t = X__socklen_t /* socket.h:33:21 */ + +// Protocol families. + +// Address families. + +// Socket level values. Others are defined in the appropriate headers. +// +// XXX These definitions also should go into the appropriate headers as +// far as they are available. + +// Maximum queue length specifiable by listen. + +// Get the definition of the macro to define the common sockaddr members. +// Definition of struct sockaddr_* common members and sizes, generic version. +// Copyright (C) 1995-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/socket.h> instead. + +// POSIX.1g specifies this type name for the `sa_family' member. +type Sa_family_t = uint16 /* sockaddr.h:28:28 */ + +// This macro is used to declare the initial common members +// of the data types used for socket addresses, `struct sockaddr', +// `struct sockaddr_in', `struct sockaddr_un', etc. + +// Size of struct sockaddr_storage. + +// Structure describing a generic socket address. +type Sockaddr = struct { + Fsa_family Sa_family_t + Fsa_data [14]int8 +} /* socket.h:178:1 */ + +// Structure large enough to hold any socket address (with the historical +// exception of AF_UNIX). + +type Sockaddr_storage = struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 +} /* socket.h:191:1 */ + +// Structure describing messages sent by +// +// `sendmsg' and received by `recvmsg'. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen Size_t + Fmsg_control uintptr + Fmsg_controllen Size_t + Fmsg_flags int32 + F__ccgo_pad2 [4]byte +} /* socket.h:257:1 */ + +// Structure used for storage of ancillary data object information. +type Cmsghdr = struct { + F__ccgo_pad1 [0]uint64 + Fcmsg_len Size_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:275:1 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This allows for 1024 file descriptors: if NR_OPEN is ever grown +// beyond that you'll have to change this too. But 1024 fd's seem to be +// enough even for such "real" unices like OSF/1, so hopefully this is +// one limit that doesn't have to be changed [again]. +// +// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in +// <sys/time.h> (and thus <linux/time.h>) - but this is a more logical +// place for them. Solved by having dummy defines in <sys/time.h>. + +// This macro may have been defined in <gnu/types.h>. But we always +// use the one here. + +type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */ + +// Type of a signal handler. +type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ + +// Type of a SYSV IPC key. +type X__kernel_key_t = int32 /* posix_types.h:33:13 */ +type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. Also, we cannot +// assume GCC is being used. + +type X__kernel_old_uid_t = uint16 /* posix_types_64.h:11:24 */ +type X__kernel_old_gid_t = uint16 /* posix_types_64.h:12:24 */ + +type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// There seems to be no way of detecting this automatically from user +// space, so 64 bit architectures should override this in their +// bitsperlong.h. In particular, an architecture that supports +// both 32 and 64 bit user space must not rely on CONFIG_64BIT +// to decide it, but rather check a compiler provided macro. + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. +// +// First the types that are often defined in different ways across +// architectures, so that you can override them. + +type X__kernel_long_t = int64 /* posix_types.h:15:15 */ +type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */ + +type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */ + +type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */ + +type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ + +type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */ + +type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */ +type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */ + +type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ + +type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ + +type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ +type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ + +// Most 32 bit architectures use "unsigned int" size_t, +// and all 64 bit architectures use "unsigned long" size_t. +type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */ +type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */ +type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */ + +type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ + +// anything below here should be completely generic +type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ +type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ +type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ +type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ +type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ +type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ +type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ +type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ +type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ +type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ +type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// Socket-level I/O control calls. + +// For setsockopt(2) + +// Security levels - as per NRL IPv6 - don't actually do anything + +// Socket filtering + +// Instruct lower device to use last 4-bytes of skb data as FCS + +// on 64-bit and x32, avoid the ?: operator + +// Structure used to manipulate the SO_LINGER option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:361:1 */ + +// This is the 4.3 BSD `struct sockaddr' format, which is used as wire +// +// format in the grotty old 4.3 `talk' protocol. +type Osockaddr = struct { + Fsa_family uint16 + Fsa_data [14]uint8 +} /* struct_osockaddr.h:6:1 */ + +// Define some macros helping to catch buffer overflows. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Internet address. +type In_addr_t = Uint32_t /* in.h:30:18 */ +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ + +// Get system-specific definitions. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Linux version. + +// If the application has already included linux/in6.h from a linux-based +// kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the +// defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo +// in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly. +// Neither the linux kernel nor glibc should break this ABI without coordination. +// In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check +// for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for +// maximum backwards compatibility. + +// Options for use with `getsockopt' and `setsockopt' at the IP level. +// The first word in the comment at the right is the data type used; +// "bool" means a boolean value stored in an `int'. +// For BSD compatibility. + +// TProxy original addresses + +// IP_MTU_DISCOVER arguments. +// Always use interface mtu (ignores dst pmtu) but don't set DF flag. +// Also incoming ICMP frag_needed notifications will be ignored on +// this socket to prevent accepting spoofed ones. +// Like IP_PMTUDISC_INTERFACE but allow packets to be fragmented. + +// To select the IP level. + +// Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). +type Ip_opts = struct { + Fip_dst struct{ Fs_addr In_addr_t } + Fip_opts [40]int8 +} /* in.h:142:1 */ + +// Like `struct ip_mreq' but including interface specification by index. +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:149:1 */ + +// Structure used for IP_PKTINFO. +type In_pktinfo = struct { + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr In_addr_t } + Fipi_addr struct{ Fs_addr In_addr_t } +} /* in.h:157:1 */ + +// Type to represent a port. +type In_port_t = Uint16_t /* in.h:119:18 */ + +// Definitions of the bits in an Internet address integer. +// +// On subnets, host and network parts are found according to +// the subnet mask, not these masks. + +// Address to accept any incoming messages. +// Address to send to all hosts. +// Address indicating an error return. + +// Network number for local host loopback. +// Address to loopback in software to local host. + +// Defines for Multicast INADDR. + +// IPv6 address +type In6_addr = struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } +} /* in.h:212:1 */ + +// ::1 + +// Structure describing an Internet socket address. +type Sockaddr_in = struct { + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]uint8 +} /* in.h:238:1 */ + +// Ditto, for IPv6. +type Sockaddr_in6 = struct { + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t +} /* in.h:253:1 */ + +// IPv4 multicast request. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:265:1 */ + +type Ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } + Fimr_sourceaddr struct{ Fs_addr In_addr_t } +} /* in.h:274:1 */ + +// Likewise, for IPv6. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fipv6mr_interface uint32 +} /* in.h:289:1 */ + +// Multicast group request. +type Group_req = struct { + Fgr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:301:1 */ + +type Group_source_req = struct { + Fgsr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:310:1 */ + +// Full-state filter operations. +type Ip_msfilter = struct { + Fimsf_multiaddr struct{ Fs_addr In_addr_t } + Fimsf_interface struct{ Fs_addr In_addr_t } + Fimsf_fmode Uint32_t + Fimsf_numsrc Uint32_t + Fimsf_slist [1]struct{ Fs_addr In_addr_t } +} /* in.h:324:1 */ + +type Group_filter = struct { + Fgf_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgf_fmode Uint32_t + Fgf_numsrc Uint32_t + Fgf_slist [1]struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:345:1 */ + +// Define uintN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This is necessary to make this include file properly replace the +// Sun version. +// @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC +// Copyright (c) 2010, Oracle America, Inc. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * 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. +// * Neither the name of the "Oracle America, Inc." 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 COPYRIGHT HOLDERS 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 +// COPYRIGHT HOLDER 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. + +// Cleaned up for GNU C library roland@gnu.ai.mit.edu: +// added multiple inclusion protection and use of <sys/cdefs.h>. +// In GNU this file is #include'd by <netdb.h>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +type Rpcent = struct { + Fr_name uintptr + Fr_aliases uintptr + Fr_number int32 + F__ccgo_pad1 [4]byte +} /* netdb.h:46:1 */ + +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Description of data base entry for a single network. NOTE: here a +// +// poor assumption is made. The network number is expected to fit +// into an unsigned long int variable. +type Netent = struct { + Fn_name uintptr + Fn_aliases uintptr + Fn_addrtype int32 + Fn_net Uint32_t +} /* netdb.h:26:1 */ + +// Description of data base entry for a single host. +type Hostent = struct { + Fh_name uintptr + Fh_aliases uintptr + Fh_addrtype int32 + Fh_length int32 + Fh_addr_list uintptr +} /* netdb.h:98:1 */ + +// Description of data base entry for a single service. +type Servent = struct { + Fs_name uintptr + Fs_aliases uintptr + Fs_port int32 + F__ccgo_pad1 [4]byte + Fs_proto uintptr +} /* netdb.h:255:1 */ + +// Description of data base entry for a single service. +type Protoent = struct { + Fp_name uintptr + Fp_aliases uintptr + Fp_proto int32 + F__ccgo_pad1 [4]byte +} /* netdb.h:324:1 */ + +// Extension from POSIX.1:2001. +// Structure to contain information about address of a service provider. +type Addrinfo = struct { + Fai_flags int32 + Fai_family int32 + Fai_socktype int32 + Fai_protocol int32 + Fai_addrlen Socklen_t + F__ccgo_pad1 [4]byte + Fai_addr uintptr + Fai_canonname uintptr + Fai_next uintptr +} /* netdb.h:565:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/netinet/in/capi_linux_loong64.go b/vendor/modernc.org/libc/netinet/in/capi_linux_loong64.go new file mode 100644 index 00000000..953ed094 --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_linux_amd64.go -pkgname in', DO NOT EDIT. + +package in + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/netinet/in/in_linux_loong64.go b/vendor/modernc.org/libc/netinet/in/in_linux_loong64.go new file mode 100644 index 00000000..cfd5e88a --- /dev/null +++ b/vendor/modernc.org/libc/netinet/in/in_linux_loong64.go @@ -0,0 +1,2790 @@ +// Code generated by 'ccgo netinet/in/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o netinet/in/in_linux_amd64.go -pkgname in', DO NOT EDIT. + +package in + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_ALG = 38 // socket.h:133:1: + AF_APPLETALK = 5 // socket.h:99:1: + AF_ASH = 18 // socket.h:113:1: + AF_ATMPVC = 8 // socket.h:102:1: + AF_ATMSVC = 20 // socket.h:115:1: + AF_AX25 = 3 // socket.h:97:1: + AF_BLUETOOTH = 31 // socket.h:126:1: + AF_BRIDGE = 7 // socket.h:101:1: + AF_CAIF = 37 // socket.h:132:1: + AF_CAN = 29 // socket.h:124:1: + AF_DECnet = 12 // socket.h:106:1: + AF_ECONET = 19 // socket.h:114:1: + AF_FILE = 1 // socket.h:95:1: + AF_IB = 27 // socket.h:122:1: + AF_IEEE802154 = 36 // socket.h:131:1: + AF_INET = 2 // socket.h:96:1: + AF_INET6 = 10 // socket.h:104:1: + AF_IPX = 4 // socket.h:98:1: + AF_IRDA = 23 // socket.h:118:1: + AF_ISDN = 34 // socket.h:129:1: + AF_IUCV = 32 // socket.h:127:1: + AF_KCM = 41 // socket.h:136:1: + AF_KEY = 15 // socket.h:109:1: + AF_LLC = 26 // socket.h:121:1: + AF_LOCAL = 1 // socket.h:93:1: + AF_MAX = 45 // socket.h:140:1: + AF_MPLS = 28 // socket.h:123:1: + AF_NETBEUI = 13 // socket.h:107:1: + AF_NETLINK = 16 // socket.h:110:1: + AF_NETROM = 6 // socket.h:100:1: + AF_NFC = 39 // socket.h:134:1: + AF_PACKET = 17 // socket.h:112:1: + AF_PHONET = 35 // socket.h:130:1: + AF_PPPOX = 24 // socket.h:119:1: + AF_QIPCRTR = 42 // socket.h:137:1: + AF_RDS = 21 // socket.h:116:1: + AF_ROSE = 11 // socket.h:105:1: + AF_ROUTE = 16 // socket.h:111:1: + AF_RXRPC = 33 // socket.h:128:1: + AF_SECURITY = 14 // socket.h:108:1: + AF_SMC = 43 // socket.h:138:1: + AF_SNA = 22 // socket.h:117:1: + AF_TIPC = 30 // socket.h:125:1: + AF_UNIX = 1 // socket.h:94:1: + AF_UNSPEC = 0 // socket.h:92:1: + AF_VSOCK = 40 // socket.h:135:1: + AF_WANPIPE = 25 // socket.h:120:1: + AF_X25 = 9 // socket.h:103:1: + AF_XDP = 44 // socket.h:139:1: + BIG_ENDIAN = 4321 // endian.h:28:1: + BYTE_ORDER = 1234 // endian.h:30:1: + FD_SETSIZE = 1024 // select.h:73:1: + FIOGETOWN = 0x8903 // sockios.h:8:1: + FIOSETOWN = 0x8901 // sockios.h:6:1: + INET6_ADDRSTRLEN = 46 // in.h:234:1: + INET_ADDRSTRLEN = 16 // in.h:233:1: + IN_CLASSA_HOST = 16777215 // in.h:169:1: + IN_CLASSA_MAX = 128 // in.h:170:1: + IN_CLASSA_NET = 0xff000000 // in.h:167:1: + IN_CLASSA_NSHIFT = 24 // in.h:168:1: + IN_CLASSB_HOST = 65535 // in.h:175:1: + IN_CLASSB_MAX = 65536 // in.h:176:1: + IN_CLASSB_NET = 0xffff0000 // in.h:173:1: + IN_CLASSB_NSHIFT = 16 // in.h:174:1: + IN_CLASSC_HOST = 255 // in.h:181:1: + IN_CLASSC_NET = 0xffffff00 // in.h:179:1: + IN_CLASSC_NSHIFT = 8 // in.h:180:1: + IN_LOOPBACKNET = 127 // in.h:197:1: + IPV6_2292DSTOPTS = 4 // in.h:171:1: + IPV6_2292HOPLIMIT = 8 // in.h:175:1: + IPV6_2292HOPOPTS = 3 // in.h:170:1: + IPV6_2292PKTINFO = 2 // in.h:169:1: + IPV6_2292PKTOPTIONS = 6 // in.h:173:1: + IPV6_2292RTHDR = 5 // in.h:172:1: + IPV6_ADDRFORM = 1 // in.h:168:1: + IPV6_ADDR_PREFERENCES = 72 // in.h:223:1: + IPV6_ADD_MEMBERSHIP = 20 // in.h:237:1: + IPV6_AUTHHDR = 10 // in.h:180:1: + IPV6_AUTOFLOWLABEL = 70 // in.h:220:1: + IPV6_CHECKSUM = 7 // in.h:174:1: + IPV6_DONTFRAG = 62 // in.h:214:1: + IPV6_DROP_MEMBERSHIP = 21 // in.h:238:1: + IPV6_DSTOPTS = 59 // in.h:211:1: + IPV6_FREEBIND = 78 // in.h:233:1: + IPV6_HDRINCL = 36 // in.h:198:1: + IPV6_HOPLIMIT = 52 // in.h:204:1: + IPV6_HOPOPTS = 54 // in.h:206:1: + IPV6_IPSEC_POLICY = 34 // in.h:196:1: + IPV6_JOIN_ANYCAST = 27 // in.h:192:1: + IPV6_JOIN_GROUP = 20 // in.h:185:1: + IPV6_LEAVE_ANYCAST = 28 // in.h:193:1: + IPV6_LEAVE_GROUP = 21 // in.h:186:1: + IPV6_MINHOPCOUNT = 73 // in.h:226:1: + IPV6_MTU = 24 // in.h:189:1: + IPV6_MTU_DISCOVER = 23 // in.h:188:1: + IPV6_MULTICAST_ALL = 29 // in.h:194:1: + IPV6_MULTICAST_HOPS = 18 // in.h:183:1: + IPV6_MULTICAST_IF = 17 // in.h:182:1: + IPV6_MULTICAST_LOOP = 19 // in.h:184:1: + IPV6_NEXTHOP = 9 // in.h:179:1: + IPV6_ORIGDSTADDR = 74 // in.h:228:1: + IPV6_PATHMTU = 61 // in.h:213:1: + IPV6_PKTINFO = 50 // in.h:202:1: + IPV6_PMTUDISC_DO = 2 // in.h:246:1: + IPV6_PMTUDISC_DONT = 0 // in.h:244:1: + IPV6_PMTUDISC_INTERFACE = 4 // in.h:248:1: + IPV6_PMTUDISC_OMIT = 5 // in.h:249:1: + IPV6_PMTUDISC_PROBE = 3 // in.h:247:1: + IPV6_PMTUDISC_WANT = 1 // in.h:245:1: + IPV6_RECVDSTOPTS = 58 // in.h:210:1: + IPV6_RECVERR = 25 // in.h:190:1: + IPV6_RECVFRAGSIZE = 77 // in.h:232:1: + IPV6_RECVHOPLIMIT = 51 // in.h:203:1: + IPV6_RECVHOPOPTS = 53 // in.h:205:1: + IPV6_RECVORIGDSTADDR = 74 // in.h:229:1: + IPV6_RECVPATHMTU = 60 // in.h:212:1: + IPV6_RECVPKTINFO = 49 // in.h:201:1: + IPV6_RECVRTHDR = 56 // in.h:208:1: + IPV6_RECVTCLASS = 66 // in.h:217:1: + IPV6_ROUTER_ALERT = 22 // in.h:187:1: + IPV6_ROUTER_ALERT_ISOLATE = 30 // in.h:195:1: + IPV6_RTHDR = 57 // in.h:209:1: + IPV6_RTHDRDSTOPTS = 55 // in.h:207:1: + IPV6_RTHDR_LOOSE = 0 // in.h:256:1: + IPV6_RTHDR_STRICT = 1 // in.h:257:1: + IPV6_RTHDR_TYPE_0 = 0 // in.h:259:1: + IPV6_RXDSTOPTS = 59 // in.h:241:1: + IPV6_RXHOPOPTS = 54 // in.h:240:1: + IPV6_TCLASS = 67 // in.h:218:1: + IPV6_TRANSPARENT = 75 // in.h:230:1: + IPV6_UNICAST_HOPS = 16 // in.h:181:1: + IPV6_UNICAST_IF = 76 // in.h:231:1: + IPV6_V6ONLY = 26 // in.h:191:1: + IPV6_XFRM_POLICY = 35 // in.h:197:1: + IP_ADD_MEMBERSHIP = 35 // in.h:121:1: + IP_ADD_SOURCE_MEMBERSHIP = 39 // in.h:125:1: + IP_BIND_ADDRESS_NO_PORT = 24 // in.h:103:1: + IP_BLOCK_SOURCE = 38 // in.h:124:1: + IP_CHECKSUM = 23 // in.h:102:1: + IP_DEFAULT_MULTICAST_LOOP = 1 // in.h:135:1: + IP_DEFAULT_MULTICAST_TTL = 1 // in.h:134:1: + IP_DROP_MEMBERSHIP = 36 // in.h:122:1: + IP_DROP_SOURCE_MEMBERSHIP = 40 // in.h:126:1: + IP_FREEBIND = 15 // in.h:89:1: + IP_HDRINCL = 3 // in.h:48:1: + IP_IPSEC_POLICY = 16 // in.h:90:1: + IP_MAX_MEMBERSHIPS = 20 // in.h:136:1: + IP_MINTTL = 21 // in.h:100:1: + IP_MSFILTER = 41 // in.h:127:1: + IP_MTU = 14 // in.h:88:1: + IP_MTU_DISCOVER = 10 // in.h:84:1: + IP_MULTICAST_ALL = 49 // in.h:128:1: + IP_MULTICAST_IF = 32 // in.h:118:1: + IP_MULTICAST_LOOP = 34 // in.h:120:1: + IP_MULTICAST_TTL = 33 // in.h:119:1: + IP_NODEFRAG = 22 // in.h:101:1: + IP_OPTIONS = 4 // in.h:47:1: + IP_ORIGDSTADDR = 20 // in.h:97:1: + IP_PASSSEC = 18 // in.h:92:1: + IP_PKTINFO = 8 // in.h:81:1: + IP_PKTOPTIONS = 9 // in.h:82:1: + IP_PMTUDISC = 10 // in.h:83:1: + IP_PMTUDISC_DO = 2 // in.h:109:1: + IP_PMTUDISC_DONT = 0 // in.h:107:1: + IP_PMTUDISC_INTERFACE = 4 // in.h:114:1: + IP_PMTUDISC_OMIT = 5 // in.h:116:1: + IP_PMTUDISC_PROBE = 3 // in.h:110:1: + IP_PMTUDISC_WANT = 1 // in.h:108:1: + IP_RECVERR = 11 // in.h:85:1: + IP_RECVFRAGSIZE = 25 // in.h:104:1: + IP_RECVOPTS = 6 // in.h:51:1: + IP_RECVORIGDSTADDR = 20 // in.h:98:1: + IP_RECVRETOPTS = 7 // in.h:53:1: + IP_RECVTOS = 13 // in.h:87:1: + IP_RECVTTL = 12 // in.h:86:1: + IP_RETOPTS = 7 // in.h:54:1: + IP_ROUTER_ALERT = 5 // in.h:80:1: + IP_TOS = 1 // in.h:49:1: + IP_TRANSPARENT = 19 // in.h:93:1: + IP_TTL = 2 // in.h:50:1: + IP_UNBLOCK_SOURCE = 37 // in.h:123:1: + IP_UNICAST_IF = 50 // in.h:129:1: + IP_XFRM_POLICY = 17 // in.h:91:1: + LITTLE_ENDIAN = 1234 // endian.h:27:1: + MCAST_BLOCK_SOURCE = 43 // in.h:67:1: + MCAST_EXCLUDE = 0 // in.h:76:1: + MCAST_INCLUDE = 1 // in.h:77:1: + MCAST_JOIN_GROUP = 42 // in.h:66:1: + MCAST_JOIN_SOURCE_GROUP = 46 // in.h:70:1: + MCAST_LEAVE_GROUP = 45 // in.h:69:1: + MCAST_LEAVE_SOURCE_GROUP = 47 // in.h:71:1: + MCAST_MSFILTER = 48 // in.h:72:1: + MCAST_UNBLOCK_SOURCE = 44 // in.h:68:1: + PDP_ENDIAN = 3412 // endian.h:29:1: + PF_ALG = 38 // socket.h:82:1: + PF_APPLETALK = 5 // socket.h:48:1: + PF_ASH = 18 // socket.h:62:1: + PF_ATMPVC = 8 // socket.h:51:1: + PF_ATMSVC = 20 // socket.h:64:1: + PF_AX25 = 3 // socket.h:46:1: + PF_BLUETOOTH = 31 // socket.h:75:1: + PF_BRIDGE = 7 // socket.h:50:1: + PF_CAIF = 37 // socket.h:81:1: + PF_CAN = 29 // socket.h:73:1: + PF_DECnet = 12 // socket.h:55:1: + PF_ECONET = 19 // socket.h:63:1: + PF_FILE = 1 // socket.h:44:1: + PF_IB = 27 // socket.h:71:1: + PF_IEEE802154 = 36 // socket.h:80:1: + PF_INET = 2 // socket.h:45:1: + PF_INET6 = 10 // socket.h:53:1: + PF_IPX = 4 // socket.h:47:1: + PF_IRDA = 23 // socket.h:67:1: + PF_ISDN = 34 // socket.h:78:1: + PF_IUCV = 32 // socket.h:76:1: + PF_KCM = 41 // socket.h:85:1: + PF_KEY = 15 // socket.h:58:1: + PF_LLC = 26 // socket.h:70:1: + PF_LOCAL = 1 // socket.h:42:1: + PF_MAX = 45 // socket.h:89:1: + PF_MPLS = 28 // socket.h:72:1: + PF_NETBEUI = 13 // socket.h:56:1: + PF_NETLINK = 16 // socket.h:59:1: + PF_NETROM = 6 // socket.h:49:1: + PF_NFC = 39 // socket.h:83:1: + PF_PACKET = 17 // socket.h:61:1: + PF_PHONET = 35 // socket.h:79:1: + PF_PPPOX = 24 // socket.h:68:1: + PF_QIPCRTR = 42 // socket.h:86:1: + PF_RDS = 21 // socket.h:65:1: + PF_ROSE = 11 // socket.h:54:1: + PF_ROUTE = 16 // socket.h:60:1: + PF_RXRPC = 33 // socket.h:77:1: + PF_SECURITY = 14 // socket.h:57:1: + PF_SMC = 43 // socket.h:87:1: + PF_SNA = 22 // socket.h:66:1: + PF_TIPC = 30 // socket.h:74:1: + PF_UNIX = 1 // socket.h:43:1: + PF_UNSPEC = 0 // socket.h:41:1: + PF_VSOCK = 40 // socket.h:84:1: + PF_WANPIPE = 25 // socket.h:69:1: + PF_X25 = 9 // socket.h:52:1: + PF_XDP = 44 // socket.h:88:1: + SCM_TIMESTAMP = 29 // socket.h:140:1: + SCM_TIMESTAMPING = 37 // socket.h:142:1: + SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1: + SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1: + SCM_TIMESTAMPNS = 35 // socket.h:141:1: + SCM_TXTIME = 61 // socket.h:105:1: + SCM_WIFI_STATUS = 41 // socket.h:64:1: + SIOCATMARK = 0x8905 // sockios.h:10:1: + SIOCGPGRP = 0x8904 // sockios.h:9:1: + SIOCGSTAMP = 0x8906 // sockios.h:11:1: + SIOCGSTAMPNS = 0x8907 // sockios.h:12:1: + SIOCSPGRP = 0x8902 // sockios.h:7:1: + SOL_AAL = 265 // socket.h:151:1: + SOL_ALG = 279 // socket.h:165:1: + SOL_ATM = 264 // socket.h:150:1: + SOL_BLUETOOTH = 274 // socket.h:160:1: + SOL_CAIF = 278 // socket.h:164:1: + SOL_DCCP = 269 // socket.h:155:1: + SOL_DECNET = 261 // socket.h:147:1: + SOL_ICMPV6 = 58 // in.h:253:1: + SOL_IP = 0 // in.h:132:1: + SOL_IPV6 = 41 // in.h:252:1: + SOL_IRDA = 266 // socket.h:152:1: + SOL_IUCV = 277 // socket.h:163:1: + SOL_KCM = 281 // socket.h:167:1: + SOL_LLC = 268 // socket.h:154:1: + SOL_NETBEUI = 267 // socket.h:153:1: + SOL_NETLINK = 270 // socket.h:156:1: + SOL_NFC = 280 // socket.h:166:1: + SOL_PACKET = 263 // socket.h:149:1: + SOL_PNPIPE = 275 // socket.h:161:1: + SOL_PPPOL2TP = 273 // socket.h:159:1: + SOL_RAW = 255 // socket.h:146:1: + SOL_RDS = 276 // socket.h:162:1: + SOL_RXRPC = 272 // socket.h:158:1: + SOL_SOCKET = 1 // socket.h:9:1: + SOL_TIPC = 271 // socket.h:157:1: + SOL_TLS = 282 // socket.h:168:1: + SOL_X25 = 262 // socket.h:148:1: + SOL_XDP = 283 // socket.h:169:1: + SOMAXCONN = 4096 // socket.h:172:1: + SO_ACCEPTCONN = 30 // socket.h:51:1: + SO_ATTACH_BPF = 50 // socket.h:82:1: + SO_ATTACH_FILTER = 26 // socket.h:45:1: + SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1: + SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1: + SO_BINDTODEVICE = 25 // socket.h:42:1: + SO_BINDTOIFINDEX = 62 // socket.h:107:1: + SO_BPF_EXTENSIONS = 48 // socket.h:78:1: + SO_BROADCAST = 6 // socket.h:16:1: + SO_BSDCOMPAT = 14 // socket.h:26:1: + SO_BUSY_POLL = 46 // socket.h:74:1: + SO_CNX_ADVICE = 53 // socket.h:88:1: + SO_COOKIE = 57 // socket.h:96:1: + SO_DEBUG = 1 // socket.h:11:1: + SO_DETACH_BPF = 27 // socket.h:83:1: + SO_DETACH_FILTER = 27 // socket.h:46:1: + SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1: + SO_DOMAIN = 39 // socket.h:59:1: + SO_DONTROUTE = 5 // socket.h:15:1: + SO_ERROR = 4 // socket.h:14:1: + SO_GET_FILTER = 26 // socket.h:47:1: + SO_INCOMING_CPU = 49 // socket.h:80:1: + SO_INCOMING_NAPI_ID = 56 // socket.h:94:1: + SO_KEEPALIVE = 9 // socket.h:21:1: + SO_LINGER = 13 // socket.h:25:1: + SO_LOCK_FILTER = 44 // socket.h:70:1: + SO_MARK = 36 // socket.h:56:1: + SO_MAX_PACING_RATE = 47 // socket.h:76:1: + SO_MEMINFO = 55 // socket.h:92:1: + SO_NOFCS = 43 // socket.h:68:1: + SO_NO_CHECK = 11 // socket.h:23:1: + SO_OOBINLINE = 10 // socket.h:22:1: + SO_PASSCRED = 16 // socket.h:29:1: + SO_PASSSEC = 34 // socket.h:54:1: + SO_PEEK_OFF = 42 // socket.h:65:1: + SO_PEERCRED = 17 // socket.h:30:1: + SO_PEERGROUPS = 59 // socket.h:100:1: + SO_PEERNAME = 28 // socket.h:49:1: + SO_PEERSEC = 31 // socket.h:53:1: + SO_PRIORITY = 12 // socket.h:24:1: + SO_PROTOCOL = 38 // socket.h:58:1: + SO_RCVBUF = 8 // socket.h:18:1: + SO_RCVBUFFORCE = 33 // socket.h:20:1: + SO_RCVLOWAT = 18 // socket.h:31:1: + SO_RCVTIMEO = 20 // socket.h:129:1: + SO_RCVTIMEO_NEW = 66 // socket.h:117:1: + SO_RCVTIMEO_OLD = 20 // socket.h:33:1: + SO_REUSEADDR = 2 // socket.h:12:1: + SO_REUSEPORT = 15 // socket.h:27:1: + SO_RXQ_OVFL = 40 // socket.h:61:1: + SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1: + SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1: + SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1: + SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1: + SO_SNDBUF = 7 // socket.h:17:1: + SO_SNDBUFFORCE = 32 // socket.h:19:1: + SO_SNDLOWAT = 19 // socket.h:32:1: + SO_SNDTIMEO = 21 // socket.h:130:1: + SO_SNDTIMEO_NEW = 67 // socket.h:118:1: + SO_SNDTIMEO_OLD = 21 // socket.h:34:1: + SO_TIMESTAMP = 29 // socket.h:125:1: + SO_TIMESTAMPING = 37 // socket.h:127:1: + SO_TIMESTAMPING_NEW = 65 // socket.h:115:1: + SO_TIMESTAMPING_OLD = 37 // socket.h:111:1: + SO_TIMESTAMPNS = 35 // socket.h:126:1: + SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1: + SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1: + SO_TIMESTAMP_NEW = 63 // socket.h:113:1: + SO_TIMESTAMP_OLD = 29 // socket.h:109:1: + SO_TXTIME = 61 // socket.h:104:1: + SO_TYPE = 3 // socket.h:13:1: + SO_WIFI_STATUS = 41 // socket.h:63:1: + SO_ZEROCOPY = 60 // socket.h:102:1: + X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1: + X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1: + X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1: + X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1: + X_BITS_STDINT_UINTN_H = 1 // stdint-uintn.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_ENDIAN_H = 1 // endian.h:19:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1: + X_LP64 = 1 // <predefined>:284:1: + X_NETINET_IN_H = 1 // in.h:19:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_SS_SIZE = 128 // sockaddr.h:40:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SELECT_H = 1 // select.h:22:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_SYS_SOCKET_H = 1 // socket.h:20:1: + X_SYS_TYPES_H = 1 // types.h:23:1: + X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1: + X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// Standard well-known ports. +const ( /* in.h:122:1: */ + IPPORT_ECHO = 7 // Echo service. + IPPORT_DISCARD = 9 // Discard transmissions service. + IPPORT_SYSTAT = 11 // System status service. + IPPORT_DAYTIME = 13 // Time of day service. + IPPORT_NETSTAT = 15 // Network status service. + IPPORT_FTP = 21 // File Transfer Protocol. + IPPORT_TELNET = 23 // Telnet protocol. + IPPORT_SMTP = 25 // Simple Mail Transfer Protocol. + IPPORT_TIMESERVER = 37 // Timeserver service. + IPPORT_NAMESERVER = 42 // Domain Name Service. + IPPORT_WHOIS = 43 // Internet Whois service. + IPPORT_MTP = 57 + + IPPORT_TFTP = 69 // Trivial File Transfer Protocol. + IPPORT_RJE = 77 + IPPORT_FINGER = 79 // Finger service. + IPPORT_TTYLINK = 87 + IPPORT_SUPDUP = 95 // SUPDUP protocol. + + IPPORT_EXECSERVER = 512 // execd service. + IPPORT_LOGINSERVER = 513 // rlogind service. + IPPORT_CMDSERVER = 514 + IPPORT_EFSSERVER = 520 + + // UDP ports. + IPPORT_BIFFUDP = 512 + IPPORT_WHOSERVER = 513 + IPPORT_ROUTESERVER = 520 + + // Ports less than this value are reserved for privileged processes. + IPPORT_RESERVED = 1024 + + // Ports greater this value are reserved for (non-privileged) servers. + IPPORT_USERRESERVED = 5000 +) + +// Options for use with `getsockopt' and `setsockopt' at the IPv6 level. +// The first word in the comment at the right is the data type used; +// "bool" means a boolean value stored in an `int'. + +// Advanced API (RFC3542) (1). + +// Advanced API (RFC3542) (2). + +// RFC5014. + +// RFC5082. + +// Obsolete synonyms for the above. + +// IPV6_MTU_DISCOVER values. + +// Socket level values for IPv6. + +// Routing header options for IPv6. + +// Standard well-defined IP protocols. +const ( /* in.h:40:1: */ + IPPROTO_IP = 0 // Dummy protocol for TCP. + IPPROTO_ICMP = 1 // Internet Control Message Protocol. + IPPROTO_IGMP = 2 // Internet Group Management Protocol. + IPPROTO_IPIP = 4 // IPIP tunnels (older KA9Q tunnels use 94). + IPPROTO_TCP = 6 // Transmission Control Protocol. + IPPROTO_EGP = 8 // Exterior Gateway Protocol. + IPPROTO_PUP = 12 // PUP protocol. + IPPROTO_UDP = 17 // User Datagram Protocol. + IPPROTO_IDP = 22 // XNS IDP protocol. + IPPROTO_TP = 29 // SO Transport Protocol Class 4. + IPPROTO_DCCP = 33 // Datagram Congestion Control Protocol. + IPPROTO_IPV6 = 41 // IPv6 header. + IPPROTO_RSVP = 46 // Reservation Protocol. + IPPROTO_GRE = 47 // General Routing Encapsulation. + IPPROTO_ESP = 50 // encapsulating security payload. + IPPROTO_AH = 51 // authentication header. + IPPROTO_MTP = 92 // Multicast Transport Protocol. + IPPROTO_BEETPH = 94 // IP option pseudo header for BEET. + IPPROTO_ENCAP = 98 // Encapsulation Header. + IPPROTO_PIM = 103 // Protocol Independent Multicast. + IPPROTO_COMP = 108 // Compression Header Protocol. + IPPROTO_SCTP = 132 // Stream Control Transmission Protocol. + IPPROTO_UDPLITE = 136 // UDP-Lite protocol. + IPPROTO_MPLS = 137 // MPLS in IP. + IPPROTO_RAW = 255 // Raw IP packets. + IPPROTO_MAX = 256 +) + +// If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel +// +// network headers first and we should use those ABI-identical definitions +// instead of our own, otherwise 0. +const ( /* in.h:99:1: */ + IPPROTO_HOPOPTS = 0 // IPv6 Hop-by-Hop options. + IPPROTO_ROUTING = 43 // IPv6 routing header. + IPPROTO_FRAGMENT = 44 // IPv6 fragmentation header. + IPPROTO_ICMPV6 = 58 // ICMPv6. + IPPROTO_NONE = 59 // IPv6 no next header. + IPPROTO_DSTOPTS = 60 // IPv6 destination options. + IPPROTO_MH = 135 +) + +// Bits in the FLAGS argument to `send', `recv', et al. +const ( /* socket.h:200:1: */ + MSG_OOB = 1 // Process out-of-band data. + MSG_PEEK = 2 // Peek at incoming messages. + MSG_DONTROUTE = 4 // Don't use local routing. + MSG_CTRUNC = 8 // Control data lost before delivery. + MSG_PROXY = 16 // Supply or ask second address. + MSG_TRUNC = 32 + MSG_DONTWAIT = 64 // Nonblocking IO. + MSG_EOR = 128 // End of record. + MSG_WAITALL = 256 // Wait for a full request. + MSG_FIN = 512 + MSG_SYN = 1024 + MSG_CONFIRM = 2048 // Confirm path validity. + MSG_RST = 4096 + MSG_ERRQUEUE = 8192 // Fetch message from error queue. + MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE. + MSG_MORE = 32768 // Sender will send more. + MSG_WAITFORONE = 65536 // Wait for at least one packet to return. + MSG_BATCH = 262144 // sendmmsg: more messages coming. + MSG_ZEROCOPY = 67108864 // Use user data in kernel path. + MSG_FASTOPEN = 536870912 // Send data in TCP SYN. + + MSG_CMSG_CLOEXEC = 1073741824 +) + +// Socket level message types. This must match the definitions in +// +// <linux/socket.h>. +const ( /* socket.h:332:1: */ + SCM_RIGHTS = 1 +) + +// Get the architecture-dependent definition of enum __socket_type. +// Define enum __socket_type for generic Linux. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Types of sockets. +const ( /* socket_type.h:24:1: */ + SOCK_STREAM = 1 // Sequenced, reliable, connection-based + // byte streams. + SOCK_DGRAM = 2 // Connectionless, unreliable datagrams + // of fixed maximum length. + SOCK_RAW = 3 // Raw protocol interface. + SOCK_RDM = 4 // Reliably-delivered messages. + SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based, + // datagrams of fixed maximum length. + SOCK_DCCP = 6 // Datagram Congestion Control Protocol. + SOCK_PACKET = 10 // Linux specific way of getting packets + // at the dev level. For writing rarp and + // other similar things on the user level. + + // Flags to be ORed into the type parameter of socket and socketpair and + // used for the flags parameter of paccept. + + SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the + // new descriptor(s). + SOCK_NONBLOCK = 2048 +) + +// The following constants should be used for the second parameter of +// +// `shutdown'. +const ( /* socket.h:41:1: */ + SHUT_RD = 0 // No more receptions. + SHUT_WR = 1 // No more transmissions. + SHUT_RDWR = 2 +) + +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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// Define uintN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type Uint8_t = X__uint8_t /* stdint-uintn.h:24:19 */ +type Uint16_t = X__uint16_t /* stdint-uintn.h:25:20 */ +type Uint32_t = X__uint32_t /* stdint-uintn.h:26:20 */ +type Uint64_t = X__uint64_t /* stdint-uintn.h:27:20 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Structure for scatter/gather I/O. +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* struct_iovec.h:26:1 */ + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This operating system-specific header file defines the SOCK_*, PF_*, +// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', +// `struct msghdr', and `struct linger' types. +// System-specific socket constants and types. Linux version. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// A time value that is accurate to the nearest +// +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of <linux/posix_types.h> define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +// Type for length arguments in socket calls. +type Socklen_t = X__socklen_t /* socket.h:33:21 */ + +// Protocol families. + +// Address families. + +// Socket level values. Others are defined in the appropriate headers. +// +// XXX These definitions also should go into the appropriate headers as +// far as they are available. + +// Maximum queue length specifiable by listen. + +// Get the definition of the macro to define the common sockaddr members. +// Definition of struct sockaddr_* common members and sizes, generic version. +// Copyright (C) 1995-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/socket.h> instead. + +// POSIX.1g specifies this type name for the `sa_family' member. +type Sa_family_t = uint16 /* sockaddr.h:28:28 */ + +// This macro is used to declare the initial common members +// of the data types used for socket addresses, `struct sockaddr', +// `struct sockaddr_in', `struct sockaddr_un', etc. + +// Size of struct sockaddr_storage. + +// Structure describing a generic socket address. +type Sockaddr = struct { + Fsa_family Sa_family_t + Fsa_data [14]int8 +} /* socket.h:178:1 */ + +// Structure large enough to hold any socket address (with the historical +// exception of AF_UNIX). + +type Sockaddr_storage = struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 +} /* socket.h:191:1 */ + +// Structure describing messages sent by +// +// `sendmsg' and received by `recvmsg'. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen Size_t + Fmsg_control uintptr + Fmsg_controllen Size_t + Fmsg_flags int32 + F__ccgo_pad2 [4]byte +} /* socket.h:257:1 */ + +// Structure used for storage of ancillary data object information. +type Cmsghdr = struct { + F__ccgo_pad1 [0]uint64 + Fcmsg_len Size_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:275:1 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This allows for 1024 file descriptors: if NR_OPEN is ever grown +// beyond that you'll have to change this too. But 1024 fd's seem to be +// enough even for such "real" unices like OSF/1, so hopefully this is +// one limit that doesn't have to be changed [again]. +// +// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in +// <sys/time.h> (and thus <linux/time.h>) - but this is a more logical +// place for them. Solved by having dummy defines in <sys/time.h>. + +// This macro may have been defined in <gnu/types.h>. But we always +// use the one here. + +type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */ + +// Type of a signal handler. +type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ + +// Type of a SYSV IPC key. +type X__kernel_key_t = int32 /* posix_types.h:33:13 */ +type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. Also, we cannot +// assume GCC is being used. + +type X__kernel_old_uid_t = uint16 /* posix_types_64.h:11:24 */ +type X__kernel_old_gid_t = uint16 /* posix_types_64.h:12:24 */ + +type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// There seems to be no way of detecting this automatically from user +// space, so 64 bit architectures should override this in their +// bitsperlong.h. In particular, an architecture that supports +// both 32 and 64 bit user space must not rely on CONFIG_64BIT +// to decide it, but rather check a compiler provided macro. + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. +// +// First the types that are often defined in different ways across +// architectures, so that you can override them. + +type X__kernel_long_t = int64 /* posix_types.h:15:15 */ +type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */ + +type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */ + +type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */ + +type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ + +type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */ + +type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */ +type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */ + +type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ + +type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ + +type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ +type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ + +// Most 32 bit architectures use "unsigned int" size_t, +// and all 64 bit architectures use "unsigned long" size_t. +type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */ +type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */ +type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */ + +type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ + +// anything below here should be completely generic +type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ +type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ +type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ +type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ +type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ +type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ +type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ +type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ +type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ +type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ +type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// Socket-level I/O control calls. + +// For setsockopt(2) + +// Security levels - as per NRL IPv6 - don't actually do anything + +// Socket filtering + +// Instruct lower device to use last 4-bytes of skb data as FCS + +// on 64-bit and x32, avoid the ?: operator + +// Structure used to manipulate the SO_LINGER option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:361:1 */ + +// This is the 4.3 BSD `struct sockaddr' format, which is used as wire +// +// format in the grotty old 4.3 `talk' protocol. +type Osockaddr = struct { + Fsa_family uint16 + Fsa_data [14]uint8 +} /* struct_osockaddr.h:6:1 */ + +// Define some macros helping to catch buffer overflows. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Internet address. +type In_addr_t = Uint32_t /* in.h:30:18 */ +type In_addr = struct{ Fs_addr In_addr_t } /* in.h:31:1 */ + +// Get system-specific definitions. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Linux version. + +// If the application has already included linux/in6.h from a linux-based +// kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the +// defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo +// in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly. +// Neither the linux kernel nor glibc should break this ABI without coordination. +// In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check +// for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for +// maximum backwards compatibility. + +// Options for use with `getsockopt' and `setsockopt' at the IP level. +// The first word in the comment at the right is the data type used; +// "bool" means a boolean value stored in an `int'. +// For BSD compatibility. + +// TProxy original addresses + +// IP_MTU_DISCOVER arguments. +// Always use interface mtu (ignores dst pmtu) but don't set DF flag. +// Also incoming ICMP frag_needed notifications will be ignored on +// this socket to prevent accepting spoofed ones. +// Like IP_PMTUDISC_INTERFACE but allow packets to be fragmented. + +// To select the IP level. + +// Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. +// +// The `ip_dst' field is used for the first-hop gateway when using a +// source route (this gets put into the header proper). +type Ip_opts = struct { + Fip_dst struct{ Fs_addr In_addr_t } + Fip_opts [40]int8 +} /* in.h:142:1 */ + +// Like `struct ip_mreq' but including interface specification by index. +type Ip_mreqn = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_address struct{ Fs_addr In_addr_t } + Fimr_ifindex int32 +} /* in.h:149:1 */ + +// Structure used for IP_PKTINFO. +type In_pktinfo = struct { + Fipi_ifindex int32 + Fipi_spec_dst struct{ Fs_addr In_addr_t } + Fipi_addr struct{ Fs_addr In_addr_t } +} /* in.h:157:1 */ + +// Type to represent a port. +type In_port_t = Uint16_t /* in.h:119:18 */ + +// Definitions of the bits in an Internet address integer. +// +// On subnets, host and network parts are found according to +// the subnet mask, not these masks. + +// Address to accept any incoming messages. +// Address to send to all hosts. +// Address indicating an error return. + +// Network number for local host loopback. +// Address to loopback in software to local host. + +// Defines for Multicast INADDR. + +// IPv6 address +type In6_addr = struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } +} /* in.h:212:1 */ + +// ::1 + +// Structure describing an Internet socket address. +type Sockaddr_in = struct { + Fsin_family Sa_family_t + Fsin_port In_port_t + Fsin_addr struct{ Fs_addr In_addr_t } + Fsin_zero [8]uint8 +} /* in.h:238:1 */ + +// Ditto, for IPv6. +type Sockaddr_in6 = struct { + Fsin6_family Sa_family_t + Fsin6_port In_port_t + Fsin6_flowinfo Uint32_t + Fsin6_addr struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fsin6_scope_id Uint32_t +} /* in.h:253:1 */ + +// IPv4 multicast request. +type Ip_mreq = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } +} /* in.h:265:1 */ + +type Ip_mreq_source = struct { + Fimr_multiaddr struct{ Fs_addr In_addr_t } + Fimr_interface struct{ Fs_addr In_addr_t } + Fimr_sourceaddr struct{ Fs_addr In_addr_t } +} /* in.h:274:1 */ + +// Likewise, for IPv6. +type Ipv6_mreq = struct { + Fipv6mr_multiaddr struct { + F__in6_u struct { + F__ccgo_pad1 [0]uint32 + F__u6_addr8 [16]Uint8_t + } + } + Fipv6mr_interface uint32 +} /* in.h:289:1 */ + +// Multicast group request. +type Group_req = struct { + Fgr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgr_group struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:301:1 */ + +type Group_source_req = struct { + Fgsr_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgsr_group struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgsr_source struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:310:1 */ + +// Full-state filter operations. +type Ip_msfilter = struct { + Fimsf_multiaddr struct{ Fs_addr In_addr_t } + Fimsf_interface struct{ Fs_addr In_addr_t } + Fimsf_fmode Uint32_t + Fimsf_numsrc Uint32_t + Fimsf_slist [1]struct{ Fs_addr In_addr_t } +} /* in.h:324:1 */ + +type Group_filter = struct { + Fgf_interface Uint32_t + F__ccgo_pad1 [4]byte + Fgf_group struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } + Fgf_fmode Uint32_t + Fgf_numsrc Uint32_t + Fgf_slist [1]struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 + } +} /* in.h:345:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/poll/capi_linux_loong64.go b/vendor/modernc.org/libc/poll/capi_linux_loong64.go new file mode 100644 index 00000000..52c3f3a2 --- /dev/null +++ b/vendor/modernc.org/libc/poll/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_linux_amd64.go -pkgname poll', DO NOT EDIT. + +package poll + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/poll/poll_linux_loong64.go b/vendor/modernc.org/libc/poll/poll_linux_loong64.go new file mode 100644 index 00000000..83aca0f2 --- /dev/null +++ b/vendor/modernc.org/libc/poll/poll_linux_loong64.go @@ -0,0 +1,540 @@ +// Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o poll/poll_linux_amd64.go -pkgname poll', DO NOT EDIT. + +package poll + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + POLLERR = 0x008 // poll.h:47:1: + POLLHUP = 0x010 // poll.h:48:1: + POLLIN = 0x001 // poll.h:25:1: + POLLNVAL = 0x020 // poll.h:49:1: + POLLOUT = 0x004 // poll.h:27:1: + POLLPRI = 0x002 // poll.h:26:1: + POLLRDBAND = 0x080 // poll.h:32:1: + POLLRDNORM = 0x040 // poll.h:31:1: + POLLWRBAND = 0x200 // poll.h:34:1: + POLLWRNORM = 0x100 // poll.h:33:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_POLL_H = 1 // poll.h:20:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Compatibility definitions for System V `poll' interface. +// Copyright (C) 1994-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// Get the platform dependent bits of `poll'. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Event types that can be polled for. These bits may be set in `events' +// to indicate the interesting event types; they will appear in `revents' +// to indicate the status of the file descriptor. + +// These values are defined in XPG4.2. + +// Event types always implicitly polled for. These bits need not be set in +// `events', but they will appear in `revents' to indicate the status of +// the file descriptor. + +// Type used for the number of file descriptors. +type Nfds_t = uint64 /* poll.h:33:27 */ + +// Data structure describing a polling request. +type Pollfd = struct { + Ffd int32 + Fevents int16 + Frevents int16 +} /* poll.h:36:1 */ + +// Define some inlines helping to catch common problems. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pthread/capi_linux_loong64.go b/vendor/modernc.org/libc/pthread/capi_linux_loong64.go new file mode 100644 index 00000000..fd760fda --- /dev/null +++ b/vendor/modernc.org/libc/pthread/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_linux_amd64.go -pkgname pthread', DO NOT EDIT. + +package pthread + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pthread/pthread_linux_loong64.go b/vendor/modernc.org/libc/pthread/pthread_linux_loong64.go new file mode 100644 index 00000000..c7762fdd --- /dev/null +++ b/vendor/modernc.org/libc/pthread/pthread_linux_loong64.go @@ -0,0 +1,1873 @@ +// Code generated by 'ccgo pthread/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pthread/pthread_linux_amd64.go -pkgname pthread', DO NOT EDIT. + +package pthread + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + CLOCK_BOOTTIME = 7 // time.h:60:1: + CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1: + CLOCK_MONOTONIC = 1 // time.h:48:1: + CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1: + CLOCK_MONOTONIC_RAW = 4 // time.h:54:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1: + CLOCK_REALTIME = 0 // time.h:46:1: + CLOCK_REALTIME_ALARM = 8 // time.h:62:1: + CLOCK_REALTIME_COARSE = 5 // time.h:56:1: + CLOCK_TAI = 11 // time.h:66:1: + CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1: + PTHREAD_BARRIER_SERIAL_THREAD = -1 // pthread.h:189:1: + PTHREAD_ONCE_INIT = 0 // pthread.h:182:1: + SCHED_FIFO = 1 // sched.h:29:1: + SCHED_OTHER = 0 // sched.h:28:1: + SCHED_RR = 2 // sched.h:30:1: + TIMER_ABSTIME = 1 // time.h:69:1: + TIME_UTC = 1 // time.h:65:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_CPU_SET_H = 1 // cpu-set.h:21:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1: + X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1: + X_BITS_SCHED_H = 1 // sched.h:21:1: + X_BITS_SETJMP_H = 1 // setjmp.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TIME_H = 1 // time.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1: + X_BITS_TYPES_STRUCT_SCHED_PARAM = 1 // struct_sched_param.h:20:1: + X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_PTHREAD_H = 1 // pthread.h:19:1: + X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1: + X_SCHED_H = 1 // sched.h:20:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1: + X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1: + X_TIME_H = 1 // time.h:23:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// Read-write lock types. +const ( /* pthread.h:100:1: */ + PTHREAD_RWLOCK_PREFER_READER_NP = 0 + PTHREAD_RWLOCK_PREFER_WRITER_NP = 1 + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP = 2 + PTHREAD_RWLOCK_DEFAULT_NP = 0 +) + +// Read-write lock initializers. + +// Scheduler inheritance. +const ( /* pthread.h:120:1: */ + PTHREAD_INHERIT_SCHED = 0 + PTHREAD_EXPLICIT_SCHED = 1 +) + +// Scope handling. +const ( /* pthread.h:130:1: */ + PTHREAD_SCOPE_SYSTEM = 0 + PTHREAD_SCOPE_PROCESS = 1 +) + +// Process shared or private flag. +const ( /* pthread.h:140:1: */ + PTHREAD_PROCESS_PRIVATE = 0 + PTHREAD_PROCESS_SHARED = 1 +) + +// Cancellation +const ( /* pthread.h:164:1: */ + PTHREAD_CANCEL_ENABLE = 0 + PTHREAD_CANCEL_DISABLE = 1 +) +const ( /* pthread.h:171:1: */ + PTHREAD_CANCEL_DEFERRED = 0 + PTHREAD_CANCEL_ASYNCHRONOUS = 1 +) + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// NB: Include guard matches what <linux/time.h> uses. + +// Detach state. +const ( /* pthread.h:33:1: */ + PTHREAD_CREATE_JOINABLE = 0 + PTHREAD_CREATE_DETACHED = 1 +) + +// Mutex types. +const ( /* pthread.h:43:1: */ + PTHREAD_MUTEX_TIMED_NP = 0 + PTHREAD_MUTEX_RECURSIVE_NP = 1 + PTHREAD_MUTEX_ERRORCHECK_NP = 2 + PTHREAD_MUTEX_ADAPTIVE_NP = 3 + PTHREAD_MUTEX_NORMAL = 0 + PTHREAD_MUTEX_RECURSIVE = 1 + PTHREAD_MUTEX_ERRORCHECK = 2 + PTHREAD_MUTEX_DEFAULT = 0 +) + +// Robust mutex or not flags. +const ( /* pthread.h:65:1: */ + PTHREAD_MUTEX_STALLED = 0 + PTHREAD_MUTEX_STALLED_NP = 0 + PTHREAD_MUTEX_ROBUST = 1 + PTHREAD_MUTEX_ROBUST_NP = 1 +) + +// Mutex protocols. +const ( /* pthread.h:77:1: */ + PTHREAD_PRIO_NONE = 0 + PTHREAD_PRIO_INHERIT = 1 + PTHREAD_PRIO_PROTECT = 2 +) + +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 */ + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Get type definitions. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// i386/x86_64 are little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +type Pid_t = X__pid_t /* sched.h:38:17 */ + +// Get system specific constant and data structure definitions. +// Definitions of constants and data structure for POSIX 1003.1b-1993 +// scheduling interface. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Scheduling algorithms. + +// Sched parameter structure. Generic version. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Data structure to describe a process' schedulability. +type Sched_param = struct{ Fsched_priority int32 } /* struct_sched_param.h:23:1 */ + +// Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993 +// scheduling interface. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Size definition for CPU sets. + +// Type for array elements in 'cpu_set_t'. +type X__cpu_mask = uint64 /* cpu-set.h:32:25 */ + +// Basic access functions. + +// Data structure to describe CPU mask. +type Cpu_set_t = struct{ F__bits [16]X__cpu_mask } /* cpu-set.h:42:3 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.23 Date and time <time.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This defines CLOCKS_PER_SEC, which is the number of processor clock +// ticks per second, and possibly a number of other constants. +// System-dependent timing definitions. Linux version. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <time.h> instead. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// ISO/IEC 9899:1999 7.23.1: Components of time +// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is +// the number per second of the value returned by the `clock' function. +// CAE XSH, Issue 4, Version 2: <time.h> +// The value of CLOCKS_PER_SEC is required to be 1 million on all +// XSI-conformant systems. + +// Identifier for system-wide realtime clock. +// Monotonic system-wide clock. +// High-resolution timer from the CPU. +// Thread-specific CPU-time clock. +// Monotonic system-wide clock, not adjusted for frequency scaling. +// Identifier for system-wide realtime clock, updated only on ticks. +// Monotonic system-wide clock, updated only on ticks. +// Monotonic system-wide clock that includes time spent in suspension. +// Like CLOCK_REALTIME but also wakes suspended system. +// Like CLOCK_BOOTTIME but also wakes suspended system. +// Like CLOCK_REALTIME but in International Atomic Time. + +// Flag to indicate time is absolute. + +// Many of the typedefs and structs whose official home is this header +// may also need to be defined by other headers. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// ISO C `broken-down time' structure. +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* struct_tm.h:7:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// NB: Include guard matches what <linux/time.h> uses. + +// POSIX.1b structure for timer start values and intervals. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } +} /* struct_itimerspec.h:8:1 */ + +// Definition of locale_t. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +// Copyright (C) 2001-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define the machine-dependent type `jmp_buf'. x86-64 version. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +type X__jmp_buf = [8]int64 /* setjmp.h:31:18 */ + +// Conditional variable handling. + +// Cleanup buffers +type X_pthread_cleanup_buffer = struct { + F__routine uintptr + F__arg uintptr + F__canceltype int32 + F__ccgo_pad1 [4]byte + F__prev uintptr +} /* pthread.h:155:1 */ + +// Cancellation handling with integration into exception handling. + +type X__pthread_unwind_buf_t = struct { + F__cancel_jmp_buf [1]struct { + F__cancel_jmp_buf X__jmp_buf + F__mask_was_saved int32 + F__ccgo_pad1 [4]byte + } + F__pad [4]uintptr +} /* pthread.h:507:3 */ + +// No special attributes by default. + +// Structure to hold the cleanup handler information. +type X__pthread_cleanup_frame = struct { + F__cancel_routine uintptr + F__cancel_arg uintptr + F__do_it int32 + F__cancel_type int32 +} /* pthread.h:516:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/pwd/capi_linux_loong64.go b/vendor/modernc.org/libc/pwd/capi_linux_loong64.go new file mode 100644 index 00000000..2a479f58 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_linux_amd64.go -pkgname pwd', DO NOT EDIT. + +package pwd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/pwd/pwd_linux_loong64.go b/vendor/modernc.org/libc/pwd/pwd_linux_loong64.go new file mode 100644 index 00000000..922d6ef3 --- /dev/null +++ b/vendor/modernc.org/libc/pwd/pwd_linux_loong64.go @@ -0,0 +1,789 @@ +// Code generated by 'ccgo pwd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o pwd/pwd_linux_amd64.go -pkgname pwd', DO NOT EDIT. + +package pwd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + NSS_BUFLEN_PASSWD = 1024 // pwd.h:123:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_PWD_H = 1 // pwd.h:23:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 9.2.2 User Database Access <pwd.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// The Single Unix specification says that some more types are +// +// available here. +type Gid_t = X__gid_t /* pwd.h:38:17 */ + +type Uid_t = X__uid_t /* pwd.h:43:17 */ + +// A record in the user database. +type Passwd = struct { + Fpw_name uintptr + Fpw_passwd uintptr + Fpw_uid X__uid_t + Fpw_gid X__gid_t + Fpw_gecos uintptr + Fpw_dir uintptr + Fpw_shell uintptr +} /* pwd.h:49:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/signal/capi_linux_loong64.go b/vendor/modernc.org/libc/signal/capi_linux_loong64.go new file mode 100644 index 00000000..20eeb2da --- /dev/null +++ b/vendor/modernc.org/libc/signal/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_linux_amd64.go -pkgname signal', DO NOT EDIT. + +package signal + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/signal/more_linux_loong64.go b/vendor/modernc.org/libc/signal/more_linux_loong64.go new file mode 100644 index 00000000..25cc318b --- /dev/null +++ b/vendor/modernc.org/libc/signal/more_linux_loong64.go @@ -0,0 +1,12 @@ +// 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 signal + +const ( + // /usr/include/asm-generic/signal-defs.h:24:#define SIG_DFL ((__sighandler_t)0) /* default signal handling */ + SIG_DFL = 0 + // /usr/include/asm-generic/signal-defs.h:25:#define SIG_IGN ((__sighandler_t)1) /* ignore signal */ + SIG_IGN = 1 +) diff --git a/vendor/modernc.org/libc/signal/signal_linux_loong64.go b/vendor/modernc.org/libc/signal/signal_linux_loong64.go new file mode 100644 index 00000000..b7cdcd8e --- /dev/null +++ b/vendor/modernc.org/libc/signal/signal_linux_loong64.go @@ -0,0 +1,2198 @@ +// Code generated by 'ccgo signal/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o signal/signal_linux_amd64.go -pkgname signal', DO NOT EDIT. + +package signal + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + FP_XSTATE_MAGIC1 = 0x46505853 // sigcontext.h:27:1: + FP_XSTATE_MAGIC2 = 0x46505845 // sigcontext.h:28:1: + MINSIGSTKSZ = 2048 // sigstack.h:27:1: + NGREG = 23 // ucontext.h:42:1: + NSIG = 65 // signal.h:181:1: + SA_INTERRUPT = 0x20000000 // sigaction.h:70:1: + SA_NOCLDSTOP = 1 // sigaction.h:56:1: + SA_NOCLDWAIT = 2 // sigaction.h:57:1: + SA_NODEFER = 0x40000000 // sigaction.h:65:1: + SA_NOMASK = 1073741824 // sigaction.h:73:1: + SA_ONESHOT = 2147483648 // sigaction.h:74:1: + SA_ONSTACK = 0x08000000 // sigaction.h:61:1: + SA_RESETHAND = 0x80000000 // sigaction.h:67:1: + SA_RESTART = 0x10000000 // sigaction.h:64:1: + SA_SIGINFO = 4 // sigaction.h:58:1: + SA_STACK = 134217728 // sigaction.h:75:1: + SIGABRT = 6 // signum-generic.h:50:1: + SIGALRM = 14 // signum-generic.h:63:1: + SIGBUS = 7 // signum.h:35:1: + SIGCHLD = 17 // signum.h:41:1: + SIGCLD = 17 // signum-generic.h:88:1: + SIGCONT = 18 // signum.h:43:1: + SIGFPE = 8 // signum-generic.h:51:1: + SIGHUP = 1 // signum-generic.h:56:1: + SIGILL = 4 // signum-generic.h:49:1: + SIGINT = 2 // signum-generic.h:48:1: + SIGIO = 29 // signum-generic.h:86:1: + SIGIOT = 6 // signum-generic.h:87:1: + SIGKILL = 9 // signum-generic.h:59:1: + SIGPIPE = 13 // signum-generic.h:62:1: + SIGPOLL = 29 // signum.h:51:1: + SIGPROF = 27 // signum-generic.h:77:1: + SIGPWR = 30 // signum.h:32:1: + SIGQUIT = 3 // signum-generic.h:57:1: + SIGSEGV = 11 // signum-generic.h:52:1: + SIGSTKFLT = 16 // signum.h:31:1: + SIGSTKSZ = 8192 // sigstack.h:30:1: + SIGSTOP = 19 // signum.h:45:1: + SIGSYS = 31 // signum.h:53:1: + SIGTERM = 15 // signum-generic.h:53:1: + SIGTRAP = 5 // signum-generic.h:58:1: + SIGTSTP = 20 // signum.h:47:1: + SIGTTIN = 21 // signum-generic.h:71:1: + SIGTTOU = 22 // signum-generic.h:72:1: + SIGURG = 23 // signum.h:49:1: + SIGUSR1 = 10 // signum.h:37:1: + SIGUSR2 = 12 // signum.h:39:1: + SIGVTALRM = 26 // signum-generic.h:76:1: + SIGWINCH = 28 // signum-generic.h:83:1: + SIGXCPU = 24 // signum-generic.h:74:1: + SIGXFSZ = 25 // signum-generic.h:75:1: + SIG_BLOCK = 0 // sigaction.h:79:1: + SIG_SETMASK = 2 // sigaction.h:81:1: + SIG_UNBLOCK = 1 // sigaction.h:80:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1: + X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1: + X_BITS_SIGACTION_H = 1 // sigaction.h:20:1: + X_BITS_SIGCONTEXT_H = 1 // sigcontext.h:19:1: + X_BITS_SIGEVENT_CONSTS_H = 1 // sigevent-consts.h:20:1: + X_BITS_SIGINFO_ARCH_H = 1 // siginfo-arch.h:3:1: + X_BITS_SIGINFO_CONSTS_H = 1 // siginfo-consts.h:20:1: + X_BITS_SIGNUM_GENERIC_H = 1 // signum-generic.h:20:1: + X_BITS_SIGNUM_H = 1 // signum.h:20:1: + X_BITS_SIGSTACK_H = 1 // sigstack.h:20:1: + X_BITS_SIGTHREAD_H = 1 // sigthread.h:20:1: + X_BITS_SS_FLAGS_H = 1 // ss_flags.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LP64 = 1 // <predefined>:284:1: + X_NSIG = 65 // signum-generic.h:100:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1: + X_SIGNAL_H = 0 // signal.h:23:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_SYS_UCONTEXT_H = 1 // ucontext.h:19:1: + X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1: + X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// POSIX names to access some of the members. + +// sigevent constants. Linux version. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// `sigev_notify' values. +const ( /* sigevent-consts.h:27:1: */ + SIGEV_SIGNAL = 0 // Notify via signal. + SIGEV_NONE = 1 // Other notification: meaningless. + SIGEV_THREAD = 2 // Deliver via thread creation. + + SIGEV_THREAD_ID = 4 +) + +// `si_code' values for SIGSEGV signal. +const ( /* siginfo-consts.h:119:1: */ + SEGV_MAPERR = 1 // Address not mapped to object. + SEGV_ACCERR = 2 // Invalid permissions for mapped object. + SEGV_BNDERR = 3 // Bounds checking failure. + SEGV_PKUERR = 4 // Protection key checking failure. + SEGV_ACCADI = 5 // ADI not enabled for mapped object. + SEGV_ADIDERR = 6 // Disrupting MCD error. + SEGV_ADIPERR = 7 +) + +// `si_code' values for SIGBUS signal. +const ( /* siginfo-consts.h:138:1: */ + BUS_ADRALN = 1 // Invalid address alignment. + BUS_ADRERR = 2 // Non-existant physical address. + BUS_OBJERR = 3 // Object specific hardware error. + BUS_MCEERR_AR = 4 // Hardware memory error: action required. + BUS_MCEERR_AO = 5 +) + +// `si_code' values for SIGCHLD signal. +const ( /* siginfo-consts.h:172:1: */ + CLD_EXITED = 1 // Child has exited. + CLD_KILLED = 2 // Child was killed. + CLD_DUMPED = 3 // Child terminated abnormally. + CLD_TRAPPED = 4 // Traced child has trapped. + CLD_STOPPED = 5 // Child has stopped. + CLD_CONTINUED = 6 +) + +// `si_code' values for SIGPOLL signal. +const ( /* siginfo-consts.h:189:1: */ + POLL_IN = 1 // Data input available. + POLL_OUT = 2 // Output buffers available. + POLL_MSG = 3 // Input message available. + POLL_ERR = 4 // I/O error. + POLL_PRI = 5 // High priority input available. + POLL_HUP = 6 +) + +// X/Open requires some more fields with fixed names. + +// siginfo constants. Linux version. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Most of these constants are uniform across all architectures, but there +// is one exception. +// Architecture-specific adjustments to siginfo_t. x86 version. + +// Values for `si_code'. Positive values are reserved for kernel-generated +// +// signals. +const ( /* siginfo-consts.h:35:1: */ + SI_ASYNCNL = -60 // Sent by asynch name lookup completion. + SI_DETHREAD = -7 // Sent by execve killing subsidiary + // threads. + SI_TKILL = -6 // Sent by tkill. + SI_SIGIO = -5 // Sent by queued SIGIO. + SI_ASYNCIO = -4 // Sent by AIO completion. + SI_MESGQ = -3 // Sent by real time mesq state change. + SI_TIMER = -2 // Sent by timer expiration. + SI_QUEUE = -1 // Sent by sigqueue. + SI_USER = 0 // Sent by kill, sigsend. + SI_KERNEL = 128 +) + +// `si_code' values for SIGILL signal. +const ( /* siginfo-consts.h:71:1: */ + ILL_ILLOPC = 1 // Illegal opcode. + ILL_ILLOPN = 2 // Illegal operand. + ILL_ILLADR = 3 // Illegal addressing mode. + ILL_ILLTRP = 4 // Illegal trap. + ILL_PRVOPC = 5 // Privileged opcode. + ILL_PRVREG = 6 // Privileged register. + ILL_COPROC = 7 // Coprocessor error. + ILL_BADSTK = 8 // Internal stack error. + ILL_BADIADDR = 9 +) + +// `si_code' values for SIGFPE signal. +const ( /* siginfo-consts.h:94:1: */ + FPE_INTDIV = 1 // Integer divide by zero. + FPE_INTOVF = 2 // Integer overflow. + FPE_FLTDIV = 3 // Floating point divide by zero. + FPE_FLTOVF = 4 // Floating point overflow. + FPE_FLTUND = 5 // Floating point underflow. + FPE_FLTRES = 6 // Floating point inexact result. + FPE_FLTINV = 7 // Floating point invalid operation. + FPE_FLTSUB = 8 // Subscript out of range. + FPE_FLTUNK = 14 // Undiagnosed floating-point exception. + FPE_CONDTRAP = 15 +) + +// sigstack, sigaltstack definitions. +// Copyright (C) 1998-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Minimum stack size for a signal handler. + +// System default stack size. + +// ss_flags values for stack_t. Linux version. +// Copyright (C) 1998-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Possible values for `ss_flags'. +const ( /* ss_flags.h:27:1: */ + SS_ONSTACK = 1 + SS_DISABLE = 2 +) + +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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.14 Signal handling <signal.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// Signal number definitions. Linux version. +// Copyright (C) 1995-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Signal number constants. Generic template. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Fake signal functions. + +// We define here all the signal names listed in POSIX (1003.1-2008); +// as of 1003.1-2013, no additional signals have been added by POSIX. +// We also define here signal names that historically exist in every +// real-world POSIX variant (e.g. SIGWINCH). +// +// Signals in the 1-15 range are defined with their historical numbers. +// For other signals, we use the BSD numbers. +// There are two unallocated signal numbers in the 1-31 range: 7 and 29. +// Signal number 0 is reserved for use as kill(pid, 0), to test whether +// a process exists without sending it a signal. + +// ISO C99 signals. + +// Historical signals specified by POSIX. + +// New(er) POSIX signals (1003.1-2008, 1003.1-2013). + +// Nonstandard signals found in all modern POSIX systems +// (including both BSD and Linux). + +// Archaic names for compatibility. + +// Not all systems support real-time signals. bits/signum.h indicates +// that they are supported by overriding __SIGRTMAX to a value greater +// than __SIGRTMIN. These constants give the kernel-level hard limits, +// but some real-time signals may be used internally by glibc. Do not +// use these constants in application code; use SIGRTMIN and SIGRTMAX +// (defined in signal.h) instead. + +// Biggest signal number + 1 (including real-time signals). + +// Adjustments and additions to the signal number constants for +// most Linux systems. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// An integral type that can be modified atomically, without the +// +// possibility of a signal arriving in the middle of the operation. +type Sig_atomic_t = X__sig_atomic_t /* sig_atomic_t.h:8:24 */ + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +type Pid_t = X__pid_t /* signal.h:40:17 */ +type Uid_t = X__uid_t /* signal.h:46:17 */ + +// We need `struct timespec' later on. +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// i386/x86_64 are little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Define __sigval_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Type for data associated with a signal. +type Sigval = struct { + F__ccgo_pad1 [0]uint64 + Fsival_int int32 + F__ccgo_pad2 [4]byte +} /* __sigval_t.h:24:1 */ + +type X__sigval_t = Sigval /* __sigval_t.h:30:22 */ + +// Some fields of siginfo_t have architecture-specific variations. +// Architecture-specific adjustments to siginfo_t. x86 version. + +type Siginfo_t = struct { + Fsi_signo int32 + Fsi_errno int32 + Fsi_code int32 + F__pad0 int32 + F_sifields struct { + F__ccgo_pad1 [0]uint64 + F_pad [28]int32 + } +} /* siginfo_t.h:124:5 */ + +// Architectures might also add architecture-specific constants. +// These are all considered GNU extensions. + +// Define __sigval_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// To avoid sigval_t (not a standard type name) having C++ name +// mangling depending on whether the selected standard includes union +// sigval, it should not be defined at all when using a standard for +// which the sigval name is not reserved; in that case, headers should +// not include <bits/types/sigval_t.h> and should use only the +// internal __sigval_t name. + +type Sigval_t = X__sigval_t /* sigval_t.h:16:20 */ + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Define __sigval_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Forward declaration. +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* sigevent_t.h:17:9 */ + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Define __sigval_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Forward declaration. +type Pthread_attr_t = Pthread_attr_t1 /* sigevent_t.h:17:30 */ + +// Structure to transport application-defined values with signals. +type Sigevent = struct { + Fsigev_value X__sigval_t + Fsigev_signo int32 + Fsigev_notify int32 + F_sigev_un struct { + F__ccgo_pad1 [0]uint64 + F_pad [12]int32 + } +} /* sigevent_t.h:22:9 */ + +// Structure to transport application-defined values with signals. +type Sigevent_t = Sigevent /* sigevent_t.h:42:5 */ + +// Type of a signal handler. +type X__sighandler_t = uintptr /* signal.h:72:14 */ + +// 4.4 BSD uses the name `sig_t' for this. +type Sig_t = X__sighandler_t /* signal.h:190:24 */ + +// Get the system-specific definitions of `struct sigaction' +// and the `SA_*' and `SIG_*'. constants. +// The proper definitions for Linux's sigaction. +// Copyright (C) 1993-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Structure describing the action to be taken when a signal arrives. +type Sigaction = struct { + F__sigaction_handler struct{ Fsa_handler X__sighandler_t } + Fsa_mask X__sigset_t + Fsa_flags int32 + F__ccgo_pad1 [4]byte + Fsa_restorer uintptr +} /* sigaction.h:27:1 */ + +// Get machine-dependent `struct sigcontext' and signal subcodes. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type X_fpx_sw_bytes = struct { + Fmagic1 X__uint32_t + Fextended_size X__uint32_t + Fxstate_bv X__uint64_t + Fxstate_size X__uint32_t + F__glibc_reserved1 [7]X__uint32_t +} /* sigcontext.h:31:1 */ + +type X_fpreg = struct { + Fsignificand [4]uint16 + Fexponent uint16 +} /* sigcontext.h:40:1 */ + +type X_fpxreg = struct { + Fsignificand [4]uint16 + Fexponent uint16 + F__glibc_reserved1 [3]uint16 +} /* sigcontext.h:46:1 */ + +type X_xmmreg = struct{ Felement [4]X__uint32_t } /* sigcontext.h:53:1 */ + +type X_fpstate = struct { + Fcwd X__uint16_t + Fswd X__uint16_t + Fftw X__uint16_t + Ffop X__uint16_t + Frip X__uint64_t + Frdp X__uint64_t + Fmxcsr X__uint32_t + Fmxcr_mask X__uint32_t + F_st [8]struct { + Fsignificand [4]uint16 + Fexponent uint16 + F__glibc_reserved1 [3]uint16 + } + F_xmm [16]struct{ Felement [4]X__uint32_t } + F__glibc_reserved1 [24]X__uint32_t +} /* sigcontext.h:123:1 */ + +type Sigcontext = struct { + Fr8 X__uint64_t + Fr9 X__uint64_t + Fr10 X__uint64_t + Fr11 X__uint64_t + Fr12 X__uint64_t + Fr13 X__uint64_t + Fr14 X__uint64_t + Fr15 X__uint64_t + Frdi X__uint64_t + Frsi X__uint64_t + Frbp X__uint64_t + Frbx X__uint64_t + Frdx X__uint64_t + Frax X__uint64_t + Frcx X__uint64_t + Frsp X__uint64_t + Frip X__uint64_t + Feflags X__uint64_t + Fcs uint16 + Fgs uint16 + Ffs uint16 + F__pad0 uint16 + Ferr X__uint64_t + Ftrapno X__uint64_t + Foldmask X__uint64_t + Fcr2 X__uint64_t + F__184 struct{ Ffpstate uintptr } + F__reserved1 [8]X__uint64_t +} /* sigcontext.h:139:1 */ + +type X_xsave_hdr = struct { + Fxstate_bv X__uint64_t + F__glibc_reserved1 [2]X__uint64_t + F__glibc_reserved2 [5]X__uint64_t +} /* sigcontext.h:177:1 */ + +type X_ymmh_state = struct{ Fymmh_space [64]X__uint32_t } /* sigcontext.h:184:1 */ + +type X_xstate = struct { + Ffpstate struct { + Fcwd X__uint16_t + Fswd X__uint16_t + Fftw X__uint16_t + Ffop X__uint16_t + Frip X__uint64_t + Frdp X__uint64_t + Fmxcsr X__uint32_t + Fmxcr_mask X__uint32_t + F_st [8]struct { + Fsignificand [4]uint16 + Fexponent uint16 + F__glibc_reserved1 [3]uint16 + } + F_xmm [16]struct{ Felement [4]X__uint32_t } + F__glibc_reserved1 [24]X__uint32_t + } + Fxstate_hdr struct { + Fxstate_bv X__uint64_t + F__glibc_reserved1 [2]X__uint64_t + F__glibc_reserved2 [5]X__uint64_t + } + Fymmh struct{ Fymmh_space [64]X__uint32_t } +} /* sigcontext.h:189:1 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Define stack_t. Linux version. +// Copyright (C) 1998-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Structure describing a signal stack. +type Stack_t = struct { + Fss_sp uintptr + Fss_flags int32 + F__ccgo_pad1 [4]byte + Fss_size Size_t +} /* stack_t.h:31:5 */ + +// This will define `ucontext_t' and `mcontext_t'. +// Copyright (C) 2001-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Define stack_t. Linux version. +// Copyright (C) 1998-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Type for general register. +type Greg_t = int64 /* ucontext.h:37:37 */ + +// Number of general registers. + +// Container for all general registers. +type Gregset_t = [23]Greg_t /* ucontext.h:46:16 */ + +type X_libc_fpxreg = struct { + Fsignificand [4]uint16 + Fexponent uint16 + F__glibc_reserved1 [3]uint16 +} /* ucontext.h:101:1 */ + +type X_libc_xmmreg = struct{ Felement [4]X__uint32_t } /* ucontext.h:108:1 */ + +type X_libc_fpstate = struct { + Fcwd X__uint16_t + Fswd X__uint16_t + Fftw X__uint16_t + Ffop X__uint16_t + Frip X__uint64_t + Frdp X__uint64_t + Fmxcsr X__uint32_t + Fmxcr_mask X__uint32_t + F_st [8]struct { + Fsignificand [4]uint16 + Fexponent uint16 + F__glibc_reserved1 [3]uint16 + } + F_xmm [16]struct{ Felement [4]X__uint32_t } + F__glibc_reserved1 [24]X__uint32_t +} /* ucontext.h:113:1 */ + +// Structure to describe FPU registers. +type Fpregset_t = uintptr /* ucontext.h:130:30 */ + +// Context to describe whole processor state. +type Mcontext_t = struct { + Fgregs Gregset_t + Ffpregs Fpregset_t + F__reserved1 [8]uint64 +} /* ucontext.h:139:3 */ + +// Userlevel context. +type Ucontext_t1 = struct { + Fuc_flags uint64 + Fuc_link uintptr + Fuc_stack Stack_t + Fuc_mcontext Mcontext_t + Fuc_sigmask Sigset_t + F__fpregs_mem struct { + Fcwd X__uint16_t + Fswd X__uint16_t + Fftw X__uint16_t + Ffop X__uint16_t + Frip X__uint64_t + Frdp X__uint64_t + Fmxcsr X__uint32_t + Fmxcr_mask X__uint32_t + F_st [8]struct { + Fsignificand [4]uint16 + Fexponent uint16 + F__glibc_reserved1 [3]uint16 + } + F_xmm [16]struct{ Felement [4]X__uint32_t } + F__glibc_reserved1 [24]X__uint32_t + } + F__ssp [4]uint64 +} /* ucontext.h:142:9 */ + +// Userlevel context. +type Ucontext_t = Ucontext_t1 /* ucontext.h:151:5 */ + +// Define struct sigstack. +// Copyright (C) 1998-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Structure describing a signal stack (obsolete). +type Sigstack = struct { + Fss_sp uintptr + Fss_onstack int32 + F__ccgo_pad1 [4]byte +} /* struct_sigstack.h:23:1 */ + +// Some of the functions for handling signals in threaded programs must +// be defined here. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Some of the functions for handling signals in threaded programs must +// be defined here. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +// System-specific extensions. +// System-specific extensions of <signal.h>, Linux version. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdio/capi_linux_loong64.go b/vendor/modernc.org/libc/stdio/capi_linux_loong64.go new file mode 100644 index 00000000..e327db42 --- /dev/null +++ b/vendor/modernc.org/libc/stdio/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_linux_amd64.go -pkgname stdio', DO NOT EDIT. + +package stdio + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdio/stdio_linux_loong64.go b/vendor/modernc.org/libc/stdio/stdio_linux_loong64.go new file mode 100644 index 00000000..b11d50c8 --- /dev/null +++ b/vendor/modernc.org/libc/stdio/stdio_linux_loong64.go @@ -0,0 +1,540 @@ +// Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_linux_amd64.go -pkgname stdio', DO NOT EDIT. + +package stdio + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BUFSIZ = 8192 // stdio.h:99:1: + EOF = -1 // stdio.h:104:1: + FILENAME_MAX = 4096 // stdio_lim.h:27:1: + FOPEN_MAX = 16 // stdio_lim.h:37:1: + L_ctermid = 9 // stdio_lim.h:30:1: + L_tmpnam = 20 // stdio_lim.h:25:1: + P_tmpdir = "/tmp" // stdio.h:120:1: + SEEK_CUR = 1 // stdio.h:110:1: + SEEK_END = 2 // stdio.h:111:1: + SEEK_SET = 0 // stdio.h:109:1: + TMP_MAX = 238328 // stdio_lim.h:26:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_STDIO_LIM_H = 1 // stdio_lim.h:19:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_IOFBF = 0 // stdio.h:93:1: + X_IOLBF = 1 // stdio.h:94:1: + X_IONBF = 2 // stdio.h:95:1: + X_IO_EOF_SEEN = 0x0010 // struct_FILE.h:111:1: + X_IO_ERR_SEEN = 0x0020 // struct_FILE.h:114:1: + X_IO_USER_LOCK = 0x8000 // struct_FILE.h:117:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STDIO_H = 1 // stdio.h:24:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + X_VA_LIST_DEFINED = 0 // stdio.h:53:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.15 Variable arguments <stdarg.h> + +// Define __gnuc_va_list. + +type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */ + +// Define the standard macros for the user, +// if this invocation was from the user program. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Integral type unchanged by default argument promotions that can +// hold any value corresponding to members of the extended character +// set, as well as at least one value that does not correspond to any +// member of the extended character set. + +// Conversion state information. +type X__mbstate_t = struct { + F__count int32 + F__value struct{ F__wch uint32 } +} /* __mbstate_t.h:21:3 */ + +// The tag name of this struct is _G_fpos_t to preserve historic +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. +type X_G_fpos_t = struct { + F__pos X__off_t + F__state X__mbstate_t +} /* __fpos_t.h:10:9 */ + +// The tag name of this struct is _G_fpos_t to preserve historic +// +// C++ mangled names for functions taking fpos_t arguments. +// That name should not be used in new code. +type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// The tag name of this struct is _G_fpos64_t to preserve historic +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. +type X_G_fpos64_t = struct { + F__pos X__off64_t + F__state X__mbstate_t +} /* __fpos64_t.h:10:9 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// The tag name of this struct is _G_fpos64_t to preserve historic +// +// C++ mangled names for functions taking fpos_t and/or fpos64_t +// arguments. That name should not be used in new code. +type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ + +type X_IO_FILE = struct { + F_flags int32 + F__ccgo_pad1 [4]byte + F_IO_read_ptr uintptr + F_IO_read_end uintptr + F_IO_read_base uintptr + F_IO_write_base uintptr + F_IO_write_ptr uintptr + F_IO_write_end uintptr + F_IO_buf_base uintptr + F_IO_buf_end uintptr + F_IO_save_base uintptr + F_IO_backup_base uintptr + F_IO_save_end uintptr + F_markers uintptr + F_chain uintptr + F_fileno int32 + F_flags2 int32 + F_old_offset X__off_t + F_cur_column uint16 + F_vtable_offset int8 + F_shortbuf [1]int8 + F__ccgo_pad2 [4]byte + F_lock uintptr + F_offset X__off64_t + F_codecvt uintptr + F_wide_data uintptr + F_freeres_list uintptr + F_freeres_buf uintptr + F__pad5 Size_t + F_mode int32 + F_unused2 [20]int8 +} /* __FILE.h:4:1 */ + +type X__FILE = X_IO_FILE /* __FILE.h:5:25 */ + +// The opaque type of streams. This is the definition used elsewhere. +type FILE = X_IO_FILE /* FILE.h:7:25 */ + +// These macros are used by bits/stdio.h and internal headers. + +// Many more flag bits are defined internally. + +type Va_list = X__gnuc_va_list /* stdio.h:52:24 */ + +type Off_t = X__off64_t /* stdio.h:65:19 */ + +type Ssize_t = X__ssize_t /* stdio.h:77:19 */ + +// The type of the second argument to `fgetpos' and `fsetpos'. +type Fpos_t = X__fpos64_t /* stdio.h:86:20 */ + +// If we are compiling with optimizing read this file. It contains +// several optimizing inline functions and macros. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/stdlib/capi_linux_loong64.go b/vendor/modernc.org/libc/stdlib/capi_linux_loong64.go new file mode 100644 index 00000000..bc0091ea --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_linux_amd64.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/stdlib/stdlib_linux_loong64.go b/vendor/modernc.org/libc/stdlib/stdlib_linux_loong64.go new file mode 100644 index 00000000..242876b7 --- /dev/null +++ b/vendor/modernc.org/libc/stdlib/stdlib_linux_loong64.go @@ -0,0 +1,1541 @@ +// Code generated by 'ccgo stdlib/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdlib/stdlib_linux_amd64.go -pkgname stdlib', DO NOT EDIT. + +package stdlib + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:28:1: + BYTE_ORDER = 1234 // endian.h:30:1: + EXIT_FAILURE = 1 // stdlib.h:91:1: + EXIT_SUCCESS = 0 // stdlib.h:92:1: + FD_SETSIZE = 1024 // select.h:73:1: + LITTLE_ENDIAN = 1234 // endian.h:27:1: + PDP_ENDIAN = 3412 // endian.h:29:1: + RAND_MAX = 2147483647 // stdlib.h:86:1: + WCONTINUED = 8 // waitflags.h:32:1: + WEXITED = 4 // waitflags.h:31:1: + WNOHANG = 1 // waitflags.h:25:1: + WNOWAIT = 0x01000000 // waitflags.h:33:1: + WSTOPPED = 2 // waitflags.h:30:1: + WUNTRACED = 2 // waitflags.h:26:1: + X_ALLOCA_H = 1 // alloca.h:19:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_FLOATN_COMMON_H = 0 // floatn-common.h:21:1: + X_BITS_FLOATN_H = 0 // floatn.h:20:1: + X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1: + X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1: + X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_ENDIAN_H = 1 // endian.h:19:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_GCC_WCHAR_T = 0 // stddef.h:273:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STDLIB_H = 1 // stdlib.h:35:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SELECT_H = 1 // select.h:22:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_SYS_TYPES_H = 1 // types.h:23:1: + X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1: + X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + X_T_WCHAR = 0 // stddef.h:264:1: + X_T_WCHAR_ = 0 // stddef.h:263:1: + X_WCHAR_T = 0 // stddef.h:262:1: + X_WCHAR_T_ = 0 // stddef.h:266:1: + X_WCHAR_T_DECLARED = 0 // stddef.h:274:1: + X_WCHAR_T_DEFINED = 0 // stddef.h:269:1: + X_WCHAR_T_DEFINED_ = 0 // stddef.h:268:1: + X_WCHAR_T_H = 0 // stddef.h:270:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// A null pointer constant. + +// XPG requires a few symbols from <sys/wait.h> being defined. +// Definitions of flag bits for `waitpid' et al. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Bits in the third argument to `waitpid'. + +// Bits in the fourth argument to `waitid'. + +// The following values are used by the `waitid' function. + +// The Linux kernel defines these bare, rather than an enum, +// which causes a conflict if the include order is reversed. + +const ( /* waitflags.h:52:1: */ + P_ALL = 0 // Wait for any child. + P_PID = 1 // Wait for specified process. + P_PGID = 2 +) + +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 */ + +// A null pointer constant. + +// XPG requires a few symbols from <sys/wait.h> being defined. +// Definitions of flag bits for `waitpid' et al. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Bits in the third argument to `waitpid'. + +// Bits in the fourth argument to `waitid'. + +// The following values are used by the `waitid' function. + +// The Linux kernel defines these bare, rather than an enum, +// which causes a conflict if the include order is reversed. + +type Idtype_t = uint32 /* waitflags.h:57:3 */ +// Definitions of status bits for `wait' et al. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Everything extant so far uses these same bits. + +// If WIFEXITED(STATUS), the low-order 8 bits of the status. + +// If WIFSIGNALED(STATUS), the terminating signal. + +// If WIFSTOPPED(STATUS), the signal that stopped the child. + +// Nonzero if STATUS indicates normal termination. + +// Nonzero if STATUS indicates termination by a signal. + +// Nonzero if STATUS indicates the child is stopped. + +// Nonzero if STATUS indicates the child continued after a stop. We only +// define this if <bits/waitflags.h> provides the WCONTINUED flag bit. + +// Nonzero if STATUS indicates the child dumped core. + +// Macros for constructing status values. + +// Define the macros <sys/wait.h> also would define this way. + +// _FloatN API tests for enablement. +// Macros to control TS 18661-3 glibc features on x86. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Defined to 1 if the current compiler invocation provides a +// floating-point type with the IEEE 754 binary128 format, and this +// glibc includes corresponding *f128 interfaces for it. The required +// libgcc support was added some time after the basic compiler +// support, for x86_64 and x86. + +// Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct +// from the default float, double and long double types in this glibc. + +// Defined to 1 if the current compiler invocation provides a +// floating-point type with the right format for _Float64x, and this +// glibc includes corresponding *f64x interfaces for it. + +// Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format +// of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has +// the format of _Float128, which must be different from that of long +// double. + +// Defined to concatenate the literal suffix to be used with _Float128 +// types, if __HAVE_FLOAT128 is 1. + +// Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. + +// The remaining of this file provides support for older compilers. + +// The type _Float128 exists only since GCC 7.0. + +// __builtin_huge_valf128 doesn't exist before GCC 7.0. + +// Older GCC has only a subset of built-in functions for _Float128 on +// x86, and __builtin_infq is not usable in static initializers. +// Converting a narrower sNaN to _Float128 produces a quiet NaN, so +// attempts to use _Float128 sNaNs will not work properly with older +// compilers. + +// In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, +// e.g.: __builtin_signbitf128, before GCC 6. However, there has never +// been a __builtin_signbitf128 in GCC and the type-generic builtin is +// only available since GCC 6. + +// Macros to control TS 18661-3 glibc features where the same +// definitions are appropriate for all platforms. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// This header should be included at the bottom of each bits/floatn.h. +// It defines the following macros for each _FloatN and _FloatNx type, +// where the same definitions, or definitions based only on the macros +// in bits/floatn.h, are appropriate for all glibc configurations. + +// Defined to 1 if the current compiler invocation provides a +// floating-point type with the right format for this type, and this +// glibc includes corresponding *fN or *fNx interfaces for it. + +// Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the +// type is the first with its format in the sequence of (the default +// choices for) float, double, long double, _Float16, _Float32, +// _Float64, _Float128, _Float32x, _Float64x, _Float128x for this +// glibc; that is, if functions present once per floating-point format +// rather than once per type are present for this type. +// +// All configurations supported by glibc have _Float32 the same format +// as float, _Float64 and _Float32x the same format as double, the +// _Float64x the same format as either long double or _Float128. No +// configurations support _Float128x or, as of GCC 7, have compiler +// support for a type meeting the requirements for _Float128x. + +// Defined to 1 if the corresponding _FloatN type is not binary compatible +// with the corresponding ISO C type in the current compilation unit as +// opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built +// in glibc. + +// Defined to 1 if any _FloatN or _FloatNx types that are not +// ABI-distinct are however distinct types at the C language level (so +// for the purposes of __builtin_types_compatible_p and _Generic). + +// Defined to concatenate the literal suffix to be used with _FloatN +// or _FloatNx types, if __HAVE_<type> is 1. The corresponding +// literal suffixes exist since GCC 7, for C only. + +// Defined to a complex type if __HAVE_<type> is 1. + +// The remaining of this file provides support for older compilers. + +// If double, long double and _Float64 all have the same set of +// values, TS 18661-3 requires the usual arithmetic conversions on +// long double and _Float64 to produce _Float64. For this to be the +// case when building with a compiler without a distinct _Float64 +// type, _Float64 must be a typedef for long double, not for +// double. + +// Returned by `div'. +type Div_t = struct { + Fquot int32 + Frem int32 +} /* stdlib.h:62:5 */ + +// Returned by `ldiv'. +type Ldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:70:5 */ + +// Returned by `lldiv'. +type Lldiv_t = struct { + Fquot int64 + Frem int64 +} /* stdlib.h:80:5 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// A time value that is accurate to the nearest +// +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of <linux/posix_types.h> define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +// Reentrant versions of the `random' family of functions. +// These functions all use the following data structure to contain +// state, rather than global state variables. + +type Random_data = struct { + Ffptr uintptr + Frptr uintptr + Fstate uintptr + Frand_type int32 + Frand_deg int32 + Frand_sep int32 + F__ccgo_pad1 [4]byte + Fend_ptr uintptr +} /* stdlib.h:423:1 */ + +// Data structure for communication with thread safe versions. This +// +// type is to be regarded as opaque. It's only exported because users +// have to allocate objects of this type. +type Drand48_data = struct { + F__x [3]uint16 + F__old_x [3]uint16 + F__c uint16 + F__init uint16 + F__a uint64 +} /* stdlib.h:490:1 */ + +// Shorthand for type of comparison functions. +type X__compar_fn_t = uintptr /* stdlib.h:808:13 */ + +// Floating-point inline functions for stdlib.h. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define some macros helping to catch buffer overflows. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/socket/capi_linux_loong64.go b/vendor/modernc.org/libc/sys/socket/capi_linux_loong64.go new file mode 100644 index 00000000..41ea29c8 --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_linux_amd64.go -pkgname socket', DO NOT EDIT. + +package socket + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/socket/socket_linux_loong64.go b/vendor/modernc.org/libc/sys/socket/socket_linux_loong64.go new file mode 100644 index 00000000..c5ca270f --- /dev/null +++ b/vendor/modernc.org/libc/sys/socket/socket_linux_loong64.go @@ -0,0 +1,1848 @@ +// Code generated by 'ccgo sys/socket/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/socket/socket_linux_amd64.go -pkgname socket', DO NOT EDIT. + +package socket + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + AF_ALG = 38 // socket.h:133:1: + AF_APPLETALK = 5 // socket.h:99:1: + AF_ASH = 18 // socket.h:113:1: + AF_ATMPVC = 8 // socket.h:102:1: + AF_ATMSVC = 20 // socket.h:115:1: + AF_AX25 = 3 // socket.h:97:1: + AF_BLUETOOTH = 31 // socket.h:126:1: + AF_BRIDGE = 7 // socket.h:101:1: + AF_CAIF = 37 // socket.h:132:1: + AF_CAN = 29 // socket.h:124:1: + AF_DECnet = 12 // socket.h:106:1: + AF_ECONET = 19 // socket.h:114:1: + AF_FILE = 1 // socket.h:95:1: + AF_IB = 27 // socket.h:122:1: + AF_IEEE802154 = 36 // socket.h:131:1: + AF_INET = 2 // socket.h:96:1: + AF_INET6 = 10 // socket.h:104:1: + AF_IPX = 4 // socket.h:98:1: + AF_IRDA = 23 // socket.h:118:1: + AF_ISDN = 34 // socket.h:129:1: + AF_IUCV = 32 // socket.h:127:1: + AF_KCM = 41 // socket.h:136:1: + AF_KEY = 15 // socket.h:109:1: + AF_LLC = 26 // socket.h:121:1: + AF_LOCAL = 1 // socket.h:93:1: + AF_MAX = 45 // socket.h:140:1: + AF_MPLS = 28 // socket.h:123:1: + AF_NETBEUI = 13 // socket.h:107:1: + AF_NETLINK = 16 // socket.h:110:1: + AF_NETROM = 6 // socket.h:100:1: + AF_NFC = 39 // socket.h:134:1: + AF_PACKET = 17 // socket.h:112:1: + AF_PHONET = 35 // socket.h:130:1: + AF_PPPOX = 24 // socket.h:119:1: + AF_QIPCRTR = 42 // socket.h:137:1: + AF_RDS = 21 // socket.h:116:1: + AF_ROSE = 11 // socket.h:105:1: + AF_ROUTE = 16 // socket.h:111:1: + AF_RXRPC = 33 // socket.h:128:1: + AF_SECURITY = 14 // socket.h:108:1: + AF_SMC = 43 // socket.h:138:1: + AF_SNA = 22 // socket.h:117:1: + AF_TIPC = 30 // socket.h:125:1: + AF_UNIX = 1 // socket.h:94:1: + AF_UNSPEC = 0 // socket.h:92:1: + AF_VSOCK = 40 // socket.h:135:1: + AF_WANPIPE = 25 // socket.h:120:1: + AF_X25 = 9 // socket.h:103:1: + AF_XDP = 44 // socket.h:139:1: + BIG_ENDIAN = 4321 // endian.h:28:1: + BYTE_ORDER = 1234 // endian.h:30:1: + FD_SETSIZE = 1024 // select.h:73:1: + FIOGETOWN = 0x8903 // sockios.h:8:1: + FIOSETOWN = 0x8901 // sockios.h:6:1: + LITTLE_ENDIAN = 1234 // endian.h:27:1: + PDP_ENDIAN = 3412 // endian.h:29:1: + PF_ALG = 38 // socket.h:82:1: + PF_APPLETALK = 5 // socket.h:48:1: + PF_ASH = 18 // socket.h:62:1: + PF_ATMPVC = 8 // socket.h:51:1: + PF_ATMSVC = 20 // socket.h:64:1: + PF_AX25 = 3 // socket.h:46:1: + PF_BLUETOOTH = 31 // socket.h:75:1: + PF_BRIDGE = 7 // socket.h:50:1: + PF_CAIF = 37 // socket.h:81:1: + PF_CAN = 29 // socket.h:73:1: + PF_DECnet = 12 // socket.h:55:1: + PF_ECONET = 19 // socket.h:63:1: + PF_FILE = 1 // socket.h:44:1: + PF_IB = 27 // socket.h:71:1: + PF_IEEE802154 = 36 // socket.h:80:1: + PF_INET = 2 // socket.h:45:1: + PF_INET6 = 10 // socket.h:53:1: + PF_IPX = 4 // socket.h:47:1: + PF_IRDA = 23 // socket.h:67:1: + PF_ISDN = 34 // socket.h:78:1: + PF_IUCV = 32 // socket.h:76:1: + PF_KCM = 41 // socket.h:85:1: + PF_KEY = 15 // socket.h:58:1: + PF_LLC = 26 // socket.h:70:1: + PF_LOCAL = 1 // socket.h:42:1: + PF_MAX = 45 // socket.h:89:1: + PF_MPLS = 28 // socket.h:72:1: + PF_NETBEUI = 13 // socket.h:56:1: + PF_NETLINK = 16 // socket.h:59:1: + PF_NETROM = 6 // socket.h:49:1: + PF_NFC = 39 // socket.h:83:1: + PF_PACKET = 17 // socket.h:61:1: + PF_PHONET = 35 // socket.h:79:1: + PF_PPPOX = 24 // socket.h:68:1: + PF_QIPCRTR = 42 // socket.h:86:1: + PF_RDS = 21 // socket.h:65:1: + PF_ROSE = 11 // socket.h:54:1: + PF_ROUTE = 16 // socket.h:60:1: + PF_RXRPC = 33 // socket.h:77:1: + PF_SECURITY = 14 // socket.h:57:1: + PF_SMC = 43 // socket.h:87:1: + PF_SNA = 22 // socket.h:66:1: + PF_TIPC = 30 // socket.h:74:1: + PF_UNIX = 1 // socket.h:43:1: + PF_UNSPEC = 0 // socket.h:41:1: + PF_VSOCK = 40 // socket.h:84:1: + PF_WANPIPE = 25 // socket.h:69:1: + PF_X25 = 9 // socket.h:52:1: + PF_XDP = 44 // socket.h:88:1: + SCM_TIMESTAMP = 29 // socket.h:140:1: + SCM_TIMESTAMPING = 37 // socket.h:142:1: + SCM_TIMESTAMPING_OPT_STATS = 54 // socket.h:90:1: + SCM_TIMESTAMPING_PKTINFO = 58 // socket.h:98:1: + SCM_TIMESTAMPNS = 35 // socket.h:141:1: + SCM_TXTIME = 61 // socket.h:105:1: + SCM_WIFI_STATUS = 41 // socket.h:64:1: + SIOCATMARK = 0x8905 // sockios.h:10:1: + SIOCGPGRP = 0x8904 // sockios.h:9:1: + SIOCGSTAMP = 0x8906 // sockios.h:11:1: + SIOCGSTAMPNS = 0x8907 // sockios.h:12:1: + SIOCSPGRP = 0x8902 // sockios.h:7:1: + SOL_AAL = 265 // socket.h:151:1: + SOL_ALG = 279 // socket.h:165:1: + SOL_ATM = 264 // socket.h:150:1: + SOL_BLUETOOTH = 274 // socket.h:160:1: + SOL_CAIF = 278 // socket.h:164:1: + SOL_DCCP = 269 // socket.h:155:1: + SOL_DECNET = 261 // socket.h:147:1: + SOL_IRDA = 266 // socket.h:152:1: + SOL_IUCV = 277 // socket.h:163:1: + SOL_KCM = 281 // socket.h:167:1: + SOL_LLC = 268 // socket.h:154:1: + SOL_NETBEUI = 267 // socket.h:153:1: + SOL_NETLINK = 270 // socket.h:156:1: + SOL_NFC = 280 // socket.h:166:1: + SOL_PACKET = 263 // socket.h:149:1: + SOL_PNPIPE = 275 // socket.h:161:1: + SOL_PPPOL2TP = 273 // socket.h:159:1: + SOL_RAW = 255 // socket.h:146:1: + SOL_RDS = 276 // socket.h:162:1: + SOL_RXRPC = 272 // socket.h:158:1: + SOL_SOCKET = 1 // socket.h:9:1: + SOL_TIPC = 271 // socket.h:157:1: + SOL_TLS = 282 // socket.h:168:1: + SOL_X25 = 262 // socket.h:148:1: + SOL_XDP = 283 // socket.h:169:1: + SOMAXCONN = 4096 // socket.h:172:1: + SO_ACCEPTCONN = 30 // socket.h:51:1: + SO_ATTACH_BPF = 50 // socket.h:82:1: + SO_ATTACH_FILTER = 26 // socket.h:45:1: + SO_ATTACH_REUSEPORT_CBPF = 51 // socket.h:85:1: + SO_ATTACH_REUSEPORT_EBPF = 52 // socket.h:86:1: + SO_BINDTODEVICE = 25 // socket.h:42:1: + SO_BINDTOIFINDEX = 62 // socket.h:107:1: + SO_BPF_EXTENSIONS = 48 // socket.h:78:1: + SO_BROADCAST = 6 // socket.h:16:1: + SO_BSDCOMPAT = 14 // socket.h:26:1: + SO_BUSY_POLL = 46 // socket.h:74:1: + SO_CNX_ADVICE = 53 // socket.h:88:1: + SO_COOKIE = 57 // socket.h:96:1: + SO_DEBUG = 1 // socket.h:11:1: + SO_DETACH_BPF = 27 // socket.h:83:1: + SO_DETACH_FILTER = 27 // socket.h:46:1: + SO_DETACH_REUSEPORT_BPF = 68 // socket.h:120:1: + SO_DOMAIN = 39 // socket.h:59:1: + SO_DONTROUTE = 5 // socket.h:15:1: + SO_ERROR = 4 // socket.h:14:1: + SO_GET_FILTER = 26 // socket.h:47:1: + SO_INCOMING_CPU = 49 // socket.h:80:1: + SO_INCOMING_NAPI_ID = 56 // socket.h:94:1: + SO_KEEPALIVE = 9 // socket.h:21:1: + SO_LINGER = 13 // socket.h:25:1: + SO_LOCK_FILTER = 44 // socket.h:70:1: + SO_MARK = 36 // socket.h:56:1: + SO_MAX_PACING_RATE = 47 // socket.h:76:1: + SO_MEMINFO = 55 // socket.h:92:1: + SO_NOFCS = 43 // socket.h:68:1: + SO_NO_CHECK = 11 // socket.h:23:1: + SO_OOBINLINE = 10 // socket.h:22:1: + SO_PASSCRED = 16 // socket.h:29:1: + SO_PASSSEC = 34 // socket.h:54:1: + SO_PEEK_OFF = 42 // socket.h:65:1: + SO_PEERCRED = 17 // socket.h:30:1: + SO_PEERGROUPS = 59 // socket.h:100:1: + SO_PEERNAME = 28 // socket.h:49:1: + SO_PEERSEC = 31 // socket.h:53:1: + SO_PRIORITY = 12 // socket.h:24:1: + SO_PROTOCOL = 38 // socket.h:58:1: + SO_RCVBUF = 8 // socket.h:18:1: + SO_RCVBUFFORCE = 33 // socket.h:20:1: + SO_RCVLOWAT = 18 // socket.h:31:1: + SO_RCVTIMEO = 20 // socket.h:129:1: + SO_RCVTIMEO_NEW = 66 // socket.h:117:1: + SO_RCVTIMEO_OLD = 20 // socket.h:33:1: + SO_REUSEADDR = 2 // socket.h:12:1: + SO_REUSEPORT = 15 // socket.h:27:1: + SO_RXQ_OVFL = 40 // socket.h:61:1: + SO_SECURITY_AUTHENTICATION = 22 // socket.h:38:1: + SO_SECURITY_ENCRYPTION_NETWORK = 24 // socket.h:40:1: + SO_SECURITY_ENCRYPTION_TRANSPORT = 23 // socket.h:39:1: + SO_SELECT_ERR_QUEUE = 45 // socket.h:72:1: + SO_SNDBUF = 7 // socket.h:17:1: + SO_SNDBUFFORCE = 32 // socket.h:19:1: + SO_SNDLOWAT = 19 // socket.h:32:1: + SO_SNDTIMEO = 21 // socket.h:130:1: + SO_SNDTIMEO_NEW = 67 // socket.h:118:1: + SO_SNDTIMEO_OLD = 21 // socket.h:34:1: + SO_TIMESTAMP = 29 // socket.h:125:1: + SO_TIMESTAMPING = 37 // socket.h:127:1: + SO_TIMESTAMPING_NEW = 65 // socket.h:115:1: + SO_TIMESTAMPING_OLD = 37 // socket.h:111:1: + SO_TIMESTAMPNS = 35 // socket.h:126:1: + SO_TIMESTAMPNS_NEW = 64 // socket.h:114:1: + SO_TIMESTAMPNS_OLD = 35 // socket.h:110:1: + SO_TIMESTAMP_NEW = 63 // socket.h:113:1: + SO_TIMESTAMP_OLD = 29 // socket.h:109:1: + SO_TXTIME = 61 // socket.h:104:1: + SO_TYPE = 3 // socket.h:13:1: + SO_WIFI_STATUS = 41 // socket.h:63:1: + SO_ZEROCOPY = 60 // socket.h:102:1: + X_ASM_X86_POSIX_TYPES_64_H = 0 // posix_types_64.h:3:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1: + X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1: + X_BITS_SOCKADDR_H = 1 // sockaddr.h:24:1: + X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_ENDIAN_H = 1 // endian.h:19:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LINUX_POSIX_TYPES_H = 0 // posix_types.h:3:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_SS_SIZE = 128 // sockaddr.h:40:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SELECT_H = 1 // select.h:22:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_SYS_SOCKET_H = 1 // socket.h:20:1: + X_SYS_TYPES_H = 1 // types.h:23:1: + X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1: + X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// Bits in the FLAGS argument to `send', `recv', et al. +const ( /* socket.h:200:1: */ + MSG_OOB = 1 // Process out-of-band data. + MSG_PEEK = 2 // Peek at incoming messages. + MSG_DONTROUTE = 4 // Don't use local routing. + MSG_CTRUNC = 8 // Control data lost before delivery. + MSG_PROXY = 16 // Supply or ask second address. + MSG_TRUNC = 32 + MSG_DONTWAIT = 64 // Nonblocking IO. + MSG_EOR = 128 // End of record. + MSG_WAITALL = 256 // Wait for a full request. + MSG_FIN = 512 + MSG_SYN = 1024 + MSG_CONFIRM = 2048 // Confirm path validity. + MSG_RST = 4096 + MSG_ERRQUEUE = 8192 // Fetch message from error queue. + MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE. + MSG_MORE = 32768 // Sender will send more. + MSG_WAITFORONE = 65536 // Wait for at least one packet to return. + MSG_BATCH = 262144 // sendmmsg: more messages coming. + MSG_ZEROCOPY = 67108864 // Use user data in kernel path. + MSG_FASTOPEN = 536870912 // Send data in TCP SYN. + + MSG_CMSG_CLOEXEC = 1073741824 +) + +// Socket level message types. This must match the definitions in +// +// <linux/socket.h>. +const ( /* socket.h:332:1: */ + SCM_RIGHTS = 1 +) + +// Get the architecture-dependent definition of enum __socket_type. +// Define enum __socket_type for generic Linux. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Types of sockets. +const ( /* socket_type.h:24:1: */ + SOCK_STREAM = 1 // Sequenced, reliable, connection-based + // byte streams. + SOCK_DGRAM = 2 // Connectionless, unreliable datagrams + // of fixed maximum length. + SOCK_RAW = 3 // Raw protocol interface. + SOCK_RDM = 4 // Reliably-delivered messages. + SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based, + // datagrams of fixed maximum length. + SOCK_DCCP = 6 // Datagram Congestion Control Protocol. + SOCK_PACKET = 10 // Linux specific way of getting packets + // at the dev level. For writing rarp and + // other similar things on the user level. + + // Flags to be ORed into the type parameter of socket and socketpair and + // used for the flags parameter of paccept. + + SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the + // new descriptor(s). + SOCK_NONBLOCK = 2048 +) + +// The following constants should be used for the second parameter of +// +// `shutdown'. +const ( /* socket.h:41:1: */ + SHUT_RD = 0 // No more receptions. + SHUT_WR = 1 // No more transmissions. + SHUT_RDWR = 2 +) + +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 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Structure for scatter/gather I/O. +type Iovec = struct { + Fiov_base uintptr + Fiov_len Size_t +} /* struct_iovec.h:26:1 */ + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This operating system-specific header file defines the SOCK_*, PF_*, +// AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', +// `struct msghdr', and `struct linger' types. +// System-specific socket constants and types. Linux version. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// A time value that is accurate to the nearest +// +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of <linux/posix_types.h> define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +// Type for length arguments in socket calls. +type Socklen_t = X__socklen_t /* socket.h:33:21 */ + +// Protocol families. + +// Address families. + +// Socket level values. Others are defined in the appropriate headers. +// +// XXX These definitions also should go into the appropriate headers as +// far as they are available. + +// Maximum queue length specifiable by listen. + +// Get the definition of the macro to define the common sockaddr members. +// Definition of struct sockaddr_* common members and sizes, generic version. +// Copyright (C) 1995-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/socket.h> instead. + +// POSIX.1g specifies this type name for the `sa_family' member. +type Sa_family_t = uint16 /* sockaddr.h:28:28 */ + +// This macro is used to declare the initial common members +// of the data types used for socket addresses, `struct sockaddr', +// `struct sockaddr_in', `struct sockaddr_un', etc. + +// Size of struct sockaddr_storage. + +// Structure describing a generic socket address. +type Sockaddr = struct { + Fsa_family Sa_family_t + Fsa_data [14]int8 +} /* socket.h:178:1 */ + +// Structure large enough to hold any socket address (with the historical +// exception of AF_UNIX). + +type Sockaddr_storage = struct { + Fss_family Sa_family_t + F__ss_padding [118]int8 + F__ss_align uint64 +} /* socket.h:191:1 */ + +// Structure describing messages sent by +// +// `sendmsg' and received by `recvmsg'. +type Msghdr = struct { + Fmsg_name uintptr + Fmsg_namelen Socklen_t + F__ccgo_pad1 [4]byte + Fmsg_iov uintptr + Fmsg_iovlen Size_t + Fmsg_control uintptr + Fmsg_controllen Size_t + Fmsg_flags int32 + F__ccgo_pad2 [4]byte +} /* socket.h:257:1 */ + +// Structure used for storage of ancillary data object information. +type Cmsghdr = struct { + F__ccgo_pad1 [0]uint64 + Fcmsg_len Size_t + Fcmsg_level int32 + Fcmsg_type int32 +} /* socket.h:275:1 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This allows for 1024 file descriptors: if NR_OPEN is ever grown +// beyond that you'll have to change this too. But 1024 fd's seem to be +// enough even for such "real" unices like OSF/1, so hopefully this is +// one limit that doesn't have to be changed [again]. +// +// Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in +// <sys/time.h> (and thus <linux/time.h>) - but this is a more logical +// place for them. Solved by having dummy defines in <sys/time.h>. + +// This macro may have been defined in <gnu/types.h>. But we always +// use the one here. + +type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */ + +// Type of a signal handler. +type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ + +// Type of a SYSV IPC key. +type X__kernel_key_t = int32 /* posix_types.h:33:13 */ +type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. Also, we cannot +// assume GCC is being used. + +type X__kernel_old_uid_t = uint16 /* posix_types_64.h:11:24 */ +type X__kernel_old_gid_t = uint16 /* posix_types_64.h:12:24 */ + +type X__kernel_old_dev_t = uint64 /* posix_types_64.h:15:23 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// There seems to be no way of detecting this automatically from user +// space, so 64 bit architectures should override this in their +// bitsperlong.h. In particular, an architecture that supports +// both 32 and 64 bit user space must not rely on CONFIG_64BIT +// to decide it, but rather check a compiler provided macro. + +// This file is generally used by user-level software, so you need to +// be a little careful about namespace pollution etc. +// +// First the types that are often defined in different ways across +// architectures, so that you can override them. + +type X__kernel_long_t = int64 /* posix_types.h:15:15 */ +type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */ + +type X__kernel_ino_t = X__kernel_ulong_t /* posix_types.h:20:26 */ + +type X__kernel_mode_t = uint32 /* posix_types.h:24:22 */ + +type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ + +type X__kernel_ipc_pid_t = int32 /* posix_types.h:32:14 */ + +type X__kernel_uid_t = uint32 /* posix_types.h:36:22 */ +type X__kernel_gid_t = uint32 /* posix_types.h:37:22 */ + +type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ + +type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ + +type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ +type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ + +// Most 32 bit architectures use "unsigned int" size_t, +// and all 64 bit architectures use "unsigned long" size_t. +type X__kernel_size_t = X__kernel_ulong_t /* posix_types.h:72:26 */ +type X__kernel_ssize_t = X__kernel_long_t /* posix_types.h:73:25 */ +type X__kernel_ptrdiff_t = X__kernel_long_t /* posix_types.h:74:25 */ + +type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ + +// anything below here should be completely generic +type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ +type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ +type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ +type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ +type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ +type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ +type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ +type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ +type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ +type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ +type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ + +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +// Socket-level I/O control calls. + +// For setsockopt(2) + +// Security levels - as per NRL IPv6 - don't actually do anything + +// Socket filtering + +// Instruct lower device to use last 4-bytes of skb data as FCS + +// on 64-bit and x32, avoid the ?: operator + +// Structure used to manipulate the SO_LINGER option. +type Linger = struct { + Fl_onoff int32 + Fl_linger int32 +} /* socket.h:361:1 */ + +// This is the 4.3 BSD `struct sockaddr' format, which is used as wire +// +// format in the grotty old 4.3 `talk' protocol. +type Osockaddr = struct { + Fsa_family uint16 + Fsa_data [14]uint8 +} /* struct_osockaddr.h:6:1 */ + +// Define some macros helping to catch buffer overflows. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/stat/capi_linux_loong64.go b/vendor/modernc.org/libc/sys/stat/capi_linux_loong64.go new file mode 100644 index 00000000..7ab15123 --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_linux_amd64.go -pkgname stat', DO NOT EDIT. + +package stat + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/stat/stat_linux_loong64.go b/vendor/modernc.org/libc/sys/stat/stat_linux_loong64.go new file mode 100644 index 00000000..9c460d3a --- /dev/null +++ b/vendor/modernc.org/libc/sys/stat/stat_linux_loong64.go @@ -0,0 +1,947 @@ +// Code generated by 'ccgo sys/stat/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/stat/stat_linux_amd64.go -pkgname stat', DO NOT EDIT. + +package stat + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + ACCESSPERMS = 511 // stat.h:195:1: + ALLPERMS = 4095 // stat.h:196:1: + DEFFILEMODE = 438 // stat.h:197:1: + S_BLKSIZE = 512 // stat.h:199:1: + S_IEXEC = 64 // stat.h:177:1: + S_IFBLK = 24576 // stat.h:107:1: + S_IFCHR = 8192 // stat.h:106:1: + S_IFDIR = 16384 // stat.h:105:1: + S_IFIFO = 4096 // stat.h:110:1: + S_IFLNK = 40960 // stat.h:113:1: + S_IFMT = 61440 // stat.h:104:1: + S_IFREG = 32768 // stat.h:108:1: + S_IFSOCK = 49152 // stat.h:117:1: + S_IREAD = 256 // stat.h:175:1: + S_IRGRP = 32 // stat.h:180:1: + S_IROTH = 4 // stat.h:186:1: + S_IRUSR = 256 // stat.h:168:1: + S_IRWXG = 56 // stat.h:184:1: + S_IRWXO = 7 // stat.h:190:1: + S_IRWXU = 448 // stat.h:172:1: + S_ISGID = 1024 // stat.h:161:1: + S_ISUID = 2048 // stat.h:160:1: + S_ISVTX = 512 // stat.h:165:1: + S_IWGRP = 16 // stat.h:181:1: + S_IWOTH = 2 // stat.h:187:1: + S_IWRITE = 128 // stat.h:176:1: + S_IWUSR = 128 // stat.h:169:1: + S_IXGRP = 8 // stat.h:182:1: + S_IXOTH = 1 // stat.h:188:1: + S_IXUSR = 64 // stat.h:170:1: + UTIME_NOW = 1073741823 // stat.h:206:1: + UTIME_OMIT = 1073741822 // stat.h:207:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_STAT_H = 1 // stat.h:23:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:284:1: + X_MKNOD_VER = 0 // stat.h:390:1: + X_MKNOD_VER_LINUX = 0 // stat.h:41:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_STATBUF_ST_BLKSIZE = 0 // stat.h:172:1: + X_STATBUF_ST_NSEC = 0 // stat.h:175:1: + X_STATBUF_ST_RDEV = 0 // stat.h:173:1: + X_STAT_VER = 1 // stat.h:44:1: + X_STAT_VER_KERNEL = 0 // stat.h:37:1: + X_STAT_VER_LINUX = 1 // stat.h:38:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_STAT_H = 1 // stat.h:23:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 5.6 File Characteristics <sys/stat.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// i386/x86_64 are little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +// The Single Unix specification says that some more types are +// available here. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +type Dev_t = X__dev_t /* stat.h:40:17 */ + +type Gid_t = X__gid_t /* stat.h:45:17 */ + +type Ino_t = X__ino64_t /* stat.h:53:19 */ + +type Mode_t = X__mode_t /* stat.h:59:18 */ + +type Nlink_t = X__nlink_t /* stat.h:64:19 */ + +type Off_t = X__off64_t /* stat.h:72:19 */ + +type Uid_t = X__uid_t /* stat.h:78:17 */ + +// Copyright (C) 1999-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Versions of the `struct stat' data structure. + +// x86-64 versions of the `xmknod' interface. + +type Stat = struct { + Fst_dev X__dev_t + Fst_ino X__ino_t + Fst_nlink X__nlink_t + Fst_mode X__mode_t + Fst_uid X__uid_t + Fst_gid X__gid_t + F__pad0 int32 + Fst_rdev X__dev_t + Fst_size X__off_t + Fst_blksize X__blksize_t + Fst_blocks X__blkcnt_t + Fst_atim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_mtim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fst_ctim struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + F__glibc_reserved [3]X__syscall_slong_t +} /* stat.h:46:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/sys/types/capi_linux_loong64.go b/vendor/modernc.org/libc/sys/types/capi_linux_loong64.go new file mode 100644 index 00000000..76280065 --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_linux_amd64.go -pkgname types', DO NOT EDIT. + +package types + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/sys/types/types_linux_loong64.go b/vendor/modernc.org/libc/sys/types/types_linux_loong64.go new file mode 100644 index 00000000..8a758d4c --- /dev/null +++ b/vendor/modernc.org/libc/sys/types/types_linux_loong64.go @@ -0,0 +1,1511 @@ +// Code generated by 'ccgo sys/types/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o sys/types/types_linux_amd64.go -pkgname types', DO NOT EDIT. + +package types + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:28:1: + BYTE_ORDER = 1234 // endian.h:30:1: + FD_SETSIZE = 1024 // select.h:73:1: + LITTLE_ENDIAN = 1234 // endian.h:27:1: + PDP_ENDIAN = 3412 // endian.h:29:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1: + X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1: + X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_ENDIAN_H = 1 // endian.h:19:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SELECT_H = 1 // select.h:22:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_SYS_TYPES_H = 1 // types.h:23:1: + X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1: + X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// A time value that is accurate to the nearest +// +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of <linux/posix_types.h> define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/termios/capi_linux_loong64.go b/vendor/modernc.org/libc/termios/capi_linux_loong64.go new file mode 100644 index 00000000..193dc60e --- /dev/null +++ b/vendor/modernc.org/libc/termios/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_linux_amd64.go -pkgname termios', DO NOT EDIT. + +package termios + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/termios/termios_linux_loong64.go b/vendor/modernc.org/libc/termios/termios_linux_loong64.go new file mode 100644 index 00000000..494b2017 --- /dev/null +++ b/vendor/modernc.org/libc/termios/termios_linux_loong64.go @@ -0,0 +1,1024 @@ +// Code generated by 'ccgo termios/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o termios/termios_linux_amd64.go -pkgname termios', DO NOT EDIT. + +package termios + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + B0 = 0000000 // termios.h:33:1: + B1000000 = 0010010 // termios-baud.h:40:1: + B110 = 0000003 // termios.h:36:1: + B115200 = 0010002 // termios-baud.h:34:1: + B1152000 = 0010011 // termios-baud.h:41:1: + B1200 = 0000011 // termios.h:42:1: + B134 = 0000004 // termios.h:37:1: + B150 = 0000005 // termios.h:38:1: + B1500000 = 0010012 // termios-baud.h:42:1: + B1800 = 0000012 // termios.h:43:1: + B19200 = 0000016 // termios.h:47:1: + B200 = 0000006 // termios.h:39:1: + B2000000 = 0010013 // termios-baud.h:43:1: + B230400 = 0010003 // termios-baud.h:35:1: + B2400 = 0000013 // termios.h:44:1: + B2500000 = 0010014 // termios-baud.h:44:1: + B300 = 0000007 // termios.h:40:1: + B3000000 = 0010015 // termios-baud.h:45:1: + B3500000 = 0010016 // termios-baud.h:46:1: + B38400 = 0000017 // termios.h:48:1: + B4000000 = 0010017 // termios-baud.h:47:1: + B460800 = 0010004 // termios-baud.h:36:1: + B4800 = 0000014 // termios.h:45:1: + B50 = 0000001 // termios.h:34:1: + B500000 = 0010005 // termios-baud.h:37:1: + B57600 = 0010001 // termios-baud.h:33:1: + B576000 = 0010006 // termios-baud.h:38:1: + B600 = 0000010 // termios.h:41:1: + B75 = 0000002 // termios.h:35:1: + B921600 = 0010007 // termios-baud.h:39:1: + B9600 = 0000015 // termios.h:46:1: + BRKINT = 0000002 // termios-c_iflag.h:25:1: + BS0 = 0000000 // termios-c_oflag.h:48:1: + BS1 = 0020000 // termios-c_oflag.h:49:1: + BSDLY = 0020000 // termios-c_oflag.h:47:1: + CBAUD = 000000010017 // termios-baud.h:24:1: + CBAUDEX = 000000010000 // termios-baud.h:25:1: + CBRK = 0 // ttydefaults.h:83:1: + CDISCARD = 15 // ttydefaults.h:78:1: + CDSUSP = 25 // ttydefaults.h:74:1: + CEOF = 4 // ttydefaults.h:56:1: + CEOL = 0 // ttydefaults.h:60:1: + CEOT = 4 // ttydefaults.h:81:1: + CERASE = 0177 // ttydefaults.h:62:1: + CFLUSH = 15 // ttydefaults.h:85:1: + CIBAUD = 002003600000 // termios-baud.h:27:1: + CINTR = 3 // ttydefaults.h:63:1: + CKILL = 21 // ttydefaults.h:69:1: + CLNEXT = 22 // ttydefaults.h:77:1: + CLOCAL = 0004000 // termios-c_cflag.h:34:1: + CMIN = 1 // ttydefaults.h:70:1: + CMSPAR = 010000000000 // termios-baud.h:28:1: + CQUIT = 034 // ttydefaults.h:71:1: + CR0 = 0000000 // termios-c_oflag.h:38:1: + CR1 = 0001000 // termios-c_oflag.h:39:1: + CR2 = 0002000 // termios-c_oflag.h:40:1: + CR3 = 0003000 // termios-c_oflag.h:41:1: + CRDLY = 0003000 // termios-c_oflag.h:37:1: + CREAD = 0000200 // termios-c_cflag.h:30:1: + CREPRINT = 18 // ttydefaults.h:80:1: + CRPRNT = 18 // ttydefaults.h:84:1: + CRTSCTS = 020000000000 // termios-baud.h:29:1: + CS5 = 0000000 // termios-c_cflag.h:25:1: + CS6 = 0000020 // termios-c_cflag.h:26:1: + CS7 = 0000040 // termios-c_cflag.h:27:1: + CS8 = 0000060 // termios-c_cflag.h:28:1: + CSIZE = 0000060 // termios-c_cflag.h:24:1: + CSTART = 17 // ttydefaults.h:75:1: + CSTATUS = 0 // ttydefaults.h:67:1: + CSTOP = 19 // ttydefaults.h:76:1: + CSTOPB = 0000100 // termios-c_cflag.h:29:1: + CSUSP = 26 // ttydefaults.h:72:1: + CTIME = 0 // ttydefaults.h:73:1: + CWERASE = 23 // ttydefaults.h:79:1: + ECHO = 0000010 // termios-c_lflag.h:29:1: + ECHOCTL = 0001000 // termios-c_lflag.h:37:1: + ECHOE = 0000020 // termios-c_lflag.h:30:1: + ECHOK = 0000040 // termios-c_lflag.h:32:1: + ECHOKE = 0004000 // termios-c_lflag.h:45:1: + ECHONL = 0000100 // termios-c_lflag.h:33:1: + ECHOPRT = 0002000 // termios-c_lflag.h:42:1: + EXTA = 14 // termios.h:50:1: + EXTB = 15 // termios.h:51:1: + EXTPROC = 0200000 // termios-c_lflag.h:57:1: + FF0 = 0000000 // termios-c_oflag.h:51:1: + FF1 = 0100000 // termios-c_oflag.h:52:1: + FFDLY = 0100000 // termios-c_oflag.h:50:1: + FLUSHO = 0010000 // termios-c_lflag.h:48:1: + HUPCL = 0002000 // termios-c_cflag.h:33:1: + ICANON = 0000002 // termios-c_lflag.h:25:1: + ICRNL = 0000400 // termios-c_iflag.h:32:1: + IEXTEN = 0100000 // termios-c_lflag.h:54:1: + IGNBRK = 0000001 // termios-c_iflag.h:24:1: + IGNCR = 0000200 // termios-c_iflag.h:31:1: + IGNPAR = 0000004 // termios-c_iflag.h:26:1: + IMAXBEL = 0020000 // termios-c_iflag.h:38:1: + INLCR = 0000100 // termios-c_iflag.h:30:1: + INPCK = 0000020 // termios-c_iflag.h:28:1: + ISIG = 0000001 // termios-c_lflag.h:24:1: + ISTRIP = 0000040 // termios-c_iflag.h:29:1: + IUCLC = 0001000 // termios-c_iflag.h:33:1: + IUTF8 = 0040000 // termios-c_iflag.h:40:1: + IXANY = 0004000 // termios-c_iflag.h:36:1: + IXOFF = 0010000 // termios-c_iflag.h:37:1: + IXON = 0002000 // termios-c_iflag.h:35:1: + NCCS = 32 // termios-struct.h:23:1: + NL0 = 0000000 // termios-c_oflag.h:35:1: + NL1 = 0000400 // termios-c_oflag.h:36:1: + NLDLY = 0000400 // termios-c_oflag.h:34:1: + NOFLSH = 0000200 // termios-c_lflag.h:34:1: + OCRNL = 0000010 // termios-c_oflag.h:28:1: + OFDEL = 0000200 // termios-c_oflag.h:32:1: + OFILL = 0000100 // termios-c_oflag.h:31:1: + OLCUC = 0000002 // termios-c_oflag.h:25:1: + ONLCR = 0000004 // termios-c_oflag.h:27:1: + ONLRET = 0000040 // termios-c_oflag.h:30:1: + ONOCR = 0000020 // termios-c_oflag.h:29:1: + OPOST = 0000001 // termios-c_oflag.h:24:1: + PARENB = 0000400 // termios-c_cflag.h:31:1: + PARMRK = 0000010 // termios-c_iflag.h:27:1: + PARODD = 0001000 // termios-c_cflag.h:32:1: + PENDIN = 0040000 // termios-c_lflag.h:50:1: + TAB0 = 0000000 // termios-c_oflag.h:43:1: + TAB1 = 0004000 // termios-c_oflag.h:44:1: + TAB2 = 0010000 // termios-c_oflag.h:45:1: + TAB3 = 0014000 // termios-c_oflag.h:46:1: + TABDLY = 0014000 // termios-c_oflag.h:42:1: + TCIFLUSH = 0 // termios.h:70:1: + TCIOFF = 2 // termios.h:66:1: + TCIOFLUSH = 2 // termios.h:72:1: + TCION = 3 // termios.h:67:1: + TCOFLUSH = 1 // termios.h:71:1: + TCOOFF = 0 // termios.h:64:1: + TCOON = 1 // termios.h:65:1: + TCSADRAIN = 1 // termios-tcflow.h:25:1: + TCSAFLUSH = 2 // termios-tcflow.h:26:1: + TCSANOW = 0 // termios-tcflow.h:24:1: + TIOCSER_TEMT = 0x01 // termios.h:60:1: + TOSTOP = 0000400 // termios-c_lflag.h:35:1: + TTYDEF_CFLAG = 1440 // ttydefaults.h:49:1: + TTYDEF_IFLAG = 11554 // ttydefaults.h:46:1: + TTYDEF_LFLAG = 35355 // ttydefaults.h:48:1: + TTYDEF_OFLAG = 6149 // ttydefaults.h:47:1: + TTYDEF_SPEED = 13 // ttydefaults.h:50:1: + VDISCARD = 13 // termios-c_cc.h:37:1: + VEOF = 4 // termios-c_cc.h:28:1: + VEOL = 11 // termios-c_cc.h:35:1: + VEOL2 = 16 // termios-c_cc.h:40:1: + VERASE = 2 // termios-c_cc.h:26:1: + VINTR = 0 // termios-c_cc.h:24:1: + VKILL = 3 // termios-c_cc.h:27:1: + VLNEXT = 15 // termios-c_cc.h:39:1: + VMIN = 6 // termios-c_cc.h:30:1: + VQUIT = 1 // termios-c_cc.h:25:1: + VREPRINT = 12 // termios-c_cc.h:36:1: + VSTART = 8 // termios-c_cc.h:32:1: + VSTOP = 9 // termios-c_cc.h:33:1: + VSUSP = 10 // termios-c_cc.h:34:1: + VSWTC = 7 // termios-c_cc.h:31:1: + VT0 = 0000000 // termios-c_oflag.h:56:1: + VT1 = 0040000 // termios-c_oflag.h:57:1: + VTDLY = 0040000 // termios-c_oflag.h:55:1: + VTIME = 5 // termios-c_cc.h:29:1: + VWERASE = 14 // termios-c_cc.h:38:1: + XCASE = 0000004 // termios-c_lflag.h:27:1: + XTABS = 0014000 // termios-c_oflag.h:60:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_HAVE_STRUCT_TERMIOS_C_ISPEED = 1 // termios-struct.h:34:1: + X_HAVE_STRUCT_TERMIOS_C_OSPEED = 1 // termios-struct.h:35:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_TTYDEFAULTS_H_ = 0 // ttydefaults.h:41:1: + X_TERMIOS_H = 1 // termios.h:23:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 7.1-2 General Terminal Interface <termios.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// We need `pid_t'. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type Pid_t = X__pid_t /* termios.h:30:17 */ + +// Get the system-dependent definitions of `struct termios', `tcflag_t', +// `cc_t', `speed_t', and all the macros specifying the flag bits. +// termios type and macro definitions. Linux version. +// Copyright (C) 1993-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +type Cc_t = uint8 /* termios.h:23:23 */ +type Speed_t = uint32 /* termios.h:24:22 */ +type Tcflag_t = uint32 /* termios.h:25:22 */ + +// struct termios definition. Linux/generic version. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library. If not, see +// <https://www.gnu.org/licenses/>. + +type Termios = struct { + Fc_iflag Tcflag_t + Fc_oflag Tcflag_t + Fc_cflag Tcflag_t + Fc_lflag Tcflag_t + Fc_line Cc_t + Fc_cc [32]Cc_t + F__ccgo_pad1 [3]byte + Fc_ispeed Speed_t + Fc_ospeed Speed_t +} /* termios-struct.h:24:1 */ + +// - +// Copyright (c) 1982, 1986, 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. +// 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. +// +// @(#)ttydefaults.h 8.4 (Berkeley) 1/21/94 + +// System wide defaults for terminal state. Linux version. + +// Defaults on "first" open. + +// Control Character Defaults +// compat + +// PROTECTED INCLUSION ENDS HERE + +// #define TTYDEFCHARS to include an array of default control characters. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/time/capi_linux_loong64.go b/vendor/modernc.org/libc/time/capi_linux_loong64.go new file mode 100644 index 00000000..fef9264d --- /dev/null +++ b/vendor/modernc.org/libc/time/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_linux_amd64.go -pkgname time', DO NOT EDIT. + +package time + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/time/time_linux_loong64.go b/vendor/modernc.org/libc/time/time_linux_loong64.go new file mode 100644 index 00000000..e7f73f0d --- /dev/null +++ b/vendor/modernc.org/libc/time/time_linux_loong64.go @@ -0,0 +1,679 @@ +// Code generated by 'ccgo time/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o time/time_linux_amd64.go -pkgname time', DO NOT EDIT. + +package time + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + CLOCK_BOOTTIME = 7 // time.h:60:1: + CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1: + CLOCK_MONOTONIC = 1 // time.h:48:1: + CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1: + CLOCK_MONOTONIC_RAW = 4 // time.h:54:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1: + CLOCK_REALTIME = 0 // time.h:46:1: + CLOCK_REALTIME_ALARM = 8 // time.h:62:1: + CLOCK_REALTIME_COARSE = 5 // time.h:56:1: + CLOCK_TAI = 11 // time.h:66:1: + CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1: + TIMER_ABSTIME = 1 // time.h:69:1: + TIME_UTC = 1 // time.h:65:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TIME_H = 1 // time.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1: + X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_TIME_H = 1 // time.h:23:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This defines CLOCKS_PER_SEC, which is the number of processor clock +// ticks per second, and possibly a number of other constants. +// System-dependent timing definitions. Linux version. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <time.h> instead. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// ISO/IEC 9899:1999 7.23.1: Components of time +// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is +// the number per second of the value returned by the `clock' function. +// CAE XSH, Issue 4, Version 2: <time.h> +// The value of CLOCKS_PER_SEC is required to be 1 million on all +// XSI-conformant systems. + +// Identifier for system-wide realtime clock. +// Monotonic system-wide clock. +// High-resolution timer from the CPU. +// Thread-specific CPU-time clock. +// Monotonic system-wide clock, not adjusted for frequency scaling. +// Identifier for system-wide realtime clock, updated only on ticks. +// Monotonic system-wide clock, updated only on ticks. +// Monotonic system-wide clock that includes time spent in suspension. +// Like CLOCK_REALTIME but also wakes suspended system. +// Like CLOCK_BOOTTIME but also wakes suspended system. +// Like CLOCK_REALTIME but in International Atomic Time. + +// Flag to indicate time is absolute. + +// Many of the typedefs and structs whose official home is this header +// may also need to be defined by other headers. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// ISO C `broken-down time' structure. +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* struct_tm.h:7:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// i386/x86_64 are little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// NB: Include guard matches what <linux/time.h> uses. + +// POSIX.1b structure for timer start values and intervals. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } +} /* struct_itimerspec.h:8:1 */ + +type Pid_t = X__pid_t /* time.h:54:17 */ + +// Definition of locale_t. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/unistd/capi_linux_loong64.go b/vendor/modernc.org/libc/unistd/capi_linux_loong64.go new file mode 100644 index 00000000..4e94243c --- /dev/null +++ b/vendor/modernc.org/libc/unistd/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_linux_amd64.go -pkgname unistd', DO NOT EDIT. + +package unistd + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/unistd/unistd_linux_loong64.go b/vendor/modernc.org/libc/unistd/unistd_linux_loong64.go new file mode 100644 index 00000000..7a83d48f --- /dev/null +++ b/vendor/modernc.org/libc/unistd/unistd_linux_loong64.go @@ -0,0 +1,1592 @@ +// Code generated by 'ccgo unistd/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o unistd/unistd_linux_amd64.go -pkgname unistd', DO NOT EDIT. + +package unistd + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + F_LOCK = 1 // unistd.h:1074:1: + F_OK = 0 // unistd.h:284:1: + F_TEST = 3 // unistd.h:1076:1: + F_TLOCK = 2 // unistd.h:1075:1: + F_ULOCK = 0 // unistd.h:1073:1: + L_INCR = 1 // unistd.h:323:1: + L_SET = 0 // unistd.h:322:1: + L_XTND = 2 // unistd.h:324:1: + R_OK = 4 // unistd.h:281:1: + SEEK_CUR = 1 // unistd.h:312:1: + SEEK_END = 2 // unistd.h:313:1: + SEEK_SET = 0 // unistd.h:311:1: + STDERR_FILENO = 2 // unistd.h:212:1: + STDIN_FILENO = 0 // unistd.h:210:1: + STDOUT_FILENO = 1 // unistd.h:211:1: + W_OK = 2 // unistd.h:282:1: + X_OK = 1 // unistd.h:283:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_POSIX_OPT_H = 1 // posix_opt.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_GETOPT_CORE_H = 1 // getopt_core.h:21:1: + X_GETOPT_POSIX_H = 1 // getopt_posix.h:21:1: + X_LFS64_ASYNCHRONOUS_IO = 1 // posix_opt.h:117:1: + X_LFS64_LARGEFILE = 1 // posix_opt.h:121:1: + X_LFS64_STDIO = 1 // posix_opt.h:122:1: + X_LFS_ASYNCHRONOUS_IO = 1 // posix_opt.h:112:1: + X_LFS_LARGEFILE = 1 // posix_opt.h:120:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX2_CHAR_TERM = 200809 // posix_opt.h:179:1: + X_POSIX2_C_BIND = 200809 // unistd.h:74:1: + X_POSIX2_C_DEV = 200809 // unistd.h:78:1: + X_POSIX2_C_VERSION = 200809 // unistd.h:70:1: + X_POSIX2_LOCALEDEF = 200809 // unistd.h:86:1: + X_POSIX2_SW_DEV = 200809 // unistd.h:82:1: + X_POSIX2_VERSION = 200809 // unistd.h:67:1: + X_POSIX_ADVISORY_INFO = 200809 // posix_opt.h:170:1: + X_POSIX_ASYNCHRONOUS_IO = 200809 // posix_opt.h:109:1: + X_POSIX_ASYNC_IO = 1 // posix_opt.h:110:1: + X_POSIX_BARRIERS = 200809 // posix_opt.h:155:1: + X_POSIX_CHOWN_RESTRICTED = 0 // posix_opt.h:53:1: + X_POSIX_CLOCK_SELECTION = 200809 // posix_opt.h:167:1: + X_POSIX_CPUTIME = 0 // posix_opt.h:128:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_FSYNC = 200809 // posix_opt.h:38:1: + X_POSIX_IPV6 = 200809 // posix_opt.h:173:1: + X_POSIX_JOB_CONTROL = 1 // posix_opt.h:23:1: + X_POSIX_MAPPED_FILES = 200809 // posix_opt.h:41:1: + X_POSIX_MEMLOCK = 200809 // posix_opt.h:44:1: + X_POSIX_MEMLOCK_RANGE = 200809 // posix_opt.h:47:1: + X_POSIX_MEMORY_PROTECTION = 200809 // posix_opt.h:50:1: + X_POSIX_MESSAGE_PASSING = 200809 // posix_opt.h:158:1: + X_POSIX_MONOTONIC_CLOCK = 0 // posix_opt.h:164:1: + X_POSIX_NO_TRUNC = 1 // posix_opt.h:60:1: + X_POSIX_PRIORITIZED_IO = 200809 // posix_opt.h:114:1: + X_POSIX_PRIORITY_SCHEDULING = 200809 // posix_opt.h:32:1: + X_POSIX_RAW_SOCKETS = 200809 // posix_opt.h:176:1: + X_POSIX_READER_WRITER_LOCKS = 200809 // posix_opt.h:137:1: + X_POSIX_REALTIME_SIGNALS = 200809 // posix_opt.h:106:1: + X_POSIX_REENTRANT_FUNCTIONS = 1 // posix_opt.h:75:1: + X_POSIX_REGEXP = 1 // posix_opt.h:134:1: + X_POSIX_SAVED_IDS = 1 // posix_opt.h:26:1: + X_POSIX_SEMAPHORES = 200809 // posix_opt.h:103:1: + X_POSIX_SHARED_MEMORY_OBJECTS = 200809 // posix_opt.h:125:1: + X_POSIX_SHELL = 1 // posix_opt.h:140:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_POSIX_SPAWN = 200809 // posix_opt.h:149:1: + X_POSIX_SPIN_LOCKS = 200809 // posix_opt.h:146:1: + X_POSIX_SPORADIC_SERVER = -1 // posix_opt.h:182:1: + X_POSIX_SYNCHRONIZED_IO = 200809 // posix_opt.h:35:1: + X_POSIX_THREADS = 200809 // posix_opt.h:72:1: + X_POSIX_THREAD_ATTR_STACKADDR = 200809 // posix_opt.h:85:1: + X_POSIX_THREAD_ATTR_STACKSIZE = 200809 // posix_opt.h:82:1: + X_POSIX_THREAD_CPUTIME = 0 // posix_opt.h:131:1: + X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 // posix_opt.h:79:1: + X_POSIX_THREAD_PRIO_INHERIT = 200809 // posix_opt.h:88:1: + X_POSIX_THREAD_PRIO_PROTECT = 200809 // posix_opt.h:92:1: + X_POSIX_THREAD_PROCESS_SHARED = 200809 // posix_opt.h:161:1: + X_POSIX_THREAD_ROBUST_PRIO_INHERIT = 200809 // posix_opt.h:96:1: + X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 // posix_opt.h:99:1: + X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 // posix_opt.h:76:1: + X_POSIX_THREAD_SPORADIC_SERVER = -1 // posix_opt.h:183:1: + X_POSIX_TIMEOUTS = 200809 // posix_opt.h:143:1: + X_POSIX_TIMERS = 200809 // posix_opt.h:152:1: + X_POSIX_TRACE = -1 // posix_opt.h:186:1: + X_POSIX_TRACE_EVENT_FILTER = -1 // posix_opt.h:187:1: + X_POSIX_TRACE_INHERIT = -1 // posix_opt.h:188:1: + X_POSIX_TRACE_LOG = -1 // posix_opt.h:189:1: + X_POSIX_TYPED_MEMORY_OBJECTS = -1 // posix_opt.h:192:1: + X_POSIX_V6_LP64_OFF64 = 1 // environments.h:62:1: + X_POSIX_V6_LPBIG_OFFBIG = -1 // environments.h:57:1: + X_POSIX_V7_LP64_OFF64 = 1 // environments.h:61:1: + X_POSIX_V7_LPBIG_OFFBIG = -1 // environments.h:56:1: + X_POSIX_VDISABLE = 0 // posix_opt.h:57:1: + X_POSIX_VERSION = 200809 // unistd.h:34:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + X_UNISTD_H = 1 // unistd.h:23:1: + X_XBS5_LP64_OFF64 = 1 // environments.h:63:1: + X_XBS5_LPBIG_OFFBIG = -1 // environments.h:58:1: + X_XOPEN_ENH_I18N = 1 // unistd.h:112:1: + X_XOPEN_LEGACY = 1 // unistd.h:115:1: + X_XOPEN_REALTIME = 1 // posix_opt.h:63:1: + X_XOPEN_REALTIME_THREADS = 1 // posix_opt.h:66:1: + X_XOPEN_SHM = 1 // posix_opt.h:69:1: + X_XOPEN_UNIX = 1 // unistd.h:108:1: + X_XOPEN_VERSION = 700 // unistd.h:90:1: + X_XOPEN_XCU_VERSION = 4 // unistd.h:100:1: + X_XOPEN_XPG2 = 1 // unistd.h:103:1: + X_XOPEN_XPG3 = 1 // unistd.h:104:1: + X_XOPEN_XPG4 = 1 // unistd.h:105:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; +// the `_SC_*' symbols for the NAME argument to `sysconf'; +// and the `_CS_*' symbols for the NAME argument to `confstr'. +// `sysconf', `pathconf', and `confstr' NAME values. Generic version. +// Copyright (C) 1993-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Values for the NAME argument to `pathconf' and `fpathconf'. +const ( /* confname.h:24:1: */ + X_PC_LINK_MAX = 0 + X_PC_MAX_CANON = 1 + X_PC_MAX_INPUT = 2 + X_PC_NAME_MAX = 3 + X_PC_PATH_MAX = 4 + X_PC_PIPE_BUF = 5 + X_PC_CHOWN_RESTRICTED = 6 + X_PC_NO_TRUNC = 7 + X_PC_VDISABLE = 8 + X_PC_SYNC_IO = 9 + X_PC_ASYNC_IO = 10 + X_PC_PRIO_IO = 11 + X_PC_SOCK_MAXBUF = 12 + X_PC_FILESIZEBITS = 13 + X_PC_REC_INCR_XFER_SIZE = 14 + X_PC_REC_MAX_XFER_SIZE = 15 + X_PC_REC_MIN_XFER_SIZE = 16 + X_PC_REC_XFER_ALIGN = 17 + X_PC_ALLOC_SIZE_MIN = 18 + X_PC_SYMLINK_MAX = 19 + X_PC_2_SYMLINKS = 20 +) + +// Values for the NAME argument to `confstr'. +const ( /* confname.h:533:1: */ + X_CS_PATH = 0 // The default search path. + + X_CS_V6_WIDTH_RESTRICTED_ENVS = 1 + + X_CS_GNU_LIBC_VERSION = 2 + X_CS_GNU_LIBPTHREAD_VERSION = 3 + + X_CS_V5_WIDTH_RESTRICTED_ENVS = 4 + + X_CS_V7_WIDTH_RESTRICTED_ENVS = 5 + + X_CS_LFS_CFLAGS = 1000 + X_CS_LFS_LDFLAGS = 1001 + X_CS_LFS_LIBS = 1002 + X_CS_LFS_LINTFLAGS = 1003 + X_CS_LFS64_CFLAGS = 1004 + X_CS_LFS64_LDFLAGS = 1005 + X_CS_LFS64_LIBS = 1006 + X_CS_LFS64_LINTFLAGS = 1007 + + X_CS_XBS5_ILP32_OFF32_CFLAGS = 1100 + X_CS_XBS5_ILP32_OFF32_LDFLAGS = 1101 + X_CS_XBS5_ILP32_OFF32_LIBS = 1102 + X_CS_XBS5_ILP32_OFF32_LINTFLAGS = 1103 + X_CS_XBS5_ILP32_OFFBIG_CFLAGS = 1104 + X_CS_XBS5_ILP32_OFFBIG_LDFLAGS = 1105 + X_CS_XBS5_ILP32_OFFBIG_LIBS = 1106 + X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107 + X_CS_XBS5_LP64_OFF64_CFLAGS = 1108 + X_CS_XBS5_LP64_OFF64_LDFLAGS = 1109 + X_CS_XBS5_LP64_OFF64_LIBS = 1110 + X_CS_XBS5_LP64_OFF64_LINTFLAGS = 1111 + X_CS_XBS5_LPBIG_OFFBIG_CFLAGS = 1112 + X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 1113 + X_CS_XBS5_LPBIG_OFFBIG_LIBS = 1114 + X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115 + + X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116 + X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 1117 + X_CS_POSIX_V6_ILP32_OFF32_LIBS = 1118 + X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 1119 + X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 1120 + X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 1121 + X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 1122 + X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123 + X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 1124 + X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 1125 + X_CS_POSIX_V6_LP64_OFF64_LIBS = 1126 + X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 1127 + X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 1128 + X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 1129 + X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 1130 + X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131 + + X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 1132 + X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 1133 + X_CS_POSIX_V7_ILP32_OFF32_LIBS = 1134 + X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS = 1135 + X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 1136 + X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 1137 + X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 1138 + X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139 + X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 1140 + X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 1141 + X_CS_POSIX_V7_LP64_OFF64_LIBS = 1142 + X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS = 1143 + X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 1144 + X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 1145 + X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 1146 + X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147 + + X_CS_V6_ENV = 1148 + X_CS_V7_ENV = 1149 +) + +// Values for the argument to `sysconf'. +const ( /* confname.h:71:1: */ + X_SC_ARG_MAX = 0 + X_SC_CHILD_MAX = 1 + X_SC_CLK_TCK = 2 + X_SC_NGROUPS_MAX = 3 + X_SC_OPEN_MAX = 4 + X_SC_STREAM_MAX = 5 + X_SC_TZNAME_MAX = 6 + X_SC_JOB_CONTROL = 7 + X_SC_SAVED_IDS = 8 + X_SC_REALTIME_SIGNALS = 9 + X_SC_PRIORITY_SCHEDULING = 10 + X_SC_TIMERS = 11 + X_SC_ASYNCHRONOUS_IO = 12 + X_SC_PRIORITIZED_IO = 13 + X_SC_SYNCHRONIZED_IO = 14 + X_SC_FSYNC = 15 + X_SC_MAPPED_FILES = 16 + X_SC_MEMLOCK = 17 + X_SC_MEMLOCK_RANGE = 18 + X_SC_MEMORY_PROTECTION = 19 + X_SC_MESSAGE_PASSING = 20 + X_SC_SEMAPHORES = 21 + X_SC_SHARED_MEMORY_OBJECTS = 22 + X_SC_AIO_LISTIO_MAX = 23 + X_SC_AIO_MAX = 24 + X_SC_AIO_PRIO_DELTA_MAX = 25 + X_SC_DELAYTIMER_MAX = 26 + X_SC_MQ_OPEN_MAX = 27 + X_SC_MQ_PRIO_MAX = 28 + X_SC_VERSION = 29 + X_SC_PAGESIZE = 30 + X_SC_RTSIG_MAX = 31 + X_SC_SEM_NSEMS_MAX = 32 + X_SC_SEM_VALUE_MAX = 33 + X_SC_SIGQUEUE_MAX = 34 + X_SC_TIMER_MAX = 35 + + // Values for the argument to `sysconf' + // corresponding to _POSIX2_* symbols. + X_SC_BC_BASE_MAX = 36 + X_SC_BC_DIM_MAX = 37 + X_SC_BC_SCALE_MAX = 38 + X_SC_BC_STRING_MAX = 39 + X_SC_COLL_WEIGHTS_MAX = 40 + X_SC_EQUIV_CLASS_MAX = 41 + X_SC_EXPR_NEST_MAX = 42 + X_SC_LINE_MAX = 43 + X_SC_RE_DUP_MAX = 44 + X_SC_CHARCLASS_NAME_MAX = 45 + + X_SC_2_VERSION = 46 + X_SC_2_C_BIND = 47 + X_SC_2_C_DEV = 48 + X_SC_2_FORT_DEV = 49 + X_SC_2_FORT_RUN = 50 + X_SC_2_SW_DEV = 51 + X_SC_2_LOCALEDEF = 52 + + X_SC_PII = 53 + X_SC_PII_XTI = 54 + X_SC_PII_SOCKET = 55 + X_SC_PII_INTERNET = 56 + X_SC_PII_OSI = 57 + X_SC_POLL = 58 + X_SC_SELECT = 59 + X_SC_UIO_MAXIOV = 60 + X_SC_IOV_MAX = 60 + X_SC_PII_INTERNET_STREAM = 61 + X_SC_PII_INTERNET_DGRAM = 62 + X_SC_PII_OSI_COTS = 63 + X_SC_PII_OSI_CLTS = 64 + X_SC_PII_OSI_M = 65 + X_SC_T_IOV_MAX = 66 + + // Values according to POSIX 1003.1c (POSIX threads). + X_SC_THREADS = 67 + X_SC_THREAD_SAFE_FUNCTIONS = 68 + X_SC_GETGR_R_SIZE_MAX = 69 + X_SC_GETPW_R_SIZE_MAX = 70 + X_SC_LOGIN_NAME_MAX = 71 + X_SC_TTY_NAME_MAX = 72 + X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73 + X_SC_THREAD_KEYS_MAX = 74 + X_SC_THREAD_STACK_MIN = 75 + X_SC_THREAD_THREADS_MAX = 76 + X_SC_THREAD_ATTR_STACKADDR = 77 + X_SC_THREAD_ATTR_STACKSIZE = 78 + X_SC_THREAD_PRIORITY_SCHEDULING = 79 + X_SC_THREAD_PRIO_INHERIT = 80 + X_SC_THREAD_PRIO_PROTECT = 81 + X_SC_THREAD_PROCESS_SHARED = 82 + + X_SC_NPROCESSORS_CONF = 83 + X_SC_NPROCESSORS_ONLN = 84 + X_SC_PHYS_PAGES = 85 + X_SC_AVPHYS_PAGES = 86 + X_SC_ATEXIT_MAX = 87 + X_SC_PASS_MAX = 88 + + X_SC_XOPEN_VERSION = 89 + X_SC_XOPEN_XCU_VERSION = 90 + X_SC_XOPEN_UNIX = 91 + X_SC_XOPEN_CRYPT = 92 + X_SC_XOPEN_ENH_I18N = 93 + X_SC_XOPEN_SHM = 94 + + X_SC_2_CHAR_TERM = 95 + X_SC_2_C_VERSION = 96 + X_SC_2_UPE = 97 + + X_SC_XOPEN_XPG2 = 98 + X_SC_XOPEN_XPG3 = 99 + X_SC_XOPEN_XPG4 = 100 + + X_SC_CHAR_BIT = 101 + X_SC_CHAR_MAX = 102 + X_SC_CHAR_MIN = 103 + X_SC_INT_MAX = 104 + X_SC_INT_MIN = 105 + X_SC_LONG_BIT = 106 + X_SC_WORD_BIT = 107 + X_SC_MB_LEN_MAX = 108 + X_SC_NZERO = 109 + X_SC_SSIZE_MAX = 110 + X_SC_SCHAR_MAX = 111 + X_SC_SCHAR_MIN = 112 + X_SC_SHRT_MAX = 113 + X_SC_SHRT_MIN = 114 + X_SC_UCHAR_MAX = 115 + X_SC_UINT_MAX = 116 + X_SC_ULONG_MAX = 117 + X_SC_USHRT_MAX = 118 + + X_SC_NL_ARGMAX = 119 + X_SC_NL_LANGMAX = 120 + X_SC_NL_MSGMAX = 121 + X_SC_NL_NMAX = 122 + X_SC_NL_SETMAX = 123 + X_SC_NL_TEXTMAX = 124 + + X_SC_XBS5_ILP32_OFF32 = 125 + X_SC_XBS5_ILP32_OFFBIG = 126 + X_SC_XBS5_LP64_OFF64 = 127 + X_SC_XBS5_LPBIG_OFFBIG = 128 + + X_SC_XOPEN_LEGACY = 129 + X_SC_XOPEN_REALTIME = 130 + X_SC_XOPEN_REALTIME_THREADS = 131 + + X_SC_ADVISORY_INFO = 132 + X_SC_BARRIERS = 133 + X_SC_BASE = 134 + X_SC_C_LANG_SUPPORT = 135 + X_SC_C_LANG_SUPPORT_R = 136 + X_SC_CLOCK_SELECTION = 137 + X_SC_CPUTIME = 138 + X_SC_THREAD_CPUTIME = 139 + X_SC_DEVICE_IO = 140 + X_SC_DEVICE_SPECIFIC = 141 + X_SC_DEVICE_SPECIFIC_R = 142 + X_SC_FD_MGMT = 143 + X_SC_FIFO = 144 + X_SC_PIPE = 145 + X_SC_FILE_ATTRIBUTES = 146 + X_SC_FILE_LOCKING = 147 + X_SC_FILE_SYSTEM = 148 + X_SC_MONOTONIC_CLOCK = 149 + X_SC_MULTI_PROCESS = 150 + X_SC_SINGLE_PROCESS = 151 + X_SC_NETWORKING = 152 + X_SC_READER_WRITER_LOCKS = 153 + X_SC_SPIN_LOCKS = 154 + X_SC_REGEXP = 155 + X_SC_REGEX_VERSION = 156 + X_SC_SHELL = 157 + X_SC_SIGNALS = 158 + X_SC_SPAWN = 159 + X_SC_SPORADIC_SERVER = 160 + X_SC_THREAD_SPORADIC_SERVER = 161 + X_SC_SYSTEM_DATABASE = 162 + X_SC_SYSTEM_DATABASE_R = 163 + X_SC_TIMEOUTS = 164 + X_SC_TYPED_MEMORY_OBJECTS = 165 + X_SC_USER_GROUPS = 166 + X_SC_USER_GROUPS_R = 167 + X_SC_2_PBS = 168 + X_SC_2_PBS_ACCOUNTING = 169 + X_SC_2_PBS_LOCATE = 170 + X_SC_2_PBS_MESSAGE = 171 + X_SC_2_PBS_TRACK = 172 + X_SC_SYMLOOP_MAX = 173 + X_SC_STREAMS = 174 + X_SC_2_PBS_CHECKPOINT = 175 + + X_SC_V6_ILP32_OFF32 = 176 + X_SC_V6_ILP32_OFFBIG = 177 + X_SC_V6_LP64_OFF64 = 178 + X_SC_V6_LPBIG_OFFBIG = 179 + + X_SC_HOST_NAME_MAX = 180 + X_SC_TRACE = 181 + X_SC_TRACE_EVENT_FILTER = 182 + X_SC_TRACE_INHERIT = 183 + X_SC_TRACE_LOG = 184 + + X_SC_LEVEL1_ICACHE_SIZE = 185 + X_SC_LEVEL1_ICACHE_ASSOC = 186 + X_SC_LEVEL1_ICACHE_LINESIZE = 187 + X_SC_LEVEL1_DCACHE_SIZE = 188 + X_SC_LEVEL1_DCACHE_ASSOC = 189 + X_SC_LEVEL1_DCACHE_LINESIZE = 190 + X_SC_LEVEL2_CACHE_SIZE = 191 + X_SC_LEVEL2_CACHE_ASSOC = 192 + X_SC_LEVEL2_CACHE_LINESIZE = 193 + X_SC_LEVEL3_CACHE_SIZE = 194 + X_SC_LEVEL3_CACHE_ASSOC = 195 + X_SC_LEVEL3_CACHE_LINESIZE = 196 + X_SC_LEVEL4_CACHE_SIZE = 197 + X_SC_LEVEL4_CACHE_ASSOC = 198 + X_SC_LEVEL4_CACHE_LINESIZE = 199 + // Leave room here, maybe we need a few more cache levels some day. + + X_SC_IPV6 = 235 + X_SC_RAW_SOCKETS = 236 + + X_SC_V7_ILP32_OFF32 = 237 + X_SC_V7_ILP32_OFFBIG = 238 + X_SC_V7_LP64_OFF64 = 239 + X_SC_V7_LPBIG_OFFBIG = 240 + + X_SC_SS_REPL_MAX = 241 + + X_SC_TRACE_EVENT_NAME_MAX = 242 + X_SC_TRACE_NAME_MAX = 243 + X_SC_TRACE_SYS_MAX = 244 + X_SC_TRACE_USER_EVENT_MAX = 245 + + X_SC_XOPEN_STREAMS = 246 + + X_SC_THREAD_ROBUST_PRIO_INHERIT = 247 + X_SC_THREAD_ROBUST_PRIO_PROTECT = 248 +) + +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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.10 Symbolic Constants <unistd.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// These may be used to determine what facilities are present at compile time. +// Their values can be obtained at run time from `sysconf'. + +// POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. + +// These are not #ifdef __USE_POSIX2 because they are +// in the theoretically application-owned namespace. + +// The utilities on GNU systems also correspond to this version. + +// The utilities on GNU systems also correspond to this version. + +// This symbol was required until the 2001 edition of POSIX. + +// If defined, the implementation supports the +// C Language Bindings Option. + +// If defined, the implementation supports the +// C Language Development Utilities Option. + +// If defined, the implementation supports the +// Software Development Utilities Option. + +// If defined, the implementation supports the +// creation of locales with the localedef utility. + +// X/Open version number to which the library conforms. It is selectable. + +// Commands and utilities from XPG4 are available. + +// We are compatible with the old published standards as well. + +// The X/Open Unix extensions are available. + +// The enhanced internationalization capabilities according to XPG4.2 +// are present. + +// The legacy interfaces are also available. + +// Get values of POSIX options: +// +// If these symbols are defined, the corresponding features are +// always available. If not, they may be available sometimes. +// The current values can be obtained with `sysconf'. +// +// _POSIX_JOB_CONTROL Job control is supported. +// _POSIX_SAVED_IDS Processes have a saved set-user-ID +// and a saved set-group-ID. +// _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. +// _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. +// _POSIX_TIMERS POSIX.4 clocks and timers are supported. +// _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. +// _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. +// _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. +// _POSIX_FSYNC The fsync function is present. +// _POSIX_MAPPED_FILES Mapping of files to memory is supported. +// _POSIX_MEMLOCK Locking of all memory is supported. +// _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. +// _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. +// _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. +// _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. +// _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. +// _POSIX_THREADS POSIX.1c pthreads are supported. +// _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. +// _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. +// _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. +// _POSIX_THREAD_PRIORITY_SCHEDULING +// POSIX.1c thread execution scheduling supported. +// _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. +// _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. +// _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. +// _POSIX_PII Protocol-independent interfaces are supported. +// _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. +// _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. +// _POSIX_PII_INTERNET Internet family of protocols supported. +// _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. +// _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. +// _POSIX_PII_OSI ISO/OSI family of protocols supported. +// _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. +// _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. +// _POSIX_POLL Implementation supports `poll' function. +// _POSIX_SELECT Implementation supports `select' and `pselect'. +// +// _XOPEN_REALTIME X/Open realtime support is available. +// _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. +// _XOPEN_SHM Shared memory interface according to XPG4.2. +// +// _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit +// int, long, pointer, and off_t types. +// _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit +// int, long, and pointer and off_t with at least +// 64 bits. +// _XBS5_LP64_OFF64 Implementation provides environment with 32-bit +// int, and 64-bit long, pointer, and off_t types. +// _XBS5_LPBIG_OFFBIG Implementation provides environment with at +// least 32 bits int and long, pointer, and off_t +// with at least 64 bits. +// +// If any of these symbols is defined as -1, the corresponding option is not +// true for any file. If any is defined as other than -1, the corresponding +// option is true for all files. If a symbol is not defined at all, the value +// for a specific file can be obtained from `pathconf' and `fpathconf'. +// +// _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change +// the owner of a file. `chown' can only be used +// to change the group ID of a file to a group of +// which the calling process is a member. +// _POSIX_NO_TRUNC Pathname components longer than +// NAME_MAX generate an error. +// _POSIX_VDISABLE If defined, if the value of an element of the +// `c_cc' member of `struct termios' is +// _POSIX_VDISABLE, no character will have the +// effect associated with that element. +// _POSIX_SYNC_IO Synchronous I/O may be performed. +// _POSIX_ASYNC_IO Asynchronous I/O may be performed. +// _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. +// +// Support for the Large File Support interface is not generally available. +// If it is available the following constants are defined to one. +// _LFS64_LARGEFILE Low-level I/O supports large files. +// _LFS64_STDIO Standard I/O supports large files. +// + +// Define POSIX options for Linux. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; see the file COPYING.LIB. If +// not, see <https://www.gnu.org/licenses/>. + +// Job control is supported. + +// Processes have a saved set-user-ID and a saved set-group-ID. + +// Priority scheduling is not supported with the correct semantics, +// but GNU/Linux applications expect that the corresponding interfaces +// are available, even though the semantics do not meet the POSIX +// requirements. See glibc bug 14829. + +// Synchronizing file data is supported. + +// The fsync function is present. + +// Mapping of files to memory is supported. + +// Locking of all memory is supported. + +// Locking of ranges of memory is supported. + +// Setting of memory protections is supported. + +// Some filesystems allow all users to change file ownership. + +// `c_cc' member of 'struct termios' structure can be disabled by +// using the value _POSIX_VDISABLE. + +// Filenames are not silently truncated. + +// X/Open realtime support is available. + +// X/Open thread realtime support is available. + +// XPG4.2 shared memory is supported. + +// Tell we have POSIX threads. + +// We have the reentrant functions described in POSIX. + +// We provide priority scheduling for threads. + +// We support user-defined stack sizes. + +// We support user-defined stacks. + +// We support priority inheritence. + +// We support priority protection, though only for non-robust +// mutexes. + +// We support priority inheritence for robust mutexes. + +// We do not support priority protection for robust mutexes. + +// We support POSIX.1b semaphores. + +// Real-time signals are supported. + +// We support asynchronous I/O. +// Alternative name for Unix98. +// Support for prioritization is also available. + +// The LFS support in asynchronous I/O is also available. + +// The rest of the LFS is also available. + +// POSIX shared memory objects are implemented. + +// CPU-time clocks support needs to be checked at runtime. + +// Clock support in threads must be also checked at runtime. + +// GNU libc provides regular expression handling. + +// Reader/Writer locks are available. + +// We have a POSIX shell. + +// We support the Timeouts option. + +// We support spinlocks. + +// The `spawn' function family is supported. + +// We have POSIX timers. + +// The barrier functions are available. + +// POSIX message queues are available. + +// Thread process-shared synchronization is supported. + +// The monotonic clock might be available. + +// The clock selection interfaces are available. + +// Advisory information interfaces are available. + +// IPv6 support is available. + +// Raw socket support is available. + +// We have at least one terminal. + +// Neither process nor thread sporadic server interfaces is available. + +// trace.h is not available. + +// Typed memory objects are not available. + +// Get the environment definitions from Unix98. +// Copyright (C) 1999-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// This header should define the following symbols under the described +// situations. A value `1' means that the model is always supported, +// `-1' means it is never supported. Undefined means it cannot be +// statically decided. +// +// _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type +// _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type +// +// _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type +// _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type +// +// The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, +// _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, +// _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were +// used in previous versions of the Unix standard and are available +// only for compatibility. + +// Environments with 32-bit wide pointers are optionally provided. +// Therefore following macros aren't defined: +// # undef _POSIX_V7_ILP32_OFF32 +// # undef _POSIX_V7_ILP32_OFFBIG +// # undef _POSIX_V6_ILP32_OFF32 +// # undef _POSIX_V6_ILP32_OFFBIG +// # undef _XBS5_ILP32_OFF32 +// # undef _XBS5_ILP32_OFFBIG +// and users need to check at runtime. + +// We also have no use (for now) for an environment with bigger pointers +// and offsets. + +// By default we have 64-bit wide `long int', pointers and `off_t'. + +// Standard file descriptors. + +// All functions that are not declared anywhere else. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type Ssize_t = X__ssize_t /* unistd.h:220:19 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// The Single Unix specification says that some more types are +// +// available here. +type Gid_t = X__gid_t /* unistd.h:232:17 */ + +type Uid_t = X__uid_t /* unistd.h:237:17 */ + +type Off_t = X__off64_t /* unistd.h:245:19 */ + +type Useconds_t = X__useconds_t /* unistd.h:255:22 */ + +type Pid_t = X__pid_t /* unistd.h:260:17 */ + +type Intptr_t = X__intptr_t /* unistd.h:267:20 */ + +type Socklen_t = X__socklen_t /* unistd.h:274:21 */ + +// Define some macros helping to catch buffer overflows. + +// System-specific extensions. +// System-specific extensions of <unistd.h>, Linux version. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/utime/capi_linux_loong64.go b/vendor/modernc.org/libc/utime/capi_linux_loong64.go new file mode 100644 index 00000000..8f7c87f4 --- /dev/null +++ b/vendor/modernc.org/libc/utime/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_linux_amd64.go -pkgname utime', DO NOT EDIT. + +package utime + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/utime/utime_linux_loong64.go b/vendor/modernc.org/libc/utime/utime_linux_loong64.go new file mode 100644 index 00000000..9d673aca --- /dev/null +++ b/vendor/modernc.org/libc/utime/utime_linux_loong64.go @@ -0,0 +1,781 @@ +// Code generated by 'ccgo utime/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o utime/utime_linux_amd64.go -pkgname utime', DO NOT EDIT. + +package utime + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_UTIME_H = 1 // utime.h:23:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177: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 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 5.6.6 Set File Access and Modification Times <utime.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// Structure describing file times. +type Utimbuf = struct { + Factime X__time_t + Fmodtime X__time_t +} /* utime.h:36:1 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/uuid/uuid/capi_linux_loong64.go b/vendor/modernc.org/libc/uuid/uuid/capi_linux_loong64.go new file mode 100644 index 00000000..68331799 --- /dev/null +++ b/vendor/modernc.org/libc/uuid/uuid/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo uuid/uuid/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid/uuid_linux_amd64.go -pkgname uuid', DO NOT EDIT. + +package uuid + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/uuid/uuid/uuid_linux_loong64.go b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_loong64.go new file mode 100644 index 00000000..dfd5ff6a --- /dev/null +++ b/vendor/modernc.org/libc/uuid/uuid/uuid_linux_loong64.go @@ -0,0 +1,1986 @@ +// Code generated by 'ccgo uuid/uuid/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o uuid/uuid/uuid_linux_amd64.go -pkgname uuid', DO NOT EDIT. + +package uuid + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + BIG_ENDIAN = 4321 // endian.h:28:1: + BYTE_ORDER = 1234 // endian.h:30:1: + CLOCK_BOOTTIME = 7 // time.h:60:1: + CLOCK_BOOTTIME_ALARM = 9 // time.h:64:1: + CLOCK_MONOTONIC = 1 // time.h:48:1: + CLOCK_MONOTONIC_COARSE = 6 // time.h:58:1: + CLOCK_MONOTONIC_RAW = 4 // time.h:54:1: + CLOCK_PROCESS_CPUTIME_ID = 2 // time.h:50:1: + CLOCK_REALTIME = 0 // time.h:46:1: + CLOCK_REALTIME_ALARM = 8 // time.h:62:1: + CLOCK_REALTIME_COARSE = 5 // time.h:56:1: + CLOCK_TAI = 11 // time.h:66:1: + CLOCK_THREAD_CPUTIME_ID = 3 // time.h:52:1: + FD_SETSIZE = 1024 // select.h:73:1: + LITTLE_ENDIAN = 1234 // endian.h:27:1: + PDP_ENDIAN = 3412 // endian.h:29:1: + TIMER_ABSTIME = 1 // time.h:69:1: + TIME_UTC = 1 // time.h:65:1: + UUID_STR_LEN = 37 // uuid.h:65:1: + UUID_TYPE_DCE_MD5 = 3 // uuid.h:58:1: + UUID_TYPE_DCE_RANDOM = 4 // uuid.h:59:1: + UUID_TYPE_DCE_SECURITY = 2 // uuid.h:57:1: + UUID_TYPE_DCE_SHA1 = 5 // uuid.h:60:1: + UUID_TYPE_DCE_TIME = 1 // uuid.h:56:1: + UUID_TYPE_MASK = 0xf // uuid.h:63:1: + UUID_TYPE_SHIFT = 4 // uuid.h:62:1: + UUID_VARIANT_DCE = 1 // uuid.h:48:1: + UUID_VARIANT_MASK = 0x7 // uuid.h:53:1: + UUID_VARIANT_MICROSOFT = 2 // uuid.h:49:1: + UUID_VARIANT_NCS = 0 // uuid.h:47:1: + UUID_VARIANT_OTHER = 3 // uuid.h:50:1: + UUID_VARIANT_SHIFT = 5 // uuid.h:52:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_BYTESWAP_H = 1 // byteswap.h:24:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_PTHREADTYPES_ARCH_H = 1 // pthreadtypes-arch.h:19:1: + X_BITS_PTHREADTYPES_COMMON_H = 1 // pthreadtypes.h:20:1: + X_BITS_STDINT_INTN_H = 1 // stdint-intn.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TIME_H = 1 // time.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1: + X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1: + X_BITS_UINTN_IDENTITY_H = 1 // uintn-identity.h:24:1: + X_BSD_SIZE_T_ = 0 // stddef.h:189:1: + X_BSD_SIZE_T_DEFINED_ = 0 // stddef.h:192:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_ENDIAN_H = 1 // endian.h:19:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_GCC_SIZE_T = 0 // stddef.h:195:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_RWLOCK_INTERNAL_H = 0 // struct_rwlock.h:21:1: + X_SIZET_ = 0 // stddef.h:196:1: + X_SIZE_T = 0 // stddef.h:183:1: + X_SIZE_T_ = 0 // stddef.h:188:1: + X_SIZE_T_DECLARED = 0 // stddef.h:193:1: + X_SIZE_T_DEFINED = 0 // stddef.h:191:1: + X_SIZE_T_DEFINED_ = 0 // stddef.h:190:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_STRUCT_TIMESPEC = 1 // struct_timespec.h:3:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_SYS_SELECT_H = 1 // select.h:22:1: + X_SYS_SIZE_T_H = 0 // stddef.h:184:1: + X_SYS_TIME_H = 1 // time.h:19:1: + X_SYS_TYPES_H = 1 // types.h:23:1: + X_THREAD_MUTEX_INTERNAL_H = 1 // struct_mutex.h:20:1: + X_THREAD_SHARED_TYPES_H = 1 // thread-shared-types.h:20:1: + X_TIME_H = 1 // time.h:23:1: + X_T_SIZE = 0 // stddef.h:186:1: + X_T_SIZE_ = 0 // stddef.h:185:1: + X_UUID_UUID_H = 0 // uuid.h:36:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// Values for the first argument to `getitimer' and `setitimer'. +const ( /* time.h:89:1: */ + // Timers run in real time. + ITIMER_REAL = 0 + // Timers run only when the process is executing. + ITIMER_VIRTUAL = 1 + // Timers run when the process is executing and when + // the system is executing on behalf of the process. + ITIMER_PROF = 2 +) + +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 */ + +// Public include file for the UUID library +// +// Copyright (C) 1996, 1997, 1998 Theodore Ts'o. +// +// %Begin-Header% +// 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, and the entire permission notice in its entirety, +// including the disclaimer of warranties. +// 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. The name of the author may not be used to endorse or promote +// products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF +// WHICH ARE HEREBY 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 NOT ADVISED OF THE POSSIBILITY OF SUCH +// DAMAGE. +// %End-Header% + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +type U_char = X__u_char /* types.h:33:18 */ +type U_short = X__u_short /* types.h:34:19 */ +type U_int = X__u_int /* types.h:35:17 */ +type U_long = X__u_long /* types.h:36:18 */ +type Quad_t = X__quad_t /* types.h:37:18 */ +type U_quad_t = X__u_quad_t /* types.h:38:20 */ +type Fsid_t = X__fsid_t /* types.h:39:18 */ +type Loff_t = X__loff_t /* types.h:42:18 */ + +type Ino_t = X__ino64_t /* types.h:49:19 */ + +type Dev_t = X__dev_t /* types.h:59:17 */ + +type Gid_t = X__gid_t /* types.h:64:17 */ + +type Mode_t = X__mode_t /* types.h:69:18 */ + +type Nlink_t = X__nlink_t /* types.h:74:19 */ + +type Uid_t = X__uid_t /* types.h:79:17 */ + +type Off_t = X__off64_t /* types.h:87:19 */ + +type Pid_t = X__pid_t /* types.h:97:17 */ + +type Id_t = X__id_t /* types.h:103:16 */ + +type Ssize_t = X__ssize_t /* types.h:108:19 */ + +type Daddr_t = X__daddr_t /* types.h:114:19 */ +type Caddr_t = X__caddr_t /* types.h:115:19 */ + +type Key_t = X__key_t /* types.h:121:17 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `clock'. +type Clock_t = X__clock_t /* clock_t.h:7:19 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Clock ID used in clock and timer functions. +type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Returned by `time'. +type Time_t = X__time_t /* time_t.h:7:18 */ + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Timer ID returned by `timer_create'. +type Timer_t = X__timer_t /* timer_t.h:7:19 */ + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// Old compatibility names for C types. +type Ulong = uint64 /* types.h:148:27 */ +type Ushort = uint16 /* types.h:149:28 */ +type Uint = uint32 /* types.h:150:22 */ + +// These size-specific names are used by some of the inet code. + +// Define intN_t types. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ +type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ +type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ +type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ + +// These were defined by ISO C without the first `_'. +type U_int8_t = X__uint8_t /* types.h:158:19 */ +type U_int16_t = X__uint16_t /* types.h:159:20 */ +type U_int32_t = X__uint32_t /* types.h:160:20 */ +type U_int64_t = X__uint64_t /* types.h:161:20 */ + +type Register_t = int32 /* types.h:164:13 */ + +// It also defines `fd_set' and the FD_* macros for `select'. +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Get definition of needed basic types. +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Get __FD_* definitions. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Get sigset_t. + +type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ + +// A set of signals to be blocked, unblocked, or waited for. +type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ + +// Get definition of timer specification structures. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// A time value that is accurate to the nearest +// +// microsecond but also has a range of years. +type Timeval = struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t +} /* struct_timeval.h:8:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// POSIX.1b structure for a time value. This is like a `struct timeval' but +// +// has nanoseconds instead of microseconds. +type Timespec = struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t +} /* struct_timespec.h:10:1 */ + +type Suseconds_t = X__suseconds_t /* select.h:43:23 */ + +// The fd_set member is required to be an array of longs. +type X__fd_mask = int64 /* select.h:49:18 */ + +// Some versions of <linux/posix_types.h> define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ + +// Maximum number of file descriptors in `fd_set'. + +// Sometimes the fd_set member is assumed to have this type. +type Fd_mask = X__fd_mask /* select.h:77:19 */ + +// Define some inlines helping to catch common problems. + +type Blksize_t = X__blksize_t /* types.h:185:21 */ + +// Types from the Large File Support interface. +type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. +type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. +type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} /* thread-shared-types.h:49:9 */ + +// Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Arch-specific definitions. Each architecture must define the following +// macros to define the expected sizes of pthread data types: +// +// __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. +// __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. +// __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. +// __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. +// __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. +// __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. +// __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. +// __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. +// __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. +// +// The additional macro defines any constraint for the lock alignment +// inside the thread structures: +// +// __LOCK_ALIGNMENT - for internal lock/futex usage. +// +// Same idea but for the once locking primitive: +// +// __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. + +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Common definition of pthread_mutex_t. + +type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ + +type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ + +type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ + +// Arch-specific mutex definitions. A generic implementation is provided +// by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture +// can override it by defining: +// +// 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t +// definition). It should contains at least the internal members +// defined in the generic version. +// +// 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with +// atomic operations. +// +// 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. +// It should initialize the mutex internal flag. + +// x86 internal mutex struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_mutex_s = struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list X__pthread_list_t +} /* struct_mutex.h:22:1 */ + +// Arch-sepecific read-write lock definitions. A generic implementation is +// provided by struct_rwlock.h. If required, an architecture can override it +// by defining: +// +// 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). +// It should contain at least the internal members defined in the +// generic version. +// +// 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. +// It should initialize the rwlock internal type. + +// x86 internal rwlock struct definitions. +// Copyright (C) 2019-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +type X__pthread_rwlock_arch_t = struct { + F__readers uint32 + F__writers uint32 + F__wrphase_futex uint32 + F__writers_futex uint32 + F__pad3 uint32 + F__pad4 uint32 + F__cur_writer int32 + F__shared int32 + F__rwelision int8 + F__pad1 [7]uint8 + F__pad2 uint64 + F__flags uint32 + F__ccgo_pad1 [4]byte +} /* struct_rwlock.h:23:1 */ + +// Common definition of pthread_cond_t. + +type X__pthread_cond_s = struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +} /* thread-shared-types.h:92:1 */ + +// Thread identifiers. The structure of the attribute type is not +// +// exposed on purpose. +type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ + +// Data structures for mutex handling. The structure of the attribute +// +// type is not exposed on purpose. +type Pthread_mutexattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:36:3 */ + +// Data structure for condition variable handling. The structure of +// +// the attribute type is not exposed on purpose. +type Pthread_condattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:45:3 */ + +// Keys for thread-specific data +type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ + +// Once-only execution +type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ + +type Pthread_attr_t1 = struct { + F__ccgo_pad1 [0]uint64 + F__size [56]int8 +} /* pthreadtypes.h:56:1 */ + +type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ + +type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ + +// Data structure for reader-writer lock variable handling. The +// +// structure of the attribute type is deliberately not exposed. +type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ + +type Pthread_rwlockattr_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [8]int8 +} /* pthreadtypes.h:97:3 */ + +// POSIX spinlock data type. +type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ + +// POSIX barriers data type. The structure of the type is +// +// deliberately not exposed. +type Pthread_barrier_t = struct { + F__ccgo_pad1 [0]uint64 + F__size [32]int8 +} /* pthreadtypes.h:112:3 */ + +type Pthread_barrierattr_t = struct { + F__ccgo_pad1 [0]uint32 + F__size [4]int8 +} /* pthreadtypes.h:118:3 */ + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// `fd_set' type and related macros, and `select'/`pselect' declarations. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> + +// Structure crudely representing a timezone. +// +// This is obsolete and should never be used. +type Timezone = struct { + Ftz_minuteswest int32 + Ftz_dsttime int32 +} /* time.h:52:1 */ + +// Type of the second argument to `getitimer' and +// +// the second and third arguments `setitimer'. +type Itimerval = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_usec X__suseconds_t + } +} /* time.h:105:1 */ + +type X__itimer_which_t = int32 /* time.h:118:13 */ + +// Convenience macros for operations on timevals. +// NOTE: `timercmp' does not work for >= or <=. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.23 Date and time <time.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Copyright (C) 1989-2020 Free Software Foundation, Inc. +// +// This file is part of GCC. +// +// GCC is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3, or (at your option) +// any later version. +// +// GCC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. +// +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +// ISO C Standard: 7.17 Common definitions <stddef.h> + +// Any one of these symbols __need_* means that GNU libc +// wants us just to define one data type. So don't define +// the symbols that indicate this file's entire job has been done. + +// This avoids lossage on SunOS but only if stdtypes.h comes first. +// There's no way to win with the other order! Sun lossage. + +// Sequent's header files use _PTRDIFF_T_ in some conflicting way. +// Just ignore it. + +// On VxWorks, <type/vxTypesBase.h> may have defined macros like +// _TYPE_size_t which will typedef size_t. fixincludes patched the +// vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is +// not defined, and so that defining this macro defines _GCC_SIZE_T. +// If we find that the macros are still defined at this point, we must +// invoke them so that the type is defined as expected. + +// In case nobody has defined these types, but we aren't running under +// GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and +// __WCHAR_TYPE__ have reasonable values. This can happen if the +// parts of GCC is compiled by an older compiler, that actually +// include gstddef.h, such as collect2. + +// Signed type of difference of two pointers. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Unsigned type of `sizeof' something. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// Wide character type. +// Locale-writers should change this as necessary to +// be big enough to hold unique values not between 0 and 127, +// and not (wchar_t) -1, for each defined multibyte character. + +// Define this type if we are doing the whole job, +// or if we want this type in particular. + +// A null pointer constant. + +// This defines CLOCKS_PER_SEC, which is the number of processor clock +// ticks per second, and possibly a number of other constants. +// System-dependent timing definitions. Linux version. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <time.h> instead. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// ISO/IEC 9899:1999 7.23.1: Components of time +// The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is +// the number per second of the value returned by the `clock' function. +// CAE XSH, Issue 4, Version 2: <time.h> +// The value of CLOCKS_PER_SEC is required to be 1 million on all +// XSI-conformant systems. + +// Identifier for system-wide realtime clock. +// Monotonic system-wide clock. +// High-resolution timer from the CPU. +// Thread-specific CPU-time clock. +// Monotonic system-wide clock, not adjusted for frequency scaling. +// Identifier for system-wide realtime clock, updated only on ticks. +// Monotonic system-wide clock, updated only on ticks. +// Monotonic system-wide clock that includes time spent in suspension. +// Like CLOCK_REALTIME but also wakes suspended system. +// Like CLOCK_BOOTTIME but also wakes suspended system. +// Like CLOCK_REALTIME but in International Atomic Time. + +// Flag to indicate time is absolute. + +// Many of the typedefs and structs whose official home is this header +// may also need to be defined by other headers. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// ISO C `broken-down time' structure. +type Tm = struct { + Ftm_sec int32 + Ftm_min int32 + Ftm_hour int32 + Ftm_mday int32 + Ftm_mon int32 + Ftm_year int32 + Ftm_wday int32 + Ftm_yday int32 + Ftm_isdst int32 + F__ccgo_pad1 [4]byte + Ftm_gmtoff int64 + Ftm_zone uintptr +} /* struct_tm.h:7:1 */ + +// NB: Include guard matches what <linux/time.h> uses. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// NB: Include guard matches what <linux/time.h> uses. + +// POSIX.1b structure for timer start values and intervals. +type Itimerspec = struct { + Fit_interval struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } + Fit_value struct { + Ftv_sec X__time_t + Ftv_nsec X__syscall_slong_t + } +} /* struct_itimerspec.h:8:1 */ + +// Definition of locale_t. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +type Uuid_t = [16]uint8 /* uuid.h:44:23 */ + +var _ int8 /* gen.c:2:13: */ diff --git a/vendor/modernc.org/libc/wctype/capi_linux_loong64.go b/vendor/modernc.org/libc/wctype/capi_linux_loong64.go new file mode 100644 index 00000000..e1138ccd --- /dev/null +++ b/vendor/modernc.org/libc/wctype/capi_linux_loong64.go @@ -0,0 +1,5 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path -export-defines -export-enums -export-externs X -export-fields F -export-structs -export-typedefs -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_linux_amd64.go -pkgname wctype', DO NOT EDIT. + +package wctype + +var CAPI = map[string]struct{}{} diff --git a/vendor/modernc.org/libc/wctype/wctype_linux_loong64.go b/vendor/modernc.org/libc/wctype/wctype_linux_loong64.go new file mode 100644 index 00000000..a36ea7c5 --- /dev/null +++ b/vendor/modernc.org/libc/wctype/wctype_linux_loong64.go @@ -0,0 +1,953 @@ +// Code generated by 'ccgo wctype/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o wctype/wctype_linux_amd64.go -pkgname wctype', DO NOT EDIT. + +package wctype + +import ( + "math" + "reflect" + "sync/atomic" + "unsafe" +) + +var _ = math.Pi +var _ reflect.Kind +var _ atomic.Value +var _ unsafe.Pointer + +const ( + WEOF = 4294967295 // wctype.h:33:1: + X_ATFILE_SOURCE = 1 // features.h:342:1: + X_BITS_ENDIANNESS_H = 1 // endianness.h:2:1: + X_BITS_ENDIAN_H = 1 // endian.h:20:1: + X_BITS_TIME64_H = 1 // time64.h:24:1: + X_BITS_TYPESIZES_H = 1 // typesizes.h:24:1: + X_BITS_TYPES_H = 1 // types.h:24:1: + X_BITS_TYPES_LOCALE_T_H = 1 // locale_t.h:20:1: + X_BITS_TYPES___LOCALE_T_H = 1 // __locale_t.h:21:1: + X_BITS_WCTYPE_WCHAR_H = 1 // wctype-wchar.h:24:1: + X_DEFAULT_SOURCE = 1 // features.h:227:1: + X_FEATURES_H = 1 // features.h:19:1: + X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: + X_LP64 = 1 // <predefined>:284:1: + X_POSIX_C_SOURCE = 200809 // features.h:281:1: + X_POSIX_SOURCE = 1 // features.h:279:1: + X_STDC_PREDEF_H = 1 // <predefined>:162:1: + X_SYS_CDEFS_H = 1 // cdefs.h:19:1: + X_WCTYPE_H = 1 // wctype.h:24:1: + X_WINT_T = 1 // wint_t.h:10:1: + Linux = 1 // <predefined>:231:1: + Unix = 1 // <predefined>:177:1: +) + +// The characteristics are stored always in network byte order (big +// endian). We define the bit value interpretations here dependent on the +// machine's byte order. + +// Endian macros for string.h functions +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// Definitions for byte order, according to significance of bytes, +// from low addresses to high addresses. The value is what you get by +// putting '4' in the most significant byte, '3' in the second most +// significant byte, '2' in the second least significant byte, and '1' +// in the least significant byte, and then writing down one digit for +// each byte, starting with the byte at the lowest address at the left, +// and proceeding to the byte with the highest address at the right. + +// This file defines `__BYTE_ORDER' for the particular machine. + +// i386/x86_64 are little-endian. + +// Some machines may need to use a different endianness for floating point +// values. + +const ( /* wctype-wchar.h:56:1: */ + X__ISwupper = 0 // UPPERCASE. + X__ISwlower = 1 // lowercase. + X__ISwalpha = 2 // Alphabetic. + X__ISwdigit = 3 // Numeric. + X__ISwxdigit = 4 // Hexadecimal numeric. + X__ISwspace = 5 // Whitespace. + X__ISwprint = 6 // Printing. + X__ISwgraph = 7 // Graphical. + X__ISwblank = 8 // Blank (usually SPC and TAB). + X__ISwcntrl = 9 // Control character. + X__ISwpunct = 10 // Punctuation. + X__ISwalnum = 11 // Alphanumeric. + + X_ISwupper = 16777216 // UPPERCASE. + X_ISwlower = 33554432 // lowercase. + X_ISwalpha = 67108864 // Alphabetic. + X_ISwdigit = 134217728 // Numeric. + X_ISwxdigit = 268435456 // Hexadecimal numeric. + X_ISwspace = 536870912 // Whitespace. + X_ISwprint = 1073741824 // Printing. + X_ISwgraph = -2147483648 // Graphical. + X_ISwblank = 65536 // Blank (usually SPC and TAB). + X_ISwcntrl = 131072 // Control character. + X_ISwpunct = 262144 // Punctuation. + X_ISwalnum = 524288 +) + +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 */ + +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.25 +// Wide character classification and mapping utilities <wctype.h> + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C2X extension. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// GNU formerly extended the scanf functions with modified format +// specifiers %as, %aS, and %a[...] that allocate a buffer for the +// input using malloc. This extension conflicts with ISO C99, which +// defines %a as a standalone format specifier that reads a floating- +// point number; moreover, POSIX.1-2008 provides the same feature +// using the modifier letter 'm' instead (%ms, %mS, %m[...]). +// +// We now follow C99 unless GNU extensions are active and the compiler +// is specifically in C89 or C++98 mode (strict or not). For +// instance, with GCC, -std=gnu11 will have C99-compliant scanf with +// or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the +// old extension. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// All functions, except those with callbacks or those that +// synchronize memory, are leaf functions. + +// GCC can always grok prototypes. For C++ programs we add throw() +// to help it optimize the function calls. But this works only with +// gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions +// as non-throwing using a function attribute since programs can use +// the -fexceptions options for C code as well. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// +// #elif __SOME_OTHER_COMPILER__ +// +// # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. +// The Linux kernel defines __always_inline in stddef.h (283d7573), and +// it conflicts with this definition. Therefore undefine it first to +// allow either header to be included first. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Describes a char array whose address can safely be passed as the first +// argument to strncpy and strncat, as the char array is not necessarily +// a NUL-terminated string. + +// Undefine (also defined in libc-symbols.h). +// Copies attributes from the declaration or type referenced by +// the argument. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// Copyright (C) 1991-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Bit size of the time_t type at glibc build time, x86-64 and x32 case. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// For others, time size is word size. + +// Convenience types. +type X__u_char = uint8 /* types.h:31:23 */ +type X__u_short = uint16 /* types.h:32:28 */ +type X__u_int = uint32 /* types.h:33:22 */ +type X__u_long = uint64 /* types.h:34:27 */ + +// Fixed-size types, underlying types depend on word size and compiler. +type X__int8_t = int8 /* types.h:37:21 */ +type X__uint8_t = uint8 /* types.h:38:23 */ +type X__int16_t = int16 /* types.h:39:26 */ +type X__uint16_t = uint16 /* types.h:40:28 */ +type X__int32_t = int32 /* types.h:41:20 */ +type X__uint32_t = uint32 /* types.h:42:22 */ +type X__int64_t = int64 /* types.h:44:25 */ +type X__uint64_t = uint64 /* types.h:45:27 */ + +// Smallest types with at least a given width. +type X__int_least8_t = X__int8_t /* types.h:52:18 */ +type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ +type X__int_least16_t = X__int16_t /* types.h:54:19 */ +type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ +type X__int_least32_t = X__int32_t /* types.h:56:19 */ +type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ +type X__int_least64_t = X__int64_t /* types.h:58:19 */ +type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ + +// quad_t is also 64 bits. +type X__quad_t = int64 /* types.h:63:18 */ +type X__u_quad_t = uint64 /* types.h:64:27 */ + +// Largest integral types. +type X__intmax_t = int64 /* types.h:72:18 */ +type X__uintmax_t = uint64 /* types.h:73:27 */ + +// The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE +// macros for each of the OS types we define below. The definitions +// of those macros must use the following macros for underlying types. +// We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned +// variants of each of the following integer types on this machine. +// +// 16 -- "natural" 16-bit type (always short) +// 32 -- "natural" 32-bit type (always int) +// 64 -- "natural" 64-bit type (long or long long) +// LONG32 -- 32-bit type, traditionally long +// QUAD -- 64-bit type, traditionally long long +// WORD -- natural type of __WORDSIZE bits (int or long) +// LONGWORD -- type of __WORDSIZE bits, traditionally long +// +// We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the +// conventional uses of `long' or `long long' type modifiers match the +// types we define, even when a less-adorned type would be the same size. +// This matters for (somewhat) portably writing printf/scanf formats for +// these types, where using the appropriate l or ll format modifiers can +// make the typedefs and the formats match up across all GNU platforms. If +// we used `long' when it's 64 bits where `long long' is expected, then the +// compiler would warn about the formats not matching the argument types, +// and the programmer changing them to shut up the compiler would break the +// program's portability. +// +// Here we assume what is presently the case in all the GCC configurations +// we support: long long is always 64 bits, long is always word/address size, +// and int is always 32 bits. + +// No need to mark the typedef with __extension__. +// bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. +// Copyright (C) 2012-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// See <bits/types.h> for the meaning of these macros. This file exists so +// that <bits/types.h> need not vary across different GNU platforms. + +// X32 kernel interface is 64-bit. + +// Tell the libc code that off_t and off64_t are actually the same type +// for all ABI purposes, even if possibly expressed as different base types +// for C type-checking purposes. + +// Same for ino_t and ino64_t. + +// And for __rlim_t and __rlim64_t. + +// And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. + +// Number of descriptors that can fit in an `fd_set'. + +// bits/time64.h -- underlying types for __time64_t. Generic version. +// Copyright (C) 2018-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Define __TIME64_T_TYPE so that it is always a 64-bit type. + +// If we already have 64-bit time type then use it. + +type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. +type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. +type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. +type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. +type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). +type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. +type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. +type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. +type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). +type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. +type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. +type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. +type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. +type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). +type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. +type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. +type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. +type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. + +type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. +type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. + +// Clock ID used in clock and timer functions. +type X__clockid_t = int32 /* types.h:168:29 */ + +// Timer ID returned by `timer_create'. +type X__timer_t = uintptr /* types.h:171:12 */ + +// Type to represent block size. +type X__blksize_t = int64 /* types.h:174:29 */ + +// Types from the Large File Support interface. + +// Type to count number of disk blocks. +type X__blkcnt_t = int64 /* types.h:179:28 */ +type X__blkcnt64_t = int64 /* types.h:180:30 */ + +// Type to count file system blocks. +type X__fsblkcnt_t = uint64 /* types.h:183:30 */ +type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ + +// Type to count file system nodes. +type X__fsfilcnt_t = uint64 /* types.h:187:30 */ +type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ + +// Type of miscellaneous file system fields. +type X__fsword_t = int64 /* types.h:191:28 */ + +type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. + +// Signed long type used in system calls. +type X__syscall_slong_t = int64 /* types.h:196:33 */ +// Unsigned long type used in system calls. +type X__syscall_ulong_t = uint64 /* types.h:198:33 */ + +// These few don't really vary by system, they always correspond +// +// to one of the other defined types. +type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). +type X__caddr_t = uintptr /* types.h:203:14 */ + +// Duplicates info from stdint.h but this is used in unistd.h. +type X__intptr_t = int64 /* types.h:206:25 */ + +// Duplicate info from sys/socket.h. +type X__socklen_t = uint32 /* types.h:209:23 */ + +// C99: An integer type that can be accessed as an atomic entity, +// +// even in the presence of asynchronous interrupts. +// It is not currently necessary for this to be machine-specific. +type X__sig_atomic_t = int32 /* types.h:214:13 */ + +// Seconds since the Epoch, visible to user code when time_t is too +// narrow only for consistency with the old way of widening too-narrow +// types. User code should never use __time64_t. + +// Some versions of stddef.h provide wint_t, even though neither the +// C nor C++ standards, nor POSIX, specifies this. We assume that +// stddef.h will define the macro _WINT_T if and only if it provides +// wint_t, and conversely, that it will avoid providing wint_t if +// _WINT_T is already defined. + +// Integral type unchanged by default argument promotions that can +// hold any value corresponding to members of the extended character +// set, as well as at least one value that does not correspond to any +// member of the extended character set. + +type Wint_t = uint32 /* wint_t.h:20:23 */ + +// Constant expression of type `wint_t' whose value does not correspond +// to any member of the extended character set. + +// Some definitions from this header also appear in <wchar.h> in +// Unix98 mode. +// Copyright (C) 1996-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.25 +// Wide character classification and mapping utilities <wctype.h> + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Never include this file directly; use <sys/types.h> instead. + +// The definitions in this header are specified to appear in <wctype.h> +// in ISO C99, but in <wchar.h> in Unix98. _GNU_SOURCE follows C99. + +// Scalar type that can hold values which represent locale-specific +// +// character classifications. +type Wctype_t = uint64 /* wctype-wchar.h:38:27 */ + +// Extensible wide-character mapping functions: 7.15.3.2. + +// Scalar type that can hold values which represent locale-specific +// +// character mappings. +type Wctrans_t = uintptr /* wctype.h:48:25 */ + +// POSIX.1-2008 extended locale interface (see locale.h). +// Definition of locale_t. +// Copyright (C) 2017-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// Definition of struct __locale_struct and __locale_t. +// Copyright (C) 1997-2020 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <https://www.gnu.org/licenses/>. + +// POSIX.1-2008: the locale_t type, representing a locale context +// (implementation-namespace version). This type should be treated +// as opaque by applications; some details are exposed for the sake of +// efficiency in e.g. ctype functions. + +type X__locale_struct = struct { + F__locales [13]uintptr + F__ctype_b uintptr + F__ctype_tolower uintptr + F__ctype_toupper uintptr + F__names [13]uintptr +} /* __locale_t.h:28:1 */ + +type X__locale_t = uintptr /* __locale_t.h:42:32 */ + +type Locale_t = X__locale_t /* locale_t.h:24:20 */ + +var _ int8 /* gen.c:2:13: */ |