Commit | Line | Data |
---|---|---|
c911543b | 1 | /* Fake unistd.h: config.h already provides most of the relevant things. */ |
ab5796a9 | 2 | |
0f7bb05d EZ |
3 | #ifndef _UNISTD_H |
4 | #define _UNISTD_H | |
5 | ||
1088b922 PE |
6 | /* On Microsoft platforms, <stdlib.h> declares 'environ'; on POSIX |
7 | platforms, <unistd.h> does. Every file in Emacs that includes | |
8 | <unistd.h> also includes <stdlib.h>, so there's no need to declare | |
9 | 'environ' here. */ | |
10 | ||
8e2417bf JB |
11 | /* Provide prototypes of library functions that are emulated on w32 |
12 | and whose prototypes are usually found in unistd.h on POSIX | |
4f3f021d | 13 | platforms. */ |
0f7bb05d | 14 | extern ssize_t readlink (const char *, char *, size_t); |
8654f9d7 | 15 | extern ssize_t readlinkat (int, const char *, char *, size_t); |
0f7bb05d | 16 | extern int symlink (char const *, char const *); |
7e8b50d9 EZ |
17 | extern int setpgid (pid_t, pid_t); |
18 | extern pid_t getpgrp (void); | |
4f3f021d EZ |
19 | extern pid_t setsid (void); |
20 | extern pid_t tcgetpgrp (int); | |
0f7bb05d | 21 | |
14f20728 EZ |
22 | extern int faccessat (int, char const *, int, int); |
23 | ||
24 | /* These are normally on fcntl.h, but we don't override that header. */ | |
25 | /* Use values compatible with gnulib, as there's no reason to differ. */ | |
26 | #define AT_FDCWD (-3041965) | |
27 | #define AT_EACCESS 4 | |
28 | #define AT_SYMLINK_NOFOLLOW 4096 | |
29 | ||
99a7a591 | 30 | #define O_IGNORE_CTTY 0 |
70743157 PE |
31 | #define O_NOCTTY 0 |
32 | #define O_NOFOLLOW 0 | |
49cdacda | 33 | |
8d1a544c EZ |
34 | /* This is normally on stdlib.h, but we don't override that header. */ |
35 | extern int unsetenv (const char *); | |
36 | ||
0f7bb05d | 37 | #endif /* _UNISTD_H */ |