|
|
1.1 root 1: /*++
2:
3: Copyright (c) 1989 Microsoft Corporation
4:
5: Module Name:
6:
7: unistd.h
8:
9: Abstract:
10:
11: This module contains the "symbolic constants and structures referenced
12: elsewhere in the standard" IEEE P1003.1/Draft 13.
13:
14: --*/
15:
16: #ifndef _UNISTD_
17: #define _UNISTD_
18:
19: #include <sys/types.h>
20:
1.1.1.2 ! root 21: #ifdef __cplusplus
! 22: extern "C" {
! 23: #endif
! 24:
1.1 root 25: #define STDIN_FILENO 0
26: #define STDOUT_FILENO 1
27: #define STDERR_FILENO 2
28:
29: /*
30: * Section 2.9.1
31: */
32:
33: #define F_OK 00
34: #define X_OK 01
35: #define W_OK 02
36: #define R_OK 04
37:
38: /*
39: * Section 2.9.2
40: */
41:
42: #define SEEK_SET 0
43: #define SEEK_CUR 1
44: #define SEEK_END 2
45:
46: /*
47: * Section 2.9.3
48: */
49:
50: #define _POSIX_JOB_CONTROL
51: #define _POSIX_VERSION 199009L
52: #define _POSIX_SAVED_IDS
53:
54: /*
55: * Section 2.9.4
56: */
57:
58: #define _POSIX_CHOWN_RESTRICTED 1
59: #define _POSIX_NO_TRUNC 1
1.1.1.2 ! root 60: #define _POSIX_VDISABLE 0
1.1 root 61:
62: /*
63: * Section 4.8.1
64: * sysconf 'name' values
65: */
66:
67: #define _SC_ARG_MAX 1
68: #define _SC_CHILD_MAX 2
69: #define _SC_CLK_TCK 3
70: #define _SC_NGROUPS_MAX 4
71: #define _SC_OPEN_MAX 5
72: #define _SC_JOB_CONTROL 6
73: #define _SC_SAVED_IDS 7
1.1.1.2 ! root 74: #define _SC_STREAM_MAX 8
! 75: #define _SC_TZNAME_MAX 9
! 76: #define _SC_VERSION 10
1.1 root 77:
78: /*
79: * Section 5.7.1
80: * pathconf and fpathconf 'name' values
81: */
82:
83: #define _PC_LINK_MAX 1
84: #define _PC_MAX_CANON 2
85: #define _PC_MAX_INPUT 3
86: #define _PC_NAME_MAX 4
87: #define _PC_PATH_MAX 5
88: #define _PC_PIPE_BUF 6
89: #define _PC_CHOWN_RESTRICTED 7
90: #define _PC_NO_TRUNC 8
91: #define _PC_VDISABLE 9
92:
1.1.1.2 ! root 93: #ifndef NULL
! 94: #define NULL ((void *)0)
! 95: #endif
! 96:
1.1 root 97: /*
98: * Function Prototypes
99: */
100:
101: pid_t _CRTAPI1 fork(void);
102:
103: int _CRTAPI2 execl(const char *, const char *, ...);
104: int _CRTAPI1 execv(const char *, char * const []);
105: int _CRTAPI2 execle(const char *, const char *arg, ...);
106: int _CRTAPI1 execve(const char *, char * const [], char * const []);
107: int _CRTAPI2 execlp(const char *, const char *, ...);
108: int _CRTAPI1 execvp(const char *, char * const []);
109:
110: void _CRTAPI1 _exit(int);
111: unsigned int _CRTAPI1 alarm(unsigned int);
112: int _CRTAPI1 pause(void);
113: unsigned int _CRTAPI1 sleep(unsigned int);
114: pid_t _CRTAPI1 getpid(void);
115: pid_t _CRTAPI1 getppid(void);
116: uid_t _CRTAPI1 getuid(void);
117: uid_t _CRTAPI1 geteuid(void);
118: gid_t _CRTAPI1 getgid(void);
119: gid_t _CRTAPI1 getegid(void);
120: int _CRTAPI1 setuid(uid_t);
121: int _CRTAPI1 setgid(gid_t);
122: int _CRTAPI1 getgroups(int gidsetsize, gid_t grouplist[]);
123: char *_CRTAPI1 getlogin(void);
124: pid_t _CRTAPI1 getpgrp(void);
125: pid_t _CRTAPI1 setsid(void);
126: int _CRTAPI1 setpgid(pid_t, pid_t);
127:
128: struct utsname;
129: int _CRTAPI1 uname(struct utsname *);
130:
131: time_t _CRTAPI1 time(time_t *);
132: char * _CRTAPI1 getenv(const char *);
133: char * _CRTAPI1 ctermid(char *s);
134: char * _CRTAPI1 ttyname(int);
135: int _CRTAPI1 isatty(int);
136:
137: long _CRTAPI1 sysconf(int);
138:
139: int _CRTAPI1 chdir(const char *);
140: char * _CRTAPI1 getcwd(char *, size_t);
141: int _CRTAPI1 link(const char *, const char *);
142: int _CRTAPI1 unlink(const char *);
143: int _CRTAPI1 rmdir(const char *);
144: int _CRTAPI1 rename(const char *, const char *);
145: int _CRTAPI1 access(const char *, int);
146: int _CRTAPI1 chown(const char *, uid_t, gid_t);
147:
148: struct utimbuf;
149: int _CRTAPI1 utime(const char *, const struct utimbuf *);
150:
151: long _CRTAPI1 pathconf(const char *, int);
152: long _CRTAPI1 fpathconf(int, int);
153:
154: int _CRTAPI1 pipe(int *);
155: int _CRTAPI1 dup(int);
156: int _CRTAPI1 dup2(int, int);
157: int _CRTAPI1 close(int);
158: ssize_t _CRTAPI1 read(int, void *, size_t);
159: ssize_t _CRTAPI1 write(int, const void *, size_t);
160: off_t _CRTAPI1 lseek(int, off_t, int);
161:
162: char * _CRTAPI1 cuserid(char *);
163:
1.1.1.2 ! root 164: #ifdef __cplusplus
! 165: }
! 166: #endif
! 167:
1.1 root 168: #endif /* _UNISTD_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.