bpo-34674: Assume unistd.h exists on Unix. (GH-9290)
This commit is contained in:
parent
1aeba7458d
commit
ea13740a37
|
@ -32,7 +32,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifndef MS_WINDOWS
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_CRYPT_H
|
#ifdef HAVE_CRYPT_H
|
||||||
|
|
|
@ -213,41 +213,6 @@ module os
|
||||||
extern char *ctermid_r(char *);
|
extern char *ctermid_r(char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_UNISTD_H
|
|
||||||
#if ( defined(__WATCOMC__) || defined(_MSC_VER) ) && !defined(__QNX__)
|
|
||||||
extern int mkdir(const char *);
|
|
||||||
#else
|
|
||||||
extern int mkdir(const char *, mode_t);
|
|
||||||
#endif
|
|
||||||
#if defined(__IBMC__) || defined(__IBMCPP__)
|
|
||||||
extern int chdir(char *);
|
|
||||||
extern int rmdir(char *);
|
|
||||||
#else
|
|
||||||
extern int chdir(const char *);
|
|
||||||
extern int rmdir(const char *);
|
|
||||||
#endif
|
|
||||||
extern int chmod(const char *, mode_t);
|
|
||||||
/*#ifdef HAVE_FCHMOD
|
|
||||||
extern int fchmod(int, mode_t);
|
|
||||||
#endif*/
|
|
||||||
/*#ifdef HAVE_LCHMOD
|
|
||||||
extern int lchmod(const char *, mode_t);
|
|
||||||
#endif*/
|
|
||||||
extern int chown(const char *, uid_t, gid_t);
|
|
||||||
extern char *getcwd(char *, int);
|
|
||||||
extern char *strerror(int);
|
|
||||||
extern int link(const char *, const char *);
|
|
||||||
extern int rename(const char *, const char *);
|
|
||||||
extern int stat(const char *, struct stat *);
|
|
||||||
extern int unlink(const char *);
|
|
||||||
#ifdef HAVE_SYMLINK
|
|
||||||
extern int symlink(const char *, const char *);
|
|
||||||
#endif /* HAVE_SYMLINK */
|
|
||||||
#ifdef HAVE_LSTAT
|
|
||||||
extern int lstat(const char *, struct stat *);
|
|
||||||
#endif /* HAVE_LSTAT */
|
|
||||||
#endif /* !HAVE_UNISTD_H */
|
|
||||||
|
|
||||||
#endif /* !_MSC_VER */
|
#endif /* !_MSC_VER */
|
||||||
|
|
||||||
#ifdef HAVE_POSIX_SPAWN
|
#ifdef HAVE_POSIX_SPAWN
|
||||||
|
|
|
@ -4,10 +4,7 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
/* for sysconf */
|
|
||||||
#if defined(HAVE_UNISTD_H)
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/* On some systems, these aren't in any header file.
|
/* On some systems, these aren't in any header file.
|
||||||
On others they are, with inconsistent prototypes.
|
On others they are, with inconsistent prototypes.
|
||||||
|
|
|
@ -7725,7 +7725,7 @@ for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
|
||||||
fcntl.h grp.h \
|
fcntl.h grp.h \
|
||||||
ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
|
ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
|
||||||
sched.h shadow.h signal.h stropts.h termios.h \
|
sched.h shadow.h signal.h stropts.h termios.h \
|
||||||
unistd.h utime.h \
|
utime.h \
|
||||||
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
|
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
|
||||||
sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
|
sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
|
||||||
sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
|
sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
|
||||||
|
|
|
@ -2066,7 +2066,7 @@ AC_CHECK_HEADERS(asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
|
||||||
fcntl.h grp.h \
|
fcntl.h grp.h \
|
||||||
ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
|
ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
|
||||||
sched.h shadow.h signal.h stropts.h termios.h \
|
sched.h shadow.h signal.h stropts.h termios.h \
|
||||||
unistd.h utime.h \
|
utime.h \
|
||||||
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
|
poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
|
||||||
sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
|
sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
|
||||||
sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
|
sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
|
||||||
|
|
Loading…
Reference in New Issue