Merge from emacs-24; up to 2014-04-25T10:35:01Z!michael.albinus@gmx.de
[bpt/emacs.git] / nt / inc / unistd.h
CommitLineData
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
9e821c83
EZ
6#include <sys/types.h>
7#include <pwd.h>
8
1088b922
PE
9/* On Microsoft platforms, <stdlib.h> declares 'environ'; on POSIX
10 platforms, <unistd.h> does. Every file in Emacs that includes
11 <unistd.h> also includes <stdlib.h>, so there's no need to declare
12 'environ' here. */
13
8e2417bf
JB
14/* Provide prototypes of library functions that are emulated on w32
15 and whose prototypes are usually found in unistd.h on POSIX
4f3f021d 16 platforms. */
0f7bb05d 17extern ssize_t readlink (const char *, char *, size_t);
8654f9d7 18extern ssize_t readlinkat (int, const char *, char *, size_t);
0f7bb05d 19extern int symlink (char const *, char const *);
7e8b50d9
EZ
20extern int setpgid (pid_t, pid_t);
21extern pid_t getpgrp (void);
4f3f021d
EZ
22extern pid_t setsid (void);
23extern pid_t tcgetpgrp (int);
0f7bb05d 24
14f20728
EZ
25extern int faccessat (int, char const *, int, int);
26
27/* These are normally on fcntl.h, but we don't override that header. */
28/* Use values compatible with gnulib, as there's no reason to differ. */
29#define AT_FDCWD (-3041965)
30#define AT_EACCESS 4
31#define AT_SYMLINK_NOFOLLOW 4096
32
99a7a591 33#define O_IGNORE_CTTY 0
49cdacda 34#define O_NOCTTY 0
70743157 35#define O_NOFOLLOW 0
49cdacda 36
8d1a544c
EZ
37/* This is normally on stdlib.h, but we don't override that header. */
38extern int unsetenv (const char *);
49cdacda 39
0f7bb05d 40#endif /* _UNISTD_H */