The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/unistd.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*      $NetBSD: unistd.h,v 1.30 2003/11/15 01:19:38 thorpej Exp $      */
    2 
    3 /*
    4  * Copyright (c) 1989, 1993
    5  *      The Regents of the University of California.  All rights reserved.
    6  *
    7  * Redistribution and use in source and binary forms, with or without
    8  * modification, are permitted provided that the following conditions
    9  * are met:
   10  * 1. Redistributions of source code must retain the above copyright
   11  *    notice, this list of conditions and the following disclaimer.
   12  * 2. Redistributions in binary form must reproduce the above copyright
   13  *    notice, this list of conditions and the following disclaimer in the
   14  *    documentation and/or other materials provided with the distribution.
   15  * 3. Neither the name of the University nor the names of its contributors
   16  *    may be used to endorse or promote products derived from this software
   17  *    without specific prior written permission.
   18  *
   19  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   20  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   21  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   22  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   23  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   24  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   25  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   27  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   28  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   29  * SUCH DAMAGE.
   30  *
   31  *      @(#)unistd.h    8.2 (Berkeley) 1/7/94
   32  */
   33 
   34 #ifndef _SYS_UNISTD_H_
   35 #define _SYS_UNISTD_H_
   36 
   37 #include <sys/featuretest.h>
   38 
   39 /* compile-time symbolic constants */
   40 #define _POSIX_JOB_CONTROL      /* implementation supports job control */
   41 
   42 /*
   43  * According to POSIX 1003.1:
   44  * "The saved set-user-ID capability allows a program to regain the
   45  * effective user ID established at the last exec call."
   46  * However, the setuid/setgid function as specified by POSIX 1003.1 does
   47  * not allow changing the effective ID from the super-user without also
   48  * changed the saved ID, so it is impossible to get super-user privileges
   49  * back later.  Instead we provide this feature independent of the current
   50  * effective ID through the seteuid/setegid function.  In addition, we do
   51  * not use the saved ID as specified by POSIX 1003.1 in setuid/setgid,
   52  * because this would make it impossible for a set-user-ID executable
   53  * owned by a user other than the super-user to permanently revoke its
   54  * extra privileges.
   55  */
   56 #ifdef  _NOT_AVAILABLE
   57 #define _POSIX_SAVED_IDS        /* saved set-user-ID and set-group-ID */
   58 #endif
   59 
   60 #define _POSIX_VERSION          199009L
   61 #define _POSIX2_VERSION         199212L
   62 
   63 /* execution-time symbolic constants */
   64                                 /* chown requires appropriate privileges */
   65 #define _POSIX_CHOWN_RESTRICTED 1
   66                                 /* too-long path components generate errors */
   67 #define _POSIX_NO_TRUNC         1
   68                                 /* may disable terminal special characters */
   69 #define _POSIX_VDISABLE         ((unsigned char)'\377')
   70                                 /* file synchronization is available */
   71 #define _POSIX_FSYNC            1
   72                                 /* synchronized I/O is available */
   73 #define _POSIX_SYNCHRONIZED_IO  1
   74                                 /* memory mapped files */
   75 #define _POSIX_MAPPED_FILES     1
   76                                 /* memory locking of whole address space */
   77 #define _POSIX_MEMLOCK          1
   78                                 /* memory locking address ranges */
   79 #define _POSIX_MEMLOCK_RANGE    1
   80                                 /* memory access protections */
   81 #define _POSIX_MEMORY_PROTECTION 1
   82                                 /* monotonic clock */
   83 #define _POSIX_MONOTONIC_CLOCK  200112L
   84                                 /* threads */
   85 #define _POSIX_THREADS          200112L
   86                                 /* semaphores */
   87 #define _POSIX_SEMAPHORES       0
   88                                 /* barriers */
   89 #define _POSIX_BARRIERS         200112L
   90                                 /* timers */
   91 #define _POSIX_TIMERS           200112L
   92                                 /* spin locks */
   93 #define _POSIX_SPIN_LOCKS       200112L
   94                                 /* read/write locks */
   95 #define _POSIX_READER_WRITER_LOCKS      200112L
   96                                 /* XPG4.2 shared memory */
   97 #define _XOPEN_SHM              0
   98 
   99 /* access function */
  100 #define F_OK            0       /* test for existence of file */
  101 #define X_OK            0x01    /* test for execute or search permission */
  102 #define W_OK            0x02    /* test for write permission */
  103 #define R_OK            0x04    /* test for read permission */
  104 
  105 /* whence values for lseek(2) */
  106 #define SEEK_SET        0       /* set file offset to offset */
  107 #define SEEK_CUR        1       /* set file offset to current plus offset */
  108 #define SEEK_END        2       /* set file offset to EOF plus offset */
  109 
  110 #if defined(_NETBSD_SOURCE)
  111 /* whence values for lseek(2); renamed by POSIX 1003.1 */
  112 #define L_SET           SEEK_SET
  113 #define L_INCR          SEEK_CUR
  114 #define L_XTND          SEEK_END
  115 
  116 /*
  117  * fsync_range values.
  118  *
  119  * Note the following flag values were chosen to not overlap
  120  * values for SEEK_XXX flags.  While not currently implemented,
  121  * it is possible to extend this call to respect SEEK_CUR and
  122  * SEEK_END offset addressing modes.
  123  */
  124 #define FDATASYNC       0x0010  /* sync data and minimal metadata */
  125 #define FFILESYNC       0x0020  /* sync data and metadata */
  126 #endif
  127 
  128 /* configurable pathname variables */
  129 #define _PC_LINK_MAX             1
  130 #define _PC_MAX_CANON            2
  131 #define _PC_MAX_INPUT            3
  132 #define _PC_NAME_MAX             4
  133 #define _PC_PATH_MAX             5
  134 #define _PC_PIPE_BUF             6
  135 #define _PC_CHOWN_RESTRICTED     7
  136 #define _PC_NO_TRUNC             8
  137 #define _PC_VDISABLE             9
  138 #define _PC_SYNC_IO             10
  139 #define _PC_FILESIZEBITS        11
  140 
  141 /* configurable system variables */
  142 /*
  143  * XXX The value of _SC_CLK_TCK is embedded in <time.h>.
  144  * XXX The value of _SC_PAGESIZE is embedded in <sys/shm.h>.
  145  */
  146 #define _SC_ARG_MAX              1
  147 #define _SC_CHILD_MAX            2
  148 #define _O_SC_CLK_TCK            3 /* Old version, always 100 */
  149 #define _SC_NGROUPS_MAX          4
  150 #define _SC_OPEN_MAX             5
  151 #define _SC_JOB_CONTROL          6
  152 #define _SC_SAVED_IDS            7
  153 #define _SC_VERSION              8
  154 #define _SC_BC_BASE_MAX          9
  155 #define _SC_BC_DIM_MAX          10
  156 #define _SC_BC_SCALE_MAX        11
  157 #define _SC_BC_STRING_MAX       12
  158 #define _SC_COLL_WEIGHTS_MAX    13
  159 #define _SC_EXPR_NEST_MAX       14
  160 #define _SC_LINE_MAX            15
  161 #define _SC_RE_DUP_MAX          16
  162 #define _SC_2_VERSION           17
  163 #define _SC_2_C_BIND            18
  164 #define _SC_2_C_DEV             19
  165 #define _SC_2_CHAR_TERM         20
  166 #define _SC_2_FORT_DEV          21
  167 #define _SC_2_FORT_RUN          22
  168 #define _SC_2_LOCALEDEF         23
  169 #define _SC_2_SW_DEV            24
  170 #define _SC_2_UPE               25
  171 #define _SC_STREAM_MAX          26
  172 #define _SC_TZNAME_MAX          27
  173 #define _SC_PAGESIZE            28
  174 #define _SC_PAGE_SIZE           _SC_PAGESIZE    /* 1170 compatibility */
  175 #define _SC_FSYNC               29
  176 #define _SC_XOPEN_SHM           30
  177 #define _SC_SYNCHRONIZED_IO     31
  178 #define _SC_IOV_MAX             32
  179 #define _SC_MAPPED_FILES        33
  180 #define _SC_MEMLOCK             34
  181 #define _SC_MEMLOCK_RANGE       35
  182 #define _SC_MEMORY_PROTECTION   36
  183 #define _SC_LOGIN_NAME_MAX      37
  184 #define _SC_MONOTONIC_CLOCK     38
  185 #define _SC_CLK_TCK             39 /* New, variable version */
  186 #define _SC_ATEXIT_MAX          40
  187 #define _SC_THREADS             41
  188 #define _SC_SEMAPHORES          42
  189 #define _SC_BARRIERS            43
  190 #define _SC_TIMERS              44
  191 #define _SC_SPIN_LOCKS          45
  192 #define _SC_READER_WRITER_LOCKS 46
  193 
  194 /* configurable system strings */
  195 #define _CS_PATH                 1
  196 
  197 #endif /* !_SYS_UNISTD_H_ */

Cache object: d03f82abe73fe60806d28c4a6e2e1910


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.