]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/Include/sys/unistd.h
StdLib: Add isDirSep character classification macro and function. Implement several...
[mirror_edk2.git] / StdLib / Include / sys / unistd.h
index a63d88df55ea8756d199a03b70ce1e301ad32428..274e29f0963d17f2a9d66e4f399cf955e3c1a096 100644 (file)
@@ -1,6 +1,14 @@
-/*  $NetBSD: unistd.h,v 1.35 2006/08/14 18:17:48 rpaulo Exp $ */\r
+/** @file\r
+\r
+  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-/*\r
  * Copyright (c) 1989, 1993\r
  *  The Regents of the University of California.  All rights reserved.\r
  *\r
  * SUCH DAMAGE.\r
  *\r
  *  @(#)unistd.h  8.2 (Berkeley) 1/7/94\r
- */\r
-\r
+    NetBSD: unistd.h,v 1.35 2006/08/14 18:17:48 rpaulo Exp\r
+**/\r
 #ifndef _SYS_UNISTD_H_\r
 #define _SYS_UNISTD_H_\r
 \r
 #include <sys/featuretest.h>\r
 \r
 /* compile-time symbolic constants */\r
-//#define _POSIX_JOB_CONTROL  /* implementation supports job control */\r
 \r
 /*\r
  * According to POSIX 1003.1:\r
 #define _POSIX2_VERSION   199212L\r
 \r
 /* execution-time symbolic constants */\r
-        /* chown requires appropriate privileges */\r
-//#define _POSIX_CHOWN_RESTRICTED 1\r
-//        /* clock selection */\r
-//#define _POSIX_CLOCK_SELECTION  -1\r
-//        /* too-long path components generate errors */\r
-//#define _POSIX_NO_TRUNC   1\r
-//        /* may disable terminal special characters */\r
-//#define _POSIX_VDISABLE   ((unsigned char)'\377')\r
-//        /* file synchronization is available */\r
-//#define _POSIX_FSYNC    1\r
-//        /* synchronized I/O is available */\r
-//#define _POSIX_SYNCHRONIZED_IO  1\r
-//        /* memory mapped files */\r
-//#define _POSIX_MAPPED_FILES 1\r
-//        /* memory locking of whole address space */\r
-//#define _POSIX_MEMLOCK    1\r
-//        /* memory locking address ranges */\r
-//#define _POSIX_MEMLOCK_RANGE  1\r
-//        /* memory access protections */\r
-//#define _POSIX_MEMORY_PROTECTION 1\r
-//        /* monotonic clock */\r
-//#define _POSIX_MONOTONIC_CLOCK  200112L\r
-//        /* threads */\r
-//#define _POSIX_THREADS    200112L\r
-//        /* semaphores */\r
-//#define _POSIX_SEMAPHORES 0\r
-//        /* barriers */\r
-//#define _POSIX_BARRIERS   200112L\r
         /* timers */\r
 #define _POSIX_TIMERS   200112L\r
-        /* spin locks */\r
-//#define _POSIX_SPIN_LOCKS 200112L\r
-//        /* read/write locks */\r
-//#define _POSIX_READER_WRITER_LOCKS  200112L\r
-//        /* XPG4.2 shared memory */\r
-//#define _XOPEN_SHM    0\r
+\r
+/* Always ensure that these are consistent with <fcntl.h>!\r
+   whence values for lseek(2).\r
+*/\r
+#ifndef SEEK_SET\r
+#define SEEK_SET  0 /**< set file offset to offset */\r
+#endif\r
+#ifndef SEEK_CUR\r
+#define SEEK_CUR  1 /**< set file offset to current plus offset */\r
+#endif\r
+#ifndef SEEK_END\r
+#define SEEK_END  2 /**< set file offset to EOF plus offset */\r
+#endif\r
 \r
 /* whence values for lseek(2); renamed by POSIX 1003.1 */\r
 #define L_SET   SEEK_SET\r
 #define L_INCR    SEEK_CUR\r
 #define L_XTND    SEEK_END\r
 \r
-/*\r
- * fsync_range values.\r
- *\r
- * Note the following flag values were chosen to not overlap\r
- * values for SEEK_XXX flags.  While not currently implemented,\r
- * it is possible to extend this call to respect SEEK_CUR and\r
- * SEEK_END offset addressing modes.\r
- */\r
-#define FDATASYNC 0x0010  /* sync data and minimal metadata */\r
-#define FFILESYNC 0x0020  /* sync data and metadata */\r
-#define FDISKSYNC 0x0040  /* flush disk caches after sync */\r
-\r
-/* configurable pathname variables; use as argument to pathconf(3) */\r
-#define _PC_LINK_MAX     1\r
-#define _PC_MAX_CANON    2\r
-#define _PC_MAX_INPUT    3\r
-#define _PC_NAME_MAX     4\r
-#define _PC_PATH_MAX     5\r
-#define _PC_PIPE_BUF     6\r
-#define _PC_CHOWN_RESTRICTED   7\r
-#define _PC_NO_TRUNC     8\r
-#define _PC_VDISABLE     9\r
-#define _PC_SYNC_IO   10\r
-#define _PC_FILESIZEBITS  11\r
-\r
-/* configurable system variables; use as argument to sysconf(3) */\r
-/*\r
- * XXX The value of _SC_CLK_TCK is embedded in <time.h>.\r
- * XXX The value of _SC_PAGESIZE is embedded in <sys/shm.h>.\r
- */\r
-#define _SC_ARG_MAX    1\r
-#define _SC_CHILD_MAX    2\r
-#define _O_SC_CLK_TCK    3 /* Old version, always 100 */\r
-#define _SC_NGROUPS_MAX    4\r
-#define _SC_OPEN_MAX     5\r
-#define _SC_JOB_CONTROL    6\r
-#define _SC_SAVED_IDS    7\r
-#define _SC_VERSION    8\r
-#define _SC_BC_BASE_MAX    9\r
-#define _SC_BC_DIM_MAX    10\r
-#define _SC_BC_SCALE_MAX  11\r
-#define _SC_BC_STRING_MAX 12\r
-#define _SC_COLL_WEIGHTS_MAX  13\r
-#define _SC_EXPR_NEST_MAX 14\r
-#define _SC_LINE_MAX    15\r
-#define _SC_RE_DUP_MAX    16\r
-#define _SC_2_VERSION   17\r
-#define _SC_2_C_BIND    18\r
-#define _SC_2_C_DEV   19\r
-#define _SC_2_CHAR_TERM   20\r
-#define _SC_2_FORT_DEV    21\r
-#define _SC_2_FORT_RUN    22\r
-#define _SC_2_LOCALEDEF   23\r
-#define _SC_2_SW_DEV    24\r
-#define _SC_2_UPE   25\r
-#define _SC_STREAM_MAX    26\r
-#define _SC_TZNAME_MAX    27\r
-#define _SC_PAGESIZE    28\r
-#define _SC_PAGE_SIZE   _SC_PAGESIZE  /* 1170 compatibility */\r
-#define _SC_FSYNC   29\r
-#define _SC_XOPEN_SHM   30\r
-#define _SC_SYNCHRONIZED_IO 31\r
-#define _SC_IOV_MAX   32\r
-#define _SC_MAPPED_FILES  33\r
-#define _SC_MEMLOCK   34\r
-#define _SC_MEMLOCK_RANGE 35\r
-#define _SC_MEMORY_PROTECTION 36\r
-#define _SC_LOGIN_NAME_MAX  37\r
-#define _SC_MONOTONIC_CLOCK 38\r
-#define _SC_CLK_TCK   39 /* New, variable version */\r
-#define _SC_ATEXIT_MAX    40\r
-#define _SC_THREADS   41\r
-#define _SC_SEMAPHORES    42\r
-#define _SC_BARRIERS    43\r
-#define _SC_TIMERS    44\r
-#define _SC_SPIN_LOCKS    45\r
-#define _SC_READER_WRITER_LOCKS 46\r
-#define _SC_GETGR_R_SIZE_MAX  47\r
-#define _SC_GETPW_R_SIZE_MAX  48\r
-#define _SC_CLOCK_SELECTION 49\r
-\r
 /* configurable system strings */\r
 #define _CS_PATH     1\r
 \r