xref: /original-bsd/sys/sys/unistd.h (revision c0f053f7)
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.2 (Berkeley) 05/24/89
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 #define	POSIX_VDISABLE		/* may disable terminal special characters */
29 
30 /* access function */
31 #define	R_OK		4	/* test for read permission */
32 #define	W_OK		2	/* test for write permission */
33 #define	X_OK		1	/* test for execute or search permission */
34 #define	F_OK		0	/* test for existence of file */
35 
36 /* lseek function */
37 #define	SEEK_SET	0	/* set file offset to offset */
38 #define	SEEK_CUR	1	/* set file offset to current plus offset */
39 #define	SEEK_END	2	/* set file offset to EOF plus offset */
40 
41 /* map a stream pointer to a file descriptor */
42 #define	STDIN_FILENO		0	/* standard input value, stdin */
43 #define	STDOUT_FILENO		1	/* standard output value, stdout */
44 #define	STDERR_FILENO		2	/* standard error value, stdout */
45 
46 #define	NULL	0			/* null pointer constant */
47 
48 /* configurable pathname variables */
49 #define	_PC_LINK_MAX		1
50 #define	_PC_MAX_CANON		2
51 #define	_PC_MAX_INPUT		3
52 #define	_PC_NAME_MAX		4
53 #define	_PC_PATH_MAX		5
54 #define	_PC_PIPE_BUF		6
55 #define	_PC_CHOWN_RESTRICTED	7
56 #define	_PC_NO_TRUNC		8
57 #define	_PC_VDISABLE		9
58 
59 /* configurable system variables */
60 #define	_SC_ARG_MAX		1
61 #define	_SC_CHILD_MAX		2
62 #define	_SC_CLK_TCK		3
63 #define	_SC_NGROUPS_MAX		4
64 #define	_SC_OPEN_MAX		5
65 #define	_SC_JOB_CONTROL		6
66 #define	_SC_SAVED_IDS		7
67 #define	_SC_VERSION		8
68