unistd.h revision 106812
11638Srgrimes/*- 21638Srgrimes * Copyright (c) 1991, 1993, 1994 31638Srgrimes * The Regents of the University of California. All rights reserved. 41638Srgrimes * 51638Srgrimes * Redistribution and use in source and binary forms, with or without 61638Srgrimes * modification, are permitted provided that the following conditions 71638Srgrimes * are met: 81638Srgrimes * 1. Redistributions of source code must retain the above copyright 91638Srgrimes * notice, this list of conditions and the following disclaimer. 101638Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111638Srgrimes * notice, this list of conditions and the following disclaimer in the 121638Srgrimes * documentation and/or other materials provided with the distribution. 131638Srgrimes * 3. All advertising materials mentioning features or use of this software 141638Srgrimes * must display the following acknowledgement: 151638Srgrimes * This product includes software developed by the University of 161638Srgrimes * California, Berkeley and its contributors. 171638Srgrimes * 4. Neither the name of the University nor the names of its contributors 181638Srgrimes * may be used to endorse or promote products derived from this software 191638Srgrimes * without specific prior written permission. 201638Srgrimes * 211638Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221638Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231638Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241638Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251638Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261638Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271638Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281638Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291638Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301638Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311638Srgrimes * SUCH DAMAGE. 321638Srgrimes * 331638Srgrimes * @(#)unistd.h 8.12 (Berkeley) 4/27/95 341638Srgrimes * $FreeBSD: head/include/unistd.h 106812 2002-11-12 14:41:49Z mike $ 351638Srgrimes */ 361638Srgrimes 371638Srgrimes#ifndef _UNISTD_H_ 381638Srgrimes#define _UNISTD_H_ 391638Srgrimes 401638Srgrimes#include <sys/cdefs.h> 411638Srgrimes#include <sys/types.h> /* XXX adds too much pollution. */ 421638Srgrimes#include <sys/unistd.h> 431638Srgrimes#include <sys/_types.h> 44 45#ifndef _GID_T_DECLARED 46typedef __gid_t gid_t; 47#define _GID_T_DECLARED 48#endif 49 50#ifndef _SIZE_T_DECLARED 51typedef __size_t size_t; 52#define _SIZE_T_DECLARED 53#endif 54 55#ifndef _SSIZE_T_DECLARED 56typedef __ssize_t ssize_t; 57#define _SSIZE_T_DECLARED 58#endif 59 60#ifndef _UID_T_DECLARED 61typedef __uid_t_ uid_t; 62#define _UID_T_DECLARED 63#endif 64 65/* 66 * XXX missing type definitions for off_t, pid_t and useconds_t. 67 */ 68 69#define STDIN_FILENO 0 /* standard input file descriptor */ 70#define STDOUT_FILENO 1 /* standard output file descriptor */ 71#define STDERR_FILENO 2 /* standard error file descriptor */ 72 73#ifndef NULL 74#define NULL 0 /* null pointer constant */ 75#endif 76 77#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200112 78#define F_ULOCK 0 /* unlock locked section */ 79#define F_LOCK 1 /* lock a section for exclusive use */ 80#define F_TLOCK 2 /* test and lock a section for exclusive use */ 81#define F_TEST 3 /* test a section for locks by other procs */ 82#endif 83 84/* 85 * POSIX options and option groups we unconditionally do or don't 86 * implement. This list includes those options which are exclusively 87 * implemented (or not) in user mode. Please keep this list in 88 * alphabetical order. 89 * 90 * Anything which is defined as zero below **must** have an 91 * implementation for the corresponding sysconf() which is able to 92 * determine conclusively whether or not the feature is supported. 93 * Anything which is defined as other than -1 below **must** have 94 * complete headers, types, and function declarations as specified by 95 * the POSIX standard; however, if the relevant sysconf() function 96 * returns -1, the functions may be stubbed out. 97 */ 98#define _POSIX_BARRIERS -1 99#define _POSIX_READER_WRITER_LOCKS 200112L 100#define _POSIX_REGEXP 1 101#define _POSIX_SHELL 1 102#define _POSIX_SPAWN -1 103#define _POSIX_SPIN_LOCKS -1 104#define _POSIX_THREAD_ATTR_STACKADDR 200112L 105#define _POSIX_THREAD_ATTR_STACKSIZE 200112L 106#define _POSIX_THREAD_CPUTIME -1 107#define _POSIX_THREAD_PRIO_INHERIT 200112L 108#define _POSIX_THREAD_PRIO_PROTECT 200112L 109#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L 110#define _POSIX_THREAD_PROCESS_SHARED -1 111#define _POSIX_THREAD_SAFE_FUNCTIONS -1 112#define _POSIX_THREAD_SPORADIC_SERVER -1 113#define _POSIX_THREADS 200112L 114#define _POSIX_TRACE -1 115#define _POSIX_TRACE_EVENT_FILTER -1 116#define _POSIX_TRACE_INHERIT -1 117#define _POSIX_TRACE_LOG -1 118#define _POSIX2_C_BIND 200112L /* mandatory */ 119#define _POSIX2_C_DEV -1 /* need c99 utility */ 120#define _POSIX2_CHAR_TERM 1 121#define _POSIX2_FORT_DEV -1 /* need fort77 utility */ 122#define _POSIX2_FORT_RUN 200112L 123#define _POSIX2_LOCALEDEF -1 124#define _POSIX2_PBS -1 125#define _POSIX2_PBS_ACCOUNTING -1 126#define _POSIX2_PBS_CHECKPOINT -1 127#define _POSIX2_PBS_LOCATE -1 128#define _POSIX2_PBS_MESSAGE -1 129#define _POSIX2_PBS_TRACK -1 130#define _POSIX2_SW_DEV -1 /* XXX ??? */ 131#define _POSIX2_UPE 200112L 132#define _V6_ILP32_OFF32 -1 133#define _V6_ILP32_OFFBIG 0 134#define _V6_LP64_OFF64 0 135#define _V6_LPBIG_OFFBIG -1 136 137#if __XSI_VISIBLE 138#define _XOPEN_CRYPT -1 /* XXX ??? */ 139#define _XOPEN_ENH_I18N -1 /* mandatory in XSI */ 140#define _XOPEN_LEGACY -1 141#define _XOPEN_REALTIME -1 142#define _XOPEN_REALTIME_THREADS -1 143#define _XOPEN_UNIX -1 144#endif 145 146/* Define the POSIX.2 version we target for compliance. */ 147#define _POSIX2_VERSION 199212L 148 149/* 150 * POSIX-style system configuration variable accessors (for the 151 * sysconf function). The kernel does not directly implement the 152 * sysconf() interface; rather, a C library stub translates references 153 * to sysconf() into calls to sysctl() using a giant switch statement. 154 * Those that are marked `user' are implemented entirely in the C 155 * library and never query the kernel. pathconf() is implemented 156 * directly by the kernel so those are not defined here. 157 */ 158#define _SC_ARG_MAX 1 159#define _SC_CHILD_MAX 2 160#define _SC_CLK_TCK 3 161#define _SC_NGROUPS_MAX 4 162#define _SC_OPEN_MAX 5 163#define _SC_JOB_CONTROL 6 164#define _SC_SAVED_IDS 7 165#define _SC_VERSION 8 166#define _SC_BC_BASE_MAX 9 /* user */ 167#define _SC_BC_DIM_MAX 10 /* user */ 168#define _SC_BC_SCALE_MAX 11 /* user */ 169#define _SC_BC_STRING_MAX 12 /* user */ 170#define _SC_COLL_WEIGHTS_MAX 13 /* user */ 171#define _SC_EXPR_NEST_MAX 14 /* user */ 172#define _SC_LINE_MAX 15 /* user */ 173#define _SC_RE_DUP_MAX 16 /* user */ 174#define _SC_2_VERSION 17 /* user */ 175#define _SC_2_C_BIND 18 /* user */ 176#define _SC_2_C_DEV 19 /* user */ 177#define _SC_2_CHAR_TERM 20 /* user */ 178#define _SC_2_FORT_DEV 21 /* user */ 179#define _SC_2_FORT_RUN 22 /* user */ 180#define _SC_2_LOCALEDEF 23 /* user */ 181#define _SC_2_SW_DEV 24 /* user */ 182#define _SC_2_UPE 25 /* user */ 183#define _SC_STREAM_MAX 26 /* user */ 184#define _SC_TZNAME_MAX 27 /* user */ 185 186#if __POSIX_VISIBLE >= 199309 187#define _SC_ASYNCHRONOUS_IO 28 188#define _SC_MAPPED_FILES 29 189#define _SC_MEMLOCK 30 190#define _SC_MEMLOCK_RANGE 31 191#define _SC_MEMORY_PROTECTION 32 192#define _SC_MESSAGE_PASSING 33 193#define _SC_PRIORITIZED_IO 34 194#define _SC_PRIORITY_SCHEDULING 35 195#define _SC_REALTIME_SIGNALS 36 196#define _SC_SEMAPHORES 37 197#define _SC_FSYNC 38 198#define _SC_SHARED_MEMORY_OBJECTS 39 199#define _SC_SYNCHRONIZED_IO 40 200#define _SC_TIMERS 41 201#define _SC_AIO_LISTIO_MAX 42 202#define _SC_AIO_MAX 43 203#define _SC_AIO_PRIO_DELTA_MAX 44 204#define _SC_DELAYTIMER_MAX 45 205#define _SC_MQ_OPEN_MAX 46 206#define _SC_PAGESIZE 47 207#define _SC_RTSIG_MAX 48 208#define _SC_SEM_NSEMS_MAX 49 209#define _SC_SEM_VALUE_MAX 50 210#define _SC_SIGQUEUE_MAX 51 211#define _SC_TIMER_MAX 52 212#endif 213 214#if __POSIX_VISIBLE >= 200112 215#define _SC_2_PBS 59 /* user */ 216#define _SC_2_PBS_ACCOUNTING 60 /* user */ 217#define _SC_2_PBS_CHECKPOINT 61 /* user */ 218#define _SC_2_PBS_LOCATE 62 /* user */ 219#define _SC_2_PBS_MESSAGE 63 /* user */ 220#define _SC_2_PBS_TRACK 64 /* user */ 221#define _SC_ADVISORY_INFO 65 222#define _SC_BARRIERS 66 /* user */ 223#define _SC_CLOCK_SELECTION 67 224#define _SC_CPUTIME 68 225#define _SC_FILE_LOCKING 69 226#define _SC_GETGR_R_SIZE_MAX 70 /* user */ 227#define _SC_GETPW_R_SIZE_MAX 71 /* user */ 228#define _SC_HOST_NAME_MAX 72 229#define _SC_LOGIN_NAME_MAX 73 230#define _SC_MONOTONIC_CLOCK 74 231#define _SC_MQ_PRIO_MAX 75 232#define _SC_READER_WRITER_LOCKS 76 /* user */ 233#define _SC_REGEXP 77 /* user */ 234#define _SC_SHELL 78 /* user */ 235#define _SC_SPAWN 79 /* user */ 236#define _SC_SPIN_LOCKS 80 /* user */ 237#define _SC_SPORADIC_SERVER 81 238#define _SC_THREAD_ATTR_STACKADDR 82 /* user */ 239#define _SC_THREAD_ATTR_STACKSIZE 83 /* user */ 240#define _SC_THREAD_CPUTIME 84 /* user */ 241#define _SC_THREAD_DESTRUCTOR_ITERATIONS 85 /* user */ 242#define _SC_THREAD_KEYS_MAX 86 /* user */ 243#define _SC_THREAD_PRIO_INHERIT 87 /* user */ 244#define _SC_THREAD_PRIO_PROTECT 88 /* user */ 245#define _SC_THREAD_PRIORITY_SCHEDULING 89 /* user */ 246#define _SC_THREAD_PROCESS_SHARED 90 /* user */ 247#define _SC_THREAD_SAFE_FUNCTIONS 91 /* user */ 248#define _SC_THREAD_SPORADIC_SERVER 92 /* user */ 249#define _SC_THREAD_STACK_MIN 93 /* user */ 250#define _SC_THREAD_THREADS_MAX 94 /* user */ 251#define _SC_TIMEOUTS 95 /* user */ 252#define _SC_THREADS 96 /* user */ 253#define _SC_TRACE 97 /* user */ 254#define _SC_TRACE_EVENT_FILTER 98 /* user */ 255#define _SC_TRACE_INHERIT 99 /* user */ 256#define _SC_TRACE_LOG 100 /* user */ 257#define _SC_TTY_NAME_MAX 101 /* user */ 258#define _SC_TYPED_MEMORY_OBJECTS 102 259#define _SC_V6_ILP32_OFF32 103 /* user */ 260#define _SC_V6_ILP32_OFFBIG 104 /* user */ 261#define _SC_V6_LP64_OFF64 105 /* user */ 262#define _SC_V6_LPBIG_OFFBIG 106 /* user */ 263#define _SC_IPV6 118 264#define _SC_RAW_SOCKETS 119 265#define _SC_SYMLOOP_MAX 120 266#endif 267 268#if __XSI_VISIBLE 269#define _SC_ATEXIT_MAX 107 /* user */ 270#define _SC_IOV_MAX 56 271#define _SC_PAGE_SIZE _SC_PAGESIZE 272#define _SC_XOPEN_CRYPT 108 /* user */ 273#define _SC_XOPEN_ENH_I18N 109 /* user */ 274#define _SC_XOPEN_LEGACY 110 /* user */ 275#define _SC_XOPEN_REALTIME 111 276#define _SC_XOPEN_REALTIME_THREADS 112 277#define _SC_XOPEN_SHM 113 278#define _SC_XOPEN_STREAMS 114 279#define _SC_XOPEN_UNIX 115 280#define _SC_XOPEN_VERSION 116 281#define _SC_XOPEN_XCU_VERSION 117 /* user */ 282#endif 283 284#if __BSD_VISIBLE 285#define _SC_NPROCESSORS_CONF 57 286#define _SC_NPROCESSORS_ONLN 58 287#endif 288 289/* Keys for the confstr(3) function. */ 290#if __POSIX_VISIBLE >= 199209 291#define _CS_PATH 1 /* default value of PATH */ 292#endif 293 294#if __POSIX_VISIBLE >= 200112 295#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS 2 296#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS 3 297#define _CS_POSIX_V6_ILP32_OFF32_LIBS 4 298#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS 5 299#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS 6 300#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS 7 301#define _CS_POSIX_V6_LP64_OFF64_CFLAGS 8 302#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS 9 303#define _CS_POSIX_V6_LP64_OFF64_LIBS 10 304#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS 11 305#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS 12 306#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS 13 307#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS 14 308#endif 309 310__BEGIN_DECLS 311/* 1003.1-1990 */ 312void _exit(int) __dead2; 313int access(const char *, int); 314unsigned int alarm(unsigned int); 315int chdir(const char *); 316int chown(const char *, uid_t, gid_t); 317int close(int); 318int dup(int); 319int dup2(int, int); 320int eaccess(const char *, int); 321int execl(const char *, const char *, ...); 322int execle(const char *, const char *, ...); 323int execlp(const char *, const char *, ...); 324int execv(const char *, char * const *); 325int execve(const char *, char * const *, char * const *); 326int execvp(const char *, char * const *); 327pid_t fork(void); 328long fpathconf(int, int); 329char *getcwd(char *, size_t); 330gid_t getegid(void); 331uid_t geteuid(void); 332gid_t getgid(void); 333int getgroups(int, gid_t []); 334char *getlogin(void); 335pid_t getpgrp(void); 336pid_t getpid(void); 337pid_t getppid(void); 338uid_t getuid(void); 339int isatty(int); 340int link(const char *, const char *); 341#ifndef _LSEEK_DECLARED 342#define _LSEEK_DECLARED 343off_t lseek(int, off_t, int); 344#endif 345long pathconf(const char *, int); 346int pause(void); 347int pipe(int *); 348ssize_t read(int, void *, size_t); 349int rmdir(const char *); 350int setgid(gid_t); 351int setpgid(pid_t, pid_t); 352void setproctitle(const char *_fmt, ...) __printf0like(1, 2); 353pid_t setsid(void); 354int setuid(uid_t); 355unsigned int sleep(unsigned int); 356long sysconf(int); 357pid_t tcgetpgrp(int); 358int tcsetpgrp(int, pid_t); 359char *ttyname(int); 360int unlink(const char *); 361ssize_t write(int, const void *, size_t); 362 363/* 1003.2-1992 */ 364#if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE 365size_t confstr(int, char *, size_t); 366int getopt(int, char * const [], const char *); 367 368extern char *optarg; /* getopt(3) external variables */ 369extern int optind, opterr, optopt; 370#endif 371 372/* ISO/IEC 9945-1: 1996 */ 373#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE 374int fsync(int); 375 376/* 377 * ftruncate() was in the POSIX Realtime Extension (it's used for shared 378 * memory), but truncate() was not. 379 */ 380#ifndef _FTRUNCATE_DECLARED 381#define _FTRUNCATE_DECLARED 382int ftruncate(int, off_t); 383#endif 384#endif 385 386#if __POSIX_VISIBLE >= 199506 387int getlogin_r(char *, int); 388#endif 389 390/* 1003.1-2001 */ 391#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE 392int fchown(int, uid_t, gid_t); 393int readlink(const char *, char *, int); 394#endif 395#if __POSIX_VISIBLE >= 200112 396int gethostname(char *, int /* socklen_t */); 397int setegid(gid_t); 398int seteuid(uid_t); 399#endif 400 401/* 402 * symlink() was originally in POSIX.1a, which was withdrawn after 403 * being overtaken by events (1003.1-2001). It was in XPG4.2, and of 404 * course has been in BSD since 4.2. 405 */ 406#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 || __BSD_VISIBLE 407int symlink(const char * __restrict, const char * __restrict); 408#endif 409 410/* X/Open System Interfaces */ 411#if __XSI_VISIBLE 412char *crypt(const char *, const char *); 413/* char *ctermid(char *); */ /* XXX ??? */ 414int encrypt(char *, int); 415int fchdir(int); 416long gethostid(void); 417int getpgid(pid_t _pid); 418int getsid(pid_t _pid); 419char *getwd(char *); /* LEGACY: obsoleted by getcwd() */ 420int lchown(const char *, uid_t, gid_t); 421int lockf(int, int, off_t); 422int nice(int); 423ssize_t pread(int, void *, size_t, off_t); 424ssize_t pwrite(int, const void *, size_t, off_t); 425int setpgrp(pid_t _pid, pid_t _pgrp); /* obsoleted by setpgid() */ 426int setregid(gid_t, gid_t); 427int setreuid(uid_t, uid_t); 428/* void swab(const void * __restrict, void * __restrict, ssize_t); */ 429void sync(void); 430unsigned int ualarm(unsigned int, unsigned int); 431int usleep(unsigned int); 432pid_t vfork(void); 433 434/* See comment at ftruncate() above. */ 435#ifndef _TRUNCATE_DECLARED 436#define _TRUNCATE_DECLARED 437int truncate(const char *, off_t); 438#endif 439#endif /* __XSI_VISIBLE */ 440 441#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE 442int brk(const void *); 443int chroot(const char *); 444int getdtablesize(void); 445int getpagesize(void) __pure2; 446char *getpass(const char *); 447void *sbrk(intptr_t); 448#endif 449 450#if __BSD_VISIBLE 451struct timeval; /* select(2) */ 452int acct(const char *); 453int async_daemon(void); 454int check_utility_compat(const char *); 455const char * 456 crypt_get_format(void); 457int crypt_set_format(const char *); 458int des_cipher(const char *, char *, long, int); 459int des_setkey(const char *key); 460void endusershell(void); 461int exect(const char *, char * const *, char * const *); 462char *fflagstostr(u_long); 463int getdomainname(char *, int); 464int getgrouplist(const char *, gid_t, gid_t *, int *); 465mode_t getmode(const void *, mode_t); 466int getpeereid(int, uid_t *, gid_t *); 467int getresgid(gid_t *, gid_t *, gid_t *); 468int getresuid(uid_t *, uid_t *, uid_t *); 469char *getusershell(void); 470int initgroups(const char *, gid_t); 471int iruserok(unsigned long, int, const char *, const char *); 472int iruserok_sa(const void *, int, int, const char *, const char *); 473int issetugid(void); 474char *mkdtemp(char *); 475int mknod(const char *, mode_t, dev_t); 476#ifndef _MKSTEMP_DECLARED 477int mkstemp(char *); 478#define _MKSTEMP_DECLARED 479#endif 480int mkstemps(char *, int); 481#ifndef _MKTEMP_DECLARED 482char *mktemp(char *); 483#define _MKTEMP_DECLARED 484#endif 485int nfsclnt(int, void *); 486int nfssvc(int, void *); 487int profil(char *, size_t, vm_offset_t, int); 488int rcmd(char **, int, const char *, const char *, const char *, int *); 489int rcmd_af(char **, int, const char *, 490 const char *, const char *, int *, int); 491int rcmdsh(char **, int, const char *, 492 const char *, const char *, const char *); 493char *re_comp(const char *); 494int re_exec(const char *); 495int reboot(int); 496int revoke(const char *); 497pid_t rfork(int); 498pid_t rfork_thread(int, void *, int (*)(void *), void *); 499int rresvport(int *); 500int rresvport_af(int *, int); 501int ruserok(const char *, int, const char *, const char *); 502#if __BSD_VISIBLE 503#ifndef _SELECT_DECLARED 504#define _SELECT_DECLARED 505int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); 506#endif 507#endif 508int setdomainname(const char *, int); 509int setgroups(int, const gid_t *); 510void sethostid(long); 511int sethostname(const char *, int); 512#ifndef _SETKEY_DECLARED 513int setkey(const char *); 514#define _SETKEY_DECLARED 515#endif 516int setlogin(const char *); 517void *setmode(const char *); 518int setresgid(gid_t, gid_t, gid_t); 519int setresuid(uid_t, uid_t, uid_t); 520int setrgid(gid_t); 521int setruid(uid_t); 522void setusershell(void); 523int strtofflags(char **, u_long *, u_long *); 524int swapon(const char *); 525int syscall(int, ...); 526off_t __syscall(quad_t, ...); 527int ttyslot(void); 528int undelete(const char *); 529int unwhiteout(const char *); 530void *valloc(size_t); /* obsoleted by malloc() */ 531 532extern char *suboptarg; /* getsubopt(3) external variable */ 533#ifndef _GETSUBOPT_DECLARED 534int getsubopt(char **, char * const *, char **); 535#define _GETSUBOPT_DECLARED 536#endif 537extern int optreset; /* getopt(3) external variable */ 538#endif /* __BSD_VISIBLE */ 539__END_DECLS 540 541#endif /* !_UNISTD_H_ */ 542