include cleanups: remove unused headers and add feature test macros
authorSzabolcs Nagy <nsz@port70.net>
Thu, 12 Dec 2013 05:09:18 +0000 (05:09 +0000)
committerSzabolcs Nagy <nsz@port70.net>
Thu, 12 Dec 2013 05:09:18 +0000 (05:09 +0000)
157 files changed:
src/ctype/__ctype_b_loc.c
src/ctype/__ctype_get_mb_cur_max.c
src/ctype/__ctype_tolower_loc.c
src/ctype/__ctype_toupper_loc.c
src/dirent/fdopendir.c
src/dirent/opendir.c
src/dirent/readdir.c
src/dirent/readdir_r.c
src/dirent/scandir.c
src/env/__init_security.c
src/env/__stack_chk_fail.c
src/env/clearenv.c
src/env/putenv.c
src/env/unsetenv.c
src/exit/atexit.c
src/exit/exit.c
src/fcntl/fcntl.c
src/fcntl/open.c
src/fcntl/openat.c
src/internal/syscall_ret.c
src/ldso/dlinfo.c
src/legacy/euidaccess.c
src/legacy/futimes.c
src/legacy/getdtablesize.c
src/legacy/getpagesize.c
src/legacy/getpass.c
src/legacy/getusershell.c
src/legacy/lutimes.c
src/linux/chroot.c
src/linux/clock_adjtime.c
src/linux/klogctl.c
src/linux/personality.c
src/linux/prlimit.c
src/linux/sendfile.c
src/linux/setfsgid.c
src/linux/setfsuid.c
src/linux/setgroups.c
src/linux/sethostname.c
src/linux/setns.c
src/linux/stime.c
src/linux/sysinfo.c
src/linux/wait4.c
src/locale/intl.c
src/locale/localeconv.c
src/locale/strcasecmp_l.c
src/malloc/calloc.c
src/misc/get_current_dir_name.c
src/misc/getgrouplist.c
src/misc/getrusage.c
src/misc/initgroups.c
src/misc/nftw.c
src/misc/syslog.c
src/misc/uname.c
src/mman/msync.c
src/mman/munmap.c
src/multibyte/internal.c
src/multibyte/internal.h
src/multibyte/mblen.c
src/multibyte/mbrlen.c
src/multibyte/mbrtowc.c
src/multibyte/mbsinit.c
src/multibyte/mbsnrtowcs.c
src/multibyte/mbsrtowcs.c
src/multibyte/mbtowc.c
src/multibyte/wcrtomb.c
src/multibyte/wcsnrtombs.c
src/multibyte/wcsrtombs.c
src/multibyte/wctomb.c
src/network/__ipparse.c
src/network/gethostbyaddr.c
src/network/gethostbyname2.c
src/network/gethostbyname2_r.c
src/network/getifaddrs.c
src/network/getnameinfo.c
src/network/if_nameindex.c
src/network/inet_ntop.c
src/network/proto.c
src/network/recv.c
src/network/res_query.c
src/network/send.c
src/network/serv.c
src/passwd/fgetgrent.c
src/passwd/fgetpwent.c
src/passwd/putgrent.c
src/passwd/putpwent.c
src/prng/__rand48_step.c
src/process/fexecve.c
src/process/system.c
src/process/vfork.c
src/regex/glob.c
src/regex/regcomp.c
src/signal/raise.c
src/signal/sigaction.c
src/signal/sigfillset.c
src/signal/sighold.c
src/signal/sigignore.c
src/signal/siginterrupt.c
src/signal/sigismember.c
src/signal/siglongjmp.c
src/signal/signal.c
src/signal/sigpause.c
src/signal/sigqueue.c
src/signal/sigrelse.c
src/signal/sigset.c
src/signal/sigsetjmp.c
src/stat/fchmodat.c
src/stat/futimesat.c
src/stat/lchmod.c
src/stdio/fgetln.c
src/stdio/fwide.c
src/stdio/swprintf.c
src/stdio/swscanf.c
src/stdio/vfscanf.c
src/stdio/vfwscanf.c
src/stdlib/ecvt.c
src/stdlib/gcvt.c
src/stdlib/wcstod.c
src/string/bcmp.c
src/string/bcopy.c
src/string/bzero.c
src/string/index.c
src/string/memccpy.c
src/string/memchr.c
src/string/memmem.c
src/string/mempcpy.c
src/string/rindex.c
src/string/stpcpy.c
src/string/stpncpy.c
src/string/strchrnul.c
src/string/strlcpy.c
src/string/strlen.c
src/string/strstr.c
src/string/strverscmp.c
src/string/wcsstr.c
src/string/wmemchr.c
src/string/wmemcmp.c
src/string/wmemcpy.c
src/string/wmemmove.c
src/string/wmemset.c
src/temp/__randname.c
src/temp/mkdtemp.c
src/temp/mktemp.c
src/termios/tcgetattr.c
src/termios/tcsetattr.c
src/thread/pthread_attr_init.c
src/thread/pthread_sigmask.c
src/thread/synccall.c
src/time/mktime.c
src/time/nanosleep.c
src/time/strptime.c
src/time/time.c
src/time/wcsftime.c
src/unistd/ctermid.c
src/unistd/gethostname.c
src/unistd/getlogin_r.c
src/unistd/ttyname_r.c
src/unistd/usleep.c

index 6e93dc07d3bfdb01cd9e20f3471c0306fd1d584f..f43795e949403598d23a2233f6b3556ace1b2120 100644 (file)
@@ -1,4 +1,3 @@
-#include <ctype.h>
 #include <endian.h>
 
 #if __BYTE_ORDER == __BIG_ENDIAN
index 42e4ee71362d7c26df619ac9d45917a37e381ab7..d235f4da3e7520088495a61cd51e1e7ceb8ea1ab 100644 (file)
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include <stddef.h>
 
 size_t __ctype_get_mb_cur_max()
 {
index 62ce69a63bdae9d608e98bc01d5f5db4b19526b8..efb9910545c4a536eaf2079fb403343232654225 100644 (file)
@@ -1,5 +1,4 @@
-#include <ctype.h>
-#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,
index 1556164570fdfc8ef4fe50dc1a66699f1dff01eb..ffaef0e91ffbb6dcccef6702345e252833fc22d9 100644 (file)
@@ -1,5 +1,4 @@
-#include <ctype.h>
-#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,
index c684a866a3079d1d46a1d403615c4568a9713249..c377271da53919acb39f5929ded9d77f874f7e55 100644 (file)
@@ -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)
index d33d89280dfc86e9558d17b0c34a7b1a4f6ebad1..5cb84e303feea1746c64e3b255bd7fe76389e49b 100644 (file)
@@ -1,11 +1,7 @@
 #define _GNU_SOURCE
 #include <dirent.h>
 #include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <limits.h>
 #include "__dirent.h"
 #include "syscall.h"
 
index 2d27d29a4ca51175fcf1437651bcae5f61f2b092..98ec029e6b983bb9de2d3a86d2cf296dac5dd325 100644 (file)
@@ -1,11 +1,5 @@
 #include <dirent.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <limits.h>
 #include "__dirent.h"
-#include "syscall.h"
 #include "libc.h"
 
 int __getdents(int, struct dirent *, size_t);
index 639d49a17712053a08ae7453938f0c10ee40e770..daa6c6ed608449051ae46fcf800fa521dbc24fa1 100644 (file)
@@ -1,6 +1,5 @@
 #include <dirent.h>
 #include <errno.h>
-#include <stdlib.h>
 #include <string.h>
 #include "__dirent.h"
 #include "libc.h"
index a85cfac115b7dcf034b37c9cdc3531105b278c17..3af2b50f81920aeba1fa2731b44cf8aa19fa5140 100644 (file)
@@ -1,10 +1,10 @@
 #include <dirent.h>
 #include <string.h>
 #include <stdlib.h>
-#include <inttypes.h>
+#include <stdint.h>
 #include <errno.h>
 #include <stddef.h>
-#include <libc.h>
+#include "libc.h"
 
 int scandir(const char *path, struct dirent ***res,
        int (*sel)(const struct dirent *),
index 91b9b1001ac97949c6c05c0b3294abf33487e2a7..6204c5e1e34f4f76da38af2f263b5f853497f55a 100644 (file)
@@ -1,4 +1,3 @@
-#include <stddef.h>
 #include <elf.h>
 #include <poll.h>
 #include <fcntl.h>
index 031a1ed7058e4aefd498cc4a379858eacc2ac9c2..daa1b0783a890c07c385431dd2de7026e994fcd4 100644 (file)
@@ -1,6 +1,5 @@
 #include <string.h>
-#include <inttypes.h>
-#include <elf.h>
+#include <stdint.h>
 #include "pthread_impl.h"
 #include "atomic.h"
 
index a2475ce76cef3be53299676568fb6f414d4a1a03..62d50952dabffc7a8931266cc3fb56f6e4b25cfd 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <stdlib.h>
 
 extern char **__environ;
index d141db138893c55f3c13575f794817d75b001b7f..4042869b500f1866e111918f121ba3d08d962287 100644 (file)
@@ -1,7 +1,5 @@
 #include <stdlib.h>
 #include <string.h>
-#include <errno.h>
-#include <stdio.h>
 
 extern char **__environ;
 char **__env_map;
index 7493d97084dd4480b2589464d56791c6ab917926..356933546a31a41ad859c3bc08709aa76a5a2644 100644 (file)
@@ -1,4 +1,3 @@
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
index c31f3dc35261ff6ddc73d9325463c86f117ec926..89ff4ff35a30e41b84b0559ef964aa072e23e36c 100644 (file)
@@ -1,7 +1,5 @@
-#include <stddef.h>
 #include <stdlib.h>
 #include <stdint.h>
-#include <limits.h>
 #include "libc.h"
 
 /* Ensure that at least 32 atexit handlers can be registered without malloc */
index f259c98278ed3f83edbb8672a1ccd838a429f241..353f50b78ef1c9fb4b3d57c6947ec20d1f8ef620 100644 (file)
@@ -1,6 +1,5 @@
 #include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
+#include <stdint.h>
 #include "libc.h"
 #include "atomic.h"
 #include "syscall.h"
index 390ef758acfaaf9ea01db00efffc607f7888b8d3..4c34ba04f9ad0736b3cbbc32b3e94005632f692e 100644 (file)
@@ -1,6 +1,5 @@
 #define _GNU_SOURCE
 #include <fcntl.h>
-#include <unistd.h>
 #include <stdarg.h>
 #include <errno.h>
 #include "syscall.h"
index 31d6744c753ff125b90f8a0c38dd5db3249c7d44..be442089a894aad8d306a6496c3f9c5acf8f31ac 100644 (file)
@@ -1,5 +1,4 @@
 #include <fcntl.h>
-#include <unistd.h>
 #include <stdarg.h>
 #include "syscall.h"
 #include "libc.h"
index bdecb8c8fcbbbf1d8258c5c0bab56b54297986fe..634c4bf3cd6e4ade40c2353bd3bec7e65480c81c 100644 (file)
@@ -1,5 +1,4 @@
 #include <fcntl.h>
-#include <unistd.h>
 #include <stdarg.h>
 #include "syscall.h"
 #include "libc.h"
index e4a1bdbe03f3cd0c1c64c355fcf0fc2ad592c0ba..d99f4a5090c948938f31f4d9a4ce0bff01ac53b5 100644 (file)
@@ -1,5 +1,4 @@
 #include <errno.h>
-#include <unistd.h>
 
 long __syscall_ret(unsigned long r)
 {
index 4748eaf8ca9d181f1d7b6ae8d2e7746cbce5fbf7..63d276d408e34fe667476f43dd41bdf8da0deb4f 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <dlfcn.h>
 
 int __dlinfo(void *, int, void *);
index 47b464d357c2666e35605334182656619e42a396..73072513a8fac82ea15ca4be1d13e12973de4c7b 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include <fcntl.h>
 #include "libc.h"
index f8fd1cde9e1b0b441dc9d4c46aeb7d1624c02cf4..d81d83a962a8675a2dd74c6717d4c21828093a9d 100644 (file)
@@ -1,6 +1,6 @@
+#define _GNU_SOURCE
 #include <sys/stat.h>
 #include <sys/time.h>
-#include <fcntl.h>
 
 int futimes(int fd, const struct timeval tv[2])
 {
index 623a6af3296d10d942a011b401dd40878c7d932e..682da6d067583f4382d9b1f2accc8115e66af3ab 100644 (file)
@@ -1,3 +1,5 @@
+#define _GNU_SOURCE
+#include <unistd.h>
 #include <limits.h>
 #include <sys/resource.h>
 
index a47995cb69df7f922699b1c719ba51cba16ffa80..0fc29ffcdf0f807431be882bbf7694c3ea97e6fc 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "libc.h"
 
index d439a2a57fb606aa9f08c22b46320c9403597d76..3565d95f86b410c1331ccb4c7b7dc68ba8e3e02c 100644 (file)
@@ -1,5 +1,5 @@
+#define _GNU_SOURCE
 #include <stdio.h>
-#include <string.h>
 #include <termios.h>
 #include <unistd.h>
 #include <fcntl.h>
index f31f4042f928f2254c69f66f73d8c5aa74449b58..5fecdec2e44196f19a53dc4fd15018abc47bbb8c 100644 (file)
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
+#include <unistd.h>
 
 static const char defshells[] = "/bin/sh\n/bin/csh\n";
 
index 13dfe4ef09091558a1749acd4dbfedd43145e0c3..2e5502d1e38f430db52e699ebbcbebe7fa3a5670 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <fcntl.h>
index 82b4fe75c6bd183aec7b95caa3ff00826f35ecf2..0e69f145dee37cbdc865f6cf6e222a1658d58cdc 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "syscall.h"
 
index 1fc9bef4dd11b9138fecc9a1db071ac4bc9efd75..056ad6d34104cfa35064ea293763a94fffbd0372 100644 (file)
@@ -1,5 +1,3 @@
-#define _GNU_SOURCE
-#include <time.h>
 #include <sys/timex.h>
 #include "syscall.h"
 
index 209ae7421b0088fc3238eed2573cfab9e30358ac..8102ee641c3047b5d12e3a9722bf50333c897a88 100644 (file)
@@ -1,3 +1,4 @@
+#include <sys/klog.h>
 #include "syscall.h"
 
 int klogctl (int type, char *buf, int len)
index 06851f58b355fc064ff264a9a1310bd16bba03c8..e00cf7997f5461dfe4b30df2324b9e9e46c45640 100644 (file)
@@ -1,3 +1,4 @@
+#include <sys/personality.h>
 #include "syscall.h"
 #ifdef SYS_personality
 int personality(unsigned long persona)
index 1215248431de7eab3518f2ee146014450afd440e..d1639ccaf1c0cbeb742e7d214ee9f6e256d48335 100644 (file)
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#define _GNU_SOURCE
 #include <sys/resource.h>
 #include "syscall.h"
 #include "libc.h"
@@ -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);
index 818b19d31d4018257e99cfbb9a178cf3f551834f..d63f4197bb8b8db64470e02b4b157d05058feaef 100644 (file)
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#include <sys/sendfile.h>
 #include "syscall.h"
 #include "libc.h"
 
index a7ed9e9267b05b48ba510f1389c4b9b057a34654..ad8042250360ce23a49b5be024f8be9e37f54421 100644 (file)
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#include <sys/fsuid.h>
 #include "syscall.h"
 #include "libc.h"
 
index 1509e0aa760fb4b51d7b28c29ac90a01cb53db32..86358731dc9c16fc39b34812cc34a3b96632bcd6 100644 (file)
@@ -1,4 +1,4 @@
-#include <unistd.h>
+#include <sys/fsuid.h>
 #include "syscall.h"
 #include "libc.h"
 
index 9758940af2c57eaa4a836d8e34cc34ea073bba3c..1248fdbfdc83c10c9fea5a3a51d5be0edb905869 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "syscall.h"
 
index 79a87078c936e7c71707eaef23668cdf798a93d5..9313b3245574720836f74a22ba052d7fc3e7b319 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "syscall.h"
 
index 7029b7480571fd6614eeca5f93ca416ebbb17149..0afec813f126c9d21b41d879ad930bbe48bfc0ea 100644 (file)
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <sched.h>
 #include "syscall.h"
-#include "libc.h"
 
 int setns(int fd, int nstype)
 {
index 6a7e9e813cea207257e6241c1a8469ef8b8c8bdb..29a1ec64a2e290ba6555fc48f2c59bb523bc7a41 100644 (file)
@@ -1,4 +1,5 @@
 #define _GNU_SOURCE
+#include <time.h>
 #include <sys/time.h>
 
 int stime(time_t *t)
index 2dbd0ad9237c0147834b81dc6ae44dbb548590c2..7e64f330a184e451457cd4475ece471c790e7669 100644 (file)
@@ -1,7 +1,6 @@
+#include <sys/sysinfo.h>
 #include "syscall.h"
 
-struct sysinfo;
-
 int sysinfo(struct sysinfo *info)
 {
        return syscall(SYS_sysinfo, info);
index b3ae75e3229dc92c9af09eddd0cd4408913fcf2d..97f12cc524685182d13121c4fd49c17205e1af2c 100644 (file)
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <sys/wait.h>
 #include <sys/resource.h>
-#include <string.h>
 #include "syscall.h"
 
 pid_t wait4(pid_t pid, int *status, int options, struct rusage *usage)
index 964f7da19482f43bdda13e02f750a68ce1109363..ad040524ba79b436addcd72e59eca5eda29672cc 100644 (file)
@@ -1,3 +1,4 @@
+#include <libintl.h>
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
index 494cbcc0a822b20535e00f24e64e3b6c790ed2bc..cbc75d7a45693303d786fb554d70a56abc1b44a7 100644 (file)
@@ -1,6 +1,4 @@
 #include <locale.h>
-#include <string.h>
-#include <stdlib.h>
 
 static const struct lconv posix_lconv = {
        .decimal_point = ".",
index eea2f80ba8f0a5363dc05e3eed80d11466c0d0ec..ca8054308bf1caf058ddb0f219a826cb751bcd2f 100644 (file)
@@ -1,5 +1,4 @@
 #include <strings.h>
-#include <ctype.h>
 
 int strcasecmp_l(const char *l, const char *r, locale_t loc)
 {
index 9d5745628bb5667decc76a6a244cb450f39b92d8..c3dfb4732e17215e6e1fd12dd8135424907afaac 100644 (file)
@@ -1,6 +1,5 @@
 #include <stdlib.h>
 #include <errno.h>
-#include <string.h>
 
 void *calloc(size_t m, size_t n)
 {
index e0f463b5caa21b2702dd9b4ba25994a6ab177c66..8576df2c3dce2f33f3df68eb35986c853c3d48bc 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <stdlib.h>
 #include <string.h>
 #include <limits.h>
index 63557afe87681b07de17faa1804ea356bf15820e..c9a8f090da19f911d6ee3c1a97a081b139f890f3 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <grp.h>
 #include <string.h>
 #include <limits.h>
index a5cbd757dbf3a5f8cd7682adf289e44206d42fd7..0aaf0ac72ee9c04055afe0d3072f8b1c9736cebe 100644 (file)
@@ -1,5 +1,4 @@
 #include <sys/resource.h>
-#include <string.h>
 #include "syscall.h"
 
 int getrusage(int who, struct rusage *ru)
index 545d1859734493b92752ec7a49c09e56f9b6f0f5..922a958142b0ad7b1f331f30725ecec29b91a309 100644 (file)
@@ -1,11 +1,7 @@
-#include <sys/types.h>
-#include <unistd.h>
+#define _GNU_SOURCE
 #include <grp.h>
 #include <limits.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];
index 63d6aff54d665768235a22f4684cf25edd059879..b2e84bca5ea3a4ef1636240e82a0dff269f19b90 100644 (file)
@@ -2,8 +2,6 @@
 #include <dirent.h>
 #include <sys/stat.h>
 #include <errno.h>
-#include <stdlib.h>
-#include <fcntl.h>
 #include <unistd.h>
 #include <string.h>
 #include <limits.h>
index ba9cc62b67626d4d621649660a2ab5f15830ac26..1cd61ce444b2663d3f46f667f1976cb0a9479fd9 100644 (file)
@@ -1,7 +1,6 @@
 #include <stdarg.h>
 #include <sys/socket.h>
 #include <stdio.h>
-#include <fcntl.h>
 #include <unistd.h>
 #include <syslog.h>
 #include <time.h>
index 46db90d30bf7a32f87085db5d5e57ddba4992a69..55ea3420232c9999bd3bbcf5f31c5bf74946ac9e 100644 (file)
@@ -1,5 +1,4 @@
 #include <sys/utsname.h>
-#include <string.h>
 #include "syscall.h"
 
 int uname(struct utsname *uts)
index eaf35d3bcc0789586c695df007737aec069ce6ee..bb20475b4de3c38effeb0e753b99163c520c020a 100644 (file)
@@ -1,4 +1,3 @@
-#include <unistd.h>
 #include <sys/mman.h>
 #include "syscall.h"
 
index 91aefd407f5071e348dc020aa98c3719bb6b8931..8488d75ce5294af1f60ffc2bb9dd81d18e991a2b 100644 (file)
@@ -1,4 +1,3 @@
-#include <unistd.h>
 #include <sys/mman.h>
 #include "syscall.h"
 #include "libc.h"
index ab22806ecb387d99a21303dba3994c3500f09dfa..1813b266c75d29e19324d97512fbe2168c856f5a 100644 (file)
@@ -4,8 +4,6 @@
  * unnecessary.
  */
 
-#include <inttypes.h>
-
 #include "internal.h"
 
 #define C(x) ( x<2 ? -1 : ( R(0x80,0xc0) | x ) )
index 25ba240e06269927dda0380b027c3f5e9c08f630..82f5a07e58011c3756fde0db6f109743a5d6f7ed 100644 (file)
@@ -6,6 +6,7 @@
 
 #define bittab __fsmu8
 
+#include <stdint.h>
 #include "libc.h"
 
 extern const uint32_t bittab[] ATTR_LIBC_VISIBILITY;
index 26d356494a61d79d150e08b68d1a454539e54b76..96b47b123842ba9810a63d7617a2c1c199fe7b7f 100644 (file)
@@ -5,11 +5,6 @@
  */
 
 #include <stdlib.h>
-#include <inttypes.h>
-#include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 int mblen(const char *s, size_t n)
 {
index c9714ef82244a7a16d57ae37bbcba64e9a86faa3..3a5a74336287fc71d167b30433911b3e3d66b009 100644 (file)
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict st)
 {
index db803661411519744cb195a802ef52093d0ce4a9..35e834ee6af711da7d6ab077d0674966d690bba7 100644 (file)
@@ -4,11 +4,8 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
 #include <errno.h>
-
 #include "internal.h"
 
 size_t mbrtowc(wchar_t *restrict wc, const char *restrict src, size_t n, mbstate_t *restrict st)
index c0e7e494232a91802c0430e391bc128dd9ce4d6d..e001d84443664406ad9d3a98ea59afe9316ee552 100644 (file)
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 int mbsinit(const mbstate_t *st)
 {
index 33457f95bdccd6e68b56123f88e84522c7d9bad7..68b9960f375e3b3dcbe5f4f5de9d6a8a543be104 100644 (file)
@@ -4,13 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-#include <stdio.h>
-
-#include "internal.h"
 
 size_t mbsnrtowcs(wchar_t *restrict wcs, const char **restrict src, size_t n, size_t wn, mbstate_t *restrict st)
 {
index 066cce600772de1d331a3594b4d5efe68f31f871..3c1343aea81f82d30dd055a5406b5ef63267ffc7 100644 (file)
@@ -4,11 +4,9 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
+#include <stdint.h>
 #include <wchar.h>
 #include <errno.h>
-
 #include "internal.h"
 
 size_t mbsrtowcs(wchar_t *restrict ws, const char **restrict src, size_t wn, mbstate_t *restrict st)
index ec9e54ad07b4ae11015b73671064adb307236c3b..6710637ade41ee0cc1f8bc5d3d07b333561ac11c 100644 (file)
@@ -4,13 +4,10 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
 #include <errno.h>
-
 #include "internal.h"
-#include <stdio.h>
+
 int mbtowc(wchar_t *restrict wc, const char *restrict src, size_t n)
 {
        unsigned c;
index 250649f55b4fb707b4216b96f9d9e2dba96968a7..59f733db6e33dac743c89a8927fd2cbdb9f87c31 100644 (file)
@@ -4,13 +4,9 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
 #include <errno.h>
 
-#include "internal.h"
-
 size_t wcrtomb(char *restrict s, wchar_t wc, mbstate_t *restrict st)
 {
        if (!s) return 1;
index a2e308b3be62e0eeb720a2ae19c4d16d14abb7aa..7eb05d459ab826fbba890d52796302d799b1b251 100644 (file)
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t *restrict st)
 {
index d48a65e74aaccdb151437bcbfd64b0aac1136a1a..5cf8f3eb704753d60b2a778966dd4ae8c28057a4 100644 (file)
@@ -4,12 +4,7 @@
  * unnecessary.
  */
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 size_t wcsrtombs(char *restrict s, const wchar_t **restrict ws, size_t n, mbstate_t *restrict st)
 {
index 6910ef37f5041f88fe829a4dc25c68cbd9238671..de7ed84d9bbcfc83d5c8e77a45a1677b8a7ab971 100644 (file)
@@ -5,11 +5,7 @@
  */
 
 #include <stdlib.h>
-#include <inttypes.h>
 #include <wchar.h>
-#include <errno.h>
-
-#include "internal.h"
 
 int wctomb(char *s, wchar_t wc)
 {
index 2480265bd6d4e24ca7f48d5e01724c6ee1d75c19..79f3b8cfeedfd5af0c7e47f09d49af39eee0bbe1 100644 (file)
@@ -1,4 +1,3 @@
-#include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <sys/socket.h>
index c9b6388a415b5c5aa78c449003cf8ce3519b84b6..598e2241a9f808e8ecafb72e24d7d6959cb49a28 100644 (file)
@@ -1,8 +1,6 @@
 #define _GNU_SOURCE
 
 #include <netdb.h>
-#include <string.h>
-#include <netinet/in.h>
 #include <errno.h>
 #include <stdlib.h>
 
index c9f90da2d3d6fb387cdba87cbbbb011fd02b84d6..dc9d6621be5655389327813001e8e49dfadbe79a 100644 (file)
@@ -2,8 +2,6 @@
 
 #include <sys/socket.h>
 #include <netdb.h>
-#include <string.h>
-#include <netinet/in.h>
 #include <errno.h>
 #include <stdlib.h>
 
index 0dc6dc00d62ccb7e7174d4ab9cf869818a797eb8..27eb080f8502128179fcaa92a9bf15c8b66ea4f9 100644 (file)
@@ -5,7 +5,7 @@
 #include <string.h>
 #include <netinet/in.h>
 #include <errno.h>
-#include <inttypes.h>
+#include <stdint.h>
 
 int gethostbyname2_r(const char *name, int af,
        struct hostent *h, char *buf, size_t buflen,
index fc49929a7a667a60630be60e12251443a3bed78a..5a94cc7c4496fe4edda2938dc672c9a3301d0552 100644 (file)
@@ -11,6 +11,7 @@
 #include <arpa/inet.h> /* inet_pton */
 #include <unistd.h>
 #include <sys/ioctl.h>
+#include <sys/socket.h>
 
 typedef union {
        struct sockaddr_in6 v6;
index 3d115c75ce217202030f4cb3907033cc4eaf5e3e..33f89a38efe844fe6475795293ce2ad71da3760b 100644 (file)
@@ -1,6 +1,5 @@
 #include <netdb.h>
 #include <limits.h>
-#include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <sys/socket.h>
index ad0a76624bf85bb5500998b07868570b14948a4f..53b80b21dc5570d84ea6bc44b9f94f6010e2a847 100644 (file)
@@ -6,8 +6,6 @@
 #include <errno.h>
 #include "syscall.h"
 
-#include <stdio.h>
-
 static void *do_nameindex(int s, size_t n)
 {
        size_t i, len, k;
index ca3334375128e086bcd49ec6e7c941de769d4ec8..14f9f4c4018ed5dc0a3a4c9db1839c411135bfad 100644 (file)
@@ -1,7 +1,5 @@
 #include <sys/socket.h>
-#include <netinet/in.h>
 #include <arpa/inet.h>
-#include <netdb.h>
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
index 8c25c53a55302ac9a1a4f1783520b2cae7c62b15..031003ad0cf490b4e2e01714e27d179693e51553 100644 (file)
@@ -1,5 +1,4 @@
 #include <netdb.h>
-#include <stdio.h>
 #include <string.h>
 
 /* do we really need all these?? */
index d04a54aa8924aa98b5b16e8b48a6308ccd1db489..59700485bdecb1e7e81b2a1ddbb44a08149db788 100644 (file)
@@ -1,6 +1,4 @@
 #include <sys/socket.h>
-#include "syscall.h"
-#include "libc.h"
 
 ssize_t recv(int fd, void *buf, size_t len, int flags)
 {
index c3ad10901ac6fbbe4120c64f888be65e98e49452..3847da375de84e1416ac9486c34384cd8d524613 100644 (file)
@@ -1,4 +1,5 @@
 #define _GNU_SOURCE
+#include <resolv.h>
 #include <netdb.h>
 #include "__dns.h"
 #include "libc.h"
index b6ec310124523cfee7e8a11f92c3cac678d88749..9f104977321182758eb59d5f9fb17326dfc3f8b5 100644 (file)
@@ -1,6 +1,4 @@
 #include <sys/socket.h>
-#include "syscall.h"
-#include "libc.h"
 
 ssize_t send(int fd, const void *buf, size_t len, int flags)
 {
index 5ade6ad1feb692bce21289e068d5cab6d8b9c00b..41424e80637d71fe07a469cec972238575f97136 100644 (file)
@@ -1,6 +1,4 @@
 #include <netdb.h>
-#include <stdio.h>
-#include <string.h>
 
 void endservent(void)
 {
index 2f18d9251f37364fee8ab4cf41923d146ad38c51..d8d1c77362549eaede7f4ecb32879daf18f9977a 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include "pwf.h"
 
 struct group *fgetgrent(FILE *f)
index e95fdb2c66b1d3ca00a85474f951ff21ddd36115..eb47b2a119379b4df9d5c0d1c06d463723cd2ebb 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include "pwf.h"
 
 struct passwd *fgetpwent(FILE *f)
index 6f26c05167d991d820c170adb4845d9baaf2a04f..a0b320fc32692bc244d40f0c0191f8d94eefb388 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <grp.h>
 #include <stdio.h>
 
index 80fbf3843d5e5909f1b6d74644cd1e11ed050b2e..3a02e5730482044d56e1458b26360fefa3f85541 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <pwd.h>
 #include <stdio.h>
 
index 105f810ff017d51e8979b049bae0167ec612a497..ccaffc37b199df1afd18371a87333d8265625d58 100644 (file)
@@ -1,4 +1,3 @@
-#include <stdlib.h>
 #include <stdint.h>
 
 uint64_t __rand48_step(unsigned short *xi, unsigned short *lc)
index 8ab02a74683dc8b7f2911e22c8874bbc94ac6484..6507b42949c915e757bfa71935388a0ea4e0a15d 100644 (file)
@@ -1,5 +1,4 @@
 #include <unistd.h>
-#include <stdio.h>
 #include <errno.h>
 
 void __procfdname(char *, unsigned);
index f5b7b492e64eb6a4fdcbe1ba6af6b8d89432c017..8cbdda060d0275c7fd6480b2be676b7c25945d3e 100644 (file)
@@ -1,5 +1,5 @@
 #include <unistd.h>
-#include <fcntl.h>
+#include <stdlib.h>
 #include <signal.h>
 #include <sys/wait.h>
 #include <spawn.h>
index 16d07ea70598228668cfa68446d84e33b74123e3..fc4adb464f13c85fc25fc5d5f967d511e13f22eb 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include "syscall.h"
 #include "libc.h"
index 6c07e6b3b5f817f57af09cd9e0a74a0d85bb0fc7..6affee040c310f435008d227c73bfee7eacab3cb 100644 (file)
@@ -7,8 +7,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <stddef.h>
-#include <unistd.h>
-#include <stdio.h>
 #include "libc.h"
 
 struct match
index 16337542205c2c63cd513ca8da32692fca54e873..d90762751de177d920573adee799ddbd727765ad 100644 (file)
@@ -30,7 +30,6 @@
 */
 
 #include <string.h>
-#include <errno.h>
 #include <stdlib.h>
 #include <regex.h>
 #include <limits.h>
index 6fa43bef97ee1508c23e1dd1328e588ddcf68cf4..35063c5b89c78ae37405cf299626b0fe20a38aca 100644 (file)
@@ -1,5 +1,4 @@
 #include <signal.h>
-#include <errno.h>
 #include <stdint.h>
 #include "syscall.h"
 #include "pthread_impl.h"
index 5499bd181c37c06978f4c0a55d9571078b9faffd..f7ff4a6198b302232a83a883c860953142fd438e 100644 (file)
@@ -1,4 +1,3 @@
-#include <stdlib.h>
 #include <signal.h>
 #include <errno.h>
 #include <string.h>
index 4d0a807a97f02bb1e669f2110d222b55f1eb8dbd..16e7b4f5bc420516ad70ef636524fe4084dfc730 100644 (file)
@@ -1,5 +1,4 @@
 #include <signal.h>
-#include <string.h>
 #include <limits.h>
 
 int sigfillset(sigset_t *set)
index 5b0f6b1880c9525b47671e977f71466b5f0479ee..992812fd0cb0ba342c0ec6e04ad5fc3998022c46 100644 (file)
@@ -1,5 +1,5 @@
 #include <signal.h>
-#include <stdlib.h>
+#include <stddef.h>
 
 int sighold(int sig)
 {
index 98dff61e22da7f51d623b26410fe307544457ccf..78bd747413d67cbf50aa0395b2b8bd58edc01fd1 100644 (file)
@@ -1,5 +1,5 @@
 #include <signal.h>
-#include <stdlib.h>
+#include <stddef.h>
 
 int sigignore(int sig)
 {
index 60b3405426bb646596bd55b1ffdfa1b28bd03249..94f92be6aae4b53d349ff12a291bac060aa2acd5 100644 (file)
@@ -1,4 +1,4 @@
-#include <stdlib.h>
+#include <stddef.h>
 #include <signal.h>
 
 int siginterrupt(int sig, int flag)
index dd1a8dbed435c290da29b8269040f7a51627fbab..ab87d62249de487cdb1c0990ffa26acf60160ade 100644 (file)
@@ -1,5 +1,4 @@
 #include <signal.h>
-#include <errno.h>
 
 int sigismember(const sigset_t *set, int sig)
 {
index 2974ff7fc49f9067139db95c72c99f5859121b19..b644cebb98f60b4526919a9637ed5803426e67a4 100644 (file)
@@ -1,6 +1,5 @@
 #include <setjmp.h>
 #include <signal.h>
-#include <stdlib.h>
 #include "syscall.h"
 #include "pthread_impl.h"
 
index 9d2f23ab77560d8852fb14e51c0bc07031cc3866..c0f063edb2fa8137f0fd77a91b4d67b03708dc36 100644 (file)
@@ -1,5 +1,4 @@
 #include <signal.h>
-#include <stddef.h>
 #include "syscall.h"
 #include "libc.h"
 
index 6c0f05dfb0d7708d395c9580db367158ffa27159..363d2fec27f9cc720cbbef0236061b4bd0c2159a 100644 (file)
@@ -1,5 +1,4 @@
 #include <signal.h>
-#include <stdlib.h>
 
 int sigpause(int sig)
 {
index eb4d184fba7ea721abbe5a43498fb13d78c8e908..b75f0c5cea42f7f03a23ef3f130d1c507f8c2df4 100644 (file)
@@ -1,7 +1,6 @@
 #include <signal.h>
 #include <string.h>
 #include <unistd.h>
-#include <stdint.h>
 #include "syscall.h"
 #include "pthread_impl.h"
 
index b0b3024b9d4b10da870cf3f8bd84fbc787a4f44c..31c1a030fe52708925cdb8fe96a227ff1537210b 100644 (file)
@@ -1,5 +1,5 @@
 #include <signal.h>
-#include <stdlib.h>
+#include <stddef.h>
 
 int sigrelse(int sig)
 {
index 1b6b38fdde054954c74154f2b9c416af715aa9bf..cbe462847f70c5083038420595e78f2815428efb 100644 (file)
@@ -1,5 +1,5 @@
 #include <signal.h>
-#include <stdlib.h>
+#include <stddef.h>
 
 void (*sigset(int sig, void (*handler)(int)))(int)
 {
index 6a5f6f158e3756c3a9f3ba70f0a19806968a1be5..cb2257f0c45f8918c9e409052d8b3e322bd5a67a 100644 (file)
@@ -1,6 +1,5 @@
 #include <setjmp.h>
 #include <signal.h>
-#include <stdlib.h>
 
 /* !!! This function will not work unless the compiler performs
  * tail call optimization. Machine-specific asm versions should
index aeb50bc5741aa3740c13f78cc95319ffb7e26207..12e7ff0cd17f90209cfb979c7a7096e2767e052a 100644 (file)
@@ -1,7 +1,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <stdio.h>
 #include "syscall.h"
 
 void __procfdname(char *, unsigned);
index 0cc185454db095f18cbff97aa37e4a4f6ae9bfb0..dbefc844c46e092067a4650a8db1e59857192269 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <sys/time.h>
 #include "syscall.h"
 
index c35f586116f50a3520524858c5e938cc088bd3ba..f324ba798334e8168a14e8b781fd4c15accd6076 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <sys/stat.h>
 #include <fcntl.h>
 
index a2e4bd3cc5bf1c1e9aa2bc927b88cdc02c02fba5..afe12b5dfe024add1739f80d5982eefef76d7567 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include "stdio_impl.h"
 #include <string.h>
 
index 48480685aa4b63a664ccc842548aa8f663c9b662..fdf8e4bb334706ad8e4d2f911de30876e50b3bd4 100644 (file)
@@ -1,3 +1,4 @@
+#include <wchar.h>
 #include "stdio_impl.h"
 
 #define SH (8*sizeof(int)-1)
index cbf83d235d8e0e436ff942cc1915f33b35848147..f75eb112e7c0d7e22b79c03204cc00c6af7575e7 100644 (file)
@@ -1,4 +1,3 @@
-#include <stdio.h>
 #include <stdarg.h>
 #include <wchar.h>
 
index c7986096fb1835749f451a2e92d0c53f7647feed..d893fbacf13c7c3340091e42313f3539bca71117 100644 (file)
@@ -1,4 +1,3 @@
-#include <stdio.h>
 #include <stdarg.h>
 #include <wchar.h>
 #include "libc.h"
index c0e607f533ed355328a33fc7861965b5d4df40a5..0091a8d49188ff44cfc22ca1a5e2c8a8fc6fbeb1 100644 (file)
@@ -5,10 +5,7 @@
 #include <wctype.h>
 #include <limits.h>
 #include <string.h>
-#include <errno.h>
-#include <math.h>
-#include <float.h>
-#include <inttypes.h>
+#include <stdint.h>
 
 #include "stdio_impl.h"
 #include "shgetc.h"
index 75f04d725719f412328b7fcb8f143d88fa14a479..f8f4b70fded0c7aae0acd2e7f05ec8efdc426515 100644 (file)
@@ -6,9 +6,6 @@
 #include <wctype.h>
 #include <limits.h>
 #include <string.h>
-#include <errno.h>
-#include <math.h>
-#include <float.h>
 
 #include "stdio_impl.h"
 #include "shgetc.h"
index 79c3de63debfde0edb068f24bf6e10fd323f3c47..797b664ecfebc0841a23bae84aa62a70c5359e41 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <stdlib.h>
 #include <stdio.h>
 
index 6c075e25851d8b2e90ca5aa680c7f1a0b792dcd1..f29bc304e5bad0459c699422b273d6e381f2c539 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <stdlib.h>
 #include <stdio.h>
 
index 83f308d3b327fd5f140418721dd1196fcbb94a37..26fe9af8b4cc7d7c5f69fbab349d1bb1735f18f8 100644 (file)
@@ -1,6 +1,7 @@
 #include "shgetc.h"
 #include "floatscan.h"
 #include "stdio_impl.h"
+#include <wchar.h>
 #include <wctype.h>
 
 /* This read function heavily cheats. It knows:
index 5d6a388bb4c9537dbb46f6b9a29ab34ba00e97dd..87c6007ee3ccf47902a847d1496bf31508222cef 100644 (file)
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
 #include <string.h>
 #include <strings.h>
 
index e76272fc4dd6514c33031d55254518ec55689e92..a07129f50dd131be1642be364b7ca780cd4fc825 100644 (file)
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
 #include <string.h>
 #include <strings.h>
 
index 0f98b4a5ec02d404d1d06b52e64d967962b208e0..ba536b07e939e907562705fa357c3793cd2eaaf8 100644 (file)
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
 #include <string.h>
 #include <strings.h>
 
index dd611251f5653beb9a815f91a584f39be74121be..252948f9fd5899808f0639c0fc8990d8b7967a28 100644 (file)
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
 #include <string.h>
 #include <strings.h>
 
index b85009c8706e9bb050dd3340a3ff385fb215165d..7c233d5e90571f20ed06819575343657495b8246 100644 (file)
@@ -1,5 +1,4 @@
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
 
index a0472f78e0cfcf16f2f8defbe072a283c6d041a1..4daff7bbc4634c6162b0158fc3bc893c9b697d53 100644 (file)
@@ -1,5 +1,4 @@
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
 
index 861fef2f161abeaf86da0a65c6ef7c05293a482a..5211d7599884478984466ab1447eb0991bdbdf08 100644 (file)
@@ -1,6 +1,5 @@
 #define _GNU_SOURCE
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 
 static char *twobyte_memmem(const unsigned char *h, size_t k, const unsigned char *n)
index c23ca69eddddd400e4cb8deb29022bf7d2d2d175..a297985e6853a38e254f762a80b11838eeb71fb8 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <string.h>
 
 void *mempcpy(void *dest, const void *src, size_t n)
index 17df2bf2ecb89a109a3e7310d518dad76651b2fb..693c750b6b653c4a25f0c31ac12c43dabe08c152 100644 (file)
@@ -1,3 +1,4 @@
+#define _BSD_SOURCE
 #include <string.h>
 #include <strings.h>
 
index feb9eb8156bc16675df962edc47cd9ffdc36adfa..06623c4491c4f6ebb26d7a7c664c06a4a3f54f9f 100644 (file)
@@ -1,5 +1,4 @@
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
 #include "libc.h"
index 0a2c2a9d716e1a9f0591d56e6e35a7c0a0fbe0ef..1f57a4ddbd0a818168e56c0b15178e93304c42cf 100644 (file)
@@ -1,5 +1,4 @@
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
 #include "libc.h"
index ceae4d45f22000fd3ee4e5f5ce86d67a1bcf7466..05700ad64eea55cb8f6dffad0fe6dd97feb3d31c 100644 (file)
@@ -1,5 +1,4 @@
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
 #include "libc.h"
index 4d3ff92a8d79997c139b8a0eaaaefe54e5b7a2e6..193d724130eca36d7939819e2d7ec94889dca3ef 100644 (file)
@@ -1,5 +1,5 @@
+#define _BSD_SOURCE
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
 #include "libc.h"
index d6f8631d59dd1ba47334d955fc1fe6e94106dcf3..929ddcbc1c2594762c7b44cdfd5edf0f2955d1f6 100644 (file)
@@ -1,5 +1,4 @@
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
 
index 0649174838cc860db7eb086dff32bb81a94e2ab0..915c0a22f6c239125bafbec63571519d9ac52bd7 100644 (file)
@@ -1,5 +1,4 @@
 #include <string.h>
-#include <stdlib.h>
 #include <stdint.h>
 
 static char *twobyte_strstr(const unsigned char *h, const unsigned char *n)
index 94d2e15c4d98da0ca83cae4ca403b654e4d47ca6..6f37cc6801fa8094cbdbc9080cf8f3b74661502e 100644 (file)
@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <ctype.h>
 #include <string.h>
-#include <sys/types.h>
 
 int strverscmp(const char *l, const char *r)
 {
index 037d096578e1c647678560169eadb1679a5114c3..3e28e287f25fa7a8f51f3da15f7cf342bd1ab0e4 100644 (file)
@@ -1,7 +1,4 @@
 #include <wchar.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
 
 #define MAX(a,b) ((a)>(b)?(a):(b))
 #define MIN(a,b) ((a)<(b)?(a):(b))
index 37d69629eea37843c8c0e6c54d78f8b5ec669b10..2bc2c2702c928cbbf4dad9188598c4b16c05f646 100644 (file)
@@ -1,4 +1,3 @@
-#include <string.h>
 #include <wchar.h>
 
 wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
index 6788a383fcb254edb3d6512fce743d47c76b4432..2a193263ce5c63d49c9f5c545a46f99fb3c59098 100644 (file)
@@ -1,4 +1,3 @@
-#include <string.h>
 #include <wchar.h>
 
 int wmemcmp(const wchar_t *l, const wchar_t *r, size_t n)
index 55a8e1d8caec2b966101ce713ae177b365956253..52e6e6e07b9dac897d5ee6665caed25afccafc70 100644 (file)
@@ -1,4 +1,3 @@
-#include <string.h>
 #include <wchar.h>
 
 wchar_t *wmemcpy(wchar_t *restrict d, const wchar_t *restrict s, size_t n)
index cde4feec920d2c0f99d5b28578889bd8410abb27..e406f3d5c8dfc2af79b992c9f1fa6cfc80c12ec6 100644 (file)
@@ -1,4 +1,3 @@
-#include <string.h>
 #include <wchar.h>
 
 wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n)
index 1a2a8618d1b037851270459fb7756816ee6fe9d4..07a037a0f92dd667cf0fd7c2ac74319462113664 100644 (file)
@@ -1,4 +1,3 @@
-#include <string.h>
 #include <wchar.h>
 
 wchar_t *wmemset(wchar_t *d, wchar_t c, size_t n)
index 38c99d3f48b4cd57dba799f567cfe4b134b559a4..464b83d5f95b09b23ecd3c91a1d12641187b2543 100644 (file)
@@ -1,4 +1,3 @@
-#include <string.h>
 #include <time.h>
 #include <stdint.h>
 
index 195e9cbabb87dbe66baf020600a6dfcfa8a1f065..6c2c16ef2e8027e4f30a3d90be1c79f3502c73f9 100644 (file)
@@ -1,12 +1,7 @@
 #include <string.h>
-#include <stdio.h>
 #include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <limits.h>
 #include <errno.h>
 #include <sys/stat.h>
-#include "libc.h"
 
 char *__randname(char *);
 
index 67130e1677e65b92fe13d4da3314eb4e8e864aa3..4ab0df2069ac6d0c685ea2265f15d40596392217 100644 (file)
@@ -1,6 +1,6 @@
+#define _GNU_SOURCE
 #include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
+#include <stdlib.h>
 #include <errno.h>
 #include <sys/stat.h>
 
index d9ce786e97185cc68954dddfaec1d1adf5947f0d..545a0bf8ad135696e526c22c9bf1f251879292ac 100644 (file)
@@ -1,6 +1,5 @@
 #include <termios.h>
 #include <sys/ioctl.h>
-#include <string.h>
 
 int tcgetattr(int fd, struct termios *tio)
 {
index e9a168f39233773588363e2ecf57342c051221c7..94df18f91e1718b034303c32b8ee919808ac9f9c 100644 (file)
@@ -1,6 +1,5 @@
 #include <termios.h>
 #include <sys/ioctl.h>
-#include <string.h>
 #include <errno.h>
 
 int tcsetattr(int fd, int act, const struct termios *tio)
index 6693488967ff29075549b994b2e02b307b46f65c..969e0a3805e9299070eddd8a2b43cf7d6be160b1 100644 (file)
@@ -1,5 +1,4 @@
 #include "pthread_impl.h"
-#include <string.h>
 
 int pthread_attr_init(pthread_attr_t *a)
 {
index b274bd0d8ac19fcb54a3e32a81b2db6fccdc1d6b..88c333f6b682b0c3db71fc35b5e7ed69636272a4 100644 (file)
@@ -1,6 +1,5 @@
 #include <signal.h>
 #include <errno.h>
-#include <pthread.h>
 #include "syscall.h"
 
 int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict old)
index 4127a413af88bad8d519dac0141213eb69829865..a21578dc5745ca8467309755189c6aefb9887aed 100644 (file)
@@ -1,6 +1,5 @@
 #include "pthread_impl.h"
 #include <semaphore.h>
-#include <string.h>
 
 static struct chain {
        struct chain *next;
index ef1fb4256e76700309cc3ed62cd90d444446bc98..0ab478029c3a2f9aded4555b7fc3decc0b201b0b 100644 (file)
@@ -1,7 +1,5 @@
 #include "time_impl.h"
 #include <errno.h>
-#include <stdlib.h>
-#include <string.h>
 
 time_t mktime(struct tm *tm)
 {
index c8878b11c7184986d3053e4383cbd57e07e976bf..a2ff4839425d772fce611b3439960cde0e176226 100644 (file)
@@ -1,4 +1,3 @@
-#include <unistd.h>
 #include <time.h>
 #include "syscall.h"
 #include "libc.h"
index 0f66e6c65498fad6c682a315d3bf65a289eb998f..d1d141e51f2742a6f61ab5fec76805e78d1ffa29 100644 (file)
@@ -1,4 +1,3 @@
-#include <stdio.h>
 #include <stdlib.h>
 #include <langinfo.h>
 #include <time.h>
index 22754850d8e4bf4e6792779714610b018ee63825..4b95e7527d440b05b55ca100b465cd79feff652e 100644 (file)
@@ -1,5 +1,4 @@
 #include <time.h>
-#include <sys/time.h>
 #include "syscall.h"
 
 int __clock_gettime(clockid_t, struct timespec *);
index a2804ac8182cffadc3042eaa16838d93babd091e..8d2a2ebc3fa18bf34935b0adf6a40a31e9a88e78 100644 (file)
@@ -1,6 +1,5 @@
 #include <wchar.h>
 #include <time.h>
-#include <string.h>
 #include <locale.h>
 #include "libc.h"
 
index ffa9b758cb60be3bc2e55c3224d6e3dc3d2e7082..77684050e6f935c40d0b1937aa126b0aa5cb2930 100644 (file)
@@ -1,6 +1,4 @@
 #include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <limits.h>
index a406c4eba5e61ab78522146e85edf44a70befe6a..f984b7dd2f9a88dde7fb23132424f912c17bcdc0 100644 (file)
@@ -1,6 +1,5 @@
 #include <unistd.h>
 #include <sys/utsname.h>
-#include <string.h>
 
 int gethostname(char *name, size_t len)
 {
index 37ce0d43dafb92e5bd6f2cb8ffa60ee3619b43d9..53866c6dce4077d8a53ba118a6460c2f2e6f55ee 100644 (file)
@@ -1,5 +1,4 @@
 #include <unistd.h>
-#include <stdlib.h>
 #include <string.h>
 #include <errno.h>
 
index a2ce351192eb959e1c59f47ed525def5c7b35120..8bac7b2f3ab10cb0929341ca1425af65c8d409bf 100644 (file)
@@ -1,7 +1,5 @@
 #include <unistd.h>
 #include <errno.h>
-#include <stdio.h>
-#include <string.h>
 
 void __procfdname(char *, unsigned);
 
index ce1c814453f87deab85b9f5bcaeea029bd9be64e..6c96652691e0dabacacde4885f74466d2772a661 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include <time.h>