@@ -1,4 +1,3 @@
-#include <ctype.h>
#include <endian.h>
#if __BYTE_ORDER == __BIG_ENDIAN
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include <stddef.h>
size_t __ctype_get_mb_cur_max()
{
@@ -1,5 +1,4 @@
-#include <inttypes.h>
+#include <stdint.h>
static const int32_t table[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -3,8 +3,6 @@
#include <sys/stat.h>
#include <errno.h>
#include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
#include "__dirent.h"
DIR *fdopendir(int fd)
@@ -1,11 +1,7 @@
#define _GNU_SOURCE
#include <dirent.h>
#include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
#include "syscall.h"
@@ -1,11 +1,5 @@
-#include <fcntl.h>
-#include "syscall.h"
#include "libc.h"
int __getdents(int, struct dirent *, size_t);
@@ -1,6 +1,5 @@
#include <string.h>
@@ -1,10 +1,10 @@
#include <stddef.h>
-#include <libc.h>
+#include "libc.h"
int scandir(const char *path, struct dirent ***res,
int (*sel)(const struct dirent *),
-#include <stddef.h>
#include <elf.h>
#include <poll.h>
-#include <elf.h>
#include "pthread_impl.h"
#include "atomic.h"
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
extern char **__environ;
@@ -1,7 +1,5 @@
-#include <stdio.h>
char **__env_map;
#include <stdint.h>
/* Ensure that at least 32 atexit handlers can be registered without malloc */
#include <stdarg.h>
long __syscall_ret(unsigned long r)
#include <dlfcn.h>
int __dlinfo(void *, int, void *);
#include <unistd.h>
@@ -1,6 +1,6 @@
#include <sys/time.h>
int futimes(int fd, const struct timeval tv[2])
@@ -1,3 +1,5 @@
+#include <unistd.h>
#include <limits.h>
#include <sys/resource.h>
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include <string.h>
#include <termios.h>
@@ -1,7 +1,6 @@
static const char defshells[] = "/bin/sh\n/bin/csh\n";
@@ -1,5 +1,3 @@
-#define _GNU_SOURCE
-#include <time.h>
#include <sys/timex.h>
+#include <sys/klog.h>
int klogctl (int type, char *buf, int len)
+#include <sys/personality.h>
#ifdef SYS_personality
int personality(unsigned long persona)
@@ -8,4 +8,5 @@ int prlimit(pid_t pid, int resource, const struct rlimit *new_limit, struct rlim
return syscall(SYS_prlimit64, pid, resource, new_limit, old_limit);
}
+#undef prlimit64
LFS64(prlimit);
+#include <sys/sendfile.h>
+#include <sys/fsuid.h>
#include <sched.h>
-#include "libc.h"
int setns(int fd, int nstype)
@@ -1,4 +1,5 @@
+#include <time.h>
int stime(time_t *t)
+#include <sys/sysinfo.h>
-struct sysinfo;
-
int sysinfo(struct sysinfo *info)
return syscall(SYS_sysinfo, info);
#include <sys/wait.h>
pid_t wait4(pid_t pid, int *status, int options, struct rusage *usage)
+#include <libintl.h>
#include <strings.h>
@@ -1,6 +1,4 @@
#include <locale.h>
static const struct lconv posix_lconv = {
.decimal_point = ".",
int strcasecmp_l(const char *l, const char *r, locale_t loc)
void *calloc(size_t m, size_t n)
#include <grp.h>
int getrusage(int who, struct rusage *ru)
-#include <sys/types.h>
-int getgrouplist(const char *, gid_t, gid_t *, int *);
-int setgroups(size_t, const gid_t *);
int initgroups(const char *user, gid_t gid)
gid_t groups[NGROUPS_MAX];
@@ -2,8 +2,6 @@
#include <sys/socket.h>
#include <syslog.h>
#include <time.h>
#include <sys/utsname.h>
int uname(struct utsname *uts)
#include <sys/mman.h>
@@ -4,8 +4,6 @@
* unnecessary.
*/
#include "internal.h"
#define C(x) ( x<2 ? -1 : ( R(0x80,0xc0) | x ) )
@@ -6,6 +6,7 @@
#define bittab __fsmu8
extern const uint32_t bittab[] ATTR_LIBC_VISIBILITY;
@@ -5,11 +5,6 @@
-#include <wchar.h>
-#include "internal.h"
int mblen(const char *s, size_t n)
@@ -4,12 +4,7 @@
#include <wchar.h>
size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict st)
@@ -4,11 +4,8 @@
size_t mbrtowc(wchar_t *restrict wc, const char *restrict src, size_t n, mbstate_t *restrict st)
int mbsinit(const mbstate_t *st)
@@ -4,13 +4,7 @@
size_t mbsnrtowcs(wchar_t *restrict wcs, const char **restrict src, size_t n, size_t wn, mbstate_t *restrict st)
@@ -4,11 +4,9 @@
size_t mbsrtowcs(wchar_t *restrict ws, const char **restrict src, size_t wn, mbstate_t *restrict st)
@@ -4,13 +4,10 @@
+
int mbtowc(wchar_t *restrict wc, const char *restrict src, size_t n)
unsigned c;
@@ -4,13 +4,9 @@
size_t wcrtomb(char *restrict s, wchar_t wc, mbstate_t *restrict st)
if (!s) return 1;
size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t *restrict st)
size_t wcsrtombs(char *restrict s, const wchar_t **restrict ws, size_t n, mbstate_t *restrict st)
@@ -5,11 +5,7 @@
int wctomb(char *s, wchar_t wc)
#include <ctype.h>
@@ -1,8 +1,6 @@
#include <netdb.h>
-#include <netinet/in.h>
@@ -5,7 +5,7 @@
#include <netinet/in.h>
int gethostbyname2_r(const char *name, int af,
struct hostent *h, char *buf, size_t buflen,
@@ -11,6 +11,7 @@
#include <arpa/inet.h> /* inet_pton */
#include <sys/ioctl.h>
+#include <sys/socket.h>
typedef union {
struct sockaddr_in6 v6;
@@ -6,8 +6,6 @@
static void *do_nameindex(int s, size_t n)
size_t i, len, k;
#include <arpa/inet.h>
-#include <netdb.h>
/* do we really need all these?? */
ssize_t recv(int fd, void *buf, size_t len, int flags)
+#include <resolv.h>
#include "__dns.h"
ssize_t send(int fd, const void *buf, size_t len, int flags)
void endservent(void)
#include "pwf.h"
struct group *fgetgrent(FILE *f)
struct passwd *fgetpwent(FILE *f)
#include <pwd.h>
uint64_t __rand48_step(unsigned short *xi, unsigned short *lc)
void __procfdname(char *, unsigned);
+#include <stdlib.h>
#include <signal.h>
#include <spawn.h>
@@ -7,8 +7,6 @@
struct match
@@ -30,7 +30,6 @@
#include <regex.h>
int sigfillset(sigset_t *set)
int sighold(int sig)
int sigignore(int sig)
int siginterrupt(int sig, int flag)
int sigismember(const sigset_t *set, int sig)
#include <setjmp.h>