xref: /original-bsd/sys/sys/unistd.h (revision 7b081c7c)
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.4 (Berkeley) 10/08/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 /* fnmatch function */
47 #define	FNM_PATHNAME	0x01	/* match pathnames, not filenames */
48 #ifndef _POSIX_SOURCE
49 #define	FNM_QUOTE	0x02	/* escape special chars with \ */
50 #endif
51 
52 #ifndef NULL
53 #define	NULL		0	/* null pointer constant */
54 #endif
55 
56 /* configurable pathname variables */
57 #define	_PC_LINK_MAX		1
58 #define	_PC_MAX_CANON		2
59 #define	_PC_MAX_INPUT		3
60 #define	_PC_NAME_MAX		4
61 #define	_PC_PATH_MAX		5
62 #define	_PC_PIPE_BUF		6
63 #define	_PC_CHOWN_RESTRICTED	7
64 #define	_PC_NO_TRUNC		8
65 #define	_PC_VDISABLE		9
66 
67 /* configurable system variables */
68 #define	_SC_ARG_MAX		1
69 #define	_SC_CHILD_MAX		2
70 #define	_SC_CLK_TCK		3
71 #define	_SC_NGROUPS_MAX		4
72 #define	_SC_OPEN_MAX		5
73 #define	_SC_JOB_CONTROL		6
74 #define	_SC_SAVED_IDS		7
75 #define	_SC_VERSION		8
76