1 /* 2 * Copyright (c) 1989 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms are permitted 6 * provided that the above copyright notice and this paragraph are 7 * duplicated in all such forms and that any documentation, 8 * advertising materials, and other materials related to such 9 * distribution and use acknowledge that the software was developed 10 * by the University of California, Berkeley. The name of the 11 * University may not be used to endorse or promote products derived 12 * from this software without specific prior written permission. 13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 * 17 * @(#)unistd.h 5.6 (Berkeley) 05/13/90 18 */ 19 20 /* compile-time symbolic constants */ 21 #define _POSIX_JOB_CONTROL /* implementation supports job control */ 22 /*#define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ 23 #define _POSIX_VERSION 198808L 24 25 /* execution-time symbolic constants */ 26 #define _POSIX_CHOWN_RESTRICTED /* chown requires appropriate privileges */ 27 #define _POSIX_NO_TRUNC /* too-long path components generate errors */ 28 /* may disable terminal special characters */ 29 #define _POSIX_VDISABLE ((unsigned char)'\377') 30 31 /* access function */ 32 #define F_OK 0 /* test for existence of file */ 33 #define X_OK 0x01 /* test for execute or search permission */ 34 #define W_OK 0x02 /* test for write permission */ 35 #define R_OK 0x04 /* test for read permission */ 36 37 /* lseek function */ 38 #define SEEK_SET 0 /* set file offset to offset */ 39 #define SEEK_CUR 1 /* set file offset to current plus offset */ 40 #define SEEK_END 2 /* set file offset to EOF plus offset */ 41 42 /* map a stream pointer to a file descriptor */ 43 #define STDIN_FILENO 0 /* standard input value, stdin */ 44 #define STDOUT_FILENO 1 /* standard output value, stdout */ 45 #define STDERR_FILENO 2 /* standard error value, stdout */ 46 47 /* fnmatch function */ 48 #define FNM_PATHNAME 0x01 /* match pathnames, not filenames */ 49 #ifndef _POSIX_SOURCE 50 #define FNM_QUOTE 0x02 /* escape special chars with \ */ 51 #endif 52 53 #ifndef NULL 54 #define NULL 0 /* null pointer constant */ 55 #endif 56 57 /* configurable pathname variables */ 58 #define _PC_LINK_MAX 1 59 #define _PC_MAX_CANON 2 60 #define _PC_MAX_INPUT 3 61 #define _PC_NAME_MAX 4 62 #define _PC_PATH_MAX 5 63 #define _PC_PIPE_BUF 6 64 #define _PC_CHOWN_RESTRICTED 7 65 #define _PC_NO_TRUNC 8 66 #define _PC_VDISABLE 9 67 68 /* configurable system variables */ 69 #define _SC_ARG_MAX 1 70 #define _SC_CHILD_MAX 2 71 #define _SC_CLK_TCK 3 72 #define _SC_NGROUPS_MAX 4 73 #define _SC_OPEN_MAX 5 74 #define _SC_JOB_CONTROL 6 75 #define _SC_SAVED_IDS 7 76 #define _SC_VERSION 8 77