diff options
author | Jan Mercl <0xjnml@gmail.com> | 2020-08-04 17:15:32 +0200 |
---|---|---|
committer | Jan Mercl <0xjnml@gmail.com> | 2020-08-04 17:15:32 +0200 |
commit | 43c865ce5d35eb463e4a05f65e8e388364480711 (patch) | |
tree | cf07107d933ff0381f6682cad8fb3986f16d3b2f /lib/sqlite_linux_amd64.go | |
parent | 1349149922b282e74a77c7d51c316d883fba5b89 (diff) |
regenerate and update dependencies
Diffstat (limited to 'lib/sqlite_linux_amd64.go')
-rw-r--r-- | lib/sqlite_linux_amd64.go | 1497 |
1 files changed, 1245 insertions, 252 deletions
diff --git a/lib/sqlite_linux_amd64.go b/lib/sqlite_linux_amd64.go index 3c40c14..17cce2a 100644 --- a/lib/sqlite_linux_amd64.go +++ b/lib/sqlite_linux_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -ccgo-export-defines -ccgo-export-externs X -ccgo-export-fields F -ccgo-export-typedefs -ccgo-pkgname sqlite3 -o lib/sqlite_linux_amd64.go testdata/sqlite-amalgamation-3320300/sqlite3.c -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_DQS=0 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_MAX_MMAP_SIZE=8589934592 -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_NO_SYNC=1 -DSQLITE_OS_UNIX=1 -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -ccgo-long-double-is-double', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -ccgo-export-defines -ccgo-export-enums -ccgo-export-externs X -ccgo-export-fields F -ccgo-export-typedefs -ccgo-pkgname sqlite3 -o lib/sqlite_linux_amd64.go testdata/sqlite-amalgamation-3320300/sqlite3.c -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_DQS=0 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_MAX_MMAP_SIZE=8589934592 -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_NO_SYNC=1 -DSQLITE_OS_UNIX=1 -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -ccgo-long-double-is-double', DO NOT EDIT. package sqlite3 @@ -366,11 +366,11 @@ const ( FOPEN_MAX = 16 FP_ILOGB0 = -2147483648 FP_ILOGBNAN = -2147483648 - FP_INFINITE = 1 - FP_NAN = 0 - FP_NORMAL = 4 - FP_SUBNORMAL = 3 - FP_ZERO = 2 + FP_INFINITE1 = 1 + FP_NAN1 = 0 + FP_NORMAL1 = 4 + FP_SUBNORMAL1 = 3 + FP_ZERO1 = 2 FTS5_TOKENIZE_AUX = 0x0008 FTS5_TOKENIZE_DOCUMENT = 0x0004 FTS5_TOKENIZE_PREFIX = 0x0002 @@ -2220,206 +2220,206 @@ const ( YY_SHIFT_COUNT = 550 YY_SHIFT_MAX = 1948 YY_SHIFT_MIN = 0 - _ANSI_STDARG_H_ = 0 - _ANSI_STDDEF_H = 0 - _ASM_GENERIC_ERRNO_BASE_H = 0 - _ASM_GENERIC_ERRNO_H = 0 - _ASM_GENERIC_IOCTL_H = 0 - _ASSERT_H = 1 - _BITS_ERRNO_H = 1 - _BITS_FLOATN_COMMON_H = 0 - _BITS_FLOATN_H = 0 - _BITS_LIBM_SIMD_DECL_STUBS_H = 1 - _BITS_POSIX_OPT_H = 1 - _BITS_PTHREADTYPES_ARCH_H = 1 - _BITS_PTHREADTYPES_COMMON_H = 1 - _BITS_STAT_H = 1 - _BITS_STDINT_INTN_H = 1 - _BITS_STDIO_LIM_H = 1 - _BITS_TIME_H = 1 - _BITS_TYPESIZES_H = 1 - _BITS_TYPES_H = 1 - _BSD_PTRDIFF_T_ = 0 - _BSD_SIZE_T_ = 0 - _BSD_SIZE_T_DEFINED_ = 0 - _DLFCN_H = 1 - _ERRNO_H = 1 - _FCNTL_H = 1 - _FEATURES_H = 1 - _FILE_OFFSET_BITS = 64 - _FTS5_H = 0 - _FTSINT_H = 0 - _GCC_MAX_ALIGN_T = 0 - _GCC_PTRDIFF_T = 0 - _GCC_SIZE_T = 0 - _GCC_WCHAR_T = 0 - _GETOPT_CORE_H = 1 - _GETOPT_POSIX_H = 1 - _IOC_DIRBITS = 2 - _IOC_DIRMASK = 3 - _IOC_DIRSHIFT = 30 - _IOC_NONE = 0 - _IOC_NRBITS = 8 - _IOC_NRMASK = 255 - _IOC_NRSHIFT = 0 - _IOC_READ = 2 - _IOC_SIZEBITS = 14 - _IOC_SIZEMASK = 16383 - _IOC_SIZESHIFT = 16 - _IOC_TYPEBITS = 8 - _IOC_TYPEMASK = 255 - _IOC_TYPESHIFT = 8 - _IOC_WRITE = 1 - _IOFBF = 0 - _IOLBF = 1 - _IONBF = 2 - _IO_EOF_SEEN = 0x0010 - _IO_ERR_SEEN = 0x0020 - _IO_USER_LOCK = 0x8000 - _LARGEFILE_SOURCE = 1 - _LARGE_FILE = 1 - _LFS64_ASYNCHRONOUS_IO = 1 - _LFS64_LARGEFILE = 1 - _LFS64_STDIO = 1 - _LFS_ASYNCHRONOUS_IO = 1 - _LFS_LARGEFILE = 1 - _LINUX_IOCTL_H = 0 - _LP64 = 1 - _MATH_H = 1 - _MKNOD_VER = 0 - _MKNOD_VER_LINUX = 0 - _OS_COMMON_H_ = 0 - _POSIX2_CHAR_TERM = 200809 - _POSIX2_C_BIND = 200112 - _POSIX2_C_DEV = 200112 - _POSIX2_C_VERSION = 200112 - _POSIX2_LOCALEDEF = 200112 - _POSIX2_SW_DEV = 200112 - _POSIX2_VERSION = 200112 - _POSIX_ADVISORY_INFO = 200809 - _POSIX_ASYNCHRONOUS_IO = 200809 - _POSIX_ASYNC_IO = 1 - _POSIX_BARRIERS = 200809 - _POSIX_CHOWN_RESTRICTED = 0 - _POSIX_CLOCK_SELECTION = 200809 - _POSIX_CPUTIME = 0 - _POSIX_C_SOURCE = 200112 - _POSIX_FSYNC = 200809 - _POSIX_IPV6 = 200809 - _POSIX_JOB_CONTROL = 1 - _POSIX_MAPPED_FILES = 200809 - _POSIX_MEMLOCK = 200809 - _POSIX_MEMLOCK_RANGE = 200809 - _POSIX_MEMORY_PROTECTION = 200809 - _POSIX_MESSAGE_PASSING = 200809 - _POSIX_MONOTONIC_CLOCK = 0 - _POSIX_NO_TRUNC = 1 - _POSIX_PRIORITIZED_IO = 200809 - _POSIX_PRIORITY_SCHEDULING = 200809 - _POSIX_RAW_SOCKETS = 200809 - _POSIX_READER_WRITER_LOCKS = 200809 - _POSIX_REALTIME_SIGNALS = 200809 - _POSIX_REENTRANT_FUNCTIONS = 1 - _POSIX_REGEXP = 1 - _POSIX_SAVED_IDS = 1 - _POSIX_SEMAPHORES = 200809 - _POSIX_SHARED_MEMORY_OBJECTS = 200809 - _POSIX_SHELL = 1 - _POSIX_SOURCE = 1 - _POSIX_SPAWN = 200809 - _POSIX_SPIN_LOCKS = 200809 - _POSIX_SPORADIC_SERVER = -1 - _POSIX_SYNCHRONIZED_IO = 200809 - _POSIX_THREADS = 200809 - _POSIX_THREAD_ATTR_STACKADDR = 200809 - _POSIX_THREAD_ATTR_STACKSIZE = 200809 - _POSIX_THREAD_CPUTIME = 0 - _POSIX_THREAD_PRIORITY_SCHEDULING = 200809 - _POSIX_THREAD_PRIO_INHERIT = 200809 - _POSIX_THREAD_PRIO_PROTECT = 200809 - _POSIX_THREAD_PROCESS_SHARED = 200809 - _POSIX_THREAD_SAFE_FUNCTIONS = 200809 - _POSIX_THREAD_SPORADIC_SERVER = -1 - _POSIX_TIMEOUTS = 200809 - _POSIX_TIMERS = 200809 - _POSIX_TRACE = -1 - _POSIX_TRACE_EVENT_FILTER = -1 - _POSIX_TRACE_INHERIT = -1 - _POSIX_TRACE_LOG = -1 - _POSIX_TYPED_MEMORY_OBJECTS = -1 - _POSIX_V6_LP64_OFF64 = 1 - _POSIX_V6_LPBIG_OFFBIG = -1 - _POSIX_V7_LP64_OFF64 = 1 - _POSIX_V7_LPBIG_OFFBIG = -1 - _POSIX_VDISABLE = 0 - _POSIX_VERSION = 200112 - _PTRDIFF_T = 0 - _PTRDIFF_T_ = 0 - _PTRDIFF_T_DECLARED = 0 - _SIZET_ = 0 - _SIZE_T = 0 - _SIZE_T_ = 0 - _SIZE_T_DECLARED = 0 - _SIZE_T_DEFINED = 0 - _SIZE_T_DEFINED_ = 0 - _SQLITE3RTREE_H_ = 0 - _SQLITE_OS_H_ = 0 - _STATBUF_ST_BLKSIZE = 0 - _STATBUF_ST_NSEC = 0 - _STATBUF_ST_RDEV = 0 - _STAT_VER = 1 - _STAT_VER_KERNEL = 0 - _STAT_VER_LINUX = 1 - _STDARG_H = 0 - _STDC_PREDEF_H = 1 - _STDDEF_H = 0 - _STDDEF_H_ = 0 - _STDIO_H = 1 - _STDLIB_H = 1 - _STRING_H = 1 - _STRUCT_TIMESPEC = 1 - _SYS_CDEFS_H = 1 - _SYS_IOCTL_H = 1 - _SYS_MMAN_H = 1 - _SYS_SELECT_H = 1 - _SYS_SIZE_T_H = 0 - _SYS_STAT_H = 1 - _SYS_TIME_H = 1 - _SYS_TTYDEFAULTS_H_ = 0 - _SYS_TYPES_H = 1 - _THREAD_SHARED_TYPES_H = 1 - _TIME_H = 1 - _T_PTRDIFF = 0 - _T_PTRDIFF_ = 0 - _T_SIZE = 0 - _T_SIZE_ = 0 - _T_WCHAR = 0 - _T_WCHAR_ = 0 - _UNISTD_H = 1 - _VA_LIST = 0 - _VA_LIST_ = 0 - _VA_LIST_DEFINED = 0 - _VA_LIST_T_H = 0 - _WCHAR_T = 0 - _WCHAR_T_ = 0 - _WCHAR_T_DECLARED = 0 - _WCHAR_T_DEFINED = 0 - _WCHAR_T_DEFINED_ = 0 - _WCHAR_T_H = 0 - _XBS5_LP64_OFF64 = 1 - _XBS5_LPBIG_OFFBIG = -1 - _XOPEN_ENH_I18N = 1 - _XOPEN_LEGACY = 1 - _XOPEN_REALTIME = 1 - _XOPEN_REALTIME_THREADS = 1 - _XOPEN_SHM = 1 - _XOPEN_SOURCE = 600 - _XOPEN_UNIX = 1 - _XOPEN_VERSION = 600 - _XOPEN_XCU_VERSION = 4 - _XOPEN_XPG2 = 1 - _XOPEN_XPG3 = 1 - _XOPEN_XPG4 = 1 + X_ANSI_STDARG_H_ = 0 + X_ANSI_STDDEF_H = 0 + X_ASM_GENERIC_ERRNO_BASE_H = 0 + X_ASM_GENERIC_ERRNO_H = 0 + X_ASM_GENERIC_IOCTL_H = 0 + X_ASSERT_H = 1 + X_BITS_ERRNO_H = 1 + X_BITS_FLOATN_COMMON_H = 0 + X_BITS_FLOATN_H = 0 + X_BITS_LIBM_SIMD_DECL_STUBS_H = 1 + X_BITS_POSIX_OPT_H = 1 + X_BITS_PTHREADTYPES_ARCH_H = 1 + X_BITS_PTHREADTYPES_COMMON_H = 1 + X_BITS_STAT_H = 1 + X_BITS_STDINT_INTN_H = 1 + X_BITS_STDIO_LIM_H = 1 + X_BITS_TIME_H = 1 + X_BITS_TYPESIZES_H = 1 + X_BITS_TYPES_H = 1 + X_BSD_PTRDIFF_T_ = 0 + X_BSD_SIZE_T_ = 0 + X_BSD_SIZE_T_DEFINED_ = 0 + X_DLFCN_H = 1 + X_ERRNO_H = 1 + X_FCNTL_H = 1 + X_FEATURES_H = 1 + X_FILE_OFFSET_BITS = 64 + X_FTS5_H = 0 + X_FTSINT_H = 0 + X_GCC_MAX_ALIGN_T = 0 + X_GCC_PTRDIFF_T = 0 + X_GCC_SIZE_T = 0 + X_GCC_WCHAR_T = 0 + X_GETOPT_CORE_H = 1 + X_GETOPT_POSIX_H = 1 + X_IOC_DIRBITS = 2 + X_IOC_DIRMASK = 3 + X_IOC_DIRSHIFT = 30 + X_IOC_NONE = 0 + X_IOC_NRBITS = 8 + X_IOC_NRMASK = 255 + X_IOC_NRSHIFT = 0 + X_IOC_READ = 2 + X_IOC_SIZEBITS = 14 + X_IOC_SIZEMASK = 16383 + X_IOC_SIZESHIFT = 16 + X_IOC_TYPEBITS = 8 + X_IOC_TYPEMASK = 255 + X_IOC_TYPESHIFT = 8 + X_IOC_WRITE = 1 + X_IOFBF = 0 + X_IOLBF = 1 + X_IONBF = 2 + X_IO_EOF_SEEN = 0x0010 + X_IO_ERR_SEEN = 0x0020 + X_IO_USER_LOCK = 0x8000 + X_LARGEFILE_SOURCE = 1 + X_LARGE_FILE = 1 + X_LFS64_ASYNCHRONOUS_IO = 1 + X_LFS64_LARGEFILE = 1 + X_LFS64_STDIO = 1 + X_LFS_ASYNCHRONOUS_IO = 1 + X_LFS_LARGEFILE = 1 + X_LINUX_IOCTL_H = 0 + X_LP64 = 1 + X_MATH_H = 1 + X_MKNOD_VER = 0 + X_MKNOD_VER_LINUX = 0 + X_OS_COMMON_H_ = 0 + X_POSIX2_CHAR_TERM = 200809 + X_POSIX2_C_BIND = 200112 + X_POSIX2_C_DEV = 200112 + X_POSIX2_C_VERSION = 200112 + X_POSIX2_LOCALEDEF = 200112 + X_POSIX2_SW_DEV = 200112 + X_POSIX2_VERSION = 200112 + X_POSIX_ADVISORY_INFO = 200809 + X_POSIX_ASYNCHRONOUS_IO = 200809 + X_POSIX_ASYNC_IO = 1 + X_POSIX_BARRIERS = 200809 + X_POSIX_CHOWN_RESTRICTED = 0 + X_POSIX_CLOCK_SELECTION = 200809 + X_POSIX_CPUTIME = 0 + X_POSIX_C_SOURCE = 200112 + X_POSIX_FSYNC = 200809 + X_POSIX_IPV6 = 200809 + X_POSIX_JOB_CONTROL = 1 + X_POSIX_MAPPED_FILES = 200809 + X_POSIX_MEMLOCK = 200809 + X_POSIX_MEMLOCK_RANGE = 200809 + X_POSIX_MEMORY_PROTECTION = 200809 + X_POSIX_MESSAGE_PASSING = 200809 + X_POSIX_MONOTONIC_CLOCK = 0 + X_POSIX_NO_TRUNC = 1 + X_POSIX_PRIORITIZED_IO = 200809 + X_POSIX_PRIORITY_SCHEDULING = 200809 + X_POSIX_RAW_SOCKETS = 200809 + X_POSIX_READER_WRITER_LOCKS = 200809 + X_POSIX_REALTIME_SIGNALS = 200809 + X_POSIX_REENTRANT_FUNCTIONS = 1 + X_POSIX_REGEXP = 1 + X_POSIX_SAVED_IDS = 1 + X_POSIX_SEMAPHORES = 200809 + X_POSIX_SHARED_MEMORY_OBJECTS = 200809 + X_POSIX_SHELL = 1 + X_POSIX_SOURCE = 1 + X_POSIX_SPAWN = 200809 + X_POSIX_SPIN_LOCKS = 200809 + X_POSIX_SPORADIC_SERVER = -1 + X_POSIX_SYNCHRONIZED_IO = 200809 + X_POSIX_THREADS = 200809 + X_POSIX_THREAD_ATTR_STACKADDR = 200809 + X_POSIX_THREAD_ATTR_STACKSIZE = 200809 + X_POSIX_THREAD_CPUTIME = 0 + X_POSIX_THREAD_PRIORITY_SCHEDULING = 200809 + X_POSIX_THREAD_PRIO_INHERIT = 200809 + X_POSIX_THREAD_PRIO_PROTECT = 200809 + X_POSIX_THREAD_PROCESS_SHARED = 200809 + X_POSIX_THREAD_SAFE_FUNCTIONS = 200809 + X_POSIX_THREAD_SPORADIC_SERVER = -1 + X_POSIX_TIMEOUTS = 200809 + X_POSIX_TIMERS = 200809 + X_POSIX_TRACE = -1 + X_POSIX_TRACE_EVENT_FILTER = -1 + X_POSIX_TRACE_INHERIT = -1 + X_POSIX_TRACE_LOG = -1 + X_POSIX_TYPED_MEMORY_OBJECTS = -1 + X_POSIX_V6_LP64_OFF64 = 1 + X_POSIX_V6_LPBIG_OFFBIG = -1 + X_POSIX_V7_LP64_OFF64 = 1 + X_POSIX_V7_LPBIG_OFFBIG = -1 + X_POSIX_VDISABLE = 0 + X_POSIX_VERSION = 200112 + X_PTRDIFF_T = 0 + X_PTRDIFF_T_ = 0 + X_PTRDIFF_T_DECLARED = 0 + X_SIZET_ = 0 + X_SIZE_T = 0 + X_SIZE_T_ = 0 + X_SIZE_T_DECLARED = 0 + X_SIZE_T_DEFINED = 0 + X_SIZE_T_DEFINED_ = 0 + X_SQLITE3RTREE_H_ = 0 + X_SQLITE_OS_H_ = 0 + X_STATBUF_ST_BLKSIZE = 0 + X_STATBUF_ST_NSEC = 0 + X_STATBUF_ST_RDEV = 0 + X_STAT_VER = 1 + X_STAT_VER_KERNEL = 0 + X_STAT_VER_LINUX = 1 + X_STDARG_H = 0 + X_STDC_PREDEF_H = 1 + X_STDDEF_H = 0 + X_STDDEF_H_ = 0 + X_STDIO_H = 1 + X_STDLIB_H = 1 + X_STRING_H = 1 + X_STRUCT_TIMESPEC = 1 + X_SYS_CDEFS_H = 1 + X_SYS_IOCTL_H = 1 + X_SYS_MMAN_H = 1 + X_SYS_SELECT_H = 1 + X_SYS_SIZE_T_H = 0 + X_SYS_STAT_H = 1 + X_SYS_TIME_H = 1 + X_SYS_TTYDEFAULTS_H_ = 0 + X_SYS_TYPES_H = 1 + X_THREAD_SHARED_TYPES_H = 1 + X_TIME_H = 1 + X_T_PTRDIFF = 0 + X_T_PTRDIFF_ = 0 + X_T_SIZE = 0 + X_T_SIZE_ = 0 + X_T_WCHAR = 0 + X_T_WCHAR_ = 0 + X_UNISTD_H = 1 + X_VA_LIST = 0 + X_VA_LIST_ = 0 + X_VA_LIST_DEFINED = 0 + X_VA_LIST_T_H = 0 + X_WCHAR_T = 0 + X_WCHAR_T_ = 0 + X_WCHAR_T_DECLARED = 0 + X_WCHAR_T_DEFINED = 0 + X_WCHAR_T_DEFINED_ = 0 + X_WCHAR_T_H = 0 + X_XBS5_LP64_OFF64 = 1 + X_XBS5_LPBIG_OFFBIG = -1 + X_XOPEN_ENH_I18N = 1 + X_XOPEN_LEGACY = 1 + X_XOPEN_REALTIME = 1 + X_XOPEN_REALTIME_THREADS = 1 + X_XOPEN_SHM = 1 + X_XOPEN_SOURCE = 600 + X_XOPEN_UNIX = 1 + X_XOPEN_VERSION = 600 + X_XOPEN_XCU_VERSION = 4 + X_XOPEN_XPG2 = 1 + X_XOPEN_XPG3 = 1 + X_XOPEN_XPG4 = 1 BBatch = 0 EtBUFSIZE = 70 EtCHARX = 8 @@ -2468,6 +2468,447 @@ const ( WsdStatInit = 0 ) +// Depending on the type of TG_ARG, call an appropriately suffixed +// version of FUNC with arguments (including parentheses) ARGS. +// Suffixed functions may not exist for long double if it has the same +// format as double, or for other types with the same format as float, +// double or long double. The behavior is undefined if the argument +// does not have a real floating type. The definition may use a +// conditional expression, so all suffixed versions of FUNC must +// return the same type (FUNC may include a cast if necessary rather +// than being a single identifier). + +// ISO C99 defines some generic macros which work on any data type. + +// All floating-point numbers can be put in one of these categories. +const ( /* math.h:853:1: */ + FP_NAN = 0 + FP_INFINITE = 1 + FP_ZERO = 2 + FP_SUBNORMAL = 3 + FP_NORMAL = 4 +) + +// 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-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// 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 +) + +// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. +// are already defined. +// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. +// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. + +// 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-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// 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 +) + +// Values for the first argument to `getitimer' and `setitimer'. +const ( /* time.h:88: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 */ @@ -5410,6 +5851,17 @@ type _ht = struct { Fchain uintptr } +// 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 _G_fpos_t = struct { + F__pos int64 + F__state struct { + F__count int32 + F__value struct{ F__wch uint32 } + } +} + // bits/types.h -- definitions of __*_t types underlying *_t types. // Copyright (C) 2002-2018 Free Software Foundation, Inc. // This file is part of the GNU C Library. @@ -5883,7 +6335,174 @@ type Fsfilcnt_t = uint64 /* types.h:230:24 */ // Type to count file system inode type Blkcnt64_t = int64 /* types.h:236:22 */ // Type to count number of disk blocks. type Fsblkcnt64_t = uint64 /* types.h:237:24 */ // Type to count file system blocks. -type Fsfilcnt64_t = uint64 /* types.h:238:24 */ +type Fsfilcnt64_t = uint64 /* types.h:238:24 */ // Type to count file system inodes. + +// Now add the thread types. +// Declaration of common pthread types for all architectures. +// Copyright (C) 2017-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// For internal mutex and condition variable definitions. +// Common threading primitives definitions for both POSIX and C11. +// Copyright (C) 2017-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// 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. +// +// Also, the following macros must be define for internal pthread_mutex_t +// struct definitions (struct __pthread_mutex_s): +// +// __PTHREAD_COMPAT_PADDING_MID - any additional members after 'kind' +// and before '__spin' (for 64 bits) or +// '__nusers' (for 32 bits). +// __PTHREAD_COMPAT_PADDING_END - any additional members at the end of +// the internal structure. +// __PTHREAD_MUTEX_LOCK_ELISION - 1 if the architecture supports lock +// elision or 0 otherwise. +// __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers. The +// preferred value for new architectures +// is 0. +// __PTHREAD_MUTEX_USE_UNION - control whether internal __spins and +// __list will be place inside a union for +// linuxthreads compatibility. +// The preferred value for new architectures +// is 0. +// +// For a new port the preferred values for the required defines are: +// +// #define __PTHREAD_COMPAT_PADDING_MID +// #define __PTHREAD_COMPAT_PADDING_END +// #define __PTHREAD_MUTEX_LOCK_ELISION 0 +// #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 +// #define __PTHREAD_MUTEX_USE_UNION 0 +// +// __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to +// eventually support lock elision using transactional memory. +// +// 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. +// +// And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t) +// must be defined. +// +// Copyright (C) 2002-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. + +// Definitions for internal mutex struct. + +type __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 + _ [4]byte +} + +// Common definition of pthread_mutex_t. + +type __pthread_internal_list = struct { + F__prev uintptr + F__next uintptr +} + +// Lock elision support. + +type __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 struct { + F__prev uintptr + F__next uintptr + } +} + +// Common definition of pthread_cond_t. + +type __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 identifiers. The structure of the attribute type is not // exposed on purpose. @@ -5916,53 +6535,13 @@ type pthread_attr_t = struct { type Pthread_attr_t = pthread_attr_t /* pthreadtypes.h:62:30 */ -type Pthread_mutex_t = struct { - F__data struct { - F__lock int32 - F__count uint32 - F__owner int32 - F__nusers uint32 - F__kind int32 - F__spins int16 - F__elision int16 - F__list struct { - F__prev uintptr - F__next uintptr - } - } -} /* pthreadtypes.h:72:3 */ - -type Pthread_cond_t = struct { - F__data 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 - } -} /* pthreadtypes.h:80:3 */ +type Pthread_mutex_t = struct{ F__data __pthread_mutex_s } /* pthreadtypes.h:72:3 */ + +type Pthread_cond_t = struct{ F__data __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 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 - _ [4]byte - } -} /* pthreadtypes.h:91:3 */ +type Pthread_rwlock_t = struct{ F__data __pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ type Pthread_rwlockattr_t = struct { _ [0]uint64 @@ -9084,6 +9663,40 @@ type timespec = struct { Ftv_nsec int64 } +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// 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 int64 + Ftv_nsec int64 + } + Fit_value struct { + Ftv_sec int64 + Ftv_nsec int64 + } +} + // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". @@ -17419,6 +18032,192 @@ var azName = [176]uintptr{ /* 175 */ ts + 2250, /* "Abortable" */ } /* sqlite3.c:33082:20 */ +//************* End of opcodes.c ******************************************** +//************* Begin file os_unix.c **************************************** +// 2004 May 22 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// This file contains the VFS implementation for unix-like operating systems +// include Linux, MacOSX, *BSD, QNX, VxWorks, AIX, HPUX, and others. +// +// There are actually several different VFS implementations in this file. +// The differences are in the way that file locking is done. The default +// implementation uses Posix Advisory Locks. Alternative implementations +// use flock(), dot-files, various proprietary locking schemas, or simply +// skip locking all together. +// +// This source file is organized into divisions where the logic for various +// subfunctions is contained within the appropriate division. PLEASE +// KEEP THE STRUCTURE OF THIS FILE INTACT. New code should be placed +// in the correct division and should be clearly labeled. +// +// The layout of divisions is as follows: +// +// * General-purpose declarations and utility functions. +// * Unique file ID logic used by VxWorks. +// * Various locking primitive implementations (all except proxy locking): +// + for Posix Advisory Locks +// + for no-op locks +// + for dot-file locks +// + for flock() locking +// + for named semaphore locks (VxWorks only) +// + for AFP filesystem locks (MacOSX only) +// * sqlite3_file methods not associated with locking. +// * Definitions of sqlite3_io_methods objects for all locking +// methods plus "finder" functions for each locking method. +// * sqlite3_vfs method implementations. +// * Locking primitives for the proxy uber-locking-method. (MacOSX only) +// * Definitions of sqlite3_vfs objects for all locking methods +// plus implementations of sqlite3_os_init() and sqlite3_os_end(). +// #include "sqliteInt.h" + +// There are various methods for file locking used for concurrency +// control: +// +// 1. POSIX locking (the default), +// 2. No locking, +// 3. Dot-file locking, +// 4. flock() locking, +// 5. AFP locking (OSX only), +// 6. Named POSIX semaphores (VXWorks only), +// 7. proxy locking. (OSX only) +// +// Styles 4, 5, and 7 are only available of SQLITE_ENABLE_LOCKING_STYLE +// is defined to 1. The SQLITE_ENABLE_LOCKING_STYLE also enables automatic +// selection of the appropriate locking style based on the filesystem +// where the database is located. + +// Use pread() and pwrite() if they are available + +// standard include files. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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 Standard: 2.6 Primitive System Data Types <sys/types.h> + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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 Standard: 5.6 File Characteristics <sys/stat.h> + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// bits/types.h -- definitions of __*_t types underlying *_t types. +// Copyright (C) 2002-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// Never include this file directly; use <sys/types.h> instead. + +// The Single Unix specification says that some more types are +// available here. + +// Copyright (C) 1999-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// Versions of the `struct stat' data structure. + +// x86-64 versions of the `xmknod' interface. + +type stat = struct { + Fst_dev uint64 + Fst_ino uint64 + Fst_nlink uint64 + Fst_mode uint32 + Fst_uid uint32 + Fst_gid uint32 + F__pad0 int32 + Fst_rdev uint64 + Fst_size int64 + Fst_blksize int64 + Fst_blocks int64 + Fst_atime int64 + Fst_atimensec uint64 + Fst_mtime int64 + Fst_mtimensec uint64 + Fst_ctime int64 + Fst_ctimensec uint64 + F__glibc_reserved [3]int64 +} + // Note stat64 has the same shape as stat for x86-64. type stat64 = struct { Fst_dev uint64 @@ -17531,6 +18330,187 @@ type flock = struct { _ [4]byte } +type flock64 = struct { + Fl_type int16 + Fl_whence int16 + Fl_start int64 + Fl_len int64 + Fl_pid int32 + _ [4]byte +} + +// Define some inlines helping to catch common problems. + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// Get the list of `ioctl' requests and related constants. +// Copyright (C) 1996-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// Use the definitions from the kernel header files. +// 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 + +// ioctl command encoding: 32 bits total, command in lower 16 bits, +// size of the parameter structure in the lower 14 bits of the +// upper 16 bits. +// Encoding the size of the parameter structure in the ioctl request +// is useful for catching programs compiled with old versions +// and to avoid overwriting user space outside the user buffer area. +// The highest 2 bits are reserved for indicating the ``access mode''. +// NOTE: This limits the max parameter size to 16kB -1 ! + +// The following is for compatibility across the various Linux +// platforms. The generic ioctl numbering scheme doesn't really enforce +// a type field. De facto, however, the top 8 bits of the lower 16 +// bits are indeed used as a type field, so we might just as well make +// this explicit here. Please be sure to use the decoding macros +// below from now on. + +// Let any architecture override either of the following before +// including this file. + +// Direction bits, which any architecture can choose to override +// before including this file. +// +// NOTE: _IOC_WRITE means userland is writing and kernel is +// reading. _IOC_READ means userland is reading and kernel is writing. + +// Used to create numbers. +// +// NOTE: _IOW means userland is writing and kernel is reading. _IOR +// means userland is reading and kernel is writing. + +// used to decode ioctl numbers.. + +// ...and for the drivers/sound files... + +// These are the most common definitions for tty ioctl numbers. +// Most of them do not use the recommended _IOC(), but there is +// probably some source code out there hardcoding the number, +// so we might as well use them for all new platforms. +// +// The architectures that use different values here typically +// try to be compatible with some Unix variants for the same +// architecture. + +// 0x54 is just a magic number to make these relatively unique ('T') + +// Some arches already define FIOQSIZE due to a historical +// conflict with a Hayes modem-specific ioctl value. + +// Used for packet mode + +// Routing table calls. + +// Socket configuration controls. + +// ARP cache control calls. +// 0x8950 - 0x8952 * obsolete calls, don't re-use + +// RARP cache control calls. + +// Driver configuration calls + +// DLCI configuration calls + +// Device private ioctl calls. + +// These 16 ioctls are available to devices via the do_ioctl() device +// vector. Each device should include this file and redefine these +// names as their own. Because these are device dependent it is a good +// idea _NOT_ to issue them to random objects and hope. + +// These 16 ioctl calls are protocol private + +// Define some types used by `ioctl' requests. +// Structure types for pre-termios terminal ioctls. Linux version. +// Copyright (C) 1996-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for 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/>. + +// Get definition of constants for use with `ioctl'. +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note + +type winsize = struct { + Fws_row uint16 + Fws_col uint16 + Fws_xpixel uint16 + Fws_ypixel uint16 +} + +type termio = struct { + Fc_iflag uint16 + Fc_oflag uint16 + Fc_cflag uint16 + Fc_lflag uint16 + Fc_line uint8 + Fc_cc [8]uint8 + _ [1]byte +} + // Copyright (C) 1991-2018 Free Software Foundation, Inc. // This file is part of the GNU C Library. // @@ -18081,6 +19061,19 @@ type Sigset_t = struct{ F__val [16]uint64 } /* sigset_t.h:7:20 */ // fd_set for select and pselect. type Fd_set = struct{ Ffds_bits [16]int64 } /* select.h:70:5 */ +// Type of the second argument to `getitimer' and +// the second and third arguments `setitimer'. +type itimerval = struct { + Fit_interval struct { + Ftv_sec int64 + Ftv_usec int64 + } + Fit_value struct { + Ftv_sec int64 + Ftv_usec int64 + } +} + // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some // obscure platforms. For those cases, simply compile with one of @@ -20547,7 +21540,7 @@ func unixDeviceCharacteristics(tls *crt.TLS, id uintptr) int32 { /* sqlite3.c:37 // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). func unixGetpagesize(tls *crt.TLS) int32 { /* sqlite3.c:37665:12: */ - return int32(crt.Xsysconf(tls, 30)) + return int32(crt.Xsysconf(tls, X_SC_PAGESIZE)) } // Constants used for locking |