Back to index

glibc  2.9
unistd.h
Go to the documentation of this file.
00001 /* Copyright (C) 1991-2006, 2007, 2008 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 /*
00020  *     POSIX Standard: 2.10 Symbolic Constants          <unistd.h>
00021  */
00022 
00023 #ifndef       _UNISTD_H
00024 #define       _UNISTD_H     1
00025 
00026 #include <features.h>
00027 
00028 __BEGIN_DECLS
00029 
00030 /* These may be used to determine what facilities are present at compile time.
00031    Their values can be obtained at run time from `sysconf'.  */
00032 
00033 /* POSIX Standard approved as ISO/IEC 9945-1 as of December 2001.  */
00034 #define       _POSIX_VERSION       200112L
00035 
00036 /* These are not #ifdef __USE_POSIX2 because they are
00037    in the theoretically application-owned namespace.  */
00038 
00039 /* The utilities on GNU systems also correspond to this version.  */
00040 #define _POSIX2_VERSION     200112L
00041 
00042 /* If defined, the implementation supports the
00043    C Language Bindings Option.  */
00044 #define       _POSIX2_C_BIND       200112L
00045 
00046 /* If defined, the implementation supports the
00047    C Language Development Utilities Option.  */
00048 #define       _POSIX2_C_DEV 200112L
00049 
00050 /* If defined, the implementation supports the
00051    Software Development Utilities Option.  */
00052 #define       _POSIX2_SW_DEV       200112L
00053 
00054 /* If defined, the implementation supports the
00055    creation of locales with the localedef utility.  */
00056 #define _POSIX2_LOCALEDEF       200112L
00057 
00058 /* X/Open version number to which the library conforms.  It is selectable.  */
00059 #ifdef __USE_XOPEN2K
00060 # define _XOPEN_VERSION     600
00061 #elif defined __USE_UNIX98
00062 # define _XOPEN_VERSION     500
00063 #else
00064 # define _XOPEN_VERSION     4
00065 #endif
00066 
00067 /* Commands and utilities from XPG4 are available.  */
00068 #define _XOPEN_XCU_VERSION  4
00069 
00070 /* We are compatible with the old published standards as well.  */
00071 #define _XOPEN_XPG2  1
00072 #define _XOPEN_XPG3  1
00073 #define _XOPEN_XPG4  1
00074 
00075 /* The X/Open Unix extensions are available.  */
00076 #define _XOPEN_UNIX  1
00077 
00078 /* Encryption is present.  */
00079 #define       _XOPEN_CRYPT  1
00080 
00081 /* The enhanced internationalization capabilities according to XPG4.2
00082    are present.  */
00083 #define       _XOPEN_ENH_I18N      1
00084 
00085 /* The legacy interfaces are also available.  */
00086 #define _XOPEN_LEGACY       1
00087 
00088 
00089 /* Get values of POSIX options:
00090 
00091    If these symbols are defined, the corresponding features are
00092    always available.  If not, they may be available sometimes.
00093    The current values can be obtained with `sysconf'.
00094 
00095    _POSIX_JOB_CONTROL              Job control is supported.
00096    _POSIX_SAVED_IDS         Processes have a saved set-user-ID
00097                             and a saved set-group-ID.
00098    _POSIX_REALTIME_SIGNALS  Real-time, queued signals are supported.
00099    _POSIX_PRIORITY_SCHEDULING      Priority scheduling is supported.
00100    _POSIX_TIMERS            POSIX.4 clocks and timers are supported.
00101    _POSIX_ASYNCHRONOUS_IO   Asynchronous I/O is supported.
00102    _POSIX_PRIORITIZED_IO    Prioritized asynchronous I/O is supported.
00103    _POSIX_SYNCHRONIZED_IO   Synchronizing file data is supported.
00104    _POSIX_FSYNC                    The fsync function is present.
00105    _POSIX_MAPPED_FILES             Mapping of files to memory is supported.
00106    _POSIX_MEMLOCK           Locking of all memory is supported.
00107    _POSIX_MEMLOCK_RANGE            Locking of ranges of memory is supported.
00108    _POSIX_MEMORY_PROTECTION Setting of memory protections is supported.
00109    _POSIX_MESSAGE_PASSING   POSIX.4 message queues are supported.
00110    _POSIX_SEMAPHORES        POSIX.4 counting semaphores are supported.
00111    _POSIX_SHARED_MEMORY_OBJECTS    POSIX.4 shared memory objects are supported.
00112    _POSIX_THREADS           POSIX.1c pthreads are supported.
00113    _POSIX_THREAD_ATTR_STACKADDR    Thread stack address attribute option supported.
00114    _POSIX_THREAD_ATTR_STACKSIZE    Thread stack size attribute option supported.
00115    _POSIX_THREAD_SAFE_FUNCTIONS    Thread-safe functions are supported.
00116    _POSIX_THREAD_PRIORITY_SCHEDULING
00117                             POSIX.1c thread execution scheduling supported.
00118    _POSIX_THREAD_PRIO_INHERIT      Thread priority inheritance option supported.
00119    _POSIX_THREAD_PRIO_PROTECT      Thread priority protection option supported.
00120    _POSIX_THREAD_PROCESS_SHARED    Process-shared synchronization supported.
00121    _POSIX_PII               Protocol-independent interfaces are supported.
00122    _POSIX_PII_XTI           XTI protocol-indep. interfaces are supported.
00123    _POSIX_PII_SOCKET        Socket protocol-indep. interfaces are supported.
00124    _POSIX_PII_INTERNET             Internet family of protocols supported.
00125    _POSIX_PII_INTERNET_STREAM      Connection-mode Internet protocol supported.
00126    _POSIX_PII_INTERNET_DGRAM       Connectionless Internet protocol supported.
00127    _POSIX_PII_OSI           ISO/OSI family of protocols supported.
00128    _POSIX_PII_OSI_COTS             Connection-mode ISO/OSI service supported.
00129    _POSIX_PII_OSI_CLTS             Connectionless ISO/OSI service supported.
00130    _POSIX_POLL                     Implementation supports `poll' function.
00131    _POSIX_SELECT            Implementation supports `select' and `pselect'.
00132 
00133    _XOPEN_REALTIME          X/Open realtime support is available.
00134    _XOPEN_REALTIME_THREADS  X/Open realtime thread support is available.
00135    _XOPEN_SHM               Shared memory interface according to XPG4.2.
00136 
00137    _XBS5_ILP32_OFF32        Implementation provides environment with 32-bit
00138                             int, long, pointer, and off_t types.
00139    _XBS5_ILP32_OFFBIG              Implementation provides environment with 32-bit
00140                             int, long, and pointer and off_t with at least
00141                             64 bits.
00142    _XBS5_LP64_OFF64         Implementation provides environment with 32-bit
00143                             int, and 64-bit long, pointer, and off_t types.
00144    _XBS5_LPBIG_OFFBIG              Implementation provides environment with at
00145                             least 32 bits int and long, pointer, and off_t
00146                             with at least 64 bits.
00147 
00148    If any of these symbols is defined as -1, the corresponding option is not
00149    true for any file.  If any is defined as other than -1, the corresponding
00150    option is true for all files.  If a symbol is not defined at all, the value
00151    for a specific file can be obtained from `pathconf' and `fpathconf'.
00152 
00153    _POSIX_CHOWN_RESTRICTED  Only the super user can use `chown' to change
00154                             the owner of a file.  `chown' can only be used
00155                             to change the group ID of a file to a group of
00156                             which the calling process is a member.
00157    _POSIX_NO_TRUNC          Pathname components longer than
00158                             NAME_MAX generate an error.
00159    _POSIX_VDISABLE          If defined, if the value of an element of the
00160                             `c_cc' member of `struct termios' is
00161                             _POSIX_VDISABLE, no character will have the
00162                             effect associated with that element.
00163    _POSIX_SYNC_IO           Synchronous I/O may be performed.
00164    _POSIX_ASYNC_IO          Asynchronous I/O may be performed.
00165    _POSIX_PRIO_IO           Prioritized Asynchronous I/O may be performed.
00166 
00167    Support for the Large File Support interface is not generally available.
00168    If it is available the following constants are defined to one.
00169    _LFS64_LARGEFILE         Low-level I/O supports large files.
00170    _LFS64_STDIO                    Standard I/O supports large files.
00171    */
00172 
00173 #include <bits/posix_opt.h>
00174 
00175 /* Get the environment definitions from Unix98.  */
00176 #ifdef __USE_UNIX98
00177 # include <bits/environments.h>
00178 #endif
00179 
00180 /* Standard file descriptors.  */
00181 #define       STDIN_FILENO  0      /* Standard input.  */
00182 #define       STDOUT_FILENO 1      /* Standard output.  */
00183 #define       STDERR_FILENO 2      /* Standard error output.  */
00184 
00185 
00186 /* All functions that are not declared anywhere else.  */
00187 
00188 #include <bits/types.h>
00189 
00190 #ifndef       __ssize_t_defined
00191 typedef __ssize_t ssize_t;
00192 # define __ssize_t_defined
00193 #endif
00194 
00195 #define       __need_size_t
00196 #define __need_NULL
00197 #include <stddef.h>
00198 
00199 #if defined __USE_XOPEN || defined __USE_XOPEN2K
00200 /* The Single Unix specification says that some more types are
00201    available here.  */
00202 # ifndef __gid_t_defined
00203 typedef __gid_t gid_t;
00204 #  define __gid_t_defined
00205 # endif
00206 
00207 # ifndef __uid_t_defined
00208 typedef __uid_t uid_t;
00209 #  define __uid_t_defined
00210 # endif
00211 
00212 # ifndef __off_t_defined
00213 #  ifndef __USE_FILE_OFFSET64
00214 typedef __off_t off_t;
00215 #  else
00216 typedef __off64_t off_t;
00217 #  endif
00218 #  define __off_t_defined
00219 # endif
00220 # if defined __USE_LARGEFILE64 && !defined __off64_t_defined
00221 typedef __off64_t off64_t;
00222 #  define __off64_t_defined
00223 # endif
00224 
00225 # ifndef __useconds_t_defined
00226 typedef __useconds_t useconds_t;
00227 #  define __useconds_t_defined
00228 # endif
00229 
00230 # ifndef __pid_t_defined
00231 typedef __pid_t pid_t;
00232 #  define __pid_t_defined
00233 # endif
00234 #endif /* X/Open */
00235 
00236 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
00237 # ifndef __intptr_t_defined
00238 typedef __intptr_t intptr_t;
00239 #  define __intptr_t_defined
00240 # endif
00241 #endif
00242 
00243 #if defined __USE_BSD || defined __USE_XOPEN
00244 # ifndef __socklen_t_defined
00245 typedef __socklen_t socklen_t;
00246 #  define __socklen_t_defined
00247 # endif
00248 #endif
00249 
00250 /* Values for the second argument to access.
00251    These may be OR'd together.  */
00252 #define       R_OK   4             /* Test for read permission.  */
00253 #define       W_OK   2             /* Test for write permission.  */
00254 #define       X_OK   1             /* Test for execute permission.  */
00255 #define       F_OK   0             /* Test for existence.  */
00256 
00257 /* Test for access to NAME using the real UID and real GID.  */
00258 extern int access (__const char *__name, int __type) __THROW __nonnull ((1));
00259 
00260 #ifdef __USE_GNU
00261 /* Test for access to NAME using the effective UID and GID
00262    (as normal file operations use).  */
00263 extern int euidaccess (__const char *__name, int __type)
00264      __THROW __nonnull ((1));
00265 
00266 /* An alias for `euidaccess', used by some other systems.  */
00267 extern int eaccess (__const char *__name, int __type)
00268      __THROW __nonnull ((1));
00269 #endif
00270 
00271 #ifdef __USE_ATFILE
00272 /* Test for access to FILE relative to the directory FD is open on.
00273    If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess',
00274    otherwise use real IDs like `access'.  */
00275 extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
00276      __THROW __nonnull ((2)) __wur;
00277 #endif /* Use GNU.  */
00278 
00279 
00280 /* Values for the WHENCE argument to lseek.  */
00281 #ifndef       _STDIO_H             /* <stdio.h> has the same definitions.  */
00282 # define SEEK_SET    0      /* Seek from beginning of file.  */
00283 # define SEEK_CUR    1      /* Seek from current position.  */
00284 # define SEEK_END    2      /* Seek from end of file.  */
00285 #endif
00286 
00287 #if defined __USE_BSD && !defined L_SET
00288 /* Old BSD names for the same constants; just for compatibility.  */
00289 # define L_SET              SEEK_SET
00290 # define L_INCR             SEEK_CUR
00291 # define L_XTND             SEEK_END
00292 #endif
00293 
00294 
00295 /* Move FD's file position to OFFSET bytes from the
00296    beginning of the file (if WHENCE is SEEK_SET),
00297    the current position (if WHENCE is SEEK_CUR),
00298    or the end of the file (if WHENCE is SEEK_END).
00299    Return the new file position.  */
00300 #ifndef __USE_FILE_OFFSET64
00301 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
00302 #else
00303 # ifdef __REDIRECT_NTH
00304 extern __off64_t __REDIRECT_NTH (lseek,
00305                              (int __fd, __off64_t __offset, int __whence),
00306                              lseek64);
00307 # else
00308 #  define lseek lseek64
00309 # endif
00310 #endif
00311 #ifdef __USE_LARGEFILE64
00312 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
00313      __THROW;
00314 #endif
00315 
00316 /* Close the file descriptor FD.
00317 
00318    This function is a cancellation point and therefore not marked with
00319    __THROW.  */
00320 extern int close (int __fd);
00321 
00322 /* Read NBYTES into BUF from FD.  Return the
00323    number read, -1 for errors or 0 for EOF.
00324 
00325    This function is a cancellation point and therefore not marked with
00326    __THROW.  */
00327 extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur;
00328 
00329 /* Write N bytes of BUF to FD.  Return the number written, or -1.
00330 
00331    This function is a cancellation point and therefore not marked with
00332    __THROW.  */
00333 extern ssize_t write (int __fd, __const void *__buf, size_t __n) __wur;
00334 
00335 #ifdef __USE_UNIX98
00336 # ifndef __USE_FILE_OFFSET64
00337 /* Read NBYTES into BUF from FD at the given position OFFSET without
00338    changing the file pointer.  Return the number read, -1 for errors
00339    or 0 for EOF.
00340 
00341    This function is a cancellation point and therefore not marked with
00342    __THROW.  */
00343 extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
00344                     __off_t __offset) __wur;
00345 
00346 /* Write N bytes of BUF to FD at the given position OFFSET without
00347    changing the file pointer.  Return the number written, or -1.
00348 
00349    This function is a cancellation point and therefore not marked with
00350    __THROW.  */
00351 extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
00352                      __off_t __offset) __wur;
00353 # else
00354 #  ifdef __REDIRECT
00355 extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
00356                                __off64_t __offset),
00357                         pread64) __wur;
00358 extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
00359                                 size_t __nbytes, __off64_t __offset),
00360                         pwrite64) __wur;
00361 #  else
00362 #   define pread pread64
00363 #   define pwrite pwrite64
00364 #  endif
00365 # endif
00366 
00367 # ifdef __USE_LARGEFILE64
00368 /* Read NBYTES into BUF from FD at the given position OFFSET without
00369    changing the file pointer.  Return the number read, -1 for errors
00370    or 0 for EOF.  */
00371 extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
00372                      __off64_t __offset) __wur;
00373 /* Write N bytes of BUF to FD at the given position OFFSET without
00374    changing the file pointer.  Return the number written, or -1.  */
00375 extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
00376                       __off64_t __offset) __wur;
00377 # endif
00378 #endif
00379 
00380 /* Create a one-way communication channel (pipe).
00381    If successful, two file descriptors are stored in PIPEDES;
00382    bytes written on PIPEDES[1] can be read from PIPEDES[0].
00383    Returns 0 if successful, -1 if not.  */
00384 extern int pipe (int __pipedes[2]) __THROW __wur;
00385 
00386 #ifdef __USE_GNU
00387 /* Same as pipe but apply flags passed in FLAGS to the new file
00388    descriptors.  */
00389 extern int pipe2 (int __pipedes[2], int __flags) __THROW __wur;
00390 #endif
00391 
00392 /* Schedule an alarm.  In SECONDS seconds, the process will get a SIGALRM.
00393    If SECONDS is zero, any currently scheduled alarm will be cancelled.
00394    The function returns the number of seconds remaining until the last
00395    alarm scheduled would have signaled, or zero if there wasn't one.
00396    There is no return value to indicate an error, but you can set `errno'
00397    to 0 and check its value after calling `alarm', and this might tell you.
00398    The signal may come late due to processor scheduling.  */
00399 extern unsigned int alarm (unsigned int __seconds) __THROW;
00400 
00401 /* Make the process sleep for SECONDS seconds, or until a signal arrives
00402    and is not ignored.  The function returns the number of seconds less
00403    than SECONDS which it actually slept (thus zero if it slept the full time).
00404    If a signal handler does a `longjmp' or modifies the handling of the
00405    SIGALRM signal while inside `sleep' call, the handling of the SIGALRM
00406    signal afterwards is undefined.  There is no return value to indicate
00407    error, but if `sleep' returns SECONDS, it probably didn't work.
00408 
00409    This function is a cancellation point and therefore not marked with
00410    __THROW.  */
00411 extern unsigned int sleep (unsigned int __seconds);
00412 
00413 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
00414 /* Set an alarm to go off (generating a SIGALRM signal) in VALUE
00415    microseconds.  If INTERVAL is nonzero, when the alarm goes off, the
00416    timer is reset to go off every INTERVAL microseconds thereafter.
00417    Returns the number of microseconds remaining before the alarm.  */
00418 extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
00419      __THROW;
00420 
00421 /* Sleep USECONDS microseconds, or until a signal arrives that is not blocked
00422    or ignored.
00423 
00424    This function is a cancellation point and therefore not marked with
00425    __THROW.  */
00426 extern int usleep (__useconds_t __useconds);
00427 #endif
00428 
00429 
00430 /* Suspend the process until a signal arrives.
00431    This always returns -1 and sets `errno' to EINTR.
00432 
00433    This function is a cancellation point and therefore not marked with
00434    __THROW.  */
00435 extern int pause (void);
00436 
00437 
00438 /* Change the owner and group of FILE.  */
00439 extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
00440      __THROW __nonnull ((1)) __wur;
00441 
00442 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
00443 /* Change the owner and group of the file that FD is open on.  */
00444 extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW __wur;
00445 
00446 
00447 /* Change owner and group of FILE, if it is a symbolic
00448    link the ownership of the symbolic link is changed.  */
00449 extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
00450      __THROW __nonnull ((1)) __wur;
00451 
00452 #endif /* Use BSD || X/Open Unix.  */
00453 
00454 #ifdef __USE_ATFILE
00455 /* Change the owner and group of FILE relative to the directory FD is open
00456    on.  */
00457 extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
00458                    __gid_t __group, int __flag)
00459      __THROW __nonnull ((2)) __wur;
00460 #endif /* Use GNU.  */
00461 
00462 /* Change the process's working directory to PATH.  */
00463 extern int chdir (__const char *__path) __THROW __nonnull ((1)) __wur;
00464 
00465 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
00466 /* Change the process's working directory to the one FD is open on.  */
00467 extern int fchdir (int __fd) __THROW __wur;
00468 #endif
00469 
00470 /* Get the pathname of the current working directory,
00471    and put it in SIZE bytes of BUF.  Returns NULL if the
00472    directory couldn't be determined or SIZE was too small.
00473    If successful, returns BUF.  In GNU, if BUF is NULL,
00474    an array is allocated with `malloc'; the array is SIZE
00475    bytes long, unless SIZE == 0, in which case it is as
00476    big as necessary.  */
00477 extern char *getcwd (char *__buf, size_t __size) __THROW __wur;
00478 
00479 #ifdef __USE_GNU
00480 /* Return a malloc'd string containing the current directory name.
00481    If the environment variable `PWD' is set, and its value is correct,
00482    that value is used.  */
00483 extern char *get_current_dir_name (void) __THROW;
00484 #endif
00485 
00486 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
00487 /* Put the absolute pathname of the current working directory in BUF.
00488    If successful, return BUF.  If not, put an error message in
00489    BUF and return NULL.  BUF should be at least PATH_MAX bytes long.  */
00490 extern char *getwd (char *__buf)
00491      __THROW __nonnull ((1)) __attribute_deprecated__ __wur;
00492 #endif
00493 
00494 
00495 /* Duplicate FD, returning a new file descriptor on the same file.  */
00496 extern int dup (int __fd) __THROW __wur;
00497 
00498 /* Duplicate FD to FD2, closing FD2 and making it open on the same file.  */
00499 extern int dup2 (int __fd, int __fd2) __THROW;
00500 
00501 #ifdef __USE_GNU
00502 /* Duplicate FD to FD2, closing FD2 and making it open on the same
00503    file while setting flags according to FLAGS.  */
00504 extern int dup3 (int __fd, int __fd2, int __flags) __THROW;
00505 #endif
00506 
00507 /* NULL-terminated array of "NAME=VALUE" environment variables.  */
00508 extern char **__environ;
00509 #ifdef __USE_GNU
00510 extern char **environ;
00511 #endif
00512 
00513 
00514 /* Replace the current process, executing PATH with arguments ARGV and
00515    environment ENVP.  ARGV and ENVP are terminated by NULL pointers.  */
00516 extern int execve (__const char *__path, char *__const __argv[],
00517                  char *__const __envp[]) __THROW __nonnull ((1));
00518 
00519 #ifdef __USE_GNU
00520 /* Execute the file FD refers to, overlaying the running program image.
00521    ARGV and ENVP are passed to the new program, as for `execve'.  */
00522 extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
00523      __THROW;
00524 #endif
00525 
00526 
00527 /* Execute PATH with arguments ARGV and environment from `environ'.  */
00528 extern int execv (__const char *__path, char *__const __argv[])
00529      __THROW __nonnull ((1));
00530 
00531 /* Execute PATH with all arguments after PATH until a NULL pointer,
00532    and the argument after that for environment.  */
00533 extern int execle (__const char *__path, __const char *__arg, ...)
00534      __THROW __nonnull ((1));
00535 
00536 /* Execute PATH with all arguments after PATH until
00537    a NULL pointer and environment from `environ'.  */
00538 extern int execl (__const char *__path, __const char *__arg, ...)
00539      __THROW __nonnull ((1));
00540 
00541 /* Execute FILE, searching in the `PATH' environment variable if it contains
00542    no slashes, with arguments ARGV and environment from `environ'.  */
00543 extern int execvp (__const char *__file, char *__const __argv[])
00544      __THROW __nonnull ((1));
00545 
00546 /* Execute FILE, searching in the `PATH' environment variable if
00547    it contains no slashes, with all arguments after FILE until a
00548    NULL pointer and environment from `environ'.  */
00549 extern int execlp (__const char *__file, __const char *__arg, ...)
00550      __THROW __nonnull ((1));
00551 
00552 
00553 #if defined __USE_MISC || defined __USE_XOPEN
00554 /* Add INC to priority of the current process.  */
00555 extern int nice (int __inc) __THROW __wur;
00556 #endif
00557 
00558 
00559 /* Terminate program execution with the low-order 8 bits of STATUS.  */
00560 extern void _exit (int __status) __attribute__ ((__noreturn__));
00561 
00562 
00563 /* Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf';
00564    the `_SC_*' symbols for the NAME argument to `sysconf';
00565    and the `_CS_*' symbols for the NAME argument to `confstr'.  */
00566 #include <bits/confname.h>
00567 
00568 /* Get file-specific configuration information about PATH.  */
00569 extern long int pathconf (__const char *__path, int __name)
00570      __THROW __nonnull ((1));
00571 
00572 /* Get file-specific configuration about descriptor FD.  */
00573 extern long int fpathconf (int __fd, int __name) __THROW;
00574 
00575 /* Get the value of the system variable NAME.  */
00576 extern long int sysconf (int __name) __THROW;
00577 
00578 #ifdef __USE_POSIX2
00579 /* Get the value of the string-valued system variable NAME.  */
00580 extern size_t confstr (int __name, char *__buf, size_t __len) __THROW;
00581 #endif
00582 
00583 
00584 /* Get the process ID of the calling process.  */
00585 extern __pid_t getpid (void) __THROW;
00586 
00587 /* Get the process ID of the calling process's parent.  */
00588 extern __pid_t getppid (void) __THROW;
00589 
00590 /* Get the process group ID of the calling process.
00591    This function is different on old BSD. */
00592 #ifndef __FAVOR_BSD
00593 extern __pid_t getpgrp (void) __THROW;
00594 #else
00595 # ifdef __REDIRECT_NTH
00596 extern __pid_t __REDIRECT_NTH (getpgrp, (__pid_t __pid), __getpgid);
00597 # else
00598 #  define getpgrp __getpgid
00599 # endif
00600 #endif
00601 
00602 /* Get the process group ID of process PID.  */
00603 extern __pid_t __getpgid (__pid_t __pid) __THROW;
00604 #ifdef __USE_XOPEN_EXTENDED
00605 extern __pid_t getpgid (__pid_t __pid) __THROW;
00606 #endif
00607 
00608 
00609 /* Set the process group ID of the process matching PID to PGID.
00610    If PID is zero, the current process's process group ID is set.
00611    If PGID is zero, the process ID of the process is used.  */
00612 extern int setpgid (__pid_t __pid, __pid_t __pgid) __THROW;
00613 
00614 #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
00615 /* Both System V and BSD have `setpgrp' functions, but with different
00616    calling conventions.  The BSD function is the same as POSIX.1 `setpgid'
00617    (above).  The System V function takes no arguments and puts the calling
00618    process in its on group like `setpgid (0, 0)'.
00619 
00620    New programs should always use `setpgid' instead.
00621 
00622    The default in GNU is to provide the System V function.  The BSD
00623    function is available under -D_BSD_SOURCE.  */
00624 
00625 # ifndef __FAVOR_BSD
00626 
00627 /* Set the process group ID of the calling process to its own PID.
00628    This is exactly the same as `setpgid (0, 0)'.  */
00629 extern int setpgrp (void) __THROW;
00630 
00631 # else
00632 
00633 /* Another name for `setpgid' (above).  */
00634 #  ifdef __REDIRECT_NTH
00635 extern int __REDIRECT_NTH (setpgrp, (__pid_t __pid, __pid_t __pgrp), setpgid);
00636 #  else
00637 #   define setpgrp setpgid
00638 #  endif
00639 
00640 # endif       /* Favor BSD.  */
00641 #endif /* Use SVID or BSD.  */
00642 
00643 /* Create a new session with the calling process as its leader.
00644    The process group IDs of the session and the calling process
00645    are set to the process ID of the calling process, which is returned.  */
00646 extern __pid_t setsid (void) __THROW;
00647 
00648 #ifdef __USE_XOPEN_EXTENDED
00649 /* Return the session ID of the given process.  */
00650 extern __pid_t getsid (__pid_t __pid) __THROW;
00651 #endif
00652 
00653 /* Get the real user ID of the calling process.  */
00654 extern __uid_t getuid (void) __THROW;
00655 
00656 /* Get the effective user ID of the calling process.  */
00657 extern __uid_t geteuid (void) __THROW;
00658 
00659 /* Get the real group ID of the calling process.  */
00660 extern __gid_t getgid (void) __THROW;
00661 
00662 /* Get the effective group ID of the calling process.  */
00663 extern __gid_t getegid (void) __THROW;
00664 
00665 /* If SIZE is zero, return the number of supplementary groups
00666    the calling process is in.  Otherwise, fill in the group IDs
00667    of its supplementary groups in LIST and return the number written.  */
00668 extern int getgroups (int __size, __gid_t __list[]) __THROW __wur;
00669 
00670 #ifdef __USE_GNU
00671 /* Return nonzero iff the calling process is in group GID.  */
00672 extern int group_member (__gid_t __gid) __THROW;
00673 #endif
00674 
00675 /* Set the user ID of the calling process to UID.
00676    If the calling process is the super-user, set the real
00677    and effective user IDs, and the saved set-user-ID to UID;
00678    if not, the effective user ID is set to UID.  */
00679 extern int setuid (__uid_t __uid) __THROW;
00680 
00681 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
00682 /* Set the real user ID of the calling process to RUID,
00683    and the effective user ID of the calling process to EUID.  */
00684 extern int setreuid (__uid_t __ruid, __uid_t __euid) __THROW;
00685 #endif
00686 
00687 #if defined __USE_BSD || defined __USE_XOPEN2K
00688 /* Set the effective user ID of the calling process to UID.  */
00689 extern int seteuid (__uid_t __uid) __THROW;
00690 #endif /* Use BSD.  */
00691 
00692 /* Set the group ID of the calling process to GID.
00693    If the calling process is the super-user, set the real
00694    and effective group IDs, and the saved set-group-ID to GID;
00695    if not, the effective group ID is set to GID.  */
00696 extern int setgid (__gid_t __gid) __THROW;
00697 
00698 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
00699 /* Set the real group ID of the calling process to RGID,
00700    and the effective group ID of the calling process to EGID.  */
00701 extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW;
00702 #endif
00703 
00704 #if defined __USE_BSD || defined __USE_XOPEN2K
00705 /* Set the effective group ID of the calling process to GID.  */
00706 extern int setegid (__gid_t __gid) __THROW;
00707 #endif /* Use BSD.  */
00708 
00709 #ifdef __USE_GNU
00710 /* Fetch the real user ID, effective user ID, and saved-set user ID,
00711    of the calling process.  */
00712 extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
00713      __THROW;
00714 
00715 /* Fetch the real group ID, effective group ID, and saved-set group ID,
00716    of the calling process.  */
00717 extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
00718      __THROW;
00719 
00720 /* Set the real user ID, effective user ID, and saved-set user ID,
00721    of the calling process to RUID, EUID, and SUID, respectively.  */
00722 extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
00723      __THROW;
00724 
00725 /* Set the real group ID, effective group ID, and saved-set group ID,
00726    of the calling process to RGID, EGID, and SGID, respectively.  */
00727 extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
00728      __THROW;
00729 #endif
00730 
00731 
00732 /* Clone the calling process, creating an exact copy.
00733    Return -1 for errors, 0 to the new process,
00734    and the process ID of the new process to the old process.  */
00735 extern __pid_t fork (void) __THROW;
00736 
00737 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
00738 /* Clone the calling process, but without copying the whole address space.
00739    The calling process is suspended until the new process exits or is
00740    replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
00741    and the process ID of the new process to the old process.  */
00742 extern __pid_t vfork (void) __THROW;
00743 #endif /* Use BSD. */
00744 
00745 
00746 /* Return the pathname of the terminal FD is open on, or NULL on errors.
00747    The returned storage is good only until the next call to this function.  */
00748 extern char *ttyname (int __fd) __THROW;
00749 
00750 /* Store at most BUFLEN characters of the pathname of the terminal FD is
00751    open on in BUF.  Return 0 on success, otherwise an error number.  */
00752 extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
00753      __THROW __nonnull ((2)) __wur;
00754 
00755 /* Return 1 if FD is a valid descriptor associated
00756    with a terminal, zero if not.  */
00757 extern int isatty (int __fd) __THROW;
00758 
00759 #if defined __USE_BSD \
00760     || (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98)
00761 /* Return the index into the active-logins file (utmp) for
00762    the controlling terminal.  */
00763 extern int ttyslot (void) __THROW;
00764 #endif
00765 
00766 
00767 /* Make a link to FROM named TO.  */
00768 extern int link (__const char *__from, __const char *__to)
00769      __THROW __nonnull ((1, 2)) __wur;
00770 
00771 #ifdef __USE_ATFILE
00772 /* Like link but relative paths in TO and FROM are interpreted relative
00773    to FROMFD and TOFD respectively.  */
00774 extern int linkat (int __fromfd, __const char *__from, int __tofd,
00775                  __const char *__to, int __flags)
00776      __THROW __nonnull ((2, 4)) __wur;
00777 #endif
00778 
00779 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
00780 /* Make a symbolic link to FROM named TO.  */
00781 extern int symlink (__const char *__from, __const char *__to)
00782      __THROW __nonnull ((1, 2)) __wur;
00783 
00784 /* Read the contents of the symbolic link PATH into no more than
00785    LEN bytes of BUF.  The contents are not null-terminated.
00786    Returns the number of characters read, or -1 for errors.  */
00787 extern ssize_t readlink (__const char *__restrict __path,
00788                       char *__restrict __buf, size_t __len)
00789      __THROW __nonnull ((1, 2)) __wur;
00790 #endif /* Use BSD.  */
00791 
00792 #ifdef __USE_ATFILE
00793 /* Like symlink but a relative path in TO is interpreted relative to TOFD.  */
00794 extern int symlinkat (__const char *__from, int __tofd,
00795                     __const char *__to) __THROW __nonnull ((1, 3)) __wur;
00796 
00797 /* Like readlink but a relative PATH is interpreted relative to FD.  */
00798 extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
00799                         char *__restrict __buf, size_t __len)
00800      __THROW __nonnull ((2, 3)) __wur;
00801 #endif
00802 
00803 /* Remove the link NAME.  */
00804 extern int unlink (__const char *__name) __THROW __nonnull ((1));
00805 
00806 #ifdef __USE_ATFILE
00807 /* Remove the link NAME relative to FD.  */
00808 extern int unlinkat (int __fd, __const char *__name, int __flag)
00809      __THROW __nonnull ((2));
00810 #endif
00811 
00812 /* Remove the directory PATH.  */
00813 extern int rmdir (__const char *__path) __THROW __nonnull ((1));
00814 
00815 
00816 /* Return the foreground process group ID of FD.  */
00817 extern __pid_t tcgetpgrp (int __fd) __THROW;
00818 
00819 /* Set the foreground process group ID of FD set PGRP_ID.  */
00820 extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW;
00821 
00822 
00823 /* Return the login name of the user.
00824 
00825    This function is a possible cancellation points and therefore not
00826    marked with __THROW.  */
00827 extern char *getlogin (void);
00828 #if defined __USE_REENTRANT || defined __USE_POSIX199506
00829 /* Return at most NAME_LEN characters of the login name of the user in NAME.
00830    If it cannot be determined or some other error occurred, return the error
00831    code.  Otherwise return 0.
00832 
00833    This function is a possible cancellation points and therefore not
00834    marked with __THROW.  */
00835 extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1));
00836 #endif
00837 
00838 #ifdef __USE_BSD
00839 /* Set the login name returned by `getlogin'.  */
00840 extern int setlogin (__const char *__name) __THROW __nonnull ((1));
00841 #endif
00842 
00843 
00844 #ifdef __USE_POSIX2
00845 /* Get definitions and prototypes for functions to process the
00846    arguments in ARGV (ARGC of them, minus the program name) for
00847    options given in OPTS.  */
00848 # define __need_getopt
00849 # include <getopt.h>
00850 #endif
00851 
00852 
00853 #if defined __USE_BSD || defined __USE_UNIX98
00854 /* Put the name of the current host in no more than LEN bytes of NAME.
00855    The result is null-terminated if LEN is large enough for the full
00856    name and the terminator.  */
00857 extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1));
00858 #endif
00859 
00860 
00861 #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
00862 /* Set the name of the current host to NAME, which is LEN bytes long.
00863    This call is restricted to the super-user.  */
00864 extern int sethostname (__const char *__name, size_t __len)
00865      __THROW __nonnull ((1)) __wur;
00866 
00867 /* Set the current machine's Internet number to ID.
00868    This call is restricted to the super-user.  */
00869 extern int sethostid (long int __id) __THROW __wur;
00870 
00871 
00872 /* Get and set the NIS (aka YP) domain name, if any.
00873    Called just like `gethostname' and `sethostname'.
00874    The NIS domain name is usually the empty string when not using NIS.  */
00875 extern int getdomainname (char *__name, size_t __len)
00876      __THROW __nonnull ((1)) __wur;
00877 extern int setdomainname (__const char *__name, size_t __len)
00878      __THROW __nonnull ((1)) __wur;
00879 
00880 
00881 /* Revoke access permissions to all processes currently communicating
00882    with the control terminal, and then send a SIGHUP signal to the process
00883    group of the control terminal.  */
00884 extern int vhangup (void) __THROW;
00885 
00886 /* Revoke the access of all descriptors currently open on FILE.  */
00887 extern int revoke (__const char *__file) __THROW __nonnull ((1)) __wur;
00888 
00889 
00890 /* Enable statistical profiling, writing samples of the PC into at most
00891    SIZE bytes of SAMPLE_BUFFER; every processor clock tick while profiling
00892    is enabled, the system examines the user PC and increments
00893    SAMPLE_BUFFER[((PC - OFFSET) / 2) * SCALE / 65536].  If SCALE is zero,
00894    disable profiling.  Returns zero on success, -1 on error.  */
00895 extern int profil (unsigned short int *__sample_buffer, size_t __size,
00896                  size_t __offset, unsigned int __scale)
00897      __THROW __nonnull ((1));
00898 
00899 
00900 /* Turn accounting on if NAME is an existing file.  The system will then write
00901    a record for each process as it terminates, to this file.  If NAME is NULL,
00902    turn accounting off.  This call is restricted to the super-user.  */
00903 extern int acct (__const char *__name) __THROW;
00904 
00905 
00906 /* Successive calls return the shells listed in `/etc/shells'.  */
00907 extern char *getusershell (void) __THROW;
00908 extern void endusershell (void) __THROW; /* Discard cached info.  */
00909 extern void setusershell (void) __THROW; /* Rewind and re-read the file.  */
00910 
00911 
00912 /* Put the program in the background, and dissociate from the controlling
00913    terminal.  If NOCHDIR is zero, do `chdir ("/")'.  If NOCLOSE is zero,
00914    redirects stdin, stdout, and stderr to /dev/null.  */
00915 extern int daemon (int __nochdir, int __noclose) __THROW __wur;
00916 #endif /* Use BSD || X/Open.  */
00917 
00918 
00919 #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
00920 /* Make PATH be the root directory (the starting point for absolute paths).
00921    This call is restricted to the super-user.  */
00922 extern int chroot (__const char *__path) __THROW __nonnull ((1)) __wur;
00923 
00924 /* Prompt with PROMPT and read a string from the terminal without echoing.
00925    Uses /dev/tty if possible; otherwise stderr and stdin.  */
00926 extern char *getpass (__const char *__prompt) __nonnull ((1));
00927 #endif /* Use BSD || X/Open.  */
00928 
00929 
00930 #if defined __USE_BSD || defined __USE_XOPEN || defined __USE_XOPEN2K
00931 /* Make all changes done to FD actually appear on disk.
00932 
00933    This function is a cancellation point and therefore not marked with
00934    __THROW.  */
00935 extern int fsync (int __fd);
00936 #endif /* Use BSD || X/Open || Unix98.  */
00937 
00938 
00939 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
00940 
00941 /* Return identifier for the current host.  */
00942 extern long int gethostid (void);
00943 
00944 /* Make all changes done to all files actually appear on disk.  */
00945 extern void sync (void) __THROW;
00946 
00947 
00948 /* Return the number of bytes in a page.  This is the system's page size,
00949    which is not necessarily the same as the hardware page size.  */
00950 extern int getpagesize (void)  __THROW __attribute__ ((__const__));
00951 
00952 
00953 /* Return the maximum number of file descriptors
00954    the current process could possibly have.  */
00955 extern int getdtablesize (void) __THROW;
00956 
00957 
00958 /* Truncate FILE to LENGTH bytes.  */
00959 # ifndef __USE_FILE_OFFSET64
00960 extern int truncate (__const char *__file, __off_t __length)
00961      __THROW __nonnull ((1)) __wur;
00962 # else
00963 #  ifdef __REDIRECT_NTH
00964 extern int __REDIRECT_NTH (truncate,
00965                         (__const char *__file, __off64_t __length),
00966                         truncate64) __nonnull ((1)) __wur;
00967 #  else
00968 #   define truncate truncate64
00969 #  endif
00970 # endif
00971 # ifdef __USE_LARGEFILE64
00972 extern int truncate64 (__const char *__file, __off64_t __length)
00973      __THROW __nonnull ((1)) __wur;
00974 # endif
00975 
00976 #endif /* Use BSD || X/Open Unix.  */
00977 
00978 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
00979 
00980 /* Truncate the file FD is open on to LENGTH bytes.  */
00981 # ifndef __USE_FILE_OFFSET64
00982 extern int ftruncate (int __fd, __off_t __length) __THROW __wur;
00983 # else
00984 #  ifdef __REDIRECT_NTH
00985 extern int __REDIRECT_NTH (ftruncate, (int __fd, __off64_t __length),
00986                         ftruncate64) __wur;
00987 #  else
00988 #   define ftruncate ftruncate64
00989 #  endif
00990 # endif
00991 # ifdef __USE_LARGEFILE64
00992 extern int ftruncate64 (int __fd, __off64_t __length) __THROW __wur;
00993 # endif
00994 
00995 #endif /* Use BSD || X/Open Unix || POSIX 2003.  */
00996 
00997 
00998 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
00999 
01000 /* Set the end of accessible data space (aka "the break") to ADDR.
01001    Returns zero on success and -1 for errors (with errno set).  */
01002 extern int brk (void *__addr) __THROW __wur;
01003 
01004 /* Increase or decrease the end of accessible data space by DELTA bytes.
01005    If successful, returns the address the previous end of data space
01006    (i.e. the beginning of the new space, if DELTA > 0);
01007    returns (void *) -1 for errors (with errno set).  */
01008 extern void *sbrk (intptr_t __delta) __THROW;
01009 #endif
01010 
01011 
01012 #ifdef __USE_MISC
01013 /* Invoke `system call' number SYSNO, passing it the remaining arguments.
01014    This is completely system-dependent, and not often useful.
01015 
01016    In Unix, `syscall' sets `errno' for all errors and most calls return -1
01017    for errors; in many systems you cannot pass arguments or get return
01018    values for all system calls (`pipe', `fork', and `getppid' typically
01019    among them).
01020 
01021    In Mach, all system calls take normal arguments and always return an
01022    error code (zero for success).  */
01023 extern long int syscall (long int __sysno, ...) __THROW;
01024 
01025 #endif /* Use misc.  */
01026 
01027 
01028 #if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) && !defined F_LOCK
01029 /* NOTE: These declarations also appear in <fcntl.h>; be sure to keep both
01030    files consistent.  Some systems have them there and some here, and some
01031    software depends on the macros being defined without including both.  */
01032 
01033 /* `lockf' is a simpler interface to the locking facilities of `fcntl'.
01034    LEN is always relative to the current file position.
01035    The CMD argument is one of the following.
01036 
01037    This function is a cancellation point and therefore not marked with
01038    __THROW.  */
01039 
01040 # define F_ULOCK 0   /* Unlock a previously locked region.  */
01041 # define F_LOCK  1   /* Lock a region for exclusive use.  */
01042 # define F_TLOCK 2   /* Test and lock a region for exclusive use.  */
01043 # define F_TEST  3   /* Test a region for other processes locks.  */
01044 
01045 # ifndef __USE_FILE_OFFSET64
01046 extern int lockf (int __fd, int __cmd, __off_t __len) __wur;
01047 # else
01048 #  ifdef __REDIRECT
01049 extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len),
01050                      lockf64) __wur;
01051 #  else
01052 #   define lockf lockf64
01053 #  endif
01054 # endif
01055 # ifdef __USE_LARGEFILE64
01056 extern int lockf64 (int __fd, int __cmd, __off64_t __len) __wur;
01057 # endif
01058 #endif /* Use misc and F_LOCK not already defined.  */
01059 
01060 
01061 #ifdef __USE_GNU
01062 
01063 /* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno'
01064    set to EINTR.  */
01065 
01066 # define TEMP_FAILURE_RETRY(expression) \
01067   (__extension__                                                     \
01068     ({ long int __result;                                            \
01069        do __result = (long int) (expression);                               \
01070        while (__result == -1L && errno == EINTR);                           \
01071        __result; }))
01072 #endif
01073 
01074 #if defined __USE_POSIX199309 || defined __USE_UNIX98
01075 /* Synchronize at least the data part of a file with the underlying
01076    media.  */
01077 extern int fdatasync (int __fildes);
01078 #endif /* Use POSIX199309 */
01079 
01080 
01081 /* XPG4.2 specifies that prototypes for the encryption functions must
01082    be defined here.  */
01083 #ifdef __USE_XOPEN
01084 /* Encrypt at most 8 characters from KEY using salt to perturb DES.  */
01085 extern char *crypt (__const char *__key, __const char *__salt)
01086      __THROW __nonnull ((1, 2));
01087 
01088 /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
01089    block in place.  */
01090 extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1));
01091 
01092 
01093 /* Swab pairs bytes in the first N bytes of the area pointed to by
01094    FROM and copy the result to TO.  The value of TO must not be in the
01095    range [FROM - N + 1, FROM - 1].  If N is odd the first byte in FROM
01096    is without partner.  */
01097 extern void swab (__const void *__restrict __from, void *__restrict __to,
01098                 ssize_t __n) __THROW __nonnull ((1, 2));
01099 #endif
01100 
01101 
01102 /* The Single Unix specification demands this prototype to be here.
01103    It is also found in <stdio.h>.  */
01104 #ifdef __USE_XOPEN
01105 /* Return the name of the controlling terminal.  */
01106 extern char *ctermid (char *__s) __THROW;
01107 #endif
01108 
01109 
01110 /* Define some macros helping to catch buffer overflows.  */
01111 #if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
01112 # include <bits/unistd.h>
01113 #endif
01114 
01115 __END_DECLS
01116 
01117 #endif /* unistd.h  */