gonzui


Format: Advanced Search

t2ex/bsd_source/lib/libc/src_bsd/include/sys/unistd.hbare sourcepermlink (0.03 seconds)

Search this content:

    1: /*      $OpenBSD: unistd.h,v 1.20 2012/03/06 11:38:26 ajacoutot Exp $        */
    2: /*      $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd Exp $       */
    3: 
    4: /*
    5:  * Copyright (c) 1989, 1993
    6:  *      The Regents of the University of California.  All rights reserved.
    7:  *
    8:  * Redistribution and use in source and binary forms, with or without
    9:  * modification, are permitted provided that the following conditions
   10:  * are met:
   11:  * 1. Redistributions of source code must retain the above copyright
   12:  *    notice, this list of conditions and the following disclaimer.
   13:  * 2. Redistributions in binary form must reproduce the above copyright
   14:  *    notice, this list of conditions and the following disclaimer in the
   15:  *    documentation and/or other materials provided with the distribution.
   16:  * 3. Neither the name of the University nor the names of its contributors
   17:  *    may be used to endorse or promote products derived from this software
   18:  *    without specific prior written permission.
   19:  *
   20:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   21:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   22:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   23:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   24:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   25:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   26:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   27:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   28:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   29:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   30:  * SUCH DAMAGE.
   31:  *
   32:  *      @(#)unistd.h 8.2 (Berkeley) 1/7/94
   33:  */
   34: 
   35: #ifndef _SYS_UNISTD_H_
   36: #define _SYS_UNISTD_H_
   37: 
   38: #include <sys/cdefs.h>
   39: 
   40: /* compile-time symbolic constants */
   41:                                 /* implementation supports job control */
   42: #define _POSIX_JOB_CONTROL      1
   43:                                 /* saved set-user-ID and set-group-ID */
   44: #define _POSIX_SAVED_IDS        1
   45: 
   46: #define _POSIX_VERSION          199009L
   47: #define _POSIX2_VERSION         199212L
   48: 
   49: /* execution-time symbolic constants */
   50:                                 /* chown requires appropriate privileges */
   51: #define _POSIX_CHOWN_RESTRICTED 1
   52:                                 /* monotonic clock */
   53: #define _POSIX_MONOTONIC_CLOCK  200112L
   54:                                 /* too-long path components generate errors */
   55: #define _POSIX_NO_TRUNC         1
   56:                                 /* may disable terminal special characters */
   57: #define _POSIX_VDISABLE         (0377)
   58:                                 /* file synchronization is available */
   59: #define _POSIX_FSYNC            1
   60: 
   61: /* access function */
   62: #define F_OK            0 /* test for existence of file */
   63: #define X_OK            0x01      /* test for execute or search permission */
   64: #define W_OK            0x02      /* test for write permission */
   65: #define R_OK            0x04      /* test for read permission */
   66: 
   67: /* whence values for __libc_lseek(2) */
   68: #define SEEK_SET        0      /* set file offset to offset */
   69: #define SEEK_CUR        1      /* set file offset to current plus offset */
   70: #define SEEK_END        2      /* set file offset to EOF plus offset */
   71: 
   72: #if __BSD_VISIBLE
   73: /* old BSD whence values for __libc_lseek(2); renamed by POSIX 1003.1 */
   74: #define L_SET           SEEK_SET
   75: #define L_INCR          SEEK_CUR
   76: #define L_XTND          SEEK_END
   77: 
   78: /* the parameters argument passed to the __tfork() syscall */
   79: struct __tfork {
   80:         void   *tf_tcb;
   81:         pid_t  *tf_tid;
   82:         int    tf_flags;
   83: };
   84: #endif
   85: 
   86: /* configurable pathname variables */
   87: #define _PC_LINK_MAX             1
   88: #define _PC_MAX_CANON            2
   89: #define _PC_MAX_INPUT            3
   90: #define _PC_NAME_MAX             4
   91: #define _PC_PATH_MAX             5
   92: #define _PC_PIPE_BUF             6
   93: #define _PC_CHOWN_RESTRICTED     7
   94: #define _PC_NO_TRUNC             8
   95: #define _PC_VDISABLE             9
   96: 
   97: /* configurable system variables */
   98: #define _SC_ARG_MAX              1
   99: #define _SC_CHILD_MAX            2
  100: #define _SC_CLK_TCK              3
  101: #define _SC_NGROUPS_MAX          4
  102: #define _SC_OPEN_MAX             5
  103: #define _SC_JOB_CONTROL          6
  104: #define _SC_SAVED_IDS            7
  105: #define _SC_VERSION              8
  106: #define _SC_BC_BASE_MAX          9
  107: #define _SC_BC_DIM_MAX          10
  108: #define _SC_BC_SCALE_MAX        11
  109: #define _SC_BC_STRING_MAX       12
  110: #define _SC_COLL_WEIGHTS_MAX    13
  111: #define _SC_EXPR_NEST_MAX       14
  112: #define _SC_LINE_MAX            15
  113: #define _SC_RE_DUP_MAX          16
  114: #define _SC_2_VERSION           17
  115: #define _SC_2_C_BIND            18
  116: #define _SC_2_C_DEV             19
  117: #define _SC_2_CHAR_TERM         20
  118: #define _SC_2_FORT_DEV          21
  119: #define _SC_2_FORT_RUN          22
  120: #define _SC_2_LOCALEDEF         23
  121: #define _SC_2_SW_DEV            24
  122: #define _SC_2_UPE               25
  123: #define _SC_STREAM_MAX          26
  124: #define _SC_TZNAME_MAX          27
  125: #define _SC_PAGESIZE            28
  126: #define _SC_PAGE_SIZE           _SC_PAGESIZE     /* 1170 compatibility */
  127: #define _SC_FSYNC               29
  128: #define _SC_XOPEN_SHM           30
  129: #define _SC_SEM_NSEMS_MAX       31
  130: #define _SC_SEM_VALUE_MAX       32
  131: #define _SC_HOST_NAME_MAX       33
  132: #define _SC_MONOTONIC_CLOCK     34
  133: 
  134: /* P1003.1c */
  135: #define _SC_GETGR_R_SIZE_MAX    100
  136: #define _SC_GETPW_R_SIZE_MAX    101
  137: #define _SC_LOGIN_NAME_MAX      102
  138: #define _SC_THREAD_SAFE_FUNCTIONS 103
  139: #ifdef notyet
  140: #define _SC_THREAD_DESTRUCTOR_ITERATIONS
  141: #define _SC_THREAD_KEYS_MAX
  142: #define _SC_THREAD_STACK_MIN
  143: #define _SC_THREAD_THREADS_MAX
  144: #define _SC_TTY_NAME_MAX
  145: #define _SC_THREADS
  146: #define _SC_THREAD_ATTR_STACKADDR
  147: #define _SC_THREAD_ATTR_STACKSIZE
  148: #define _SC_THREAD_PRIORITY_SCHEDULING
  149: #define _SC_THREAD_PRIO_INHERIT
  150: #define _SC_THREAD_PRIO_PROTECT
  151: #define _SC_THREAD_PROCESS_SHARED
  152: #endif
  153: 
  154: #define _SC_PHYS_PAGES          500
  155: #define _SC_AVPHYS_PAGES        501
  156: #define _SC_NPROCESSORS_CONF    502
  157: #define _SC_NPROCESSORS_ONLN    503
  158: 
  159: /* configurable system strings */
  160: #define _CS_PATH                 1
  161: 
  162: #endif /* !_SYS_UNISTD_H_ */