199767f8919635c4928607450d9e0abb932109ceToomas Soome/*-
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Copyright (c) 1991, 1993, 1994
199767f8919635c4928607450d9e0abb932109ceToomas Soome * The Regents of the University of California. All rights reserved.
199767f8919635c4928607450d9e0abb932109ceToomas Soome *
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Redistribution and use in source and binary forms, with or without
199767f8919635c4928607450d9e0abb932109ceToomas Soome * modification, are permitted provided that the following conditions
199767f8919635c4928607450d9e0abb932109ceToomas Soome * are met:
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 1. Redistributions of source code must retain the above copyright
199767f8919635c4928607450d9e0abb932109ceToomas Soome * notice, this list of conditions and the following disclaimer.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 2. Redistributions in binary form must reproduce the above copyright
199767f8919635c4928607450d9e0abb932109ceToomas Soome * notice, this list of conditions and the following disclaimer in the
199767f8919635c4928607450d9e0abb932109ceToomas Soome * documentation and/or other materials provided with the distribution.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * 3. Neither the name of the University nor the names of its contributors
199767f8919635c4928607450d9e0abb932109ceToomas Soome * may be used to endorse or promote products derived from this software
199767f8919635c4928607450d9e0abb932109ceToomas Soome * without specific prior written permission.
199767f8919635c4928607450d9e0abb932109ceToomas Soome *
199767f8919635c4928607450d9e0abb932109ceToomas Soome * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
199767f8919635c4928607450d9e0abb932109ceToomas Soome * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
199767f8919635c4928607450d9e0abb932109ceToomas Soome * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199767f8919635c4928607450d9e0abb932109ceToomas Soome * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
199767f8919635c4928607450d9e0abb932109ceToomas Soome * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
199767f8919635c4928607450d9e0abb932109ceToomas Soome * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
199767f8919635c4928607450d9e0abb932109ceToomas Soome * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
199767f8919635c4928607450d9e0abb932109ceToomas Soome * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
199767f8919635c4928607450d9e0abb932109ceToomas Soome * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
199767f8919635c4928607450d9e0abb932109ceToomas Soome * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
199767f8919635c4928607450d9e0abb932109ceToomas Soome * SUCH DAMAGE.
199767f8919635c4928607450d9e0abb932109ceToomas Soome *
199767f8919635c4928607450d9e0abb932109ceToomas Soome * @(#)unistd.h 8.12 (Berkeley) 4/27/95
199767f8919635c4928607450d9e0abb932109ceToomas Soome * $FreeBSD$
199767f8919635c4928607450d9e0abb932109ceToomas Soome */
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _UNISTD_H_
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _UNISTD_H_
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#include <sys/cdefs.h>
199767f8919635c4928607450d9e0abb932109ceToomas Soome#include <sys/types.h> /* XXX adds too much pollution. */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#include <sys/unistd.h>
199767f8919635c4928607450d9e0abb932109ceToomas Soome#include <sys/_null.h>
199767f8919635c4928607450d9e0abb932109ceToomas Soome#include <sys/_types.h>
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _GID_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef __gid_t gid_t;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _GID_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _OFF_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef __off_t off_t;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _OFF_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _PID_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef __pid_t pid_t;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _PID_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _SIZE_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef __size_t size_t;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SIZE_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _SSIZE_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef __ssize_t ssize_t;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SSIZE_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _UID_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef __uid_t uid_t;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _UID_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _USECONDS_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soometypedef __useconds_t useconds_t;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _USECONDS_T_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define STDIN_FILENO 0 /* standard input file descriptor */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define STDOUT_FILENO 1 /* standard output file descriptor */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define STDERR_FILENO 2 /* standard error file descriptor */
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define F_ULOCK 0 /* unlock locked section */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define F_LOCK 1 /* lock a section for exclusive use */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define F_TLOCK 2 /* test and lock a section for exclusive use */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define F_TEST 3 /* test a section for locks by other procs */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/*
199767f8919635c4928607450d9e0abb932109ceToomas Soome * POSIX options and option groups we unconditionally do or don't
199767f8919635c4928607450d9e0abb932109ceToomas Soome * implement. This list includes those options which are exclusively
199767f8919635c4928607450d9e0abb932109ceToomas Soome * implemented (or not) in user mode. Please keep this list in
199767f8919635c4928607450d9e0abb932109ceToomas Soome * alphabetical order.
199767f8919635c4928607450d9e0abb932109ceToomas Soome *
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Anything which is defined as zero below **must** have an
199767f8919635c4928607450d9e0abb932109ceToomas Soome * implementation for the corresponding sysconf() which is able to
199767f8919635c4928607450d9e0abb932109ceToomas Soome * determine conclusively whether or not the feature is supported.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Anything which is defined as other than -1 below **must** have
199767f8919635c4928607450d9e0abb932109ceToomas Soome * complete headers, types, and function declarations as specified by
199767f8919635c4928607450d9e0abb932109ceToomas Soome * the POSIX standard; however, if the relevant sysconf() function
199767f8919635c4928607450d9e0abb932109ceToomas Soome * returns -1, the functions may be stubbed out.
199767f8919635c4928607450d9e0abb932109ceToomas Soome */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_BARRIERS 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_CPUTIME 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_READER_WRITER_LOCKS 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_REGEXP 1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_SHELL 1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_SPAWN 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_SPIN_LOCKS 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREAD_ATTR_STACKADDR 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREAD_ATTR_STACKSIZE 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREAD_CPUTIME 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREAD_PRIO_INHERIT 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREAD_PRIO_PROTECT 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREAD_PROCESS_SHARED -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREAD_SAFE_FUNCTIONS -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREAD_SPORADIC_SERVER -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_THREADS 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_TRACE -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_TRACE_EVENT_FILTER -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_TRACE_INHERIT -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX_TRACE_LOG -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_C_BIND 200112L /* mandatory */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_C_DEV -1 /* need c99 utility */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_CHAR_TERM 1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_FORT_DEV -1 /* need fort77 utility */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_FORT_RUN 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_LOCALEDEF -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_PBS -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_PBS_ACCOUNTING -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_PBS_CHECKPOINT -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_PBS_LOCATE -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_PBS_MESSAGE -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_PBS_TRACK -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_SW_DEV -1 /* XXX ??? */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_UPE 200112L
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _V6_ILP32_OFF32 -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _V6_ILP32_OFFBIG 0
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _V6_LP64_OFF64 0
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _V6_LPBIG_OFFBIG -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __XSI_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _XOPEN_CRYPT -1 /* XXX ??? */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _XOPEN_ENH_I18N -1 /* mandatory in XSI */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _XOPEN_LEGACY -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _XOPEN_REALTIME -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _XOPEN_REALTIME_THREADS -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _XOPEN_UNIX -1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* Define the POSIX.2 version we target for compliance. */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _POSIX2_VERSION 199212L
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/*
199767f8919635c4928607450d9e0abb932109ceToomas Soome * POSIX-style system configuration variable accessors (for the
199767f8919635c4928607450d9e0abb932109ceToomas Soome * sysconf function). The kernel does not directly implement the
199767f8919635c4928607450d9e0abb932109ceToomas Soome * sysconf() interface; rather, a C library stub translates references
199767f8919635c4928607450d9e0abb932109ceToomas Soome * to sysconf() into calls to sysctl() using a giant switch statement.
199767f8919635c4928607450d9e0abb932109ceToomas Soome * Those that are marked `user' are implemented entirely in the C
199767f8919635c4928607450d9e0abb932109ceToomas Soome * library and never query the kernel. pathconf() is implemented
199767f8919635c4928607450d9e0abb932109ceToomas Soome * directly by the kernel so those are not defined here.
199767f8919635c4928607450d9e0abb932109ceToomas Soome */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_ARG_MAX 1
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_CHILD_MAX 2
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_CLK_TCK 3
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_NGROUPS_MAX 4
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_OPEN_MAX 5
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_JOB_CONTROL 6
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SAVED_IDS 7
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_VERSION 8
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_BC_BASE_MAX 9 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_BC_DIM_MAX 10 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_BC_SCALE_MAX 11 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_BC_STRING_MAX 12 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_COLL_WEIGHTS_MAX 13 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_EXPR_NEST_MAX 14 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_LINE_MAX 15 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_RE_DUP_MAX 16 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_VERSION 17 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_C_BIND 18 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_C_DEV 19 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_CHAR_TERM 20 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_FORT_DEV 21 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_FORT_RUN 22 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_LOCALEDEF 23 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_SW_DEV 24 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_UPE 25 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_STREAM_MAX 26 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TZNAME_MAX 27 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 199309
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_ASYNCHRONOUS_IO 28
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_MAPPED_FILES 29
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_MEMLOCK 30
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_MEMLOCK_RANGE 31
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_MEMORY_PROTECTION 32
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_MESSAGE_PASSING 33
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_PRIORITIZED_IO 34
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_PRIORITY_SCHEDULING 35
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_REALTIME_SIGNALS 36
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SEMAPHORES 37
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_FSYNC 38
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SHARED_MEMORY_OBJECTS 39
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SYNCHRONIZED_IO 40
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TIMERS 41
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_AIO_LISTIO_MAX 42
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_AIO_MAX 43
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_AIO_PRIO_DELTA_MAX 44
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_DELAYTIMER_MAX 45
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_MQ_OPEN_MAX 46
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_PAGESIZE 47
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_RTSIG_MAX 48
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SEM_NSEMS_MAX 49
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SEM_VALUE_MAX 50
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SIGQUEUE_MAX 51
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TIMER_MAX 52
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 200112
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_PBS 59 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_PBS_ACCOUNTING 60 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_PBS_CHECKPOINT 61 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_PBS_LOCATE 62 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_PBS_MESSAGE 63 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_2_PBS_TRACK 64 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_ADVISORY_INFO 65
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_BARRIERS 66 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_CLOCK_SELECTION 67
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_CPUTIME 68
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_FILE_LOCKING 69
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_GETGR_R_SIZE_MAX 70 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_GETPW_R_SIZE_MAX 71 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_HOST_NAME_MAX 72
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_LOGIN_NAME_MAX 73
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_MONOTONIC_CLOCK 74
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_MQ_PRIO_MAX 75
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_READER_WRITER_LOCKS 76 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_REGEXP 77 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SHELL 78 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SPAWN 79 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SPIN_LOCKS 80 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SPORADIC_SERVER 81
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_ATTR_STACKADDR 82 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_ATTR_STACKSIZE 83 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_CPUTIME 84 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_KEYS_MAX 86 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_PRIO_INHERIT 87 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_PRIO_PROTECT 88 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_PRIORITY_SCHEDULING 89 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_PROCESS_SHARED 90 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_SPORADIC_SERVER 92 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_STACK_MIN 93 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREAD_THREADS_MAX 94 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TIMEOUTS 95 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_THREADS 96 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TRACE 97 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TRACE_EVENT_FILTER 98 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TRACE_INHERIT 99 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TRACE_LOG 100 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TTY_NAME_MAX 101 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_TYPED_MEMORY_OBJECTS 102
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_V6_ILP32_OFF32 103 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_V6_ILP32_OFFBIG 104 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_V6_LP64_OFF64 105 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_V6_LPBIG_OFFBIG 106 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_IPV6 118
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_RAW_SOCKETS 119
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_SYMLOOP_MAX 120
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __XSI_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_ATEXIT_MAX 107 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_IOV_MAX 56
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_PAGE_SIZE _SC_PAGESIZE
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_CRYPT 108 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_ENH_I18N 109 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_LEGACY 110 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_REALTIME 111
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_REALTIME_THREADS 112
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_SHM 113
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_STREAMS 114
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_UNIX 115
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_VERSION 116
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_XOPEN_XCU_VERSION 117 /* user */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __BSD_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_NPROCESSORS_CONF 57
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_NPROCESSORS_ONLN 58
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_CPUSET_SIZE 122
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* Extensions found in Solaris and Linux. */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SC_PHYS_PAGES 121
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* Keys for the confstr(3) function. */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 199209
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_PATH 1 /* default value of PATH */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 200112
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_LP64_OFF64_LIBS 10
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome__BEGIN_DECLS
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* 1003.1-1990 */
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid _exit(int) __dead2;
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint access(const char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeunsigned int alarm(unsigned int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint chdir(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint chown(const char *, uid_t, gid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint close(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid closefrom(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint dup(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint dup2(int, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint execl(const char *, const char *, ...) __null_sentinel;
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint execle(const char *, const char *, ...);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint execlp(const char *, const char *, ...) __null_sentinel;
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint execv(const char *, char * const *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint execve(const char *, char * const *, char * const *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint execvp(const char *, char * const *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomepid_t fork(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomelong fpathconf(int, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *getcwd(char *, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomegid_t getegid(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeuid_t geteuid(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomegid_t getgid(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getgroups(int, gid_t []);
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *getlogin(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomepid_t getpgrp(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomepid_t getpid(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomepid_t getppid(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeuid_t getuid(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint isatty(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint link(const char *, const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _LSEEK_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _LSEEK_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomeoff_t lseek(int, off_t, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soomelong pathconf(const char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint pause(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint pipe(int *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomessize_t read(int, void *, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint rmdir(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setgid(gid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setpgid(pid_t, pid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomepid_t setsid(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setuid(uid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeunsigned int sleep(unsigned int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomelong sysconf(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomepid_t tcgetpgrp(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint tcsetpgrp(int, pid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *ttyname(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint ttyname_r(int, char *, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint unlink(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomessize_t write(int, const void *, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* 1003.2-1992 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soomesize_t confstr(int, char *, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _GETOPT_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _GETOPT_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getopt(int, char * const [], const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeextern char *optarg; /* getopt(3) external variables */
199767f8919635c4928607450d9e0abb932109ceToomas Soomeextern int optind, opterr, optopt;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif /* _GETOPT_DECLARED */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* ISO/IEC 9945-1: 1996 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint fsync(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/*
199767f8919635c4928607450d9e0abb932109ceToomas Soome * ftruncate() was in the POSIX Realtime Extension (it's used for shared
199767f8919635c4928607450d9e0abb932109ceToomas Soome * memory), but truncate() was not.
199767f8919635c4928607450d9e0abb932109ceToomas Soome */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _FTRUNCATE_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _FTRUNCATE_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint ftruncate(int, off_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 199506
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getlogin_r(char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* 1003.1-2001 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint fchown(int, uid_t, gid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomessize_t readlink(const char * __restrict, char * __restrict, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 200112
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint gethostname(char *, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setegid(gid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint seteuid(uid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* 1003.1-2008 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getsid(pid_t _pid);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint fchdir(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getpgid(pid_t _pid);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint lchown(const char *, uid_t, gid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomessize_t pread(int, void *, size_t, off_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomessize_t pwrite(int, const void *, size_t, off_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* See comment at ftruncate() above. */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _TRUNCATE_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _TRUNCATE_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint truncate(const char *, off_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 200809
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint faccessat(int, const char *, int, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint fchownat(int, const char *, uid_t, gid_t, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint fexecve(int, char *const [], char *const []);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint linkat(int, const char *, int, const char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomessize_t readlinkat(int, const char * __restrict, char * __restrict, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint symlinkat(const char *, int, const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint unlinkat(int, const char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif /* __POSIX_VISIBLE >= 200809 */
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/*
199767f8919635c4928607450d9e0abb932109ceToomas Soome * symlink() was originally in POSIX.1a, which was withdrawn after
199767f8919635c4928607450d9e0abb932109ceToomas Soome * being overtaken by events (1003.1-2001). It was in XPG4.2, and of
199767f8919635c4928607450d9e0abb932109ceToomas Soome * course has been in BSD since 4.2.
199767f8919635c4928607450d9e0abb932109ceToomas Soome */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint symlink(const char * __restrict, const char * __restrict);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* X/Open System Interfaces */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __XSI_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *crypt(const char *, const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soome/* char *ctermid(char *); */ /* XXX ??? */
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint encrypt(char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomelong gethostid(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint lockf(int, int, off_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint nice(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setregid(gid_t, gid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setreuid(uid_t, uid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _SWAB_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SWAB_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid swab(const void * __restrict, void * __restrict, ssize_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif /* _SWAB_DECLARED */
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid sync(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif /* __XSI_VISIBLE */
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if (__XSI_VISIBLE && __XSI_VISIBLE <= 500) || __BSD_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint brk(const void *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint chroot(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getdtablesize(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getpagesize(void) __pure2;
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *getpass(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid *sbrk(intptr_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if (__XSI_VISIBLE && __XSI_VISIBLE <= 600) || __BSD_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *getwd(char *); /* obsoleted by getcwd() */
199767f8919635c4928607450d9e0abb932109ceToomas Soomeuseconds_t
199767f8919635c4928607450d9e0abb932109ceToomas Soome ualarm(useconds_t, useconds_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint usleep(useconds_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomepid_t vfork(void) __returns_twice;
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __BSD_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soomestruct timeval; /* select(2) */
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint acct(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint async_daemon(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint check_utility_compat(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeconst char *
199767f8919635c4928607450d9e0abb932109ceToomas Soome crypt_get_format(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint crypt_set_format(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint des_cipher(const char *, char *, long, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint des_setkey(const char *key);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint dup3(int, int, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint eaccess(const char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid endusershell(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint exect(const char *, char * const *, char * const *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint execvP(const char *, const char *, char * const *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint feature_present(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *fflagstostr(u_long);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getdomainname(char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getgrouplist(const char *, gid_t, gid_t *, int *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getloginclass(char *, size_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomemode_t getmode(const void *, mode_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getosreldate(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getpeereid(int, uid_t *, gid_t *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getresgid(gid_t *, gid_t *, gid_t *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint getresuid(uid_t *, uid_t *, uid_t *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *getusershell(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint initgroups(const char *, gid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint iruserok(unsigned long, int, const char *, const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint iruserok_sa(const void *, int, int, const char *, const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint issetugid(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid __FreeBSD_libc_enter_restricted_mode(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomelong lpathconf(const char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _MKDTEMP_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *mkdtemp(char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _MKDTEMP_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _MKNOD_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint mknod(const char *, mode_t, dev_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _MKNOD_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _MKSTEMP_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint mkstemp(char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _MKSTEMP_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint mkstemps(char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _MKTEMP_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *mktemp(char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _MKTEMP_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint nfssvc(int, void *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint nlm_syscall(int, int, int, char **);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint pipe2(int *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint profil(char *, size_t, vm_offset_t, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint rcmd(char **, int, const char *, const char *, const char *, int *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint rcmd_af(char **, int, const char *,
199767f8919635c4928607450d9e0abb932109ceToomas Soome const char *, const char *, int *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint rcmdsh(char **, int, const char *,
199767f8919635c4928607450d9e0abb932109ceToomas Soome const char *, const char *, const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomechar *re_comp(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint re_exec(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint reboot(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint revoke(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomepid_t rfork(int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomepid_t rfork_thread(int, void *, int (*)(void *), void *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint rresvport(int *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint rresvport_af(int *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint ruserok(const char *, int, const char *, const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#if __BSD_VISIBLE
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _SELECT_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SELECT_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setdomainname(const char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setgroups(int, const gid_t *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid sethostid(long);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint sethostname(const char *, int);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _SETKEY_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setkey(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _SETKEY_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setlogin(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setloginclass(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid *setmode(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setpgrp(pid_t, pid_t); /* obsoleted by setpgid() */
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid setproctitle(const char *_fmt, ...) __printf0like(1, 2);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setresgid(gid_t, gid_t, gid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setresuid(uid_t, uid_t, uid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setrgid(gid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint setruid(uid_t);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid setusershell(void);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint strtofflags(char **, u_long *, u_long *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint swapon(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint swapoff(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint syscall(int, ...);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeoff_t __syscall(quad_t, ...);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint undelete(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomeint unwhiteout(const char *);
199767f8919635c4928607450d9e0abb932109ceToomas Soomevoid *valloc(size_t); /* obsoleted by malloc() */
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#ifndef _OPTRESET_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soome#define _OPTRESET_DECLARED
199767f8919635c4928607450d9e0abb932109ceToomas Soomeextern int optreset; /* getopt(3) external variable */
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif /* __BSD_VISIBLE */
199767f8919635c4928607450d9e0abb932109ceToomas Soome__END_DECLS
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#endif /* !_UNISTD_H_ */