summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2018-09-14 04:57:31 (GMT)
committerGitHub <noreply@github.com>2018-09-14 04:57:31 (GMT)
commitea13740a37347d68d096b11b87c9167917ccfc22 (patch)
treecefec723d8b1b3ea3bdf87cd0db53639cec6edfd /Modules
parent1aeba7458d2aaf8a03b5d443179d122ceb2ccece (diff)
downloadcpython-ea13740a37347d68d096b11b87c9167917ccfc22.zip
cpython-ea13740a37347d68d096b11b87c9167917ccfc22.tar.gz
cpython-ea13740a37347d68d096b11b87c9167917ccfc22.tar.bz2
bpo-34674: Assume unistd.h exists on Unix. (GH-9290)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c35
-rw-r--r--Modules/resource.c3
2 files changed, 0 insertions, 38 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 7c02351..2fddd95 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -213,41 +213,6 @@ module os
extern char *ctermid_r(char *);
#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 */
#ifdef HAVE_POSIX_SPAWN
diff --git a/Modules/resource.c b/Modules/resource.c
index e59280f..87c72e7 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -4,10 +4,7 @@
#include <sys/time.h>
#include <string.h>
#include <errno.h>
-/* for sysconf */
-#if defined(HAVE_UNISTD_H)
#include <unistd.h>
-#endif
/* On some systems, these aren't in any header file.
On others they are, with inconsistent prototypes.