aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-11-29 12:46:16 -0800
committerRob Landley <rob@landley.net>2018-11-29 18:44:41 -0600
commitdb055c5b3e5f30aaee2187fbef9b8aa05aea3b95 (patch)
tree7dd2b67dfc724ce2a55d3a63f5f7e957f69640ab /lib/portability.h
parent40a09367f6f96c4ea1a70fdb0a33b38c9d98cd80 (diff)
downloadtoybox-db055c5b3e5f30aaee2187fbef9b8aa05aea3b95.tar.gz
macOS: remove glibc 2.10 workarounds.
The only part of this I actually need for macOS is to remove __APPLE__ from the getdelim/getline workaround, but if we're following the usual "seven year rule", glibc 2.10 is dead to us anyway, and we should just remove all of this.
Diffstat (limited to 'lib/portability.h')
-rw-r--r--lib/portability.h44
1 files changed, 1 insertions, 43 deletions
diff --git a/lib/portability.h b/lib/portability.h
index e6b542c4..a74d66d5 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -91,43 +91,7 @@ static inline char *basename(char *path) { return __xpg_basename(path); }
#include <string.h>
char *strcasestr(const char *haystack, const char *needle);
-
-// When building under obsolete glibc (Ubuntu 8.04-ish), hold its hand a bit.
-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 10
-#define fstatat fstatat64
-int fstatat64(int dirfd, const char *pathname, void *buf, int flags);
-int readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz);
-char *stpcpy(char *dest, const char *src);
-#include <sys/stat.h>
-int fchmodat(int dirfd, const char *pathname, mode_t mode, int flags);
-int openat(int dirfd, const char *pathname, int flags, ...);
-#include <dirent.h>
-DIR *fdopendir(int fd);
-#include <unistd.h>
-int fchownat(int dirfd, const char *pathname,
- uid_t owner, gid_t group, int flags);
-int isblank(int c);
-int unlinkat(int dirfd, const char *pathname, int flags);
-#include <stdio.h>
-ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
-
-// Straight from posix-2008, things old glibc had but didn't prototype
-
-int faccessat(int fd, const char *path, int amode, int flag);
-int linkat(int fd1, const char *path1, int fd2, const char *path2, int flag);
-int mkdirat(int fd, const char *path, mode_t mode);
-int symlinkat(const char *path1, int fd, const char *path2);
-int mknodat(int fd, const char *path, mode_t mode, dev_t dev);
-#include <sys/time.h>
-int futimens(int fd, const struct timespec times[2]);
-int utimensat(int fd, const char *path, const struct timespec times[2], int flag);
-
-#ifndef MNT_DETACH
-#define MNT_DETACH 2
-#endif
-#endif // Old glibc
-
-#endif // glibc in general
+#endif // defined(glibc)
#if !defined(__GLIBC__)
// POSIX basename.
@@ -175,12 +139,6 @@ int clearenv(void);
#define SWAP_LE64(x) (x)
#endif
-#if defined(__APPLE__) \
- || (defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 10)
-ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
-ssize_t getline(char **lineptr, size_t *n, FILE *stream);
-#endif
-
// Linux headers not listed by POSIX or LSB
#include <sys/mount.h>
#include <sys/swap.h>