Browse Source

reduce spurious inclusion of libc.h

libc.h was intended to be a header for access to global libc state and
related interfaces, but ended up included all over the place because
it was the way to get the weak_alias macro. most of the inclusions
removed here are places where weak_alias was needed. a few were
recently introduced for hidden. some go all the way back to when
libc.h defined CANCELPT_BEGIN and _END, and all (wrongly implemented)
cancellation points had to include it.

remaining spurious users are mostly callers of the LOCK/UNLOCK macros
and files that use the LFS64 macro to define the awful *64 aliases.

in a few places, new inclusion of libc.h is added because several
internal headers no longer implicitly include libc.h.

declarations for __lockfile and __unlockfile are moved from libc.h to
stdio_impl.h so that the latter does not need libc.h. putting them in
libc.h made no sense at all, since the macros in stdio_impl.h are
needed to use them correctly anyway.
Rich Felker 6 years ago
parent
commit
5ce3737931
100 changed files with 17 additions and 101 deletions
  1. 0 1
      src/aio/aio.c
  2. 0 1
      src/aio/aio_suspend.c
  3. 0 1
      src/aio/lio_listio.c
  4. 0 1
      src/conf/sysconf.c
  5. 0 1
      src/crypt/crypt_r.c
  6. 0 1
      src/ctype/isalnum.c
  7. 0 1
      src/ctype/isalpha.c
  8. 0 1
      src/ctype/isblank.c
  9. 0 1
      src/ctype/iscntrl.c
  10. 0 1
      src/ctype/isdigit.c
  11. 0 1
      src/ctype/isgraph.c
  12. 0 1
      src/ctype/islower.c
  13. 0 1
      src/ctype/isprint.c
  14. 0 1
      src/ctype/ispunct.c
  15. 0 1
      src/ctype/isspace.c
  16. 0 1
      src/ctype/isupper.c
  17. 0 1
      src/ctype/iswalnum.c
  18. 0 1
      src/ctype/iswalpha.c
  19. 0 1
      src/ctype/iswblank.c
  20. 0 1
      src/ctype/iswcntrl.c
  21. 0 1
      src/ctype/iswctype.c
  22. 0 1
      src/ctype/iswdigit.c
  23. 0 1
      src/ctype/iswgraph.c
  24. 0 1
      src/ctype/iswlower.c
  25. 0 1
      src/ctype/iswprint.c
  26. 0 1
      src/ctype/iswpunct.c
  27. 0 1
      src/ctype/iswspace.c
  28. 0 1
      src/ctype/iswupper.c
  29. 0 1
      src/ctype/iswxdigit.c
  30. 0 1
      src/ctype/isxdigit.c
  31. 0 1
      src/ctype/tolower.c
  32. 0 1
      src/ctype/toupper.c
  33. 1 1
      src/ctype/towctrans.c
  34. 0 1
      src/ctype/wctrans.c
  35. 1 1
      src/dirent/closedir.c
  36. 1 1
      src/env/__environ.c
  37. 0 1
      src/env/clearenv.c
  38. 0 1
      src/env/getenv.c
  39. 0 1
      src/env/putenv.c
  40. 0 1
      src/env/unsetenv.c
  41. 0 1
      src/errno/strerror.c
  42. 0 1
      src/fcntl/fcntl.c
  43. 1 1
      src/fenv/fesetround.c
  44. 1 1
      src/fenv/m68k/fenv.c
  45. 1 1
      src/fenv/powerpc64/fenv.c
  46. 1 1
      src/fenv/s390x/fenv.c
  47. 1 1
      src/internal/dynlink.h
  48. 1 1
      src/internal/fdpic_crt.h
  49. 0 2
      src/internal/libc.h
  50. 0 1
      src/internal/malloc_impl.h
  51. 1 1
      src/internal/sh/__shcall.c
  52. 3 1
      src/internal/stdio_impl.h
  53. 1 1
      src/internal/syscall.h
  54. 0 1
      src/ipc/msgrcv.c
  55. 0 1
      src/ipc/msgsnd.c
  56. 0 1
      src/ldso/__dlsym.c
  57. 0 1
      src/ldso/dladdr.c
  58. 0 1
      src/ldso/dlclose.c
  59. 0 1
      src/ldso/dlerror.c
  60. 0 1
      src/ldso/dlinfo.c
  61. 0 1
      src/ldso/dlopen.c
  62. 0 1
      src/ldso/tlsdesc.c
  63. 0 1
      src/legacy/euidaccess.c
  64. 0 1
      src/legacy/utmpx.c
  65. 0 1
      src/linux/cache.c
  66. 2 0
      src/linux/getdents.c
  67. 0 1
      src/linux/setfsgid.c
  68. 0 1
      src/linux/setfsuid.c
  69. 0 1
      src/linux/sysinfo.c
  70. 0 1
      src/linux/x32/sysinfo.c
  71. 0 1
      src/locale/__lctrans.c
  72. 0 1
      src/locale/dcngettext.c
  73. 0 1
      src/locale/freelocale.c
  74. 0 1
      src/locale/langinfo.c
  75. 0 1
      src/locale/newlocale.c
  76. 0 1
      src/locale/strcoll.c
  77. 0 1
      src/locale/strxfrm.c
  78. 0 2
      src/locale/textdomain.c
  79. 0 1
      src/locale/wcscoll.c
  80. 0 1
      src/locale/wcsxfrm.c
  81. 0 1
      src/malloc/memalign.c
  82. 0 1
      src/math/exp10.c
  83. 0 1
      src/math/exp10f.c
  84. 0 1
      src/math/exp10l.c
  85. 0 1
      src/math/lgamma_r.c
  86. 0 1
      src/math/lgammaf_r.c
  87. 0 1
      src/math/lgammal.c
  88. 0 1
      src/math/remainder.c
  89. 0 1
      src/math/remainderf.c
  90. 0 1
      src/math/signgam.c
  91. 0 1
      src/misc/basename.c
  92. 0 1
      src/misc/getopt.c
  93. 0 1
      src/misc/pty.c
  94. 0 1
      src/mman/madvise.c
  95. 0 1
      src/mman/mremap.c
  96. 0 1
      src/mman/munmap.c
  97. 1 1
      src/multibyte/internal.h
  98. 0 1
      src/network/accept.c
  99. 0 1
      src/network/accept4.c
  100. 0 1
      src/network/connect.c

+ 0 - 1
src/aio/aio.c

@@ -7,7 +7,6 @@
 #include <stdlib.h>
 #include "syscall.h"
 #include "atomic.h"
-#include "libc.h"
 #include "pthread_impl.h"
 
 /* The following is a threads-based implementation of AIO with minimal

+ 0 - 1
src/aio/aio_suspend.c

@@ -2,7 +2,6 @@
 #include <errno.h>
 #include <time.h>
 #include "atomic.h"
-#include "libc.h"
 #include "pthread_impl.h"
 
 int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec *ts)

+ 0 - 1
src/aio/lio_listio.c

@@ -3,7 +3,6 @@
 #include <unistd.h>
 #include <string.h>
 #include "pthread_impl.h"
-#include "libc.h"
 
 struct lio_state {
 	struct sigevent *sev;

+ 0 - 1
src/conf/sysconf.c

@@ -5,7 +5,6 @@
 #include <signal.h>
 #include <sys/sysinfo.h>
 #include "syscall.h"
-#include "libc.h"
 
 #define JT(x) (-256|(x))
 #define VER JT(1)

+ 0 - 1
src/crypt/crypt_r.c

@@ -1,5 +1,4 @@
 #include <crypt.h>
-#include "libc.h"
 
 char *__crypt_r(const char *key, const char *salt, struct crypt_data *data)
 {

+ 0 - 1
src/ctype/isalnum.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 
 int isalnum(int c)
 {

+ 0 - 1
src/ctype/isalpha.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 #undef isalpha
 
 int isalpha(int c)

+ 0 - 1
src/ctype/isblank.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 
 int isblank(int c)
 {

+ 0 - 1
src/ctype/iscntrl.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 
 int iscntrl(int c)
 {

+ 0 - 1
src/ctype/isdigit.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 #undef isdigit
 
 int isdigit(int c)

+ 0 - 1
src/ctype/isgraph.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 #undef isgraph
 
 int isgraph(int c)

+ 0 - 1
src/ctype/islower.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 #undef islower
 
 int islower(int c)

+ 0 - 1
src/ctype/isprint.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 #undef isprint
 
 int isprint(int c)

+ 0 - 1
src/ctype/ispunct.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 
 int ispunct(int c)
 {

+ 0 - 1
src/ctype/isspace.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 #undef isspace
 
 int isspace(int c)

+ 0 - 1
src/ctype/isupper.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 #undef isupper
 
 int isupper(int c)

+ 0 - 1
src/ctype/iswalnum.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 int iswalnum(wint_t wc)
 {

+ 0 - 1
src/ctype/iswalpha.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 static const unsigned char table[] = {
 #include "alpha.h"

+ 0 - 1
src/ctype/iswblank.c

@@ -1,6 +1,5 @@
 #include <wctype.h>
 #include <ctype.h>
-#include "libc.h"
 
 int iswblank(wint_t wc)
 {

+ 0 - 1
src/ctype/iswcntrl.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 int iswcntrl(wint_t wc)
 {

+ 0 - 1
src/ctype/iswctype.c

@@ -1,6 +1,5 @@
 #include <wctype.h>
 #include <string.h>
-#include "libc.h"
 
 #define WCTYPE_ALNUM  1
 #define WCTYPE_ALPHA  2

+ 0 - 1
src/ctype/iswdigit.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 #undef iswdigit
 

+ 0 - 1
src/ctype/iswgraph.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 int iswgraph(wint_t wc)
 {

+ 0 - 1
src/ctype/iswlower.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 int iswlower(wint_t wc)
 {

+ 0 - 1
src/ctype/iswprint.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 /* Consider all legal codepoints as printable except for:
  * - C0 and C1 control characters

+ 0 - 1
src/ctype/iswpunct.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 static const unsigned char table[] = {
 #include "punct.h"

+ 0 - 1
src/ctype/iswspace.c

@@ -1,6 +1,5 @@
 #include <wchar.h>
 #include <wctype.h>
-#include "libc.h"
 
 /* Our definition of whitespace is the Unicode White_Space property,
  * minus non-breaking spaces (U+00A0, U+2007, and U+202F) and script-

+ 0 - 1
src/ctype/iswupper.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 int iswupper(wint_t wc)
 {

+ 0 - 1
src/ctype/iswxdigit.c

@@ -1,5 +1,4 @@
 #include <wctype.h>
-#include "libc.h"
 
 int iswxdigit(wint_t wc)
 {

+ 0 - 1
src/ctype/isxdigit.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 
 int isxdigit(int c)
 {

+ 0 - 1
src/ctype/tolower.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 
 int tolower(int c)
 {

+ 0 - 1
src/ctype/toupper.c

@@ -1,5 +1,4 @@
 #include <ctype.h>
-#include "libc.h"
 
 int toupper(int c)
 {

+ 1 - 1
src/ctype/towctrans.c

@@ -1,6 +1,6 @@
 #include <ctype.h>
+#include <stddef.h>
 #include <wctype.h>
-#include "libc.h"
 
 #define CASEMAP(u1,u2,l) { (u1), (l)-(u1), (u2)-(u1)+1 }
 #define CASELACE(u1,u2) CASEMAP((u1),(u2),(u1)+1)

+ 0 - 1
src/ctype/wctrans.c

@@ -1,6 +1,5 @@
 #include <wctype.h>
 #include <string.h>
-#include "libc.h"
 
 wctrans_t wctrans(const char *class)
 {

+ 1 - 1
src/dirent/closedir.c

@@ -1,7 +1,7 @@
 #include <dirent.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include "__dirent.h"
-#include "libc.h"
 
 int closedir(DIR *dir)
 {

+ 1 - 1
src/env/__environ.c

@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <unistd.h>
 
 char **__environ = 0;
 weak_alias(__environ, ___environ);

+ 0 - 1
src/env/clearenv.c

@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <stdlib.h>
 #include <unistd.h>
-#include "libc.h"
 
 static void dummy(char *old, char *new) {}
 weak_alias(dummy, __env_rm_add);

+ 0 - 1
src/env/getenv.c

@@ -1,7 +1,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include "libc.h"
 
 char *getenv(const char *name)
 {

+ 0 - 1
src/env/putenv.c

@@ -1,7 +1,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include "libc.h"
 
 static void dummy(char *old, char *new) {}
 weak_alias(dummy, __env_rm_add);

+ 0 - 1
src/env/unsetenv.c

@@ -2,7 +2,6 @@
 #include <string.h>
 #include <errno.h>
 #include <unistd.h>
-#include "libc.h"
 
 static void dummy(char *old, char *new) {}
 weak_alias(dummy, __env_rm_add);

+ 0 - 1
src/errno/strerror.c

@@ -1,7 +1,6 @@
 #include <errno.h>
 #include <string.h>
 #include "locale_impl.h"
-#include "libc.h"
 
 #define E(a,b) ((unsigned char)a),
 static const unsigned char errid[] = {

+ 0 - 1
src/fcntl/fcntl.c

@@ -3,7 +3,6 @@
 #include <stdarg.h>
 #include <errno.h>
 #include "syscall.h"
-#include "libc.h"
 
 int fcntl(int fd, int cmd, ...)
 {

+ 1 - 1
src/fenv/fesetround.c

@@ -1,5 +1,5 @@
 #include <fenv.h>
-#include "libc.h"
+#include <features.h>
 
 /* __fesetround wrapper for arch independent argument check */
 

+ 1 - 1
src/fenv/m68k/fenv.c

@@ -1,5 +1,5 @@
 #include <fenv.h>
-#include "libc.h"
+#include <features.h>
 
 #if __HAVE_68881__ || __mcffpu__
 

+ 1 - 1
src/fenv/powerpc64/fenv.c

@@ -1,6 +1,6 @@
 #define _GNU_SOURCE
 #include <fenv.h>
-#include "libc.h"
+#include <features.h>
 
 static inline double get_fpscr_f(void)
 {

+ 1 - 1
src/fenv/s390x/fenv.c

@@ -1,5 +1,5 @@
 #include <fenv.h>
-#include "libc.h"
+#include <features.h>
 
 static inline unsigned get_fpc(void)
 {

+ 1 - 1
src/internal/dynlink.h

@@ -5,7 +5,7 @@
 #include <elf.h>
 #include <stdint.h>
 #include <stddef.h>
-#include "libc.h"
+#include <stdarg.h>
 
 #if UINTPTR_MAX == 0xffffffff
 typedef Elf32_Ehdr Ehdr;

+ 1 - 1
src/internal/fdpic_crt.h

@@ -1,5 +1,5 @@
 #include <stdint.h>
-#include "libc.h"
+#include <features.h>
 
 hidden void *__fdpic_fixup(void *map, uintptr_t *a, uintptr_t *z)
 {

+ 0 - 2
src/internal/libc.h

@@ -53,8 +53,6 @@ extern hidden const char __libc_version[];
 /* Designed to avoid any overhead in non-threaded processes */
 hidden void __lock(volatile int *);
 hidden void __unlock(volatile int *);
-hidden int __lockfile(FILE *);
-hidden void __unlockfile(FILE *);
 #define LOCK(x) __lock(x)
 #define UNLOCK(x) __unlock(x)
 

+ 0 - 1
src/internal/malloc_impl.h

@@ -1,7 +1,6 @@
 #ifndef MALLOC_IMPL_H
 #define MALLOC_IMPL_H
 
-#include "libc.h"
 #include <sys/mman.h>
 
 hidden void *__expand_heap(size_t *);

+ 1 - 1
src/internal/sh/__shcall.c

@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <features.h>
 
 hidden int __shcall(void *arg, int (*func)(void *))
 {

+ 3 - 1
src/internal/stdio_impl.h

@@ -3,7 +3,6 @@
 
 #include <stdio.h>
 #include "syscall.h"
-#include "libc.h"
 
 #define UNGET 8
 
@@ -54,6 +53,9 @@ extern hidden FILE *volatile __stdin_used;
 extern hidden FILE *volatile __stdout_used;
 extern hidden FILE *volatile __stderr_used;
 
+hidden int __lockfile(FILE *);
+hidden void __unlockfile(FILE *);
+
 hidden size_t __stdio_read(FILE *, unsigned char *, size_t);
 hidden size_t __stdio_write(FILE *, const unsigned char *, size_t);
 hidden size_t __stdout_write(FILE *, const unsigned char *, size_t);

+ 1 - 1
src/internal/syscall.h

@@ -1,8 +1,8 @@
 #ifndef _INTERNAL_SYSCALL_H
 #define _INTERNAL_SYSCALL_H
 
+#include <features.h>
 #include <sys/syscall.h>
-#include "libc.h"
 #include "syscall_arch.h"
 
 #ifndef SYSCALL_RLIM_INFINITY

+ 0 - 1
src/ipc/msgrcv.c

@@ -1,7 +1,6 @@
 #include <sys/msg.h>
 #include "syscall.h"
 #include "ipc.h"
-#include "libc.h"
 
 ssize_t msgrcv(int q, void *m, size_t len, long type, int flag)
 {

+ 0 - 1
src/ipc/msgsnd.c

@@ -1,7 +1,6 @@
 #include <sys/msg.h>
 #include "syscall.h"
 #include "ipc.h"
-#include "libc.h"
 
 int msgsnd(int q, const void *m, size_t len, int flag)
 {

+ 0 - 1
src/ldso/__dlsym.c

@@ -1,6 +1,5 @@
 #include <dlfcn.h>
 #include "dynlink.h"
-#include "libc.h"
 
 static void *stub_dlsym(void *restrict p, const char *restrict s, void *restrict ra)
 {

+ 0 - 1
src/ldso/dladdr.c

@@ -1,6 +1,5 @@
 #define _GNU_SOURCE
 #include <dlfcn.h>
-#include "libc.h"
 
 static int stub_dladdr(const void *addr, Dl_info *info)
 {

+ 0 - 1
src/ldso/dlclose.c

@@ -1,6 +1,5 @@
 #include <dlfcn.h>
 #include "dynlink.h"
-#include "libc.h"
 
 int dlclose(void *p)
 {

+ 0 - 1
src/ldso/dlerror.c

@@ -3,7 +3,6 @@
 #include <stdarg.h>
 #include "pthread_impl.h"
 #include "dynlink.h"
-#include "libc.h"
 
 char *dlerror()
 {

+ 0 - 1
src/ldso/dlinfo.c

@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <dlfcn.h>
 #include "dynlink.h"
-#include "libc.h"
 
 int dlinfo(void *dso, int req, void *res)
 {

+ 0 - 1
src/ldso/dlopen.c

@@ -1,6 +1,5 @@
 #include <dlfcn.h>
 #include "dynlink.h"
-#include "libc.h"
 
 static void *stub_dlopen(const char *file, int mode)
 {

+ 0 - 1
src/ldso/tlsdesc.c

@@ -1,6 +1,5 @@
 #include <stddef.h>
 #include <dynlink.h>
-#include "libc.h"
 
 ptrdiff_t __tlsdesc_static()
 {

+ 0 - 1
src/legacy/euidaccess.c

@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <unistd.h>
 #include <fcntl.h>
-#include "libc.h"
 
 int euidaccess(const char *filename, int amode)
 {

+ 0 - 1
src/legacy/utmpx.c

@@ -2,7 +2,6 @@
 #include <utmpx.h>
 #include <stddef.h>
 #include <errno.h>
-#include "libc.h"
 
 void endutxent(void)
 {

+ 0 - 1
src/linux/cache.c

@@ -1,5 +1,4 @@
 #include "syscall.h"
-#include "libc.h"
 
 #ifdef SYS_cacheflush
 int _flush_cache(void *addr, int len, int op)

+ 2 - 0
src/linux/getdents.c

@@ -1,5 +1,7 @@
+#define _BSD_SOURCE
 #include <dirent.h>
 #include "syscall.h"
+#include "libc.h"
 
 int getdents(int fd, struct dirent *buf, size_t len)
 {

+ 0 - 1
src/linux/setfsgid.c

@@ -1,6 +1,5 @@
 #include <sys/fsuid.h>
 #include "syscall.h"
-#include "libc.h"
 
 int setfsgid(gid_t gid)
 {

+ 0 - 1
src/linux/setfsuid.c

@@ -1,6 +1,5 @@
 #include <sys/fsuid.h>
 #include "syscall.h"
-#include "libc.h"
 
 int setfsuid(uid_t uid)
 {

+ 0 - 1
src/linux/sysinfo.c

@@ -1,6 +1,5 @@
 #include <sys/sysinfo.h>
 #include "syscall.h"
-#include "libc.h"
 
 int __lsysinfo(struct sysinfo *info)
 {

+ 0 - 1
src/linux/x32/sysinfo.c

@@ -1,6 +1,5 @@
 #include <sys/sysinfo.h>
 #include "syscall.h"
-#include "libc.h"
 
 #define klong long long
 #define kulong unsigned long long

+ 0 - 1
src/locale/__lctrans.c

@@ -1,6 +1,5 @@
 #include <locale.h>
 #include "locale_impl.h"
-#include "libc.h"
 
 static const char *dummy(const char *msg, const struct __locale_map *lm)
 {

+ 0 - 1
src/locale/dcngettext.c

@@ -7,7 +7,6 @@
 #include <sys/mman.h>
 #include <ctype.h>
 #include "locale_impl.h"
-#include "libc.h"
 #include "atomic.h"
 #include "pleval.h"
 

+ 0 - 1
src/locale/freelocale.c

@@ -1,6 +1,5 @@
 #include <stdlib.h>
 #include "locale_impl.h"
-#include "libc.h"
 
 void freelocale(locale_t l)
 {

+ 0 - 1
src/locale/langinfo.c

@@ -1,7 +1,6 @@
 #include <locale.h>
 #include <langinfo.h>
 #include "locale_impl.h"
-#include "libc.h"
 
 static const char c_time[] =
 	"Sun\0" "Mon\0" "Tue\0" "Wed\0" "Thu\0" "Fri\0" "Sat\0"

+ 0 - 1
src/locale/newlocale.c

@@ -1,7 +1,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include "locale_impl.h"
-#include "libc.h"
 
 int __loc_is_allocated(locale_t loc)
 {

+ 0 - 1
src/locale/strcoll.c

@@ -1,7 +1,6 @@
 #include <string.h>
 #include <locale.h>
 #include "locale_impl.h"
-#include "libc.h"
 
 int __strcoll_l(const char *l, const char *r, locale_t loc)
 {

+ 0 - 1
src/locale/strxfrm.c

@@ -1,7 +1,6 @@
 #include <string.h>
 #include <locale.h>
 #include "locale_impl.h"
-#include "libc.h"
 
 /* collate only by code points */
 size_t __strxfrm_l(char *restrict dest, const char *restrict src, size_t n, locale_t loc)

+ 0 - 2
src/locale/textdomain.c

@@ -3,8 +3,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <limits.h>
-#include "libc.h"
-#include "atomic.h"
 
 static char *current_domain;
 

+ 0 - 1
src/locale/wcscoll.c

@@ -1,7 +1,6 @@
 #include <wchar.h>
 #include <locale.h>
 #include "locale_impl.h"
-#include "libc.h"
 
 /* FIXME: stub */
 int __wcscoll_l(const wchar_t *l, const wchar_t *r, locale_t locale)

+ 0 - 1
src/locale/wcsxfrm.c

@@ -1,7 +1,6 @@
 #include <wchar.h>
 #include <locale.h>
 #include "locale_impl.h"
-#include "libc.h"
 
 /* collate only by code points */
 size_t __wcsxfrm_l(wchar_t *restrict dest, const wchar_t *restrict src, size_t n, locale_t loc)

+ 0 - 1
src/malloc/memalign.c

@@ -1,7 +1,6 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <errno.h>
-#include "libc.h"
 #include "malloc_impl.h"
 
 void *__memalign(size_t align, size_t len)

+ 0 - 1
src/math/exp10.c

@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <math.h>
 #include <stdint.h>
-#include "libc.h"
 
 double exp10(double x)
 {

+ 0 - 1
src/math/exp10f.c

@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <math.h>
 #include <stdint.h>
-#include "libc.h"
 
 float exp10f(float x)
 {

+ 0 - 1
src/math/exp10l.c

@@ -1,7 +1,6 @@
 #define _GNU_SOURCE
 #include <float.h>
 #include <math.h>
-#include "libc.h"
 #include "libm.h"
 
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024

+ 0 - 1
src/math/lgamma_r.c

@@ -79,7 +79,6 @@
  */
 
 #include "libm.h"
-#include "libc.h"
 
 static const double
 pi  =  3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */

+ 0 - 1
src/math/lgammaf_r.c

@@ -14,7 +14,6 @@
  */
 
 #include "libm.h"
-#include "libc.h"
 
 static const float
 pi  =  3.1415927410e+00, /* 0x40490fdb */

+ 0 - 1
src/math/lgammal.c

@@ -87,7 +87,6 @@
 
 #define _GNU_SOURCE
 #include "libm.h"
-#include "libc.h"
 
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double __lgammal_r(long double x, int *sg)

+ 0 - 1
src/math/remainder.c

@@ -1,5 +1,4 @@
 #include <math.h>
-#include "libc.h"
 
 double remainder(double x, double y)
 {

+ 0 - 1
src/math/remainderf.c

@@ -1,5 +1,4 @@
 #include <math.h>
-#include "libc.h"
 
 float remainderf(float x, float y)
 {

+ 0 - 1
src/math/signgam.c

@@ -1,6 +1,5 @@
 #include <math.h>
 #include "libm.h"
-#include "libc.h"
 
 int __signgam = 0;
 

+ 0 - 1
src/misc/basename.c

@@ -1,6 +1,5 @@
 #include <string.h>
 #include <libgen.h>
-#include "libc.h"
 
 char *basename(char *s)
 {

+ 0 - 1
src/misc/getopt.c

@@ -3,7 +3,6 @@
 #include <string.h>
 #include <limits.h>
 #include <stdlib.h>
-#include "libc.h"
 #include "locale_impl.h"
 #include "stdio_impl.h"
 

+ 0 - 1
src/misc/pty.c

@@ -3,7 +3,6 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <errno.h>
-#include "libc.h"
 #include "syscall.h"
 
 int posix_openpt(int flags)

+ 0 - 1
src/mman/madvise.c

@@ -1,6 +1,5 @@
 #include <sys/mman.h>
 #include "syscall.h"
-#include "libc.h"
 
 int __madvise(void *addr, size_t len, int advice)
 {

+ 0 - 1
src/mman/mremap.c

@@ -5,7 +5,6 @@
 #include <stdint.h>
 #include <stdarg.h>
 #include "syscall.h"
-#include "libc.h"
 
 static void dummy(void) { }
 weak_alias(dummy, __vm_wait);

+ 0 - 1
src/mman/munmap.c

@@ -1,6 +1,5 @@
 #include <sys/mman.h>
 #include "syscall.h"
-#include "libc.h"
 
 static void dummy(void) { }
 weak_alias(dummy, __vm_wait);

+ 1 - 1
src/multibyte/internal.h

@@ -1,7 +1,7 @@
 #define bittab __fsmu8
 
 #include <stdint.h>
-#include "libc.h"
+#include <features.h>
 
 extern hidden const uint32_t bittab[];
 

+ 0 - 1
src/network/accept.c

@@ -1,6 +1,5 @@
 #include <sys/socket.h>
 #include "syscall.h"
-#include "libc.h"
 
 int accept(int fd, struct sockaddr *restrict addr, socklen_t *restrict len)
 {

+ 0 - 1
src/network/accept4.c

@@ -3,7 +3,6 @@
 #include <errno.h>
 #include <fcntl.h>
 #include "syscall.h"
-#include "libc.h"
 
 int accept4(int fd, struct sockaddr *restrict addr, socklen_t *restrict len, int flg)
 {

+ 0 - 1
src/network/connect.c

@@ -1,6 +1,5 @@
 #include <sys/socket.h>
 #include "syscall.h"
-#include "libc.h"
 
 int connect(int fd, const struct sockaddr *addr, socklen_t len)
 {

Some files were not shown because too many files changed in this diff