Changeset 358


Ignore:
Timestamp:
Jul 11, 2003, 5:08:23 PM (22 years ago)
Author:
bird
Message:

#427: Rough merge of emx and FreeBSD 5.1 unistd.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/unistd.h

    • Property cvs2svn:cvs-rev changed from 1.7 to 1.8
    r357 r358  
    1 /* unistd.h (emx+gcc) */
    2 
    3 #ifndef _UNISTD_H
    4 #define _UNISTD_H
    5 #define _UNISTD_H_ /* toolkit compatibility */
    6 
    7 #if defined (__cplusplus)
    8 extern "C" {
    9 #endif
    10 
     1/*-
     2 * Copyright (c) 1991, 1993, 1994
     3 *      The Regents of the University of California.  All rights reserved.
     4 *
     5 * Redistribution and use in source and binary forms, with or without
     6 * modification, are permitted provided that the following conditions
     7 * are met:
     8 * 1. Redistributions of source code must retain the above copyright
     9 *    notice, this list of conditions and the following disclaimer.
     10 * 2. Redistributions in binary form must reproduce the above copyright
     11 *    notice, this list of conditions and the following disclaimer in the
     12 *    documentation and/or other materials provided with the distribution.
     13 * 3. All advertising materials mentioning features or use of this software
     14 *    must display the following acknowledgement:
     15 *      This product includes software developed by the University of
     16 *      California, Berkeley and its contributors.
     17 * 4. Neither the name of the University nor the names of its contributors
     18 *    may be used to endorse or promote products derived from this software
     19 *    without specific prior written permission.
     20 *
     21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31 * SUCH DAMAGE.
     32 *
     33 *      @(#)unistd.h    8.12 (Berkeley) 4/27/95
     34 * $FreeBSD: src/include/unistd.h,v 1.66 2002/12/29 01:07:55 mike Exp $
     35 *
     36 * @@level      EMX/FreeBSD 5.1
     37 * @@changed    Commented out stuff which isn't implemented, TCPIP stuff at bottom.
     38 * @@todo       Several man-years.. ;) Serious, complete the FreeBSD 5.1 merge. There is a bunch of POSIX stuff left.
     39 */
     40
     41#ifndef _UNISTD_H_
     42#define _UNISTD_H_
     43#define _UNISTD_H                       /* bird: emx */
     44
     45/* @@todo: remove old _POSIX_SOURCE define. */
    1146#if defined (_POSIX_C_SOURCE) && !defined (_POSIX_SOURCE)
    1247#define _POSIX_SOURCE
    1348#endif
    1449
    15 #if !defined (_SIZE_T)
    16 #define _SIZE_T
    17 typedef unsigned long size_t;
    18 #endif
    19 
    20 #if !defined (_SSIZE_T)
    21 #define _SSIZE_T
    22 typedef int ssize_t;
    23 #endif
    24 
    25 #if !defined (NULL)
    26 #if defined (__cplusplus)
    27 #define NULL 0
    28 #else
    29 #define NULL ((void *)0)
    30 #endif
    31 #endif
    32 
    33 #if !defined (STDIN_FILENO)
    34 #define STDIN_FILENO    0
    35 #define STDOUT_FILENO   1
    36 #define STDERR_FILENO   2
    37 #endif
     50#include <sys/cdefs.h>
     51#include <sys/types.h>                  /* XXX adds too much pollution. */
     52/* @@todo: port FreeBSD sys/unistd.h: #include <sys/unistd.h> */
     53#include <sys/_types.h>
     54
     55#if !defined(_GID_T_DECLARED) && !defined(_GID_T) /* bird: emx */
     56typedef __gid_t         gid_t;          /* group id */
     57#define _GID_T_DECLARED
     58#define _GID_T                          /* bird: emx */
     59#endif
     60
     61#if !defined(_OFF_T_DECLARED) && !defined(_OFF_T) /* bird:emx */
     62typedef __off_t         off_t;          /* file offset */
     63#define _OFF_T_DECLARED
     64#define _OFF_T                          /* bird: emx */
     65#endif
     66
     67#if !defined(_PID_T_DECLARED) && !defined(_PID_T) /* bird:emx */
     68typedef __pid_t         pid_t;          /* process id */
     69#define _PID_T_DECLARED
     70#define _PID_T                          /* bird: emx */
     71#endif
     72
     73#if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T) /* bird: emx */
     74typedef __size_t        size_t;
     75#define _SIZE_T_DECLARED
     76#define _SIZE_T                         /* bird: emx */
     77#endif
     78
     79#if !defined(_SSIZE_T_DECLARED) && !defined(_SSIZE_T) /* bird: emx */
     80typedef __ssize_t       ssize_t;
     81#define _SSIZE_T_DECLARED
     82#define _SSIZE_T                        /* bird: emx */
     83#endif
     84
     85#if !defined(_UID_T_DECLARED) && !defined(_UID_T)  /* bird: emx */
     86typedef __uid_t         uid_t;          /* user id */
     87#define _UID_T_DECLARED
     88#define _UID_T                          /* bird: emx */
     89#endif
     90
     91#ifndef _USECONDS_T_DECLARED
     92typedef __useconds_t    useconds_t;     /* microseconds (unsigned) */
     93#define _USECONDS_T_DECLARED
     94#endif
     95
     96#if !defined(STDIN_FILENO)              /* bird: emx */
     97#define  STDIN_FILENO   0       /* standard input file descriptor */
     98#define STDOUT_FILENO   1       /* standard output file descriptor */
     99#define STDERR_FILENO   2       /* standard error file descriptor */
     100#endif
     101
     102#ifndef NULL
     103#define NULL            0       /* null pointer constant */
     104#endif
     105
     106/** @todo: big todo to get in all the POSIX defines. */
    38107
    39108#if !defined (F_OK)
     
    80149
    81150
    82 int access (__const__ char *, int);
    83 unsigned alarm (unsigned);
    84 int chdir (__const__ char *);
    85 /* chown() */
    86 int close (int);
    87 /* ctermid() */
    88 char *cuserid (char *);
    89 int dup (int);
    90 int dup2 (int, int);
    91 int execl (__const__ char *, __const__ char *, ...);
    92 int execle (__const__ char *, __const__ char *, ...);
    93 int execlp (__const__ char *, __const__ char *, ...);
    94 int execv (__const__ char *, char * __const__ *);
    95 int execve (__const__ char *, char * __const__ *, char * __const__ *);
    96 int execvp (__const__ char *, char * __const__ *);
    97 void _exit (int) __attribute__ ((__noreturn__));
    98 int fork (void);
    99 long fpathconf (int, int);
    100 char *getcwd (char *, size_t);
    101 int getegid (void);             /* gid_t getegid (void); */
    102 int geteuid (void);             /* uid_t geteuid (void); */
    103 int getgid (void);              /* gid_t getgid (void); */
    104 int getgroups (int, int *);     /* int getgroups (int, gid_t *); */
    105 char *getlogin (void);
    106 int getpgrp (void);             /* pid_t getpgrp (void); */
    107 int getpid (void);              /* pid_t getpid (void); */
    108 int getppid (void);             /* pid_t getppid (void); */
    109 int getuid (void);              /* uid_t getuid (void); */
    110 int isatty (int);
    111 /* link() */
     151__BEGIN_DECLS
     152/* 1003.1-1990 */
     153void     _exit(int) __dead2;
     154int      access(const char *, int);
     155unsigned int     alarm(unsigned int);
     156int      chdir(const char *);
     157/* @@todo: int   chown(const char *, uid_t, gid_t); */
     158int      close(int);
     159char *   cuserid(char *); /* bird: emx/todo/obosolete? */
     160int      dup(int);
     161int      dup2(int, int);
     162/* @@todo: int   eaccess(const char *, int); */
     163int      execl(const char *, const char *, ...);
     164int      execle(const char *, const char *, ...);
     165int      execlp(const char *, const char *, ...);
     166int      execv(const char *, char * const *);
     167int      execve(const char *, char * const *, char * const *);
     168int      execvp(const char *, char * const *);
     169pid_t    fork(void);
     170long     fpathconf(int, int);
     171char    *getcwd(char *, size_t);
     172gid_t    getegid(void);
     173uid_t    geteuid(void);
     174gid_t    getgid(void);
     175int      getgroups(int, gid_t []);
     176char    *getlogin(void);
     177pid_t    getpgrp(void);
     178pid_t    getpid(void);
     179pid_t    getppid(void);
     180uid_t    getuid(void);
     181int      isatty(int);
     182/* @@todo: int   link(const char *, const char *);*/
    112183#ifndef _LSEEK_DECLARED
    113184#define _LSEEK_DECLARED
    114 long lseek (int, long, int);
    115 #endif
    116 long pathconf (__const__ char *, int);
    117 int pause (void);
    118 int pipe (int *);
    119 int read (int, void *, size_t);
    120 int rmdir (__const__ char *);
    121 int setgid (int);               /* int setsid (gid_t); */
    122 int setpgid (int, int);         /* int setpgid (gid_t, gid_t); */
    123 int setsid (void);              /* pid_t setsid (void); */
    124 int setuid (int);               /* setuid (uid_t); */
    125 unsigned sleep (unsigned);
    126 long sysconf (int);
    127 int tcgetpgrp (int);            /* pid_t tcgetpgrp (int); */
    128 int tcsetpgrp (int, int);       /* int tcsetpgrp (int, pid_t) */
    129 char *ttyname (int);
    130 int unlink (__const__ char *);
    131 int write (int, __const__ void *, size_t);
    132 
    133 
    134 #if !defined (_POSIX_SOURCE)
    135 
    136 void *brk (void *);
    137 char *getpass (__const__ char *);
    138 char *_getpass1 (__const__ char *);
    139 char *_getpass2 (__const__ char *, int);
    140 int mkstemp (char *);
    141 char *mktemp (char *);
    142 int profil (void *, unsigned, unsigned, unsigned);
    143 void *sbrk (int);
    144 
    145 #endif
    146 
    147 
    148 #if !defined (_POSIX_SOURCE) || _POSIX_C_SOURCE >= 2
    149 
    150 extern char *optarg;
    151 extern int optind;
    152 extern int opterr;
    153 extern int optopt;
    154 
    155 /* Note: The 2nd argument is not const as GETOPT_ANY reorders the
    156    array pointed to. */
    157 
    158 int getopt (int, char **, __const__ char *);
    159 
    160 #endif
    161 
    162 
    163 #if !defined (_POSIX_SOURCE) || defined (_WITH_UNDERSCORE)
    164 
     185off_t    lseek(int, off_t, int);
     186#endif
     187long     pathconf(const char *, int);
     188int      pause(void);
     189int      pipe(int *);
     190ssize_t  read(int, void *, size_t);
     191int      rmdir(const char *);
     192int      setgid(gid_t);
     193/* @@todo: void  setproctitle(const char *_fmt, ...) __printf0like(1, 2); */
     194int      setpgid(pid_t, pid_t);
     195pid_t    setsid(void);
     196int      setuid(uid_t);
     197unsigned sleep(unsigned);
     198long     sysconf(int);
     199pid_t    tcgetpgrp(int);
     200int      tcsetpgrp(int, pid_t);
     201char    *ttyname(int);
     202int      unlink(const char *);
     203int      write(int, const void *, size_t);
     204
     205/* 1003.2-1992 */
     206#if __POSIX_VISIBLE >= 199209 || __XSI_VISIBLE
     207/* @@todo: size_t        confstr(int, char *, size_t);*/
     208int      getopt(int, char * const [], const char *);
     209
     210extern char *optarg;                    /* getopt(3) external variables */
     211extern int optind, opterr, optopt;
     212#endif
     213
     214/* ISO/IEC 9945-1: 1996 */
     215#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE
     216int      fsync(int);
     217
     218/*
     219 * ftruncate() was in the POSIX Realtime Extension (it's used for shared
     220 * memory), but truncate() was not.
     221 */
     222#ifndef _FTRUNCATE_DECLARED
     223#define _FTRUNCATE_DECLARED
     224int      ftruncate(int, off_t);
     225#endif
     226#endif
     227
     228#if __POSIX_VISIBLE >= 199506
     229/* @@todo: int   getlogin_r(char *, int); */
     230#endif
     231
     232/* 1003.1-2001 */
     233#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
     234/* @@todo: int   fchown(int, uid_t, gid_t); */
     235/* @@todo: int   readlink(const char *, char *, int); */
     236#endif
     237#if __POSIX_VISIBLE >= 200112
     238/* tcpip: int    gethostname(char *, int / * socklen_t * /); */
     239/* @@todo: int   setegid(gid_t);  */
     240/* @@todo: int   seteuid(uid_t); */
     241#endif
     242
     243/*
     244 * symlink() was originally in POSIX.1a, which was withdrawn after
     245 * being overtaken by events (1003.1-2001).  It was in XPG4.2, and of
     246 * course has been in BSD since 4.2.
     247 */
     248#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >= 402 || __BSD_VISIBLE
     249/* @@todo: int   symlink(const char * __restrict, const char * __restrict); */
     250#endif
     251
     252/* X/Open System Interfaces */
     253#if __XSI_VISIBLE
     254/* @@todo: char *crypt(const char *, const char *); */
     255/* @@todo: char *ctermid(char *); */            /* XXX ??? */
     256/* @@todo: int   encrypt(char *, int); */
     257/* @@todo: int   fchdir(int); */
     258/* tcpip: long   gethostid(void); */
     259/* @@todo: int   getpgid(pid_t _pid); */
     260/* @@todo: int   getsid(pid_t _pid); */
     261char    *getwd(char *);                 /* LEGACY: obsoleted by getcwd() */
     262/* @@todo: int   lchown(const char *, uid_t, gid_t); */
     263/* @@todo: int   lockf(int, int, off_t); */
     264/* @@todo: int   nice(int); */
     265/* @@todo: ssize_t       pread(int, void *, size_t, off_t); */
     266/* @@todo: ssize_t       pwrite(int, const void *, size_t, off_t); */
     267/* @@todo: int   setpgrp(pid_t _pid, pid_t _pgrp); */ /* obsoleted by setpgid() */
     268/* @@todo: int   setregid(gid_t, gid_t); */
     269/* @@todo: int   setreuid(uid_t, uid_t); */
     270/* void  swab(const void * __restrict, void * __restrict, ssize_t); */
     271/* @@todo: void  sync(void); */
     272/* @@todo: useconds_t    ualarm(useconds_t, useconds_t); */
     273/* @@todo: int   usleep(useconds_t); */
     274/* @@todo: pid_t         vfork(void); */
     275
     276/* See comment at ftruncate() above. */
     277#ifndef _TRUNCATE_DECLARED
     278#define _TRUNCATE_DECLARED
     279int      truncate(const char *, off_t);
     280#endif
     281#endif /* __XSI_VISIBLE */
     282
     283#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
     284int      brk(const void *);
     285/* @@todo: int   chroot(const char *); */
     286/* @@todo: int   getdtablesize(void); */
     287int      getpagesize(void) __pure2;
     288char    *getpass(const char *);
     289char    *_getpass1(const char *);          /* bird: emx stuff */
     290char    *_getpass2(const char *, int);     /* bird: emx stuff */
     291void    *sbrk(intptr_t);
     292#endif
     293
     294#if __BSD_VISIBLE
     295struct timeval;                         /* select(2) */
     296/* @@todo: int   acct(const char *); */
     297/* @@todo: int   async_daemon(void); */
     298/* @@todo: int   check_utility_compat(const char *); */
     299/* @@todo: const char *
     300         crypt_get_format(void); */
     301/* @@todo: int   crypt_set_format(const char *); */
     302/* @@todo: int   des_cipher(const char *, char *, long, int); */
     303/* @@todo: int   des_setkey(const char *key); */
     304/* @@todo: void  endusershell(void); */
     305/* @@todo: int   exect(const char *, char * const *, char * const *); */
     306/* @@todo: char *fflagstostr(u_long); */
     307/* @@todo: int   getdomainname(char *, int); */
     308/* @@todo: int   getgrouplist(const char *, gid_t, gid_t *, int *); */
     309/* @@todo: mode_t        getmode(const void *, mode_t); */
     310/* @@todo: int   getpeereid(int, uid_t *, gid_t *); */
     311/* @@todo: int   getresgid(gid_t *, gid_t *, gid_t *); */
     312/* @@todo: int   getresuid(uid_t *, uid_t *, uid_t *); */
     313/* @@todo: char *getusershell(void); */
     314/* @@todo: int   initgroups(const char *, gid_t); */
     315/* @@todo: int   iruserok(unsigned long, int, const char *, const char *); */
     316/* @@todo: int   iruserok_sa(const void *, int, int, const char *, const char *); */
     317/* @@todo: int   issetugid(void); */
     318/* @@todo: char *mkdtemp(char *); */
     319/* @@todo: int   mknod(const char *, mode_t, dev_t); */
     320#ifndef _MKSTEMP_DECLARED
     321int      mkstemp(char *);
     322#define _MKSTEMP_DECLARED
     323#endif
     324/* @@todo: int   mkstemps(char *, int); */
     325#ifndef _MKTEMP_DECLARED
     326char    *mktemp(char *);
     327#define _MKTEMP_DECLARED
     328#endif
     329/* @@todo: int   nfsclnt(int, void *); */
     330/* @@todo: int   nfssvc(int, void *); */
     331/* @@todo: int   profil(char *, size_t, vm_offset_t, int); */
     332/* @@todo: int   rcmd(char **, int, const char *, const char *, const char *, int *); */
     333/* @@todo: int   rcmd_af(char **, int, const char *,
     334                const char *, const char *, int *, int); */
     335/* @@todo: int   rcmdsh(char **, int, const char *,
     336                const char *, const char *, const char *); */
     337char    *re_comp(const char *);
     338int      re_exec(const char *);
     339/* @@todo: int   reboot(int); */
     340/* @@todo: int   revoke(const char *); */
     341/* @@todo: pid_t         rfork(int); */
     342/* @@todo: pid_t         rfork_thread(int, void *, int (*)(void *), void *); */
     343/* @@todo: int   rresvport(int *); */
     344/* @@todo: int   rresvport_af(int *, int); */
     345/* @@todo: int   ruserok(const char *, int, const char *, const char *); */
     346#if __BSD_VISIBLE
     347#ifndef _SELECT_DECLARED
     348#define _SELECT_DECLARED
     349int      select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
     350#endif
     351#endif
     352/* @@todo: int   setdomainname(const char *, int); */
     353/* @@todo: int   setgroups(int, const gid_t *); */
     354/* @@todo: void  sethostid(long); */
     355/* @@todo: int   sethostname(const char *, int); */
     356/* @@todo: #ifndef _SETKEY_DECLARED */
     357/* @@todo: int   setkey(const char *); */
     358/* @@todo: #define      _SETKEY_DECLARED */
     359/* @@todo: #endif */
     360/* @@todo: int   setlogin(const char *); */
     361/* crash with DOS: void *setmode(const char *); */
     362/* @@todo: int   setresgid(gid_t, gid_t, gid_t); */
     363/* @@todo: int   setresuid(uid_t, uid_t, uid_t); */
     364/* @@todo: int   setrgid(gid_t); */
     365/* @@todo: int   setruid(uid_t); */
     366/* @@todo: void  setusershell(void); */
     367/* @@todo: int   strtofflags(char **, u_long *, u_long *); */
     368/* @@todo: int   swapon(const char *); */
     369/* @@todo: int   swapoff(const char *); */
     370/* @@todo: int   syscall(int, ...); */
     371/* @@todo: off_t         __syscall(quad_t, ...); */
     372/* @@todo: int   ttyslot(void); */
     373/* @@todo: int   undelete(const char *); */
     374/* @@todo: int   unwhiteout(const char *); */
     375/* @@todo: void *valloc(size_t); */                     /* obsoleted by malloc() */
     376
     377/* @@todo: extern char *suboptarg; */                   /* getsubopt(3) external variable */
     378/* @@todo: #ifndef _GETSUBOPT_DECLARED */
     379/* @@todo: int   getsubopt(char **, char * const *, char **); */
     380/* @@todo: #define      _GETSUBOPT_DECLARED */
     381/* @@todo: #endif */
     382/* @@todo: extern int optreset; */                      /* getopt(3) external variable */
     383#endif /* __BSD_VISIBLE */
     384/////
     385
     386#if !defined(_POSIX_SOURCE)
     387
     388
     389#endif
     390
     391
     392#if !defined(_POSIX_SOURCE) || defined(_WITH_UNDERSCORE)
     393/* @@todo: update this section to match the one without underscores as far as needed! */
     394void     __exit(int) __dead2;
     395int      _access(const char *, int);
     396unsigned int _alarm(unsigned int);
     397int      _chdir(const char *);
     398/* @@todo: int   _chown(const char *, uid_t, gid_t); */
     399int      _close(int);
     400char    *_cuserid(char *);
     401int      _dup(int);
     402int      _dup2(int, int);
     403/* @@todo: int   _eaccess(const char *, int); */
     404int      _execl(const char *, const char *, ...);
     405int      _execle(const char *, const char *, ...);
     406int      _execlp(const char *, const char *, ...);
     407int      _execv(const char *, char * const *);
     408int      _execve(const char *, char * const *, char * const *);
     409int      _execvp(const char *, char * const *);
     410pid_t    _fork(void);
     411long     _fpathconf(int, int);
     412char    *_getcwd(char *, size_t);
     413gid_t    _getegid(void);
     414uid_t    _geteuid(void);
     415gid_t    _getgid(void);
     416int      _getgroups(int, gid_t []);
     417char    *_getlogin(void);
     418pid_t    _getpgrp(void);
     419pid_t    _getpid(void);
     420pid_t    _getppid(void);
     421uid_t    _getuid(void);
     422int      _isatty(int);
     423/* @@todo: int   _link(const char *, const char *);*/
     424#ifndef __LSEEK_DECLARED
     425#define __LSEEK_DECLARED
     426off_t    _lseek(int, off_t, int);
     427#endif
     428long     _pathconf(const char *, int);
     429int      _pause(void);
     430int      _pipe(int *);
     431ssize_t  _read(int, void *, size_t);
     432int      _rmdir(const char *);
     433int      _setgid(gid_t);
     434/* @@todo: void  _setproctitle(const char *_fmt, ...) __printf0like(1, 2); */
     435int      _setpgid(pid_t, pid_t);
     436pid_t    _setsid(void);
     437int      _setuid(uid_t);
     438unsigned _sleep(unsigned);
     439long     _sysconf(int);
     440pid_t    _tcgetpgrp(int);
     441pid_t    _tcsetpgrp(int, int);
     442char    *_ttyname(int);
     443int      _unlink(const char *);
     444int      _write(int, const void *, size_t);
     445
     446int      _brk(const void *);
     447char    *_getpass(const char *);
     448char    *_getpass1(const char *);
     449char    *_getpass2(const char *, int);
     450int     _mkstemp(char *);
     451char    *_mktemp(char *);
     452void    *_sbrk(intptr_t);
     453/* @@todo: int     _profil(void *, unsigned, unsigned, unsigned); */
     454
     455/* 1003.2-1992 */
    165456extern char *_optarg;
    166457extern int _optind;
    167458extern int _opterr;
    168459extern int _optopt;
    169 
    170 int _getopt (int, char **, __const__ char *);
    171 
    172 int _access (__const__ char *, int);
    173 unsigned _alarm (unsigned);
    174 int _chdir (__const__ char *);
    175 int _close (int);
    176 char *_cuserid (char *);
    177 int _dup (int);
    178 int _dup2 (int, int);
    179 int _execl (__const__ char *, __const__ char *, ...);
    180 int _execle (__const__ char *, __const__ char *, ...);
    181 int _execlp (__const__ char *, __const__ char *, ...);
    182 int _execv (__const__ char *, char * __const__ *);
    183 int _execve (__const__ char *, char * __const__ *, char * __const__ *);
    184 int _execvp (__const__ char *, char * __const__ *);
    185 int _fork (void);
    186 long _fpathconf (int, int);
    187 char *_getcwd (char *, size_t);
    188 int _getegid (void);
    189 int _geteuid (void);
    190 int _getgid (void);
    191 int _getgroups (int, int *);
    192 char *_getlogin (void);
    193 int _getpgrp (void);
    194 int _getpid (void);
    195 int _getppid (void);
    196 int _getuid (void);
    197 int _isatty (int);
    198 long _lseek (int, long, int);
    199 long _pathconf (__const__ char *, int);
    200 int _pause (void);
    201 int _pipe (int *);
    202 int _read (int, void *, size_t);
    203 int _rmdir (__const__ char *);
    204 int _setgid (int);
    205 int _setpgid (int, int);
    206 int _setsid (void);
    207 int _setuid (int);
    208 unsigned _sleep (unsigned);
    209 long _sysconf (int);
    210 int _tcgetpgrp (int);
    211 int _tcsetpgrp (int, int);
    212 char *_ttyname (int);
    213 int _unlink (__const__ char *);
    214 int _write (int, __const__ void *, size_t);
    215 
    216 void *_brk (void *);
    217 char *_getpass (__const__ char *);
    218 char *_getpass1 (__const__ char *);
    219 char *_getpass2 (__const__ char *, int);
    220 int _mkstemp (char *);
    221 char *_mktemp (char *);
    222 int _profil (void *, unsigned, unsigned, unsigned);
    223 void *_brk (void *);
     460int      _getopt(int, char **, const char *);
    224461
    225462#endif
     
    232469#include <sys/cdefs.h>
    233470#include <sys/types.h>
    234 int     TCPCALL     soclose (int);
     471int     TCPCALL     soclose(int);
    235472#ifndef _POSIX_SOURCE
    236 int     TCPCALL     gethostid (void);
    237 int     TCPCALL     gethostname (char *, int);
     473int     TCPCALL     gethostid(void);
     474int     TCPCALL     gethostname(char *, int);
    238475#ifndef TCPV40HDRS
    239 int     TCPCALL     iruserok (unsigned long, int, const char *, const char *);
    240 int     TCPCALL     rcmd (char **, int, const char *, const char *, const char *, int *);
    241 int     TCPCALL     rresvport (int *);
    242 int     TCPCALL     ruserok (const char *, int, const char *, const char *);
     476int     TCPCALL     iruserok(unsigned long, int, const char *, const char *);
     477int     TCPCALL     rcmd(char **, int, const char *, const char *, const char *, int *);
     478int     TCPCALL     rresvport(int *);
     479int     TCPCALL     ruserok(const char *, int, const char *, const char *);
    243480#include <sys/select.h>
    244481#endif /* !TCP40HDRS */
    245482#endif /* !_POSIX_SOURCE */
    246483
    247 
    248 #if defined (__cplusplus)
    249 }
    250 #endif
     484__END_DECLS
    251485
    252486#endif /* not _UNISTD_H */
Note: See TracChangeset for help on using the changeset viewer.