Fix missing vendor dir

This commit is contained in:
Michael Lehmann
2024-12-19 22:19:04 +01:00
parent 585f4eefa1
commit cc85816e3f
543 changed files with 247315 additions and 0 deletions

23
vendor/github.com/tklauser/go-sysconf/.cirrus.yml generated vendored Normal file
View File

@@ -0,0 +1,23 @@
env:
CIRRUS_CLONE_DEPTH: 1
GO_VERSION: go1.22.2
freebsd_13_task:
freebsd_instance:
image_family: freebsd-13-2
install_script: |
pkg install -y go
GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest
bin/${GO_VERSION} download
build_script: bin/${GO_VERSION} build -v ./...
test_script: bin/${GO_VERSION} test -race ./...
freebsd_14_task:
freebsd_instance:
image_family: freebsd-14-0
install_script: |
pkg install -y go
GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest
bin/${GO_VERSION} download
build_script: bin/${GO_VERSION} build -v ./...
test_script: bin/${GO_VERSION} test -race ./...

1
vendor/github.com/tklauser/go-sysconf/.gitignore generated vendored Normal file
View File

@@ -0,0 +1 @@
_obj/

29
vendor/github.com/tklauser/go-sysconf/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2018-2022, Tobias Klauser
All rights reserved.
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 copyright holder 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.

46
vendor/github.com/tklauser/go-sysconf/README.md generated vendored Normal file
View File

@@ -0,0 +1,46 @@
# go-sysconf
[![Go Reference](https://pkg.go.dev/badge/github.com/tklauser/go-sysconf.svg)](https://pkg.go.dev/github.com/tklauser/go-sysconf)
[![GitHub Action Status](https://github.com/tklauser/go-sysconf/workflows/Tests/badge.svg)](https://github.com/tklauser/go-sysconf/actions?query=workflow%3ATests)
`sysconf` for Go, without using cgo or external binaries (e.g. getconf).
Supported operating systems: Linux, macOS, DragonflyBSD, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos.
All POSIX.1 and POSIX.2 variables are supported, see [References](#references) for a complete list.
Additionally, the following non-standard variables are supported on some operating systems:
| Variable | Supported on |
|---|---|
| `SC_PHYS_PAGES` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos |
| `SC_AVPHYS_PAGES` | Linux, OpenBSD, Solaris/Illumos |
| `SC_NPROCESSORS_CONF` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos |
| `SC_NPROCESSORS_ONLN` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos |
| `SC_UIO_MAXIOV` | Linux |
## Usage
```Go
package main
import (
"fmt"
"github.com/tklauser/go-sysconf"
)
func main() {
// get clock ticks, this will return the same as C.sysconf(C._SC_CLK_TCK)
clktck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK)
if err == nil {
fmt.Printf("SC_CLK_TCK: %v\n", clktck)
}
}
```
## References
* [POSIX documenation for `sysconf`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html)
* [Linux manpage for `sysconf(3)`](http://man7.org/linux/man-pages/man3/sysconf.3.html)
* [glibc constants for `sysconf` parameters](https://www.gnu.org/software/libc/manual/html_node/Constants-for-Sysconf.html)

21
vendor/github.com/tklauser/go-sysconf/sysconf.go generated vendored Normal file
View File

@@ -0,0 +1,21 @@
// Copyright 2018 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package sysconf implements the sysconf(3) function and provides the
// associated SC_* constants to query system configuration values.
package sysconf
import "errors"
//go:generate go run mksysconf.go
var errInvalid = errors.New("invalid parameter value")
// Sysconf returns the value of a sysconf(3) runtime system parameter.
// The name parameter should be a SC_* constant define in this package. The
// implementation is GOOS-specific and certain SC_* constants might not be
// defined for all GOOSes.
func Sysconf(name int) (int64, error) {
return sysconf(name)
}

37
vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go generated vendored Normal file
View File

@@ -0,0 +1,37 @@
// Copyright 2018 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
package sysconf
import "golang.org/x/sys/unix"
func pathconf(path string, name int) int64 {
if val, err := unix.Pathconf(path, name); err == nil {
return int64(val)
}
return -1
}
func sysctl32(name string) int64 {
if val, err := unix.SysctlUint32(name); err == nil {
return int64(val)
}
return -1
}
func sysctl64(name string) int64 {
if val, err := unix.SysctlUint64(name); err == nil {
return int64(val)
}
return -1
}
func yesno(val int64) int64 {
if val == 0 {
return -1
}
return val
}

307
vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go generated vendored Normal file
View File

@@ -0,0 +1,307 @@
// Copyright 2018 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sysconf
import (
"strconv"
"strings"
"sync"
"golang.org/x/sys/unix"
)
const (
_HOST_NAME_MAX = _MAXHOSTNAMELEN - 1
_LOGIN_NAME_MAX = _MAXLOGNAME
_SYMLOOP_MAX = _MAXSYMLINKS
// _PTHREAD_STACK_MIN changed in macOS 14
_PTHREAD_STACK_MIN_LT_MACOS14 = 0x2000
_PTHREAD_STACK_MIN_GE_MACOS14 = 0x4000
)
var uname struct {
sync.Once
macOSMajor int
}
func getMacOSMajor() int {
uname.Once.Do(func() {
var u unix.Utsname
err := unix.Uname(&u)
if err != nil {
return
}
rel := unix.ByteSliceToString(u.Release[:])
ver := strings.Split(rel, ".")
maj, _ := strconv.Atoi(ver[0])
uname.macOSMajor = maj
})
return uname.macOSMajor
}
// sysconf implements sysconf(4) as in the Darwin libc (derived from the FreeBSD
// libc), version 1534.81.1.
// See https://github.com/apple-oss-distributions/Libc/tree/Libc-1534.81.1.
func sysconf(name int) (int64, error) {
switch name {
case SC_AIO_LISTIO_MAX:
fallthrough
case SC_AIO_MAX:
return sysctl32("kern.aiomax"), nil
case SC_AIO_PRIO_DELTA_MAX:
return -1, nil
case SC_ARG_MAX:
return sysctl32("kern.argmax"), nil
case SC_ATEXIT_MAX:
return _INT_MAX, nil
case SC_CHILD_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
return int64(rlim.Cur), nil
}
}
return -1, nil
case SC_CLK_TCK:
return _CLK_TCK, nil
case SC_DELAYTIMER_MAX:
return -1, nil
case SC_GETGR_R_SIZE_MAX:
return 4096, nil
case SC_GETPW_R_SIZE_MAX:
return 4096, nil
case SC_IOV_MAX:
return _IOV_MAX, nil
case SC_MQ_OPEN_MAX:
return -1, nil
case SC_MQ_PRIO_MAX:
return -1, nil
case SC_NGROUPS_MAX:
return sysctl32("kern.ngroups"), nil
case SC_OPEN_MAX, SC_STREAM_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err != nil {
return -1, nil
}
if rlim.Cur > unix.RLIM_INFINITY {
return -1, nil
}
if rlim.Cur > _LONG_MAX {
return -1, unix.EOVERFLOW
}
return int64(rlim.Cur), nil
case SC_RTSIG_MAX:
return -1, nil
case SC_SEM_NSEMS_MAX:
return sysctl32("kern.sysv.semmns"), nil
case SC_SEM_VALUE_MAX:
return _POSIX_SEM_VALUE_MAX, nil
case SC_SIGQUEUE_MAX:
return -1, nil
case SC_THREAD_DESTRUCTOR_ITERATIONS:
return _PTHREAD_DESTRUCTOR_ITERATIONS, nil
case SC_THREAD_KEYS_MAX:
return _PTHREAD_KEYS_MAX, nil
case SC_THREAD_PRIO_INHERIT:
return _POSIX_THREAD_PRIO_INHERIT, nil
case SC_THREAD_PRIO_PROTECT:
return _POSIX_THREAD_PRIO_PROTECT, nil
case SC_THREAD_STACK_MIN:
if getMacOSMajor() < 23 {
return _PTHREAD_STACK_MIN_LT_MACOS14, nil
}
return _PTHREAD_STACK_MIN_GE_MACOS14, nil
case SC_THREAD_THREADS_MAX:
return -1, nil
case SC_TIMER_MAX:
return -1, nil
case SC_TTY_NAME_MAX:
// should be _PATH_DEV instead of "/"
return pathconf("/", _PC_NAME_MAX), nil
case SC_TZNAME_MAX:
return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil
case SC_IPV6:
if _POSIX_IPV6 == 0 {
fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0)
if err == nil && fd >= 0 {
unix.Close(fd)
return int64(200112), nil
}
return 0, nil
}
return _POSIX_IPV6, nil
case SC_MESSAGE_PASSING:
if _POSIX_MESSAGE_PASSING == 0 {
return yesno(sysctl32("p1003_1b.message_passing")), nil
}
return _POSIX_MESSAGE_PASSING, nil
case SC_PRIORITIZED_IO:
if _POSIX_PRIORITIZED_IO == 0 {
return yesno(sysctl32("p1003_1b.prioritized_io")), nil
}
return _POSIX_PRIORITIZED_IO, nil
case SC_PRIORITY_SCHEDULING:
if _POSIX_PRIORITY_SCHEDULING == 0 {
return yesno(sysctl32("p1003_1b.priority_scheduling")), nil
}
return _POSIX_PRIORITY_SCHEDULING, nil
case SC_REALTIME_SIGNALS:
if _POSIX_REALTIME_SIGNALS == 0 {
return yesno(sysctl32("p1003_1b.realtime_signals")), nil
}
return _POSIX_REALTIME_SIGNALS, nil
case SC_SAVED_IDS:
return yesno(sysctl32("kern.saved_ids")), nil
case SC_SEMAPHORES:
if _POSIX_SEMAPHORES == 0 {
return yesno(sysctl32("p1003_1b.semaphores")), nil
}
return _POSIX_SEMAPHORES, nil
case SC_SPAWN:
if getMacOSMajor() < 22 {
return -1, nil
}
// macOS 13 (Ventura) and later
return 200112, nil
case SC_SPIN_LOCKS:
return _POSIX_SPIN_LOCKS, nil
case SC_SPORADIC_SERVER:
return _POSIX_SPORADIC_SERVER, nil
case SC_SS_REPL_MAX:
return _POSIX_SS_REPL_MAX, nil
case SC_SYNCHRONIZED_IO:
if _POSIX_SYNCHRONIZED_IO == 0 {
return yesno(sysctl32("p1003_1b.synchronized_io")), nil
}
return _POSIX_SYNCHRONIZED_IO, nil
case SC_THREAD_ATTR_STACKADDR:
return _POSIX_THREAD_ATTR_STACKADDR, nil
case SC_THREAD_ATTR_STACKSIZE:
return _POSIX_THREAD_ATTR_STACKSIZE, nil
case SC_THREAD_CPUTIME:
return _POSIX_THREAD_CPUTIME, nil
case SC_THREAD_PRIORITY_SCHEDULING:
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
case SC_THREAD_PROCESS_SHARED:
return _POSIX_THREAD_PROCESS_SHARED, nil
case SC_THREAD_SAFE_FUNCTIONS:
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
case SC_THREAD_SPORADIC_SERVER:
return _POSIX_THREAD_SPORADIC_SERVER, nil
case SC_TIMERS:
if _POSIX_TIMERS == 0 {
return yesno(sysctl32("p1003_1b.timers")), nil
}
return _POSIX_TIMERS, nil
case SC_TRACE:
return _POSIX_TRACE, nil
case SC_TRACE_EVENT_FILTER:
return _POSIX_TRACE_EVENT_FILTER, nil
case SC_TRACE_EVENT_NAME_MAX:
return _POSIX_TRACE_EVENT_NAME_MAX, nil
case SC_TRACE_INHERIT:
return _POSIX_TRACE_INHERIT, nil
case SC_TRACE_LOG:
return _POSIX_TRACE_LOG, nil
case SC_TRACE_NAME_MAX:
return _POSIX_TRACE_NAME_MAX, nil
case SC_TRACE_SYS_MAX:
return _POSIX_TRACE_SYS_MAX, nil
case SC_TRACE_USER_EVENT_MAX:
return _POSIX_TRACE_USER_EVENT_MAX, nil
case SC_TYPED_MEMORY_OBJECTS:
return _POSIX_TYPED_MEMORY_OBJECTS, nil
case SC_VERSION:
// TODO(tk): darwin libc uses sysctl(CTL_KERN, KERN_POSIX1)
return _POSIX_VERSION, nil
case SC_V6_ILP32_OFF32:
if _V6_ILP32_OFF32 == 0 {
if unix.SizeofInt*_CHAR_BIT == 32 &&
unix.SizeofInt == unix.SizeofLong &&
unix.SizeofLong == unix.SizeofPtr &&
unix.SizeofPtr == sizeofOffT {
return 1, nil
}
return -1, nil
}
return _V6_ILP32_OFF32, nil
case SC_V6_ILP32_OFFBIG:
if _V6_ILP32_OFFBIG == 0 {
if unix.SizeofInt*_CHAR_BIT == 32 &&
unix.SizeofInt == unix.SizeofLong &&
unix.SizeofLong == unix.SizeofPtr &&
sizeofOffT*_CHAR_BIT >= 64 {
return 1, nil
}
return -1, nil
}
return _V6_ILP32_OFFBIG, nil
case SC_V6_LP64_OFF64:
if _V6_LP64_OFF64 == 0 {
if unix.SizeofInt*_CHAR_BIT == 32 &&
unix.SizeofLong*_CHAR_BIT == 64 &&
unix.SizeofLong == unix.SizeofPtr &&
unix.SizeofPtr == sizeofOffT {
return 1, nil
}
return -1, nil
}
return _V6_LP64_OFF64, nil
case SC_V6_LPBIG_OFFBIG:
if _V6_LPBIG_OFFBIG == 0 {
if unix.SizeofInt*_CHAR_BIT >= 32 &&
unix.SizeofLong*_CHAR_BIT >= 64 &&
unix.SizeofPtr*_CHAR_BIT >= 64 &&
sizeofOffT*_CHAR_BIT >= 64 {
return 1, nil
}
return -1, nil
}
return _V6_LPBIG_OFFBIG, nil
case SC_2_CHAR_TERM:
return _POSIX2_CHAR_TERM, nil
case SC_2_PBS,
SC_2_PBS_ACCOUNTING,
SC_2_PBS_CHECKPOINT,
SC_2_PBS_LOCATE,
SC_2_PBS_MESSAGE,
SC_2_PBS_TRACK:
return _POSIX2_PBS, nil
case SC_2_UPE:
return _POSIX2_UPE, nil
case SC_XOPEN_CRYPT:
return _XOPEN_CRYPT, nil
case SC_XOPEN_ENH_I18N:
return _XOPEN_ENH_I18N, nil
case SC_XOPEN_REALTIME:
return _XOPEN_REALTIME, nil
case SC_XOPEN_REALTIME_THREADS:
return _XOPEN_REALTIME_THREADS, nil
case SC_XOPEN_SHM:
return _XOPEN_SHM, nil
case SC_XOPEN_STREAMS:
return -1, nil
case SC_XOPEN_UNIX:
return _XOPEN_UNIX, nil
case SC_XOPEN_VERSION:
return _XOPEN_VERSION, nil
case SC_XOPEN_XCU_VERSION:
return _XOPEN_XCU_VERSION, nil
case SC_PHYS_PAGES:
return sysctl64("hw.memsize") / int64(unix.Getpagesize()), nil
case SC_NPROCESSORS_CONF:
fallthrough
case SC_NPROCESSORS_ONLN:
return sysctl32("hw.ncpu"), nil
}
return sysconfGeneric(name)
}

View File

@@ -0,0 +1,220 @@
// Copyright 2018 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sysconf
import "golang.org/x/sys/unix"
const (
_HOST_NAME_MAX = _MAXHOSTNAMELEN - 1
_LOGIN_NAME_MAX = _MAXLOGNAME
_SYMLOOP_MAX = _MAXSYMLINKS
)
// sysconf implements sysconf(3) as in the FreeBSD 12 libc.
func sysconf(name int) (int64, error) {
switch name {
case SC_AIO_LISTIO_MAX:
return sysctl32("p1003_1b.aio_listio_max"), nil
case SC_AIO_MAX:
return sysctl32("p1003_1b.aio_max"), nil
case SC_AIO_PRIO_DELTA_MAX:
return sysctl32("p1003_1b.aio_prio_delta_max"), nil
case SC_ARG_MAX:
return sysctl32("kern.argmax"), nil
case SC_ATEXIT_MAX:
return _ATEXIT_SIZE, nil
case SC_CHILD_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
return rlim.Cur, nil
}
}
return -1, nil
case SC_CLK_TCK:
return _CLK_TCK, nil
case SC_DELAYTIMER_MAX:
return yesno(sysctl32("p1003_1b.delaytimer_max")), nil
case SC_GETGR_R_SIZE_MAX, SC_GETPW_R_SIZE_MAX:
return -1, nil
case SC_IOV_MAX:
return sysctl32("kern.iov_max"), nil
case SC_MQ_OPEN_MAX:
return sysctl32("kern.mqueue.mq_open_max"), nil
case SC_MQ_PRIO_MAX:
return sysctl32("kern.mqueue.mq_prio_max"), nil
case SC_NGROUPS_MAX:
return sysctl32("kern.ngroups"), nil
case SC_OPEN_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
return rlim.Cur, nil
}
}
return -1, nil
case SC_RTSIG_MAX:
return yesno(sysctl32("p1003_1b.rtsig_max")), nil
case SC_SEM_NSEMS_MAX:
return -1, nil
case SC_SEM_VALUE_MAX:
return -1, nil
case SC_SIGQUEUE_MAX:
return yesno(sysctl32("p1003_1b.sigqueue_max")), nil
case SC_STREAM_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
return rlim.Cur, nil
}
}
return -1, nil
case SC_THREAD_DESTRUCTOR_ITERATIONS:
return _PTHREAD_DESTRUCTOR_ITERATIONS, nil
case SC_THREAD_KEYS_MAX:
return _PTHREAD_KEYS_MAX, nil
case SC_THREAD_PRIO_INHERIT:
return _POSIX_THREAD_PRIO_INHERIT, nil
case SC_THREAD_PRIO_PROTECT:
return _POSIX_THREAD_PRIO_PROTECT, nil
case SC_THREAD_STACK_MIN:
return _PTHREAD_STACK_MIN, nil
case SC_THREAD_THREADS_MAX:
return -1, nil
case SC_TIMER_MAX:
return yesno(sysctl32("p1003_1b.timer_max")), nil
case SC_TTY_NAME_MAX:
return pathconf(_PATH_DEV, _PC_NAME_MAX), nil
case SC_TZNAME_MAX:
return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil
case SC_ASYNCHRONOUS_IO:
if _POSIX_ASYNCHRONOUS_IO == 0 {
return sysctl64("p1003_1b.asynchronous_io"), nil
}
return _POSIX_ASYNCHRONOUS_IO, nil
case SC_IPV6:
if _POSIX_IPV6 == 0 {
fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0)
if err == nil && fd >= 0 {
unix.Close(fd)
return int64(200112), nil
}
return 0, nil
}
return _POSIX_IPV6, nil
case SC_MESSAGE_PASSING:
if _POSIX_MESSAGE_PASSING == 0 {
return yesno(sysctl32("p1003_1b.message_passing")), nil
}
return _POSIX_MESSAGE_PASSING, nil
case SC_PRIORITIZED_IO:
if _POSIX_PRIORITIZED_IO == 0 {
return yesno(sysctl32("p1003_1b.prioritized_io")), nil
}
return _POSIX_PRIORITIZED_IO, nil
case SC_PRIORITY_SCHEDULING:
if _POSIX_PRIORITY_SCHEDULING == 0 {
return yesno(sysctl32("p1003_1b.priority_scheduling")), nil
}
return _POSIX_PRIORITY_SCHEDULING, nil
case SC_REALTIME_SIGNALS:
if _POSIX_REALTIME_SIGNALS == 0 {
return yesno(sysctl32("p1003_1b.realtime_signals")), nil
}
return _POSIX_REALTIME_SIGNALS, nil
case SC_SAVED_IDS:
return yesno(sysctl32("kern.saved_ids")), nil
case SC_SEMAPHORES:
if _POSIX_SEMAPHORES == 0 {
return yesno(sysctl32("p1003_1b.semaphores")), nil
}
return _POSIX_SEMAPHORES, nil
case SC_SPAWN:
return _POSIX_SPAWN, nil
case SC_SPIN_LOCKS:
return _POSIX_SPIN_LOCKS, nil
case SC_SPORADIC_SERVER:
return _POSIX_SPORADIC_SERVER, nil
case SC_SYNCHRONIZED_IO:
if _POSIX_SYNCHRONIZED_IO == 0 {
return yesno(sysctl32("p1003_1b.synchronized_io")), nil
}
return _POSIX_SYNCHRONIZED_IO, nil
case SC_THREAD_ATTR_STACKADDR:
return _POSIX_THREAD_ATTR_STACKADDR, nil
case SC_THREAD_ATTR_STACKSIZE:
return _POSIX_THREAD_ATTR_STACKSIZE, nil
case SC_THREAD_CPUTIME:
return _POSIX_THREAD_CPUTIME, nil
case SC_THREAD_PRIORITY_SCHEDULING:
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
case SC_THREAD_PROCESS_SHARED:
return _POSIX_THREAD_PROCESS_SHARED, nil
case SC_THREAD_SAFE_FUNCTIONS:
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
case SC_THREAD_SPORADIC_SERVER:
return _POSIX_THREAD_SPORADIC_SERVER, nil
case SC_TIMERS:
if _POSIX_TIMERS == 0 {
return yesno(sysctl32("p1003_1b.timers")), nil
}
return _POSIX_TIMERS, nil
case SC_TRACE:
return _POSIX_TRACE, nil
case SC_TYPED_MEMORY_OBJECTS:
return _POSIX_TYPED_MEMORY_OBJECTS, nil
case SC_VERSION:
// TODO(tk): FreeBSD libc uses sysctl(CTL_KERN, KERN_POSIX1)
return _POSIX_VERSION, nil
/* TODO(tk): these need GOARCH-dependent integer size checks
case SC_V6_ILP32_OFF32:
return _V6_ILP32_OFF32, nil
case SC_V6_ILP32_OFFBIG:
return _V6_ILP32_OFFBIG, nil
case SC_V6_LP64_OFF64:
return _V6_LP64_OFF64, nil
case SC_V6_LPBIG_OFFBIG:
return _V6_LPBIG_OFFBIG, nil
*/
case SC_2_CHAR_TERM:
return _POSIX2_CHAR_TERM, nil
case SC_2_PBS,
SC_2_PBS_ACCOUNTING,
SC_2_PBS_CHECKPOINT,
SC_2_PBS_LOCATE,
SC_2_PBS_MESSAGE,
SC_2_PBS_TRACK:
return _POSIX2_PBS, nil
case SC_2_UPE:
return _POSIX2_UPE, nil
case SC_XOPEN_CRYPT:
return _XOPEN_CRYPT, nil
case SC_XOPEN_ENH_I18N:
return _XOPEN_ENH_I18N, nil
case SC_XOPEN_REALTIME:
return _XOPEN_REALTIME, nil
case SC_XOPEN_REALTIME_THREADS:
return _XOPEN_REALTIME_THREADS, nil
case SC_XOPEN_SHM:
return _XOPEN_SHM, nil
case SC_XOPEN_STREAMS:
return -1, nil
case SC_XOPEN_UNIX:
return _XOPEN_UNIX, nil
case SC_PHYS_PAGES:
return sysctl64("hw.availpages"), nil
case SC_NPROCESSORS_CONF:
fallthrough
case SC_NPROCESSORS_ONLN:
return sysctl32("hw.ncpu"), nil
}
return sysconfGeneric(name)
}

View File

@@ -0,0 +1,226 @@
// Copyright 2018 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sysconf
import "golang.org/x/sys/unix"
const (
_HOST_NAME_MAX = _MAXHOSTNAMELEN - 1
_LOGIN_NAME_MAX = _MAXLOGNAME
_SYMLOOP_MAX = _MAXSYMLINKS
)
// sysconf implements sysconf(3) as in the FreeBSD 12 libc.
func sysconf(name int) (int64, error) {
switch name {
case SC_AIO_LISTIO_MAX:
return sysctl32("p1003_1b.aio_listio_max"), nil
case SC_AIO_MAX:
return sysctl32("p1003_1b.aio_max"), nil
case SC_AIO_PRIO_DELTA_MAX:
return sysctl32("p1003_1b.aio_prio_delta_max"), nil
case SC_ARG_MAX:
return sysctl32("kern.argmax"), nil
case SC_ATEXIT_MAX:
return _ATEXIT_SIZE, nil
case SC_CHILD_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
return rlim.Cur, nil
}
}
return -1, nil
case SC_CLK_TCK:
return _CLK_TCK, nil
case SC_DELAYTIMER_MAX:
return sysctl32("p1003_1b.delaytimer_max"), nil
case SC_GETGR_R_SIZE_MAX, SC_GETPW_R_SIZE_MAX:
return -1, nil
case SC_IOV_MAX:
return sysctl32("kern.iov_max"), nil
case SC_MQ_OPEN_MAX:
return yesno(sysctl32("p1003_1b.mq_open_max")), nil
case SC_MQ_PRIO_MAX:
return _MQ_PRIO_MAX, nil
case SC_NGROUPS_MAX:
return sysctl32("kern.ngroups"), nil
case SC_OPEN_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
return rlim.Cur, nil
}
}
return -1, nil
case SC_RTSIG_MAX:
return sysctl32("p1003_1b.rtsig_max"), nil
case SC_SEM_NSEMS_MAX:
return -1, nil
case SC_SEM_VALUE_MAX:
return _SEM_VALUE_MAX, nil
case SC_SIGQUEUE_MAX:
return sysctl32("p1003_1b.sigqueue_max"), nil
case SC_STREAM_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err != nil {
return -1, nil
}
if rlim.Cur == unix.RLIM_INFINITY {
return -1, nil
}
if rlim.Cur > _LONG_MAX {
return -1, unix.EOVERFLOW
}
if rlim.Cur > _SHRT_MAX {
return _SHRT_MAX, nil
}
return rlim.Cur, nil
case SC_THREAD_DESTRUCTOR_ITERATIONS:
return _PTHREAD_DESTRUCTOR_ITERATIONS, nil
case SC_THREAD_KEYS_MAX:
return _PTHREAD_KEYS_MAX, nil
case SC_THREAD_PRIO_INHERIT:
return _POSIX_THREAD_PRIO_INHERIT, nil
case SC_THREAD_PRIO_PROTECT:
return _POSIX_THREAD_PRIO_PROTECT, nil
case SC_THREAD_STACK_MIN:
return _PTHREAD_STACK_MIN, nil
case SC_THREAD_THREADS_MAX:
return -1, nil
case SC_TIMER_MAX:
return yesno(sysctl32("p1003_1b.timer_max")), nil
case SC_TTY_NAME_MAX:
return pathconf(_PATH_DEV, _PC_NAME_MAX), nil
case SC_TZNAME_MAX:
return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil
case SC_IPV6:
if _POSIX_IPV6 == 0 {
fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0)
if err == nil && fd >= 0 {
unix.Close(fd)
return int64(200112), nil
}
return 0, nil
}
return _POSIX_IPV6, nil
case SC_MESSAGE_PASSING:
if _POSIX_MESSAGE_PASSING == 0 {
return yesno(sysctl32("p1003_1b.message_passing")), nil
}
return _POSIX_MESSAGE_PASSING, nil
case SC_PRIORITIZED_IO:
if _POSIX_PRIORITIZED_IO == 0 {
return yesno(sysctl32("p1003_1b.prioritized_io")), nil
}
return _POSIX_PRIORITIZED_IO, nil
case SC_PRIORITY_SCHEDULING:
if _POSIX_PRIORITY_SCHEDULING == 0 {
return yesno(sysctl32("p1003_1b.priority_scheduling")), nil
}
return _POSIX_PRIORITY_SCHEDULING, nil
case SC_REALTIME_SIGNALS:
if _POSIX_REALTIME_SIGNALS == 0 {
return yesno(sysctl32("p1003_1b.realtime_signals")), nil
}
return _POSIX_REALTIME_SIGNALS, nil
case SC_SAVED_IDS:
return yesno(sysctl32("kern.saved_ids")), nil
case SC_SEMAPHORES:
if _POSIX_SEMAPHORES == 0 {
return yesno(sysctl32("p1003_1b.semaphores")), nil
}
return _POSIX_SEMAPHORES, nil
case SC_SPAWN:
return _POSIX_SPAWN, nil
case SC_SPIN_LOCKS:
return _POSIX_SPIN_LOCKS, nil
case SC_SPORADIC_SERVER:
return _POSIX_SPORADIC_SERVER, nil
case SC_SYNCHRONIZED_IO:
if _POSIX_SYNCHRONIZED_IO == 0 {
return yesno(sysctl32("p1003_1b.synchronized_io")), nil
}
return _POSIX_SYNCHRONIZED_IO, nil
case SC_THREAD_ATTR_STACKADDR:
return _POSIX_THREAD_ATTR_STACKADDR, nil
case SC_THREAD_ATTR_STACKSIZE:
return _POSIX_THREAD_ATTR_STACKSIZE, nil
case SC_THREAD_CPUTIME:
return _POSIX_THREAD_CPUTIME, nil
case SC_THREAD_PRIORITY_SCHEDULING:
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
case SC_THREAD_PROCESS_SHARED:
return _POSIX_THREAD_PROCESS_SHARED, nil
case SC_THREAD_SAFE_FUNCTIONS:
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
case SC_TIMERS:
if _POSIX_TIMERS == 0 {
return yesno(sysctl32("p1003_1b.timers")), nil
}
return _POSIX_TIMERS, nil
case SC_TRACE:
return _POSIX_TRACE, nil
case SC_TYPED_MEMORY_OBJECTS:
return _POSIX_TYPED_MEMORY_OBJECTS, nil
case SC_VERSION:
// TODO(tk): FreeBSD libc uses sysctl(CTL_KERN, KERN_POSIX1)
return _POSIX_VERSION, nil
/* TODO(tk): these need GOARCH-dependent integer size checks
case SC_V6_ILP32_OFF32:
return _V6_ILP32_OFF32, nil
case SC_V6_ILP32_OFFBIG:
return _V6_ILP32_OFFBIG, nil
case SC_V6_LP64_OFF64:
return _V6_LP64_OFF64, nil
case SC_V6_LPBIG_OFFBIG:
return _V6_LPBIG_OFFBIG, nil
*/
case SC_2_CHAR_TERM:
return _POSIX2_CHAR_TERM, nil
case SC_2_PBS,
SC_2_PBS_ACCOUNTING,
SC_2_PBS_CHECKPOINT,
SC_2_PBS_LOCATE,
SC_2_PBS_MESSAGE,
SC_2_PBS_TRACK:
return _POSIX2_PBS, nil
case SC_2_UPE:
return _POSIX2_UPE, nil
case SC_XOPEN_CRYPT:
return _XOPEN_CRYPT, nil
case SC_XOPEN_ENH_I18N:
return _XOPEN_ENH_I18N, nil
case SC_XOPEN_REALTIME:
return _XOPEN_REALTIME, nil
case SC_XOPEN_REALTIME_THREADS:
return _XOPEN_REALTIME_THREADS, nil
case SC_XOPEN_SHM:
return _XOPEN_SHM, nil
case SC_XOPEN_STREAMS:
return -1, nil
case SC_XOPEN_UNIX:
return _XOPEN_UNIX, nil
case SC_PHYS_PAGES:
if val, err := unix.SysctlUint64("hw.availpages"); err == nil {
return int64(val), nil
}
return -1, nil
case SC_NPROCESSORS_CONF:
fallthrough
case SC_NPROCESSORS_ONLN:
if val, err := unix.SysctlUint32("hw.ncpu"); err == nil {
return int64(val), nil
}
return -1, nil
}
return sysconfGeneric(name)
}

View File

@@ -0,0 +1,45 @@
// Copyright 2021 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd
package sysconf
import "os"
func sysconfGeneric(name int) (int64, error) {
// POSIX default values
if sc, err := sysconfPOSIX(name); err == nil {
return sc, nil
}
switch name {
case SC_BC_BASE_MAX:
return _BC_BASE_MAX, nil
case SC_BC_DIM_MAX:
return _BC_DIM_MAX, nil
case SC_BC_SCALE_MAX:
return _BC_SCALE_MAX, nil
case SC_BC_STRING_MAX:
return _BC_STRING_MAX, nil
case SC_COLL_WEIGHTS_MAX:
return _COLL_WEIGHTS_MAX, nil
case SC_EXPR_NEST_MAX:
return _EXPR_NEST_MAX, nil
case SC_HOST_NAME_MAX:
return _HOST_NAME_MAX, nil
case SC_LINE_MAX:
return _LINE_MAX, nil
case SC_LOGIN_NAME_MAX:
return _LOGIN_NAME_MAX, nil
case SC_PAGESIZE: // same as SC_PAGE_SIZE
return int64(os.Getpagesize()), nil
case SC_RE_DUP_MAX:
return _RE_DUP_MAX, nil
case SC_SYMLOOP_MAX:
return _SYMLOOP_MAX, nil
}
return -1, errInvalid
}

353
vendor/github.com/tklauser/go-sysconf/sysconf_linux.go generated vendored Normal file
View File

@@ -0,0 +1,353 @@
// Copyright 2018 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sysconf
import (
"bufio"
"os"
"runtime"
"strconv"
"strings"
"github.com/tklauser/numcpus"
"golang.org/x/sys/unix"
)
const (
// CLK_TCK is a constant on Linux for all architectures except alpha and ia64.
// See e.g.
// https://git.musl-libc.org/cgit/musl/tree/src/conf/sysconf.c#n30
// https://github.com/containerd/cgroups/pull/12
// https://lore.kernel.org/lkml/agtlq6$iht$1@penguin.transmeta.com/
_SYSTEM_CLK_TCK = 100
)
func readProcFsInt64(path string, fallback int64) int64 {
data, err := os.ReadFile(path)
if err != nil {
return fallback
}
i, err := strconv.ParseInt(string(data[:len(data)-1]), 0, 64)
if err != nil {
return fallback
}
return i
}
// getMemPages computes mem*unit/os.Getpagesize(), but avoids overflowing int64.
func getMemPages(mem uint64, unit uint32) int64 {
pageSize := os.Getpagesize()
for unit > 1 && pageSize > 1 {
unit >>= 1
pageSize >>= 1
}
mem *= uint64(unit)
for pageSize > 1 {
pageSize >>= 1
mem >>= 1
}
return int64(mem)
}
func getPhysPages() int64 {
var si unix.Sysinfo_t
err := unix.Sysinfo(&si)
if err != nil {
return int64(0)
}
return getMemPages(uint64(si.Totalram), si.Unit)
}
func getAvPhysPages() int64 {
var si unix.Sysinfo_t
err := unix.Sysinfo(&si)
if err != nil {
return int64(0)
}
return getMemPages(uint64(si.Freeram), si.Unit)
}
func getNprocsSysfs() (int64, error) {
n, err := numcpus.GetOnline()
return int64(n), err
}
func getNprocsProcStat() (int64, error) {
f, err := os.Open("/proc/stat")
if err != nil {
return -1, err
}
defer f.Close()
count := int64(0)
s := bufio.NewScanner(f)
for s.Scan() {
if line := strings.TrimSpace(s.Text()); strings.HasPrefix(line, "cpu") {
cpu, _, found := strings.Cut(line, " ")
if found {
// skip first line with accumulated values
if cpu == "cpu" {
continue
}
_, err := strconv.ParseInt(cpu[len("cpu"):], 10, 64)
if err == nil {
count++
}
}
} else {
// The current format of /proc/stat has all the
// cpu* lines at the beginning. Assume this
// stays this way.
break
}
}
if err := s.Err(); err != nil {
return -1, err
}
return count, nil
}
func getNprocs() int64 {
count, err := getNprocsSysfs()
if err == nil {
return count
}
count, err = getNprocsProcStat()
if err == nil {
return count
}
// default to the value determined at runtime startup if all else fails
return int64(runtime.NumCPU())
}
func getNprocsConf() int64 {
count, err := numcpus.GetConfigured()
if err == nil {
return int64(count)
}
// TODO(tk): fall back to reading /proc/cpuinfo on legacy systems
// without sysfs?
return getNprocs()
}
func hasClock(clockid int32) bool {
var res unix.Timespec
if err := unix.ClockGetres(clockid, &res); err != nil {
return false
}
return true
}
func max(a, b int64) int64 {
if a > b {
return a
}
return b
}
func sysconf(name int) (int64, error) {
switch name {
case SC_AIO_LISTIO_MAX:
return -1, nil
case SC_AIO_MAX:
return -1, nil
case SC_AIO_PRIO_DELTA_MAX:
return _AIO_PRIO_DELTA_MAX, nil
case SC_ARG_MAX:
argMax := int64(_POSIX_ARG_MAX)
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_STACK, &rlim); err == nil {
argMax = max(argMax, int64(rlim.Cur/4))
}
return argMax, nil
case SC_ATEXIT_MAX:
return _INT_MAX, nil
case SC_CHILD_MAX:
childMax := int64(-1)
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil && rlim.Cur != unix.RLIM_INFINITY {
childMax = int64(rlim.Cur)
}
return childMax, nil
case SC_CLK_TCK:
return _SYSTEM_CLK_TCK, nil
case SC_DELAYTIMER_MAX:
return _DELAYTIMER_MAX, nil
case SC_GETGR_R_SIZE_MAX:
return _NSS_BUFLEN_GROUP, nil
case SC_GETPW_R_SIZE_MAX:
return _NSS_BUFLEN_PASSWD, nil
case SC_MQ_OPEN_MAX:
return -1, nil
case SC_MQ_PRIO_MAX:
return _MQ_PRIO_MAX, nil
case SC_NGROUPS_MAX:
return readProcFsInt64("/proc/sys/kernel/ngroups_max", _NGROUPS_MAX), nil
case SC_OPEN_MAX:
openMax := int64(_OPEN_MAX)
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
openMax = int64(rlim.Cur)
}
return openMax, nil
case SC_RTSIG_MAX:
return _RTSIG_MAX, nil
case SC_SEM_NSEMS_MAX:
return -1, nil
case SC_SEM_VALUE_MAX:
return _SEM_VALUE_MAX, nil
case SC_SIGQUEUE_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_SIGPENDING, &rlim); err == nil {
return int64(rlim.Cur), nil
}
return readProcFsInt64("/proc/sys/kernel/rtsig-max", _POSIX_SIGQUEUE_MAX), nil
case SC_STREAM_MAX:
return _STREAM_MAX, nil
case SC_THREAD_DESTRUCTOR_ITERATIONS:
return _POSIX_THREAD_DESTRUCTOR_ITERATIONS, nil
case SC_THREAD_KEYS_MAX:
return _PTHREAD_KEYS_MAX, nil
case SC_THREAD_PRIO_INHERIT:
return _POSIX_THREAD_PRIO_INHERIT, nil
case SC_THREAD_PRIO_PROTECT:
return _POSIX_THREAD_PRIO_PROTECT, nil
case SC_THREAD_STACK_MIN:
return _PTHREAD_STACK_MIN, nil
case SC_THREAD_THREADS_MAX:
return -1, nil
case SC_TIMER_MAX:
return -1, nil
case SC_TTY_NAME_MAX:
return _TTY_NAME_MAX, nil
case SC_TZNAME_MAX:
return -1, nil
case SC_CPUTIME:
if hasClock(unix.CLOCK_PROCESS_CPUTIME_ID) {
return _POSIX_VERSION, nil
}
return -1, nil
case SC_MONOTONIC_CLOCK:
if hasClock(unix.CLOCK_MONOTONIC) {
return _POSIX_VERSION, nil
}
return -1, nil
case SC_SAVED_IDS:
return _POSIX_SAVED_IDS, nil
case SC_SPAWN:
return _POSIX_SPAWN, nil
case SC_SPIN_LOCKS:
return _POSIX_SPIN_LOCKS, nil
case SC_SPORADIC_SERVER:
return _POSIX_SPORADIC_SERVER, nil
case SC_SYNCHRONIZED_IO:
return _POSIX_SYNCHRONIZED_IO, nil
case SC_THREAD_ATTR_STACKADDR:
return _POSIX_THREAD_ATTR_STACKADDR, nil
case SC_THREAD_ATTR_STACKSIZE:
return _POSIX_THREAD_ATTR_STACKSIZE, nil
case SC_THREAD_CPUTIME:
if hasClock(unix.CLOCK_THREAD_CPUTIME_ID) {
return _POSIX_VERSION, nil
}
return -1, nil
case SC_THREAD_PRIORITY_SCHEDULING:
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
case SC_THREAD_PROCESS_SHARED:
return _POSIX_THREAD_PROCESS_SHARED, nil
case SC_THREAD_SAFE_FUNCTIONS:
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
case SC_THREAD_SPORADIC_SERVER:
return _POSIX_THREAD_SPORADIC_SERVER, nil
case SC_TRACE:
return _POSIX_TRACE, nil
case SC_TRACE_EVENT_FILTER:
return _POSIX_TRACE_EVENT_FILTER, nil
case SC_TRACE_EVENT_NAME_MAX:
return -1, nil
case SC_TRACE_INHERIT:
return _POSIX_TRACE_INHERIT, nil
case SC_TRACE_LOG:
return _POSIX_TRACE_LOG, nil
case SC_TRACE_NAME_MAX:
return -1, nil
case SC_TRACE_SYS_MAX:
return -1, nil
case SC_TRACE_USER_EVENT_MAX:
return -1, nil
case SC_TYPED_MEMORY_OBJECTS:
return _POSIX_TYPED_MEMORY_OBJECTS, nil
case SC_V7_ILP32_OFF32:
return _POSIX_V7_ILP32_OFF32, nil
case SC_V7_ILP32_OFFBIG:
return _POSIX_V7_ILP32_OFFBIG, nil
case SC_V7_LP64_OFF64:
return _POSIX_V7_LP64_OFF64, nil
case SC_V7_LPBIG_OFFBIG:
return _POSIX_V7_LPBIG_OFFBIG, nil
case SC_V6_ILP32_OFF32:
return _POSIX_V6_ILP32_OFF32, nil
case SC_V6_ILP32_OFFBIG:
return _POSIX_V6_ILP32_OFFBIG, nil
case SC_V6_LP64_OFF64:
return _POSIX_V6_LP64_OFF64, nil
case SC_V6_LPBIG_OFFBIG:
return _POSIX_V6_LPBIG_OFFBIG, nil
case SC_2_C_VERSION:
return _POSIX2_C_VERSION, nil
case SC_2_CHAR_TERM:
return _POSIX2_CHAR_TERM, nil
case SC_2_PBS,
SC_2_PBS_ACCOUNTING,
SC_2_PBS_CHECKPOINT,
SC_2_PBS_LOCATE,
SC_2_PBS_MESSAGE,
SC_2_PBS_TRACK:
return -1, nil
case SC_2_UPE:
return -1, nil
case SC_XOPEN_CRYPT:
// removed in glibc 2.28
return -1, nil
case SC_XOPEN_ENH_I18N:
return _XOPEN_ENH_I18N, nil
case SC_XOPEN_REALTIME:
return _XOPEN_REALTIME, nil
case SC_XOPEN_REALTIME_THREADS:
return _XOPEN_REALTIME_THREADS, nil
case SC_XOPEN_SHM:
return _XOPEN_SHM, nil
case SC_XOPEN_STREAMS:
return -1, nil
case SC_XOPEN_UNIX:
return _XOPEN_UNIX, nil
case SC_XOPEN_VERSION:
return _XOPEN_VERSION, nil
case SC_XOPEN_XCU_VERSION:
return _XOPEN_XCU_VERSION, nil
case SC_PHYS_PAGES:
return getPhysPages(), nil
case SC_AVPHYS_PAGES:
return getAvPhysPages(), nil
case SC_NPROCESSORS_CONF:
return getNprocsConf(), nil
case SC_NPROCESSORS_ONLN:
return getNprocs(), nil
case SC_UIO_MAXIOV: // same as _SC_IOV_MAX
return _UIO_MAXIOV, nil
}
return sysconfGeneric(name)
}

250
vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go generated vendored Normal file
View File

@@ -0,0 +1,250 @@
// Copyright 2018 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sysconf
import (
"sync"
"golang.org/x/sys/unix"
)
const (
_HOST_NAME_MAX = _MAXHOSTNAMELEN
_LOGIN_NAME_MAX = _MAXLOGNAME + 1
_SYMLOOP_MAX = _MAXSYMLINKS
_POSIX2_C_BIND = 1
_POSIX2_C_DEV = -1
_POSIX2_CHAR_TERM = -1
_POSIX2_FORT_DEV = -1
_POSIX2_FORT_RUN = -1
_POSIX2_LOCALEDEF = -1
_POSIX2_SW_DEV = -1
_POSIX2_UPE = -1
)
var clktck struct {
sync.Once
v int64
}
func sysconfPOSIX(name int) (int64, error) {
// NetBSD does not define all _POSIX_* values used in sysconf_posix.go
// The supported ones are handled in sysconf below.
return -1, errInvalid
}
func sysconf(name int) (int64, error) {
// NetBSD uses sysctl to get some of these values. For the user.* namespace,
// calls get handled by user_sysctl in /usr/src/lib/libc/gen/sysctl.c
// Duplicate the relevant values here.
switch name {
// 1003.1
case SC_ARG_MAX:
return sysctl32("kern.argmax"), nil
case SC_CHILD_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
return int64(rlim.Cur), nil
}
}
return -1, nil
case SC_CLK_TCK:
// TODO: use sync.OnceValue once Go 1.21 is the minimal supported version
clktck.Do(func() {
clktck.v = -1
if ci, err := unix.SysctlClockinfo("kern.clockrate"); err == nil {
clktck.v = int64(ci.Hz)
}
})
return clktck.v, nil
case SC_NGROUPS_MAX:
return sysctl32("kern.ngroups"), nil
case SC_JOB_CONTROL:
return sysctl32("kern.job_control"), nil
case SC_OPEN_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
return int64(rlim.Cur), nil
}
return -1, nil
case SC_STREAM_MAX:
// sysctl("user.stream_max")
return _FOPEN_MAX, nil
case SC_TZNAME_MAX:
// sysctl("user.tzname_max")
return _NAME_MAX, nil
case SC_SAVED_IDS:
return yesno(sysctl32("kern.saved_ids")), nil
case SC_VERSION:
return sysctl32("kern.posix1version"), nil
// 1003.1b
case SC_FSYNC:
return sysctl32("kern.fsync"), nil
case SC_SYNCHRONIZED_IO:
return sysctl32("kern.synchronized_io"), nil
case SC_MAPPED_FILES:
return sysctl32("kern.mapped_files"), nil
case SC_MEMLOCK:
return sysctl32("kern.memlock"), nil
case SC_MEMLOCK_RANGE:
return sysctl32("kern.memlock_range"), nil
case SC_MEMORY_PROTECTION:
return sysctl32("kern.memory_protection"), nil
case SC_MONOTONIC_CLOCK:
return sysctl32("kern.monotonic_clock"), nil
case SC_SEMAPHORES:
return sysctl32("kern.posix_semaphores"), nil
case SC_TIMERS:
return sysctl32("kern.posix_timers"), nil
// 1003.1c
case SC_LOGIN_NAME_MAX:
return sysctl32("kern.login_name_max"), nil
case SC_THREADS:
return sysctl32("kern.posix_threads"), nil
// 1003.1j
case SC_BARRIERS:
return yesno(sysctl32("kern.posix_barriers")), nil
case SC_SPIN_LOCKS:
return yesno(sysctl32("kern.posix_spin_locks")), nil
case SC_READER_WRITER_LOCKS:
return yesno(sysctl32("kern.posix_reader_writer_locks")), nil
// 1003.2
case SC_2_VERSION:
// sysctl user.posix2_version
return _POSIX2_VERSION, nil
case SC_2_C_BIND:
// sysctl user.posix2_c_bind
return _POSIX2_C_BIND, nil
case SC_2_C_DEV:
// sysctl user.posix2_c_dev
return _POSIX2_C_DEV, nil
case SC_2_CHAR_TERM:
// sysctl user.posix2_char_term
return _POSIX2_CHAR_TERM, nil
case SC_2_FORT_DEV:
// sysctl user.posix2_fort_dev
return _POSIX2_FORT_DEV, nil
case SC_2_FORT_RUN:
// sysctl user.posix2_fort_run
return _POSIX2_FORT_RUN, nil
case SC_2_LOCALEDEF:
// sysctl user.posix2_localedef
return _POSIX2_LOCALEDEF, nil
case SC_2_SW_DEV:
// sysctl user.posix2_sw_dev
return _POSIX2_SW_DEV, nil
case SC_2_UPE:
// sysctl user.posix2_upe
return _POSIX2_UPE, nil
// XPG 4.2
case SC_IOV_MAX:
return sysctl32("kern.iov_max"), nil
case SC_XOPEN_SHM:
return yesno(sysctl32("kern.ipc.sysvshm")), nil
// 1003.1-2001, XSI Option Group
case SC_AIO_LISTIO_MAX:
return sysctl32("kern.aio_listio_max"), nil
case SC_AIO_MAX:
return sysctl32("kern.aio_max"), nil
case SC_ASYNCHRONOUS_IO:
return yesno(sysctl32("kern.posix_aio")), nil
case SC_MESSAGE_PASSING:
return yesno(sysctl32("kern.posix_msg")), nil
case SC_MQ_OPEN_MAX:
return sysctl32("kern.mqueue.mq_open_max"), nil
case SC_MQ_PRIO_MAX:
return sysctl32("kern.mqueue.mq_prio_max"), nil
case SC_PRIORITY_SCHEDULING:
return yesno(sysctl32("kern.posix_sched")), nil
case SC_ATEXIT_MAX:
// sysctl("user.atexit_max")
return -1, nil // TODO
// 1003.1-2001, TSF
case SC_GETGR_R_SIZE_MAX:
return _GETGR_R_SIZE_MAX, nil
case SC_GETPW_R_SIZE_MAX:
return _GETPW_R_SIZE_MAX, nil
// Unsorted
case SC_HOST_NAME_MAX:
return _MAXHOSTNAMELEN, nil
case SC_PASS_MAX:
return _PASSWORD_LEN, nil
case SC_REGEXP:
return _POSIX_REGEXP, nil
case SC_SHARED_MEMORY_OBJECTS:
return _POSIX_SHARED_MEMORY_OBJECTS, nil
case SC_SHELL:
return _POSIX_SHELL, nil
case SC_SPAWN:
return _POSIX_SPAWN, nil
// Extensions
case SC_NPROCESSORS_CONF:
return sysctl32("hw.ncpu"), nil
case SC_NPROCESSORS_ONLN:
return sysctl32("hw.ncpuonline"), nil
// Linux/Solaris
case SC_PHYS_PAGES:
return sysctl64("hw.physmem64") / int64(unix.Getpagesize()), nil
// Native
case SC_SCHED_RT_TS:
return sysctl32("kern.sched.rtts"), nil
case SC_SCHED_PRI_MIN:
return sysctl32("kern.sched.pri_min"), nil
case SC_SCHED_PRI_MAX:
return sysctl32("kern.sched.pri_max"), nil
case SC_THREAD_DESTRUCTOR_ITERATIONS:
return _POSIX_THREAD_DESTRUCTOR_ITERATIONS, nil
case SC_THREAD_KEYS_MAX:
return _POSIX_THREAD_KEYS_MAX, nil
case SC_THREAD_STACK_MIN:
return int64(unix.Getpagesize()), nil
case SC_THREAD_THREADS_MAX:
return sysctl32("kern.maxproc"), nil
case SC_THREAD_ATTR_STACKADDR:
return _POSIX_THREAD_ATTR_STACKADDR, nil
case SC_THREAD_ATTR_STACKSIZE:
return _POSIX_THREAD_ATTR_STACKSIZE, nil
case SC_THREAD_SAFE_FUNCTIONS:
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
case SC_THREAD_PRIO_PROTECT:
return _POSIX_THREAD_PRIO_PROTECT, nil
case SC_THREAD_PRIORITY_SCHEDULING,
SC_THREAD_PRIO_INHERIT,
SC_THREAD_PROCESS_SHARED:
return -1, nil
case SC_TTY_NAME_MAX:
return pathconf(_PATH_DEV, _PC_NAME_MAX), nil
case SC_TIMER_MAX:
return _POSIX_TIMER_MAX, nil
case SC_SEM_NSEMS_MAX:
return _LONG_MAX, nil
case SC_CPUTIME:
return _POSIX_CPUTIME, nil
case SC_THREAD_CPUTIME:
return _POSIX_THREAD_CPUTIME, nil
case SC_DELAYTIMER_MAX:
return _POSIX_DELAYTIMER_MAX, nil
case SC_SIGQUEUE_MAX:
return _POSIX_SIGQUEUE_MAX, nil
case SC_REALTIME_SIGNALS:
return 200112, nil
}
return sysconfGeneric(name)
}

View File

@@ -0,0 +1,271 @@
// Copyright 2018 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sysconf
import "golang.org/x/sys/unix"
// sysconf implements sysconf(3) as in the OpenBSD 6.3 libc.
func sysconf(name int) (int64, error) {
switch name {
case SC_AIO_LISTIO_MAX,
SC_AIO_MAX,
SC_AIO_PRIO_DELTA_MAX:
return -1, nil
case SC_ARG_MAX:
return sysctl32("kern.argmax"), nil
case SC_ATEXIT_MAX:
return -1, nil
case SC_CHILD_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
return int64(rlim.Cur), nil
}
}
return -1, nil
case SC_CLK_TCK:
return _CLK_TCK, nil
case SC_DELAYTIMER_MAX:
return -1, nil
case SC_GETGR_R_SIZE_MAX:
return _GR_BUF_LEN, nil
case SC_GETPW_R_SIZE_MAX:
return _PW_BUF_LEN, nil
case SC_IOV_MAX:
return _IOV_MAX, nil
case SC_LOGIN_NAME_MAX:
return _LOGIN_NAME_MAX, nil
case SC_NGROUPS_MAX:
return sysctl32("kern.ngroups"), nil
case SC_OPEN_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
return int64(rlim.Cur), nil
}
}
return -1, nil
case SC_SEM_NSEMS_MAX:
return -1, nil
case SC_SEM_VALUE_MAX:
return _SEM_VALUE_MAX, nil
case SC_SIGQUEUE_MAX:
return -1, nil
case SC_STREAM_MAX:
var rlim unix.Rlimit
if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil {
if rlim.Cur != unix.RLIM_INFINITY {
if rlim.Cur > _SHRT_MAX {
return _SHRT_MAX, nil
}
return int64(rlim.Cur), nil
}
}
return -1, nil
case SC_THREAD_DESTRUCTOR_ITERATIONS:
return _PTHREAD_DESTRUCTOR_ITERATIONS, nil
case SC_THREAD_KEYS_MAX:
return _PTHREAD_KEYS_MAX, nil
case SC_THREAD_STACK_MIN:
return _PTHREAD_STACK_MIN, nil
case SC_THREAD_THREADS_MAX:
return -1, nil
case SC_TIMER_MAX:
return -1, nil
case SC_TTY_NAME_MAX:
return _TTY_NAME_MAX, nil
case SC_TZNAME_MAX:
return _NAME_MAX, nil
case SC_BARRIERS:
return _POSIX_BARRIERS, nil
case SC_FSYNC:
return _POSIX_FSYNC, nil
case SC_IPV6:
if _POSIX_IPV6 == 0 {
fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0)
if err == nil && fd >= 0 {
unix.Close(fd)
return int64(200112), nil
}
return 0, nil
}
return _POSIX_IPV6, nil
case SC_JOB_CONTROL:
return _POSIX_JOB_CONTROL, nil
case SC_MAPPED_FILES:
return _POSIX_MAPPED_FILES, nil
case SC_MONOTONIC_CLOCK:
return _POSIX_MONOTONIC_CLOCK, nil
case SC_SAVED_IDS:
return _POSIX_SAVED_IDS, nil
case SC_SEMAPHORES:
return _POSIX_SEMAPHORES, nil
case SC_SPAWN:
return _POSIX_SPAWN, nil
case SC_SPIN_LOCKS:
return _POSIX_SPIN_LOCKS, nil
case SC_SPORADIC_SERVER:
return _POSIX_SPORADIC_SERVER, nil
case SC_SYNCHRONIZED_IO:
return _POSIX_SYNCHRONIZED_IO, nil
case SC_THREAD_ATTR_STACKADDR:
return _POSIX_THREAD_ATTR_STACKADDR, nil
case SC_THREAD_ATTR_STACKSIZE:
return _POSIX_THREAD_ATTR_STACKSIZE, nil
case SC_THREAD_CPUTIME:
return _POSIX_THREAD_CPUTIME, nil
case SC_THREAD_PRIO_INHERIT:
return _POSIX_THREAD_PRIO_INHERIT, nil
case SC_THREAD_PRIO_PROTECT:
return _POSIX_THREAD_PRIO_PROTECT, nil
case SC_THREAD_PRIORITY_SCHEDULING:
return _POSIX_THREAD_PRIORITY_SCHEDULING, nil
case SC_THREAD_PROCESS_SHARED:
return _POSIX_THREAD_PROCESS_SHARED, nil
case SC_THREAD_ROBUST_PRIO_INHERIT:
return _POSIX_THREAD_ROBUST_PRIO_INHERIT, nil
case SC_THREAD_ROBUST_PRIO_PROTECT:
return _POSIX_THREAD_ROBUST_PRIO_PROTECT, nil
case SC_THREAD_SAFE_FUNCTIONS:
return _POSIX_THREAD_SAFE_FUNCTIONS, nil
case SC_THREAD_SPORADIC_SERVER:
return _POSIX_THREAD_SPORADIC_SERVER, nil
case SC_THREADS:
return _POSIX_THREADS, nil
case SC_TIMEOUTS:
return _POSIX_TIMEOUTS, nil
case SC_TIMERS:
return _POSIX_TIMERS, nil
case SC_TRACE,
SC_TRACE_EVENT_FILTER,
SC_TRACE_EVENT_NAME_MAX,
SC_TRACE_INHERIT,
SC_TRACE_LOG:
return _POSIX_TRACE, nil
case SC_TYPED_MEMORY_OBJECTS:
return _POSIX_TYPED_MEMORY_OBJECTS, nil
case SC_V7_ILP32_OFF32:
return _POSIX_V7_ILP32_OFF32, nil
case SC_V7_ILP32_OFFBIG:
if _POSIX_V7_ILP32_OFFBIG == 0 {
if unix.SizeofInt*_CHAR_BIT == 32 &&
unix.SizeofLong*_CHAR_BIT == 32 &&
unix.SizeofPtr*_CHAR_BIT == 32 &&
sizeofOffT*_CHAR_BIT >= 64 {
return 1, nil
}
return -1, nil
}
return _POSIX_V7_ILP32_OFFBIG, nil
case SC_V7_LP64_OFF64:
if _POSIX_V7_LP64_OFF64 == 0 {
if unix.SizeofInt*_CHAR_BIT == 32 &&
unix.SizeofLong*_CHAR_BIT == 64 &&
unix.SizeofPtr*_CHAR_BIT == 64 &&
sizeofOffT*_CHAR_BIT == 64 {
return 1, nil
}
return -1, nil
}
return _POSIX_V7_LP64_OFF64, nil
case SC_V7_LPBIG_OFFBIG:
if _POSIX_V7_LPBIG_OFFBIG == 0 {
if unix.SizeofInt*_CHAR_BIT >= 32 &&
unix.SizeofLong*_CHAR_BIT >= 64 &&
unix.SizeofPtr*_CHAR_BIT >= 64 &&
sizeofOffT*_CHAR_BIT >= 64 {
return 1, nil
}
return -1, nil
}
return _POSIX_V7_LPBIG_OFFBIG, nil
case SC_V6_ILP32_OFF32:
return _POSIX_V6_ILP32_OFF32, nil
case SC_V6_ILP32_OFFBIG:
if _POSIX_V6_ILP32_OFFBIG == 0 {
if unix.SizeofInt*_CHAR_BIT == 32 &&
unix.SizeofLong*_CHAR_BIT == 32 &&
unix.SizeofPtr*_CHAR_BIT == 32 &&
sizeofOffT*_CHAR_BIT >= 64 {
return 1, nil
}
return -1, nil
}
return _POSIX_V6_ILP32_OFFBIG, nil
case SC_V6_LP64_OFF64:
if _POSIX_V6_LP64_OFF64 == 0 {
if unix.SizeofInt*_CHAR_BIT == 32 &&
unix.SizeofLong*_CHAR_BIT == 64 &&
unix.SizeofPtr*_CHAR_BIT == 64 &&
sizeofOffT*_CHAR_BIT == 64 {
return 1, nil
}
return -1, nil
}
return _POSIX_V6_LP64_OFF64, nil
case SC_V6_LPBIG_OFFBIG:
if _POSIX_V6_LPBIG_OFFBIG == 0 {
if unix.SizeofInt*_CHAR_BIT >= 32 &&
unix.SizeofLong*_CHAR_BIT >= 64 &&
unix.SizeofPtr*_CHAR_BIT >= 64 &&
sizeofOffT*_CHAR_BIT >= 64 {
return 1, nil
}
return -1, nil
}
return _POSIX_V6_LPBIG_OFFBIG, nil
case SC_2_CHAR_TERM:
return _POSIX2_CHAR_TERM, nil
case SC_2_PBS,
SC_2_PBS_ACCOUNTING,
SC_2_PBS_CHECKPOINT,
SC_2_PBS_LOCATE,
SC_2_PBS_MESSAGE,
SC_2_PBS_TRACK:
return _POSIX2_PBS, nil
case SC_2_UPE:
return _POSIX2_UPE, nil
case SC_2_VERSION:
return _POSIX2_VERSION, nil
case SC_XOPEN_CRYPT:
return _XOPEN_CRYPT, nil
case SC_XOPEN_ENH_I18N:
return _XOPEN_ENH_I18N, nil
case SC_XOPEN_REALTIME:
return _XOPEN_REALTIME, nil
case SC_XOPEN_REALTIME_THREADS:
return _XOPEN_REALTIME_THREADS, nil
case SC_XOPEN_SHM:
return _XOPEN_SHM, nil
case SC_XOPEN_STREAMS:
return _XOPEN_STREAMS, nil
case SC_XOPEN_UNIX:
return _XOPEN_UNIX, nil
case SC_XOPEN_UUCP:
return _XOPEN_UUCP, nil
case SC_AVPHYS_PAGES:
if uvm, err := unix.SysctlUvmexp("vm.uvmexp"); err == nil {
return int64(uvm.Free), nil
}
return -1, nil
case SC_PHYS_PAGES:
return sysctl64("hw.physmem") / int64(unix.Getpagesize()), nil
case SC_NPROCESSORS_CONF:
return sysctl32("hw.ncpu"), nil
case SC_NPROCESSORS_ONLN:
if val, err := unix.SysctlUint32("hw.ncpuonline"); err == nil {
return int64(val), nil
}
return sysctl32("hw.ncpu"), nil
}
return sysconfGeneric(name)
}

82
vendor/github.com/tklauser/go-sysconf/sysconf_posix.go generated vendored Normal file
View File

@@ -0,0 +1,82 @@
// Copyright 2018 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build darwin || dragonfly || freebsd || linux || openbsd
package sysconf
func sysconfPOSIX(name int) (int64, error) {
switch name {
case SC_ADVISORY_INFO:
return _POSIX_ADVISORY_INFO, nil
case SC_ASYNCHRONOUS_IO:
return _POSIX_ASYNCHRONOUS_IO, nil
case SC_BARRIERS:
return _POSIX_BARRIERS, nil
case SC_CLOCK_SELECTION:
return _POSIX_CLOCK_SELECTION, nil
case SC_CPUTIME:
return _POSIX_CPUTIME, nil
case SC_FSYNC:
return _POSIX_FSYNC, nil
case SC_IPV6:
return _POSIX_IPV6, nil
case SC_JOB_CONTROL:
return _POSIX_JOB_CONTROL, nil
case SC_MAPPED_FILES:
return _POSIX_MAPPED_FILES, nil
case SC_MEMLOCK:
return _POSIX_MEMLOCK, nil
case SC_MEMLOCK_RANGE:
return _POSIX_MEMLOCK_RANGE, nil
case SC_MONOTONIC_CLOCK:
return _POSIX_MONOTONIC_CLOCK, nil
case SC_MEMORY_PROTECTION:
return _POSIX_MEMORY_PROTECTION, nil
case SC_MESSAGE_PASSING:
return _POSIX_MESSAGE_PASSING, nil
case SC_PRIORITIZED_IO:
return _POSIX_PRIORITIZED_IO, nil
case SC_PRIORITY_SCHEDULING:
return _POSIX_PRIORITY_SCHEDULING, nil
case SC_RAW_SOCKETS:
return _POSIX_RAW_SOCKETS, nil
case SC_READER_WRITER_LOCKS:
return _POSIX_READER_WRITER_LOCKS, nil
case SC_REALTIME_SIGNALS:
return _POSIX_REALTIME_SIGNALS, nil
case SC_REGEXP:
return _POSIX_REGEXP, nil
case SC_SEMAPHORES:
return _POSIX_SEMAPHORES, nil
case SC_SHARED_MEMORY_OBJECTS:
return _POSIX_SHARED_MEMORY_OBJECTS, nil
case SC_SHELL:
return _POSIX_SHELL, nil
case SC_THREADS:
return _POSIX_THREADS, nil
case SC_TIMEOUTS:
return _POSIX_TIMEOUTS, nil
case SC_TIMERS:
return _POSIX_TIMERS, nil
case SC_VERSION:
return _POSIX_VERSION, nil
case SC_2_C_BIND:
return _POSIX2_C_BIND, nil
case SC_2_C_DEV:
return _POSIX2_C_DEV, nil
case SC_2_FORT_DEV:
return -1, nil
case SC_2_FORT_RUN:
return -1, nil
case SC_2_LOCALEDEF:
return _POSIX2_LOCALEDEF, nil
case SC_2_SW_DEV:
return _POSIX2_SW_DEV, nil
case SC_2_VERSION:
return _POSIX2_VERSION, nil
}
return -1, errInvalid
}

View File

@@ -0,0 +1,14 @@
// Copyright 2021 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package sysconf
import "golang.org/x/sys/unix"
func sysconf(name int) (int64, error) {
if name < 0 {
return -1, errInvalid
}
return unix.Sysconf(name)
}

View File

@@ -0,0 +1,16 @@
// Copyright 2021 Tobias Klauser. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris
package sysconf
import (
"fmt"
"runtime"
)
func sysconf(name int) (int64, error) {
return -1, fmt.Errorf("unsupported on %s", runtime.GOOS)
}

View File

@@ -0,0 +1,252 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_defs_darwin.go
//go:build darwin
package sysconf
const (
SC_AIO_LISTIO_MAX = 0x2a
SC_AIO_MAX = 0x2b
SC_AIO_PRIO_DELTA_MAX = 0x2c
SC_ARG_MAX = 0x1
SC_ATEXIT_MAX = 0x6b
SC_BC_BASE_MAX = 0x9
SC_BC_DIM_MAX = 0xa
SC_BC_SCALE_MAX = 0xb
SC_BC_STRING_MAX = 0xc
SC_CHILD_MAX = 0x2
SC_CLK_TCK = 0x3
SC_COLL_WEIGHTS_MAX = 0xd
SC_DELAYTIMER_MAX = 0x2d
SC_EXPR_NEST_MAX = 0xe
SC_GETGR_R_SIZE_MAX = 0x46
SC_GETPW_R_SIZE_MAX = 0x47
SC_HOST_NAME_MAX = 0x48
SC_IOV_MAX = 0x38
SC_LINE_MAX = 0xf
SC_LOGIN_NAME_MAX = 0x49
SC_MQ_OPEN_MAX = 0x2e
SC_MQ_PRIO_MAX = 0x4b
SC_NGROUPS_MAX = 0x4
SC_OPEN_MAX = 0x5
SC_PAGE_SIZE = 0x1d
SC_PAGESIZE = 0x1d
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55
SC_THREAD_KEYS_MAX = 0x56
SC_THREAD_STACK_MIN = 0x5d
SC_THREAD_THREADS_MAX = 0x5e
SC_RE_DUP_MAX = 0x10
SC_RTSIG_MAX = 0x30
SC_SEM_NSEMS_MAX = 0x31
SC_SEM_VALUE_MAX = 0x32
SC_SIGQUEUE_MAX = 0x33
SC_STREAM_MAX = 0x1a
SC_SYMLOOP_MAX = 0x78
SC_TIMER_MAX = 0x34
SC_TTY_NAME_MAX = 0x65
SC_TZNAME_MAX = 0x1b
SC_ADVISORY_INFO = 0x41
SC_ASYNCHRONOUS_IO = 0x1c
SC_BARRIERS = 0x42
SC_CLOCK_SELECTION = 0x43
SC_CPUTIME = 0x44
SC_FSYNC = 0x26
SC_IPV6 = 0x76
SC_JOB_CONTROL = 0x6
SC_MAPPED_FILES = 0x2f
SC_MEMLOCK = 0x1e
SC_MEMLOCK_RANGE = 0x1f
SC_MEMORY_PROTECTION = 0x20
SC_MESSAGE_PASSING = 0x21
SC_MONOTONIC_CLOCK = 0x4a
SC_PRIORITIZED_IO = 0x22
SC_PRIORITY_SCHEDULING = 0x23
SC_RAW_SOCKETS = 0x77
SC_READER_WRITER_LOCKS = 0x4c
SC_REALTIME_SIGNALS = 0x24
SC_REGEXP = 0x4d
SC_SAVED_IDS = 0x7
SC_SEMAPHORES = 0x25
SC_SHARED_MEMORY_OBJECTS = 0x27
SC_SHELL = 0x4e
SC_SPAWN = 0x4f
SC_SPIN_LOCKS = 0x50
SC_SPORADIC_SERVER = 0x51
SC_SS_REPL_MAX = 0x7e
SC_SYNCHRONIZED_IO = 0x28
SC_THREAD_ATTR_STACKADDR = 0x52
SC_THREAD_ATTR_STACKSIZE = 0x53
SC_THREAD_CPUTIME = 0x54
SC_THREAD_PRIO_INHERIT = 0x57
SC_THREAD_PRIO_PROTECT = 0x58
SC_THREAD_PRIORITY_SCHEDULING = 0x59
SC_THREAD_PROCESS_SHARED = 0x5a
SC_THREAD_SAFE_FUNCTIONS = 0x5b
SC_THREAD_SPORADIC_SERVER = 0x5c
SC_THREADS = 0x60
SC_TIMEOUTS = 0x5f
SC_TIMERS = 0x29
SC_TRACE = 0x61
SC_TRACE_EVENT_FILTER = 0x62
SC_TRACE_EVENT_NAME_MAX = 0x7f
SC_TRACE_INHERIT = 0x63
SC_TRACE_LOG = 0x64
SC_TRACE_NAME_MAX = 0x80
SC_TRACE_SYS_MAX = 0x81
SC_TRACE_USER_EVENT_MAX = 0x82
SC_TYPED_MEMORY_OBJECTS = 0x66
SC_VERSION = 0x8
SC_V6_ILP32_OFF32 = 0x67
SC_V6_ILP32_OFFBIG = 0x68
SC_V6_LP64_OFF64 = 0x69
SC_V6_LPBIG_OFFBIG = 0x6a
SC_2_C_BIND = 0x12
SC_2_C_DEV = 0x13
SC_2_CHAR_TERM = 0x14
SC_2_FORT_DEV = 0x15
SC_2_FORT_RUN = 0x16
SC_2_LOCALEDEF = 0x17
SC_2_PBS = 0x3b
SC_2_PBS_ACCOUNTING = 0x3c
SC_2_PBS_CHECKPOINT = 0x3d
SC_2_PBS_LOCATE = 0x3e
SC_2_PBS_MESSAGE = 0x3f
SC_2_PBS_TRACK = 0x40
SC_2_SW_DEV = 0x18
SC_2_UPE = 0x19
SC_2_VERSION = 0x11
SC_XOPEN_CRYPT = 0x6c
SC_XOPEN_ENH_I18N = 0x6d
SC_XOPEN_REALTIME = 0x6f
SC_XOPEN_REALTIME_THREADS = 0x70
SC_XOPEN_SHM = 0x71
SC_XOPEN_STREAMS = 0x72
SC_XOPEN_UNIX = 0x73
SC_XOPEN_VERSION = 0x74
SC_XOPEN_XCU_VERSION = 0x79
SC_PHYS_PAGES = 0xc8
SC_NPROCESSORS_CONF = 0x39
SC_NPROCESSORS_ONLN = 0x3a
)
const (
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0x2
_EXPR_NEST_MAX = 0x20
_IOV_MAX = 0x400
_LINE_MAX = 0x800
_NAME_MAX = 0xff
_RE_DUP_MAX = 0xff
_CLK_TCK = 0x64
_MAXHOSTNAMELEN = 0x100
_MAXLOGNAME = 0xff
_MAXSYMLINKS = 0x20
_POSIX_ADVISORY_INFO = -0x1
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = -0x1
_POSIX_BARRIERS = -0x1
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = -0x1
_POSIX_CPUTIME = -0x1
_POSIX_FSYNC = 0x30db0
_POSIX_IPV6 = 0x30db0
_POSIX_JOB_CONTROL = 0x30db0
_POSIX_MAPPED_FILES = 0x30db0
_POSIX_MEMLOCK = -0x1
_POSIX_MEMLOCK_RANGE = -0x1
_POSIX_MEMORY_PROTECTION = 0x30db0
_POSIX_MESSAGE_PASSING = -0x1
_POSIX_MONOTONIC_CLOCK = -0x1
_POSIX_PRIORITIZED_IO = -0x1
_POSIX_PRIORITY_SCHEDULING = -0x1
_POSIX_RAW_SOCKETS = -0x1
_POSIX_READER_WRITER_LOCKS = 0x30db0
_POSIX_REALTIME_SIGNALS = -0x1
_POSIX_REGEXP = 0x30db0
_POSIX_SEM_VALUE_MAX = 0x7fff
_POSIX_SEMAPHORES = -0x1
_POSIX_SHARED_MEMORY_OBJECTS = -0x1
_POSIX_SHELL = 0x30db0
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPIN_LOCKS = -0x1
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SS_REPL_MAX = 0x4
_POSIX_SYNCHRONIZED_IO = -0x1
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
_POSIX_THREAD_CPUTIME = -0x1
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_KEYS_MAX = 0x80
_POSIX_THREAD_PRIO_INHERIT = -0x1
_POSIX_THREAD_PRIO_PROTECT = -0x1
_POSIX_THREAD_PRIORITY_SCHEDULING = -0x1
_POSIX_THREAD_PROCESS_SHARED = 0x30db0
_POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x30db0
_POSIX_TIMEOUTS = -0x1
_POSIX_TIMERS = -0x1
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_EVENT_NAME_MAX = 0x1e
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TRACE_NAME_MAX = 0x8
_POSIX_TRACE_SYS_MAX = 0x8
_POSIX_TRACE_USER_EVENT_MAX = 0x20
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x30db0
_V6_ILP32_OFF32 = -0x1
_V6_ILP32_OFFBIG = -0x1
_V6_LP64_OFF64 = 0x1
_V6_LPBIG_OFFBIG = 0x1
_POSIX2_C_BIND = 0x30db0
_POSIX2_C_DEV = 0x30db0
_POSIX2_CHAR_TERM = 0x30db0
_POSIX2_LOCALEDEF = 0x30db0
_POSIX2_PBS = -0x1
_POSIX2_SW_DEV = 0x30db0
_POSIX2_UPE = 0x30db0
_POSIX2_VERSION = 0x30db0
_XOPEN_CRYPT = 0x1
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = -0x1
_XOPEN_REALTIME_THREADS = -0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x258
_XOPEN_XCU_VERSION = 0x4
_PTHREAD_DESTRUCTOR_ITERATIONS = 0x4
_PTHREAD_KEYS_MAX = 0x200
)
const (
_PC_NAME_MAX = 0x4
_PATH_ZONEINFO = "/usr/share/zoneinfo"
)
const (
_CHAR_BIT = 0x8
_INT_MAX = 0x7fffffff
_LONG_MAX = 0x7fffffffffffffff
sizeofOffT = 0x8
)

View File

@@ -0,0 +1,227 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_defs_dragonfly.go
//go:build dragonfly
package sysconf
const (
SC_AIO_LISTIO_MAX = 0x2a
SC_AIO_MAX = 0x2b
SC_AIO_PRIO_DELTA_MAX = 0x2c
SC_ARG_MAX = 0x1
SC_ATEXIT_MAX = 0x6b
SC_BC_BASE_MAX = 0x9
SC_BC_DIM_MAX = 0xa
SC_BC_SCALE_MAX = 0xb
SC_BC_STRING_MAX = 0xc
SC_CHILD_MAX = 0x2
SC_CLK_TCK = 0x3
SC_COLL_WEIGHTS_MAX = 0xd
SC_DELAYTIMER_MAX = 0x2d
SC_EXPR_NEST_MAX = 0xe
SC_GETGR_R_SIZE_MAX = 0x46
SC_GETPW_R_SIZE_MAX = 0x47
SC_HOST_NAME_MAX = 0x48
SC_IOV_MAX = 0x38
SC_LINE_MAX = 0xf
SC_LOGIN_NAME_MAX = 0x49
SC_MQ_OPEN_MAX = 0x2e
SC_MQ_PRIO_MAX = 0x4b
SC_NGROUPS_MAX = 0x4
SC_OPEN_MAX = 0x5
SC_PAGE_SIZE = 0x2f
SC_PAGESIZE = 0x2f
SC_RE_DUP_MAX = 0x10
SC_RTSIG_MAX = 0x30
SC_SEM_NSEMS_MAX = 0x31
SC_SEM_VALUE_MAX = 0x32
SC_SIGQUEUE_MAX = 0x33
SC_STREAM_MAX = 0x1a
SC_SYMLOOP_MAX = 0x78
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55
SC_THREAD_KEYS_MAX = 0x56
SC_THREAD_STACK_MIN = 0x5d
SC_THREAD_THREADS_MAX = 0x5e
SC_TIMER_MAX = 0x34
SC_TTY_NAME_MAX = 0x65
SC_TZNAME_MAX = 0x1b
SC_ADVISORY_INFO = 0x41
SC_ASYNCHRONOUS_IO = 0x1c
SC_BARRIERS = 0x42
SC_CLOCK_SELECTION = 0x43
SC_CPUTIME = 0x44
SC_FSYNC = 0x26
SC_IPV6 = 0x76
SC_JOB_CONTROL = 0x6
SC_MAPPED_FILES = 0x1d
SC_MEMLOCK = 0x1e
SC_MEMLOCK_RANGE = 0x1f
SC_MEMORY_PROTECTION = 0x20
SC_MESSAGE_PASSING = 0x21
SC_MONOTONIC_CLOCK = 0x4a
SC_PRIORITIZED_IO = 0x22
SC_PRIORITY_SCHEDULING = 0x23
SC_RAW_SOCKETS = 0x77
SC_READER_WRITER_LOCKS = 0x4c
SC_REALTIME_SIGNALS = 0x24
SC_REGEXP = 0x4d
SC_SAVED_IDS = 0x7
SC_SEMAPHORES = 0x25
SC_SHARED_MEMORY_OBJECTS = 0x27
SC_SHELL = 0x4e
SC_SPAWN = 0x4f
SC_SPIN_LOCKS = 0x50
SC_SPORADIC_SERVER = 0x51
SC_SYNCHRONIZED_IO = 0x28
SC_THREAD_ATTR_STACKADDR = 0x52
SC_THREAD_ATTR_STACKSIZE = 0x53
SC_THREAD_CPUTIME = 0x54
SC_THREAD_PRIO_INHERIT = 0x57
SC_THREAD_PRIO_PROTECT = 0x58
SC_THREAD_PRIORITY_SCHEDULING = 0x59
SC_THREAD_PROCESS_SHARED = 0x5a
SC_THREAD_SAFE_FUNCTIONS = 0x5b
SC_THREAD_SPORADIC_SERVER = 0x5c
SC_THREADS = 0x60
SC_TIMEOUTS = 0x5f
SC_TIMERS = 0x29
SC_TRACE = 0x61
SC_TRACE_EVENT_FILTER = 0x62
SC_TRACE_INHERIT = 0x63
SC_TRACE_LOG = 0x64
SC_TYPED_MEMORY_OBJECTS = 0x66
SC_VERSION = 0x8
SC_V6_ILP32_OFF32 = 0x67
SC_V6_ILP32_OFFBIG = 0x68
SC_V6_LP64_OFF64 = 0x69
SC_V6_LPBIG_OFFBIG = 0x6a
SC_2_C_BIND = 0x12
SC_2_C_DEV = 0x13
SC_2_CHAR_TERM = 0x14
SC_2_FORT_DEV = 0x15
SC_2_FORT_RUN = 0x16
SC_2_LOCALEDEF = 0x17
SC_2_PBS = 0x3b
SC_2_PBS_ACCOUNTING = 0x3c
SC_2_PBS_CHECKPOINT = 0x3d
SC_2_PBS_LOCATE = 0x3e
SC_2_PBS_MESSAGE = 0x3f
SC_2_PBS_TRACK = 0x40
SC_2_SW_DEV = 0x18
SC_2_UPE = 0x19
SC_2_VERSION = 0x11
SC_XOPEN_CRYPT = 0x6c
SC_XOPEN_ENH_I18N = 0x6d
SC_XOPEN_REALTIME = 0x6f
SC_XOPEN_REALTIME_THREADS = 0x70
SC_XOPEN_SHM = 0x71
SC_XOPEN_STREAMS = 0x72
SC_XOPEN_UNIX = 0x73
SC_XOPEN_VERSION = 0x74
SC_XOPEN_XCU_VERSION = 0x75
SC_PHYS_PAGES = 0x79
SC_NPROCESSORS_CONF = 0x39
SC_NPROCESSORS_ONLN = 0x3a
)
const (
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xa
_EXPR_NEST_MAX = 0x20
_LINE_MAX = 0x800
_RE_DUP_MAX = 0xff
_CLK_TCK = 0x80
_MAXHOSTNAMELEN = 0x100
_MAXLOGNAME = 0x11
_MAXSYMLINKS = 0x20
_ATEXIT_SIZE = 0x20
_POSIX_ADVISORY_INFO = -0x1
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x0
_POSIX_BARRIERS = 0x30db0
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = -0x1
_POSIX_CPUTIME = 0x30db0
_POSIX_FSYNC = 0x30db0
_POSIX_IPV6 = 0x0
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x30db0
_POSIX_MEMLOCK = -0x1
_POSIX_MEMLOCK_RANGE = 0x30db0
_POSIX_MEMORY_PROTECTION = 0x30db0
_POSIX_MESSAGE_PASSING = 0x30db0
_POSIX_MONOTONIC_CLOCK = 0x30db0
_POSIX_PRIORITIZED_IO = -0x1
_POSIX_PRIORITY_SCHEDULING = 0x30db0
_POSIX_RAW_SOCKETS = 0x30db0
_POSIX_READER_WRITER_LOCKS = 0x30db0
_POSIX_REALTIME_SIGNALS = 0x30db0
_POSIX_REGEXP = 0x1
_POSIX_SEM_VALUE_MAX = 0x7fff
_POSIX_SEMAPHORES = 0x30db0
_POSIX_SHARED_MEMORY_OBJECTS = 0x30db0
_POSIX_SHELL = 0x1
_POSIX_SPAWN = 0x30db0
_POSIX_SPIN_LOCKS = 0x30db0
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = -0x1
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
_POSIX_THREAD_CPUTIME = 0x30db0
_POSIX_THREAD_PRIO_INHERIT = 0x30db0
_POSIX_THREAD_PRIO_PROTECT = 0x30db0
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x30db0
_POSIX_THREAD_PROCESS_SHARED = -0x1
_POSIX_THREAD_SAFE_FUNCTIONS = -0x1
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x30db0
_POSIX_TIMEOUTS = 0x30db0
_POSIX_TIMERS = 0x30db0
_POSIX_TRACE = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x30db0
_V6_ILP32_OFF32 = -0x1
_V6_ILP32_OFFBIG = 0x0
_V6_LP64_OFF64 = 0x0
_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_CHAR_TERM = 0x1
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_PBS = -0x1
_POSIX2_SW_DEV = 0x31069
_POSIX2_UPE = 0x31069
_POSIX2_VERSION = 0x30a2c
_XOPEN_CRYPT = -0x1
_XOPEN_ENH_I18N = -0x1
_XOPEN_REALTIME = -0x1
_XOPEN_REALTIME_THREADS = -0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = -0x1
_PTHREAD_DESTRUCTOR_ITERATIONS = 0x4
_PTHREAD_KEYS_MAX = 0x100
_PTHREAD_STACK_MIN = 0x4000
)
const (
_PC_NAME_MAX = 0x4
_PATH_DEV = "/dev/"
_PATH_ZONEINFO = "/usr/share/zoneinfo"
)

View File

@@ -0,0 +1,228 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_defs_freebsd.go
//go:build freebsd
package sysconf
const (
SC_AIO_LISTIO_MAX = 0x2a
SC_AIO_MAX = 0x2b
SC_AIO_PRIO_DELTA_MAX = 0x2c
SC_ARG_MAX = 0x1
SC_ATEXIT_MAX = 0x6b
SC_BC_BASE_MAX = 0x9
SC_BC_DIM_MAX = 0xa
SC_BC_SCALE_MAX = 0xb
SC_BC_STRING_MAX = 0xc
SC_CHILD_MAX = 0x2
SC_CLK_TCK = 0x3
SC_COLL_WEIGHTS_MAX = 0xd
SC_DELAYTIMER_MAX = 0x2d
SC_EXPR_NEST_MAX = 0xe
SC_GETGR_R_SIZE_MAX = 0x46
SC_GETPW_R_SIZE_MAX = 0x47
SC_HOST_NAME_MAX = 0x48
SC_IOV_MAX = 0x38
SC_LINE_MAX = 0xf
SC_LOGIN_NAME_MAX = 0x49
SC_MQ_OPEN_MAX = 0x2e
SC_MQ_PRIO_MAX = 0x4b
SC_NGROUPS_MAX = 0x4
SC_OPEN_MAX = 0x5
SC_PAGE_SIZE = 0x2f
SC_PAGESIZE = 0x2f
SC_RE_DUP_MAX = 0x10
SC_RTSIG_MAX = 0x30
SC_SEM_NSEMS_MAX = 0x31
SC_SEM_VALUE_MAX = 0x32
SC_SIGQUEUE_MAX = 0x33
SC_STREAM_MAX = 0x1a
SC_SYMLOOP_MAX = 0x78
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55
SC_THREAD_KEYS_MAX = 0x56
SC_THREAD_STACK_MIN = 0x5d
SC_THREAD_THREADS_MAX = 0x5e
SC_TIMER_MAX = 0x34
SC_TTY_NAME_MAX = 0x65
SC_TZNAME_MAX = 0x1b
SC_ADVISORY_INFO = 0x41
SC_ASYNCHRONOUS_IO = 0x1c
SC_BARRIERS = 0x42
SC_CLOCK_SELECTION = 0x43
SC_CPUTIME = 0x44
SC_FSYNC = 0x26
SC_IPV6 = 0x76
SC_JOB_CONTROL = 0x6
SC_MAPPED_FILES = 0x1d
SC_MEMLOCK = 0x1e
SC_MEMLOCK_RANGE = 0x1f
SC_MEMORY_PROTECTION = 0x20
SC_MESSAGE_PASSING = 0x21
SC_MONOTONIC_CLOCK = 0x4a
SC_PRIORITIZED_IO = 0x22
SC_PRIORITY_SCHEDULING = 0x23
SC_RAW_SOCKETS = 0x77
SC_READER_WRITER_LOCKS = 0x4c
SC_REALTIME_SIGNALS = 0x24
SC_REGEXP = 0x4d
SC_SAVED_IDS = 0x7
SC_SEMAPHORES = 0x25
SC_SHARED_MEMORY_OBJECTS = 0x27
SC_SHELL = 0x4e
SC_SPAWN = 0x4f
SC_SPIN_LOCKS = 0x50
SC_SPORADIC_SERVER = 0x51
SC_SYNCHRONIZED_IO = 0x28
SC_THREAD_ATTR_STACKADDR = 0x52
SC_THREAD_ATTR_STACKSIZE = 0x53
SC_THREAD_CPUTIME = 0x54
SC_THREAD_PRIO_INHERIT = 0x57
SC_THREAD_PRIO_PROTECT = 0x58
SC_THREAD_PRIORITY_SCHEDULING = 0x59
SC_THREAD_PROCESS_SHARED = 0x5a
SC_THREAD_SAFE_FUNCTIONS = 0x5b
SC_THREAD_SPORADIC_SERVER = 0x5c
SC_THREADS = 0x60
SC_TIMEOUTS = 0x5f
SC_TIMERS = 0x29
SC_TRACE = 0x61
SC_TRACE_EVENT_FILTER = 0x62
SC_TRACE_INHERIT = 0x63
SC_TRACE_LOG = 0x64
SC_TYPED_MEMORY_OBJECTS = 0x66
SC_VERSION = 0x8
SC_V6_ILP32_OFF32 = 0x67
SC_V6_ILP32_OFFBIG = 0x68
SC_V6_LP64_OFF64 = 0x69
SC_V6_LPBIG_OFFBIG = 0x6a
SC_2_C_BIND = 0x12
SC_2_C_DEV = 0x13
SC_2_CHAR_TERM = 0x14
SC_2_FORT_DEV = 0x15
SC_2_FORT_RUN = 0x16
SC_2_LOCALEDEF = 0x17
SC_2_PBS = 0x3b
SC_2_PBS_ACCOUNTING = 0x3c
SC_2_PBS_CHECKPOINT = 0x3d
SC_2_PBS_LOCATE = 0x3e
SC_2_PBS_MESSAGE = 0x3f
SC_2_PBS_TRACK = 0x40
SC_2_SW_DEV = 0x18
SC_2_UPE = 0x19
SC_2_VERSION = 0x11
SC_XOPEN_CRYPT = 0x6c
SC_XOPEN_ENH_I18N = 0x6d
SC_XOPEN_REALTIME = 0x6f
SC_XOPEN_REALTIME_THREADS = 0x70
SC_XOPEN_SHM = 0x71
SC_XOPEN_STREAMS = 0x72
SC_XOPEN_UNIX = 0x73
SC_XOPEN_VERSION = 0x74
SC_XOPEN_XCU_VERSION = 0x75
SC_PHYS_PAGES = 0x79
SC_NPROCESSORS_CONF = 0x39
SC_NPROCESSORS_ONLN = 0x3a
)
const (
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xa
_EXPR_NEST_MAX = 0x20
_LINE_MAX = 0x800
_MQ_PRIO_MAX = 0x40
_RE_DUP_MAX = 0xff
_SEM_VALUE_MAX = 0x7fffffff
_CLK_TCK = 0x80
_MAXHOSTNAMELEN = 0x100
_MAXLOGNAME = 0x21
_MAXSYMLINKS = 0x20
_ATEXIT_SIZE = 0x20
_POSIX_ADVISORY_INFO = 0x30db0
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x30db0
_POSIX_BARRIERS = 0x30db0
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = -0x1
_POSIX_CPUTIME = 0x30db0
_POSIX_FSYNC = 0x30db0
_POSIX_IPV6 = 0x0
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x30db0
_POSIX_MEMLOCK = -0x1
_POSIX_MEMLOCK_RANGE = 0x30db0
_POSIX_MEMORY_PROTECTION = 0x30db0
_POSIX_MESSAGE_PASSING = 0x30db0
_POSIX_MONOTONIC_CLOCK = 0x30db0
_POSIX_PRIORITIZED_IO = -0x1
_POSIX_PRIORITY_SCHEDULING = 0x0
_POSIX_RAW_SOCKETS = 0x30db0
_POSIX_READER_WRITER_LOCKS = 0x30db0
_POSIX_REALTIME_SIGNALS = 0x30db0
_POSIX_REGEXP = 0x1
_POSIX_SEM_VALUE_MAX = 0x7fff
_POSIX_SEMAPHORES = 0x30db0
_POSIX_SHARED_MEMORY_OBJECTS = 0x30db0
_POSIX_SHELL = 0x1
_POSIX_SPAWN = 0x30db0
_POSIX_SPIN_LOCKS = 0x30db0
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = -0x1
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
_POSIX_THREAD_CPUTIME = 0x30db0
_POSIX_THREAD_PRIO_INHERIT = 0x30db0
_POSIX_THREAD_PRIO_PROTECT = 0x30db0
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x30db0
_POSIX_THREAD_PROCESS_SHARED = 0x30db0
_POSIX_THREAD_SAFE_FUNCTIONS = -0x1
_POSIX_THREADS = 0x30db0
_POSIX_TIMEOUTS = 0x30db0
_POSIX_TIMERS = 0x30db0
_POSIX_TRACE = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x30db0
_V6_ILP32_OFF32 = -0x1
_V6_ILP32_OFFBIG = 0x0
_V6_LP64_OFF64 = 0x0
_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x30db0
_POSIX2_C_DEV = -0x1
_POSIX2_CHAR_TERM = 0x1
_POSIX2_LOCALEDEF = -0x1
_POSIX2_PBS = -0x1
_POSIX2_SW_DEV = -0x1
_POSIX2_UPE = 0x30db0
_POSIX2_VERSION = 0x30a2c
_XOPEN_CRYPT = -0x1
_XOPEN_ENH_I18N = -0x1
_XOPEN_REALTIME = -0x1
_XOPEN_REALTIME_THREADS = -0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = -0x1
_PTHREAD_DESTRUCTOR_ITERATIONS = 0x4
_PTHREAD_KEYS_MAX = 0x100
_PTHREAD_STACK_MIN = 0x800
)
const (
_PC_NAME_MAX = 0x4
_PATH_DEV = "/dev/"
_PATH_ZONEINFO = "/usr/share/zoneinfo"
)

View File

@@ -0,0 +1,146 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_defs_linux.go
//go:build linux
package sysconf
const (
SC_AIO_LISTIO_MAX = 0x17
SC_AIO_MAX = 0x18
SC_AIO_PRIO_DELTA_MAX = 0x19
SC_ARG_MAX = 0x0
SC_ATEXIT_MAX = 0x57
SC_BC_BASE_MAX = 0x24
SC_BC_DIM_MAX = 0x25
SC_BC_SCALE_MAX = 0x26
SC_BC_STRING_MAX = 0x27
SC_CHILD_MAX = 0x1
SC_CLK_TCK = 0x2
SC_COLL_WEIGHTS_MAX = 0x28
SC_DELAYTIMER_MAX = 0x1a
SC_EXPR_NEST_MAX = 0x2a
SC_GETGR_R_SIZE_MAX = 0x45
SC_GETPW_R_SIZE_MAX = 0x46
SC_HOST_NAME_MAX = 0xb4
SC_IOV_MAX = 0x3c
SC_LINE_MAX = 0x2b
SC_LOGIN_NAME_MAX = 0x47
SC_MQ_OPEN_MAX = 0x1b
SC_MQ_PRIO_MAX = 0x1c
SC_NGROUPS_MAX = 0x3
SC_OPEN_MAX = 0x4
SC_PAGE_SIZE = 0x1e
SC_PAGESIZE = 0x1e
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x49
SC_THREAD_KEYS_MAX = 0x4a
SC_THREAD_STACK_MIN = 0x4b
SC_THREAD_THREADS_MAX = 0x4c
SC_RE_DUP_MAX = 0x2c
SC_RTSIG_MAX = 0x1f
SC_SEM_NSEMS_MAX = 0x20
SC_SEM_VALUE_MAX = 0x21
SC_SIGQUEUE_MAX = 0x22
SC_STREAM_MAX = 0x5
SC_SYMLOOP_MAX = 0xad
SC_TIMER_MAX = 0x23
SC_TTY_NAME_MAX = 0x48
SC_TZNAME_MAX = 0x6
SC_ADVISORY_INFO = 0x84
SC_ASYNCHRONOUS_IO = 0xc
SC_BARRIERS = 0x85
SC_CLOCK_SELECTION = 0x89
SC_CPUTIME = 0x8a
SC_FSYNC = 0xf
SC_IPV6 = 0xeb
SC_JOB_CONTROL = 0x7
SC_MAPPED_FILES = 0x10
SC_MEMLOCK = 0x11
SC_MEMLOCK_RANGE = 0x12
SC_MEMORY_PROTECTION = 0x13
SC_MESSAGE_PASSING = 0x14
SC_MONOTONIC_CLOCK = 0x95
SC_PRIORITIZED_IO = 0xd
SC_PRIORITY_SCHEDULING = 0xa
SC_RAW_SOCKETS = 0xec
SC_READER_WRITER_LOCKS = 0x99
SC_REALTIME_SIGNALS = 0x9
SC_REGEXP = 0x9b
SC_SAVED_IDS = 0x8
SC_SEMAPHORES = 0x15
SC_SHARED_MEMORY_OBJECTS = 0x16
SC_SHELL = 0x9d
SC_SPAWN = 0x9f
SC_SPIN_LOCKS = 0x9a
SC_SPORADIC_SERVER = 0xa0
SC_SS_REPL_MAX = 0xf1
SC_SYNCHRONIZED_IO = 0xe
SC_THREAD_ATTR_STACKADDR = 0x4d
SC_THREAD_ATTR_STACKSIZE = 0x4e
SC_THREAD_CPUTIME = 0x8b
SC_THREAD_PRIO_INHERIT = 0x50
SC_THREAD_PRIO_PROTECT = 0x51
SC_THREAD_PRIORITY_SCHEDULING = 0x4f
SC_THREAD_PROCESS_SHARED = 0x52
SC_THREAD_ROBUST_PRIO_INHERIT = 0xf7
SC_THREAD_ROBUST_PRIO_PROTECT = 0xf8
SC_THREAD_SAFE_FUNCTIONS = 0x44
SC_THREAD_SPORADIC_SERVER = 0xa1
SC_THREADS = 0x43
SC_TIMEOUTS = 0xa4
SC_TIMERS = 0xb
SC_TRACE = 0xb5
SC_TRACE_EVENT_FILTER = 0xb6
SC_TRACE_EVENT_NAME_MAX = 0xf2
SC_TRACE_INHERIT = 0xb7
SC_TRACE_LOG = 0xb8
SC_TRACE_NAME_MAX = 0xf3
SC_TRACE_SYS_MAX = 0xf4
SC_TRACE_USER_EVENT_MAX = 0xf5
SC_TYPED_MEMORY_OBJECTS = 0xa5
SC_VERSION = 0x1d
SC_V7_ILP32_OFF32 = 0xed
SC_V7_ILP32_OFFBIG = 0xee
SC_V7_LP64_OFF64 = 0xef
SC_V7_LPBIG_OFFBIG = 0xf0
SC_V6_ILP32_OFF32 = 0xb0
SC_V6_ILP32_OFFBIG = 0xb1
SC_V6_LP64_OFF64 = 0xb2
SC_V6_LPBIG_OFFBIG = 0xb3
SC_2_C_BIND = 0x2f
SC_2_C_DEV = 0x30
SC_2_C_VERSION = 0x60
SC_2_CHAR_TERM = 0x5f
SC_2_FORT_DEV = 0x31
SC_2_FORT_RUN = 0x32
SC_2_LOCALEDEF = 0x34
SC_2_PBS = 0xa8
SC_2_PBS_ACCOUNTING = 0xa9
SC_2_PBS_CHECKPOINT = 0xaf
SC_2_PBS_LOCATE = 0xaa
SC_2_PBS_MESSAGE = 0xab
SC_2_PBS_TRACK = 0xac
SC_2_SW_DEV = 0x33
SC_2_UPE = 0x61
SC_2_VERSION = 0x2e
SC_XOPEN_CRYPT = 0x5c
SC_XOPEN_ENH_I18N = 0x5d
SC_XOPEN_REALTIME = 0x82
SC_XOPEN_REALTIME_THREADS = 0x83
SC_XOPEN_SHM = 0x5e
SC_XOPEN_STREAMS = 0xf6
SC_XOPEN_UNIX = 0x5b
SC_XOPEN_VERSION = 0x59
SC_XOPEN_XCU_VERSION = 0x5a
SC_PHYS_PAGES = 0x55
SC_AVPHYS_PAGES = 0x56
SC_NPROCESSORS_CONF = 0x53
SC_NPROCESSORS_ONLN = 0x54
SC_UIO_MAXIOV = 0x3c
)

View File

@@ -0,0 +1,163 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_defs_netbsd.go
//go:build netbsd
package sysconf
const (
SC_ARG_MAX = 0x1
SC_CHILD_MAX = 0x2
SC_NGROUPS_MAX = 0x4
SC_OPEN_MAX = 0x5
SC_JOB_CONTROL = 0x6
SC_SAVED_IDS = 0x7
SC_VERSION = 0x8
SC_BC_BASE_MAX = 0x9
SC_BC_DIM_MAX = 0xa
SC_BC_SCALE_MAX = 0xb
SC_BC_STRING_MAX = 0xc
SC_COLL_WEIGHTS_MAX = 0xd
SC_EXPR_NEST_MAX = 0xe
SC_LINE_MAX = 0xf
SC_RE_DUP_MAX = 0x10
SC_2_VERSION = 0x11
SC_2_C_BIND = 0x12
SC_2_C_DEV = 0x13
SC_2_CHAR_TERM = 0x14
SC_2_FORT_DEV = 0x15
SC_2_FORT_RUN = 0x16
SC_2_LOCALEDEF = 0x17
SC_2_SW_DEV = 0x18
SC_2_UPE = 0x19
SC_STREAM_MAX = 0x1a
SC_TZNAME_MAX = 0x1b
SC_PAGESIZE = 0x1c
SC_PAGE_SIZE = 0x1c
SC_FSYNC = 0x1d
SC_XOPEN_SHM = 0x1e
SC_SYNCHRONIZED_IO = 0x1f
SC_IOV_MAX = 0x20
SC_MAPPED_FILES = 0x21
SC_MEMLOCK = 0x22
SC_MEMLOCK_RANGE = 0x23
SC_MEMORY_PROTECTION = 0x24
SC_LOGIN_NAME_MAX = 0x25
SC_MONOTONIC_CLOCK = 0x26
SC_CLK_TCK = 0x27
SC_ATEXIT_MAX = 0x28
SC_THREADS = 0x29
SC_SEMAPHORES = 0x2a
SC_BARRIERS = 0x2b
SC_TIMERS = 0x2c
SC_SPIN_LOCKS = 0x2d
SC_READER_WRITER_LOCKS = 0x2e
SC_GETGR_R_SIZE_MAX = 0x2f
SC_GETPW_R_SIZE_MAX = 0x30
SC_CLOCK_SELECTION = 0x31
SC_ASYNCHRONOUS_IO = 0x32
SC_AIO_LISTIO_MAX = 0x33
SC_AIO_MAX = 0x34
SC_MESSAGE_PASSING = 0x35
SC_MQ_OPEN_MAX = 0x36
SC_MQ_PRIO_MAX = 0x37
SC_PRIORITY_SCHEDULING = 0x38
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x39
SC_THREAD_KEYS_MAX = 0x3a
SC_THREAD_STACK_MIN = 0x3b
SC_THREAD_THREADS_MAX = 0x3c
SC_THREAD_ATTR_STACKADDR = 0x3d
SC_THREAD_ATTR_STACKSIZE = 0x3e
SC_THREAD_PRIORITY_SCHEDULING = 0x3f
SC_THREAD_PRIO_INHERIT = 0x40
SC_THREAD_PRIO_PROTECT = 0x41
SC_THREAD_PROCESS_SHARED = 0x42
SC_THREAD_SAFE_FUNCTIONS = 0x43
SC_TTY_NAME_MAX = 0x44
SC_HOST_NAME_MAX = 0x45
SC_PASS_MAX = 0x46
SC_REGEXP = 0x47
SC_SHELL = 0x48
SC_SYMLOOP_MAX = 0x49
SC_V6_ILP32_OFF32 = 0x4a
SC_V6_ILP32_OFFBIG = 0x4b
SC_V6_LP64_OFF64 = 0x4c
SC_V6_LPBIG_OFFBIG = 0x4d
SC_2_PBS = 0x50
SC_2_PBS_ACCOUNTING = 0x51
SC_2_PBS_CHECKPOINT = 0x52
SC_2_PBS_LOCATE = 0x53
SC_2_PBS_MESSAGE = 0x54
SC_2_PBS_TRACK = 0x55
SC_SPAWN = 0x56
SC_SHARED_MEMORY_OBJECTS = 0x57
SC_TIMER_MAX = 0x58
SC_SEM_NSEMS_MAX = 0x59
SC_CPUTIME = 0x5a
SC_THREAD_CPUTIME = 0x5b
SC_DELAYTIMER_MAX = 0x5c
SC_SIGQUEUE_MAX = 0x5d
SC_REALTIME_SIGNALS = 0x5e
SC_PHYS_PAGES = 0x79
SC_NPROCESSORS_CONF = 0x3e9
SC_NPROCESSORS_ONLN = 0x3ea
SC_SCHED_RT_TS = 0x7d1
SC_SCHED_PRI_MIN = 0x7d2
SC_SCHED_PRI_MAX = 0x7d3
)
const (
_MAXHOSTNAMELEN = 0x100
_MAXLOGNAME = 0x10
_MAXSYMLINKS = 0x20
_POSIX_ARG_MAX = 0x1000
_POSIX_CHILD_MAX = 0x19
_POSIX_CPUTIME = 0x30db0
_POSIX_DELAYTIMER_MAX = 0x20
_POSIX_PRIORITY_SCHEDULING = 0x30db0
_POSIX_REGEXP = 0x1
_POSIX_SHARED_MEMORY_OBJECTS = 0x0
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
_POSIX_THREAD_CPUTIME = 0x30db0
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_KEYS_MAX = 0x80
_POSIX_THREAD_PRIO_PROTECT = 0x30db0
_POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0
_POSIX_TIMER_MAX = 0x20
_POSIX_VERSION = 0x30db0
_POSIX2_VERSION = 0x30db0
_FOPEN_MAX = 0x14
_NAME_MAX = 0x1ff
_RE_DUP_MAX = 0xff
_BC_BASE_MAX = 0x7fffffff
_BC_DIM_MAX = 0xffff
_BC_SCALE_MAX = 0x7fffffff
_BC_STRING_MAX = 0x7fffffff
_COLL_WEIGHTS_MAX = 0x2
_EXPR_NEST_MAX = 0x20
_LINE_MAX = 0x800
_GETGR_R_SIZE_MAX = 0x400
_GETPW_R_SIZE_MAX = 0x400
_PATH_DEV = "/dev/"
_PATH_ZONEINFO = "/usr/share/zoneinfo"
_PASSWORD_LEN = 0x80
)
const _PC_NAME_MAX = 0x4

View File

@@ -0,0 +1,262 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_defs_openbsd.go
//go:build openbsd
package sysconf
const (
SC_AIO_LISTIO_MAX = 0x2a
SC_AIO_MAX = 0x2b
SC_AIO_PRIO_DELTA_MAX = 0x2c
SC_ARG_MAX = 0x1
SC_ATEXIT_MAX = 0x2e
SC_BC_BASE_MAX = 0x9
SC_BC_DIM_MAX = 0xa
SC_BC_SCALE_MAX = 0xb
SC_BC_STRING_MAX = 0xc
SC_CHILD_MAX = 0x2
SC_CLK_TCK = 0x3
SC_COLL_WEIGHTS_MAX = 0xd
SC_DELAYTIMER_MAX = 0x32
SC_EXPR_NEST_MAX = 0xe
SC_GETGR_R_SIZE_MAX = 0x64
SC_GETPW_R_SIZE_MAX = 0x65
SC_HOST_NAME_MAX = 0x21
SC_IOV_MAX = 0x33
SC_LINE_MAX = 0xf
SC_LOGIN_NAME_MAX = 0x66
SC_MQ_OPEN_MAX = 0x3a
SC_MQ_PRIO_MAX = 0x3b
SC_NGROUPS_MAX = 0x4
SC_OPEN_MAX = 0x5
SC_PAGE_SIZE = 0x1c
SC_PAGESIZE = 0x1c
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x50
SC_THREAD_KEYS_MAX = 0x51
SC_THREAD_STACK_MIN = 0x59
SC_THREAD_THREADS_MAX = 0x5a
SC_RE_DUP_MAX = 0x10
SC_SEM_NSEMS_MAX = 0x1f
SC_SEM_VALUE_MAX = 0x20
SC_SIGQUEUE_MAX = 0x46
SC_STREAM_MAX = 0x1a
SC_SYMLOOP_MAX = 0x4c
SC_TIMER_MAX = 0x5d
SC_TTY_NAME_MAX = 0x6b
SC_TZNAME_MAX = 0x1b
SC_ADVISORY_INFO = 0x29
SC_ASYNCHRONOUS_IO = 0x2d
SC_BARRIERS = 0x2f
SC_CLOCK_SELECTION = 0x30
SC_CPUTIME = 0x31
SC_FSYNC = 0x1d
SC_IPV6 = 0x34
SC_JOB_CONTROL = 0x6
SC_MAPPED_FILES = 0x35
SC_MEMLOCK = 0x36
SC_MEMLOCK_RANGE = 0x37
SC_MEMORY_PROTECTION = 0x38
SC_MESSAGE_PASSING = 0x39
SC_MONOTONIC_CLOCK = 0x22
SC_PRIORITIZED_IO = 0x3c
SC_PRIORITY_SCHEDULING = 0x3d
SC_RAW_SOCKETS = 0x3e
SC_READER_WRITER_LOCKS = 0x3f
SC_REALTIME_SIGNALS = 0x40
SC_REGEXP = 0x41
SC_SAVED_IDS = 0x7
SC_SEMAPHORES = 0x43
SC_SHARED_MEMORY_OBJECTS = 0x44
SC_SHELL = 0x45
SC_SPAWN = 0x47
SC_SPIN_LOCKS = 0x48
SC_SPORADIC_SERVER = 0x49
SC_SS_REPL_MAX = 0x4a
SC_SYNCHRONIZED_IO = 0x4b
SC_THREAD_ATTR_STACKADDR = 0x4d
SC_THREAD_ATTR_STACKSIZE = 0x4e
SC_THREAD_CPUTIME = 0x4f
SC_THREAD_PRIO_INHERIT = 0x52
SC_THREAD_PRIO_PROTECT = 0x53
SC_THREAD_PRIORITY_SCHEDULING = 0x54
SC_THREAD_PROCESS_SHARED = 0x55
SC_THREAD_ROBUST_PRIO_INHERIT = 0x56
SC_THREAD_ROBUST_PRIO_PROTECT = 0x57
SC_THREAD_SAFE_FUNCTIONS = 0x67
SC_THREAD_SPORADIC_SERVER = 0x58
SC_THREADS = 0x5b
SC_TIMEOUTS = 0x5c
SC_TIMERS = 0x5e
SC_TRACE = 0x5f
SC_TRACE_EVENT_FILTER = 0x60
SC_TRACE_EVENT_NAME_MAX = 0x61
SC_TRACE_INHERIT = 0x62
SC_TRACE_LOG = 0x63
SC_TRACE_NAME_MAX = 0x68
SC_TRACE_SYS_MAX = 0x69
SC_TRACE_USER_EVENT_MAX = 0x6a
SC_TYPED_MEMORY_OBJECTS = 0x6c
SC_VERSION = 0x8
SC_V7_ILP32_OFF32 = 0x71
SC_V7_ILP32_OFFBIG = 0x72
SC_V7_LP64_OFF64 = 0x73
SC_V7_LPBIG_OFFBIG = 0x74
SC_V6_ILP32_OFF32 = 0x6d
SC_V6_ILP32_OFFBIG = 0x6e
SC_V6_LP64_OFF64 = 0x6f
SC_V6_LPBIG_OFFBIG = 0x70
SC_2_C_BIND = 0x12
SC_2_C_DEV = 0x13
SC_2_CHAR_TERM = 0x14
SC_2_FORT_DEV = 0x15
SC_2_FORT_RUN = 0x16
SC_2_LOCALEDEF = 0x17
SC_2_PBS = 0x23
SC_2_PBS_ACCOUNTING = 0x24
SC_2_PBS_CHECKPOINT = 0x25
SC_2_PBS_LOCATE = 0x26
SC_2_PBS_MESSAGE = 0x27
SC_2_PBS_TRACK = 0x28
SC_2_SW_DEV = 0x18
SC_2_UPE = 0x19
SC_2_VERSION = 0x11
SC_XOPEN_CRYPT = 0x75
SC_XOPEN_ENH_I18N = 0x76
SC_XOPEN_REALTIME = 0x78
SC_XOPEN_REALTIME_THREADS = 0x79
SC_XOPEN_SHM = 0x1e
SC_XOPEN_STREAMS = 0x7a
SC_XOPEN_UNIX = 0x7b
SC_XOPEN_UUCP = 0x7c
SC_XOPEN_VERSION = 0x7d
SC_AVPHYS_PAGES = 0x1f5
SC_PHYS_PAGES = 0x1f4
SC_NPROCESSORS_CONF = 0x1f6
SC_NPROCESSORS_ONLN = 0x1f7
)
const (
_HOST_NAME_MAX = 0xff
_IOV_MAX = 0x400
_LOGIN_NAME_MAX = 0x20
_PTHREAD_DESTRUCTOR_ITERATIONS = 0x4
_PTHREAD_KEYS_MAX = 0x100
_PTHREAD_STACK_MIN = 0x1000
_PTHREAD_THREADS_MAX = 0xffffffffffffffff
_SEM_VALUE_MAX = 0xffffffff
_SYMLOOP_MAX = 0x20
_TTY_NAME_MAX = 0x104
_GR_BUF_LEN = 0xa40
_PW_BUF_LEN = 0x400
_CLK_TCK = 0x64
_POSIX_ADVISORY_INFO = -0x1
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = -0x1
_POSIX_BARRIERS = 0x30db0
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = -0x1
_POSIX_CPUTIME = 0x31069
_POSIX_FSYNC = 0x30db0
_POSIX_IPV6 = 0x0
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x30db0
_POSIX_MEMLOCK = 0x30db0
_POSIX_MEMLOCK_RANGE = 0x30db0
_POSIX_MEMORY_PROTECTION = 0x30db0
_POSIX_MESSAGE_PASSING = -0x1
_POSIX_MONOTONIC_CLOCK = 0x30db0
_POSIX_PRIORITIZED_IO = -0x1
_POSIX_PRIORITY_SCHEDULING = -0x1
_POSIX_RAW_SOCKETS = 0x30db0
_POSIX_READER_WRITER_LOCKS = 0x30db0
_POSIX_REALTIME_SIGNALS = -0x1
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x30db0
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SPAWN = 0x30db0
_POSIX_SPIN_LOCKS = 0x30db0
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = -0x1
_POSIX_THREAD_ATTR_STACKADDR = 0x30db0
_POSIX_THREAD_ATTR_STACKSIZE = 0x30db0
_POSIX_THREAD_CPUTIME = 0x31069
_POSIX_THREAD_KEYS_MAX = 0x80
_POSIX_THREAD_PRIO_INHERIT = -0x1
_POSIX_THREAD_PRIO_PROTECT = -0x1
_POSIX_THREAD_PRIORITY_SCHEDULING = -0x1
_POSIX_THREAD_PROCESS_SHARED = -0x1
_POSIX_THREAD_ROBUST_PRIO_INHERIT = -0x1
_POSIX_THREAD_ROBUST_PRIO_PROTECT = -0x1
_POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x30db0
_POSIX_TIMERS = -0x1
_POSIX_TIMEOUTS = 0x30db0
_POSIX_TRACE = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = 0x0
_POSIX_V7_LP64_OFF64 = 0x0
_POSIX_V7_LPBIG_OFFBIG = 0x0
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = 0x0
_POSIX_V6_LP64_OFF64 = 0x0
_POSIX_V6_LPBIG_OFFBIG = 0x0
_POSIX2_C_BIND = 0x30db0
_POSIX2_C_DEV = -0x1
_POSIX2_CHAR_TERM = 0x1
_POSIX2_LOCALEDEF = -0x1
_POSIX2_PBS = -0x1
_POSIX2_SW_DEV = 0x30db0
_POSIX2_UPE = 0x30db0
_POSIX2_VERSION = 0x31069
_XOPEN_CRYPT = 0x1
_XOPEN_ENH_I18N = -0x1
_XOPEN_REALTIME = -0x1
_XOPEN_REALTIME_THREADS = -0x1
_XOPEN_SHM = 0x1
_XOPEN_STREAMS = -0x1
_XOPEN_UNIX = -0x1
_XOPEN_UUCP = -0x1
_FOPEN_MAX = 0x14
_NAME_MAX = 0xff
_RE_DUP_MAX = 0xff
_BC_BASE_MAX = 0x7fffffff
_BC_DIM_MAX = 0xffff
_BC_SCALE_MAX = 0x7fffffff
_BC_STRING_MAX = 0x7fffffff
_COLL_WEIGHTS_MAX = 0x2
_EXPR_NEST_MAX = 0x20
_LINE_MAX = 0x800
_SHRT_MAX = 0x7fff
_PATH_ZONEINFO = "/usr/share/zoneinfo"
)
const (
_CHAR_BIT = 0x8
_INT_MAX = 0x7fffffff
sizeofOffT = 0x8
)

View File

@@ -0,0 +1,138 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_defs_solaris.go
//go:build solaris
package sysconf
const (
SC_AIO_LISTIO_MAX = 0x12
SC_AIO_MAX = 0x13
SC_AIO_PRIO_DELTA_MAX = 0x14
SC_ARG_MAX = 0x1
SC_ATEXIT_MAX = 0x4c
SC_BC_BASE_MAX = 0x36
SC_BC_DIM_MAX = 0x37
SC_BC_SCALE_MAX = 0x38
SC_BC_STRING_MAX = 0x39
SC_CHILD_MAX = 0x2
SC_CLK_TCK = 0x3
SC_COLL_WEIGHTS_MAX = 0x3a
SC_DELAYTIMER_MAX = 0x16
SC_EXPR_NEST_MAX = 0x3b
SC_GETGR_R_SIZE_MAX = 0x239
SC_GETPW_R_SIZE_MAX = 0x23a
SC_HOST_NAME_MAX = 0x2df
SC_IOV_MAX = 0x4d
SC_LINE_MAX = 0x3c
SC_LOGIN_NAME_MAX = 0x23b
SC_MQ_OPEN_MAX = 0x1d
SC_MQ_PRIO_MAX = 0x1e
SC_NGROUPS_MAX = 0x4
SC_OPEN_MAX = 0x5
SC_PAGE_SIZE = 0xb
SC_PAGESIZE = 0xb
SC_THREAD_DESTRUCTOR_ITERATIONS = 0x238
SC_THREAD_KEYS_MAX = 0x23c
SC_THREAD_STACK_MIN = 0x23d
SC_THREAD_THREADS_MAX = 0x23e
SC_RE_DUP_MAX = 0x3d
SC_RTSIG_MAX = 0x22
SC_SEM_NSEMS_MAX = 0x24
SC_SEM_VALUE_MAX = 0x25
SC_SIGQUEUE_MAX = 0x27
SC_STREAM_MAX = 0x10
SC_SYMLOOP_MAX = 0x2e8
SC_TIMER_MAX = 0x2c
SC_TTY_NAME_MAX = 0x23f
SC_TZNAME_MAX = 0x11
SC_ADVISORY_INFO = 0x2db
SC_ASYNCHRONOUS_IO = 0x15
SC_BARRIERS = 0x2dc
SC_CLOCK_SELECTION = 0x2dd
SC_CPUTIME = 0x2de
SC_FSYNC = 0x17
SC_IPV6 = 0x2fa
SC_JOB_CONTROL = 0x6
SC_MAPPED_FILES = 0x18
SC_MEMLOCK = 0x19
SC_MEMLOCK_RANGE = 0x1a
SC_MEMORY_PROTECTION = 0x1b
SC_MESSAGE_PASSING = 0x1c
SC_MONOTONIC_CLOCK = 0x2e0
SC_PRIORITIZED_IO = 0x1f
SC_PRIORITY_SCHEDULING = 0x20
SC_RAW_SOCKETS = 0x2fb
SC_READER_WRITER_LOCKS = 0x2e1
SC_REALTIME_SIGNALS = 0x21
SC_REGEXP = 0x2e2
SC_SAVED_IDS = 0x7
SC_SEMAPHORES = 0x23
SC_SHARED_MEMORY_OBJECTS = 0x26
SC_SHELL = 0x2e3
SC_SPAWN = 0x2e4
SC_SPIN_LOCKS = 0x2e5
SC_SPORADIC_SERVER = 0x2e6
SC_SS_REPL_MAX = 0x2e7
SC_SYNCHRONIZED_IO = 0x2a
SC_THREAD_ATTR_STACKADDR = 0x241
SC_THREAD_ATTR_STACKSIZE = 0x242
SC_THREAD_CPUTIME = 0x2e9
SC_THREAD_PRIO_INHERIT = 0x244
SC_THREAD_PRIO_PROTECT = 0x245
SC_THREAD_PRIORITY_SCHEDULING = 0x243
SC_THREAD_PROCESS_SHARED = 0x246
SC_THREAD_SAFE_FUNCTIONS = 0x247
SC_THREAD_SPORADIC_SERVER = 0x2ea
SC_THREADS = 0x240
SC_TIMEOUTS = 0x2eb
SC_TIMERS = 0x2b
SC_TRACE = 0x2ec
SC_TRACE_EVENT_FILTER = 0x2ed
SC_TRACE_EVENT_NAME_MAX = 0x2ee
SC_TRACE_INHERIT = 0x2ef
SC_TRACE_LOG = 0x2f0
SC_TRACE_NAME_MAX = 0x2f1
SC_TRACE_SYS_MAX = 0x2f2
SC_TRACE_USER_EVENT_MAX = 0x2f3
SC_TYPED_MEMORY_OBJECTS = 0x2f4
SC_VERSION = 0x8
SC_V6_ILP32_OFF32 = 0x2f5
SC_V6_ILP32_OFFBIG = 0x2f6
SC_V6_LP64_OFF64 = 0x2f7
SC_V6_LPBIG_OFFBIG = 0x2f8
SC_2_C_BIND = 0x2d
SC_2_C_DEV = 0x2e
SC_2_C_VERSION = 0x2f
SC_2_CHAR_TERM = 0x42
SC_2_FORT_DEV = 0x30
SC_2_FORT_RUN = 0x31
SC_2_LOCALEDEF = 0x32
SC_2_PBS = 0x2d4
SC_2_PBS_ACCOUNTING = 0x2d5
SC_2_PBS_CHECKPOINT = 0x2d6
SC_2_PBS_LOCATE = 0x2d8
SC_2_PBS_MESSAGE = 0x2d9
SC_2_PBS_TRACK = 0x2da
SC_2_SW_DEV = 0x33
SC_2_UPE = 0x34
SC_2_VERSION = 0x35
SC_XOPEN_CRYPT = 0x3e
SC_XOPEN_ENH_I18N = 0x3f
SC_XOPEN_REALTIME = 0x2ce
SC_XOPEN_REALTIME_THREADS = 0x2cf
SC_XOPEN_SHM = 0x40
SC_XOPEN_STREAMS = 0x2f9
SC_XOPEN_UNIX = 0x4e
SC_XOPEN_VERSION = 0xc
SC_XOPEN_XCU_VERSION = 0x43
SC_PHYS_PAGES = 0x1f4
SC_AVPHYS_PAGES = 0x1f5
SC_NPROCESSORS_CONF = 0xe
SC_NPROCESSORS_ONLN = 0xf
)

View File

@@ -0,0 +1,11 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_freebsd.go
//go:build freebsd && 386
package sysconf
const (
_LONG_MAX = 0x7fffffff
_SHRT_MAX = 0x7fff
)

View File

@@ -0,0 +1,11 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_freebsd.go
//go:build freebsd && amd64
package sysconf
const (
_LONG_MAX = 0x7fffffffffffffff
_SHRT_MAX = 0x7fff
)

View File

@@ -0,0 +1,11 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_freebsd.go
//go:build freebsd && arm
package sysconf
const (
_LONG_MAX = 0x7fffffff
_SHRT_MAX = 0x7fff
)

View File

@@ -0,0 +1,11 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_freebsd.go
//go:build freebsd && arm64
package sysconf
const (
_LONG_MAX = 0x7fffffffffffffff
_SHRT_MAX = 0x7fff
)

View File

@@ -0,0 +1,11 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_freebsd.go
//go:build freebsd && riscv64
package sysconf
const (
_LONG_MAX = 0x7fffffffffffffff
_SHRT_MAX = 0x7fff
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && 386
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x4000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = 0x1
_POSIX_V7_ILP32_OFFBIG = 0x1
_POSIX_V7_LP64_OFF64 = -0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = 0x1
_POSIX_V6_ILP32_OFFBIG = 0x1
_POSIX_V6_LP64_OFF64 = -0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && amd64
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x4000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = -0x1
_POSIX_V7_LP64_OFF64 = 0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = -0x1
_POSIX_V6_LP64_OFF64 = 0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && arm
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x4000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = 0x1
_POSIX_V7_ILP32_OFFBIG = 0x1
_POSIX_V7_LP64_OFF64 = -0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = 0x1
_POSIX_V6_ILP32_OFFBIG = 0x1
_POSIX_V6_LP64_OFF64 = -0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && arm64
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x20000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = -0x1
_POSIX_V7_LP64_OFF64 = 0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = -0x1
_POSIX_V6_LP64_OFF64 = 0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && loong64
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x20000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = -0x1
_POSIX_V7_LP64_OFF64 = 0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = -0x1
_POSIX_V6_LP64_OFF64 = 0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && mips
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x20000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = 0x1
_POSIX_V7_ILP32_OFFBIG = 0x1
_POSIX_V7_LP64_OFF64 = -0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = 0x1
_POSIX_V6_ILP32_OFFBIG = 0x1
_POSIX_V6_LP64_OFF64 = -0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && mips64
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x20000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = -0x1
_POSIX_V7_LP64_OFF64 = 0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = -0x1
_POSIX_V6_LP64_OFF64 = 0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && mips64le
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x20000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = -0x1
_POSIX_V7_LP64_OFF64 = 0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = -0x1
_POSIX_V6_LP64_OFF64 = 0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && mipsle
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x20000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = 0x1
_POSIX_V7_ILP32_OFFBIG = 0x1
_POSIX_V7_LP64_OFF64 = -0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = 0x1
_POSIX_V6_ILP32_OFFBIG = 0x1
_POSIX_V6_LP64_OFF64 = -0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && ppc64
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x20000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = -0x1
_POSIX_V7_LP64_OFF64 = 0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = -0x1
_POSIX_V6_LP64_OFF64 = 0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && ppc64le
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x20000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = -0x1
_POSIX_V7_LP64_OFF64 = 0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = -0x1
_POSIX_V6_LP64_OFF64 = 0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && riscv64
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x4000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = -0x1
_POSIX_V7_LP64_OFF64 = 0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = -0x1
_POSIX_V6_LP64_OFF64 = 0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,113 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_linux.go
//go:build linux && s390x
package sysconf
const (
_AIO_PRIO_DELTA_MAX = 0x14
_BC_BASE_MAX = 0x63
_BC_DIM_MAX = 0x800
_BC_SCALE_MAX = 0x63
_BC_STRING_MAX = 0x3e8
_COLL_WEIGHTS_MAX = 0xff
_DELAYTIMER_MAX = 0x7fffffff
_EXPR_NEST_MAX = 0x20
_HOST_NAME_MAX = 0x40
_LINE_MAX = 0x800
_LOGIN_NAME_MAX = 0x100
_MQ_PRIO_MAX = 0x8000
_NGROUPS_MAX = 0x10000
_NSS_BUFLEN_GROUP = 0x400
_NSS_BUFLEN_PASSWD = 0x400
_OPEN_MAX = 0x100
_PTHREAD_KEYS_MAX = 0x400
_PTHREAD_STACK_MIN = 0x4000
_RE_DUP_MAX = 0x7fff
_RTSIG_MAX = 0x20
_SEM_VALUE_MAX = 0x7fffffff
_STREAM_MAX = 0x10
_SYMLOOP_MAX = -0x1
_TTY_NAME_MAX = 0x20
_UIO_MAXIOV = 0x400
_INT_MAX = 0x7fffffff
_POSIX_ADVISORY_INFO = 0x31069
_POSIX_ARG_MAX = 0x1000
_POSIX_ASYNCHRONOUS_IO = 0x31069
_POSIX_BARRIERS = 0x31069
_POSIX_CHILD_MAX = 0x19
_POSIX_CLOCK_SELECTION = 0x31069
_POSIX_CPUTIME = 0x0
_POSIX_FSYNC = 0x31069
_POSIX_IPV6 = 0x31069
_POSIX_JOB_CONTROL = 0x1
_POSIX_MAPPED_FILES = 0x31069
_POSIX_MEMLOCK = 0x31069
_POSIX_MEMLOCK_RANGE = 0x31069
_POSIX_MEMORY_PROTECTION = 0x31069
_POSIX_MESSAGE_PASSING = 0x31069
_POSIX_MONOTONIC_CLOCK = 0x0
_POSIX_PRIORITIZED_IO = 0x31069
_POSIX_PRIORITY_SCHEDULING = 0x31069
_POSIX_RAW_SOCKETS = 0x31069
_POSIX_READER_WRITER_LOCKS = 0x31069
_POSIX_REALTIME_SIGNALS = 0x31069
_POSIX_REGEXP = 0x1
_POSIX_SAVED_IDS = 0x1
_POSIX_SEMAPHORES = 0x31069
_POSIX_SHARED_MEMORY_OBJECTS = 0x31069
_POSIX_SHELL = 0x1
_POSIX_SIGQUEUE_MAX = 0x20
_POSIX_SPAWN = 0x31069
_POSIX_SPIN_LOCKS = 0x31069
_POSIX_SPORADIC_SERVER = -0x1
_POSIX_SYNCHRONIZED_IO = 0x31069
_POSIX_THREAD_ATTR_STACKADDR = 0x31069
_POSIX_THREAD_ATTR_STACKSIZE = 0x31069
_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4
_POSIX_THREAD_PRIO_INHERIT = 0x31069
_POSIX_THREAD_PRIO_PROTECT = 0x31069
_POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069
_POSIX_THREAD_PROCESS_SHARED = 0x31069
_POSIX_THREAD_SAFE_FUNCTIONS = 0x31069
_POSIX_THREAD_SPORADIC_SERVER = -0x1
_POSIX_THREADS = 0x31069
_POSIX_TIMEOUTS = 0x31069
_POSIX_TIMERS = 0x31069
_POSIX_TRACE = -0x1
_POSIX_TRACE_EVENT_FILTER = -0x1
_POSIX_TRACE_INHERIT = -0x1
_POSIX_TRACE_LOG = -0x1
_POSIX_TYPED_MEMORY_OBJECTS = -0x1
_POSIX_VERSION = 0x31069
_POSIX_V7_ILP32_OFF32 = -0x1
_POSIX_V7_ILP32_OFFBIG = -0x1
_POSIX_V7_LP64_OFF64 = 0x1
_POSIX_V7_LPBIG_OFFBIG = -0x1
_POSIX_V6_ILP32_OFF32 = -0x1
_POSIX_V6_ILP32_OFFBIG = -0x1
_POSIX_V6_LP64_OFF64 = 0x1
_POSIX_V6_LPBIG_OFFBIG = -0x1
_POSIX2_C_BIND = 0x31069
_POSIX2_C_DEV = 0x31069
_POSIX2_C_VERSION = 0x31069
_POSIX2_CHAR_TERM = 0x31069
_POSIX2_LOCALEDEF = 0x31069
_POSIX2_SW_DEV = 0x31069
_POSIX2_VERSION = 0x31069
_XOPEN_ENH_I18N = 0x1
_XOPEN_REALTIME = 0x1
_XOPEN_REALTIME_THREADS = 0x1
_XOPEN_SHM = 0x1
_XOPEN_UNIX = 0x1
_XOPEN_VERSION = 0x2bc
_XOPEN_XCU_VERSION = 0x4
)

View File

@@ -0,0 +1,10 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_netbsd.go
//go:build netbsd && 386
package sysconf
const (
_LONG_MAX = 0x7fffffff
)

View File

@@ -0,0 +1,10 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_netbsd.go
//go:build netbsd && amd64
package sysconf
const (
_LONG_MAX = 0x7fffffffffffffff
)

View File

@@ -0,0 +1,10 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_netbsd.go
//go:build netbsd && arm
package sysconf
const (
_LONG_MAX = 0x7fffffff
)

View File

@@ -0,0 +1,10 @@
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs sysconf_values_netbsd.go
//go:build netbsd && arm64
package sysconf
const (
_LONG_MAX = 0x7fffffffffffffff
)