diff options
author | Rich Felker <dalias@aerifal.cx> | 2018-09-12 00:08:09 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018-09-12 14:34:37 -0400 |
commit | 5ce3737931bb411a8d167356d4d0287b53b0cbdc (patch) | |
tree | 726fc5dde9cc462316faa715158c38f0da72292d /src/time | |
parent | 0676c3a34c7bf12b33f8f5efb92476f4ffc7f20e (diff) | |
download | musl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.tar.gz musl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.tar.bz2 musl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.tar.xz musl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.zip |
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.
Diffstat (limited to 'src/time')
-rw-r--r-- | src/time/asctime_r.c | 1 | ||||
-rw-r--r-- | src/time/clock_gettime.c | 1 | ||||
-rw-r--r-- | src/time/clock_nanosleep.c | 1 | ||||
-rw-r--r-- | src/time/gmtime_r.c | 1 | ||||
-rw-r--r-- | src/time/localtime_r.c | 2 | ||||
-rw-r--r-- | src/time/nanosleep.c | 1 | ||||
-rw-r--r-- | src/time/strftime.c | 1 | ||||
-rw-r--r-- | src/time/wcsftime.c | 1 |
8 files changed, 1 insertions, 8 deletions
diff --git a/src/time/asctime_r.c b/src/time/asctime_r.c index af2618de..26809ca2 100644 --- a/src/time/asctime_r.c +++ b/src/time/asctime_r.c @@ -3,7 +3,6 @@ #include <langinfo.h> #include "locale_impl.h" #include "atomic.h" -#include "libc.h" char *__asctime_r(const struct tm *restrict tm, char *restrict buf) { diff --git a/src/time/clock_gettime.c b/src/time/clock_gettime.c index c24fe173..8fd1b8f5 100644 --- a/src/time/clock_gettime.c +++ b/src/time/clock_gettime.c @@ -2,7 +2,6 @@ #include <errno.h> #include <stdint.h> #include "syscall.h" -#include "libc.h" #include "atomic.h" #ifdef VDSO_CGT_SYM diff --git a/src/time/clock_nanosleep.c b/src/time/clock_nanosleep.c index 9e4d9f1f..32f0c07e 100644 --- a/src/time/clock_nanosleep.c +++ b/src/time/clock_nanosleep.c @@ -1,7 +1,6 @@ #include <time.h> #include <errno.h> #include "syscall.h" -#include "libc.h" int clock_nanosleep(clockid_t clk, int flags, const struct timespec *req, struct timespec *rem) { diff --git a/src/time/gmtime_r.c b/src/time/gmtime_r.c index e529799b..22aec2c2 100644 --- a/src/time/gmtime_r.c +++ b/src/time/gmtime_r.c @@ -1,6 +1,5 @@ #include "time_impl.h" #include <errno.h> -#include "libc.h" struct tm *__gmtime_r(const time_t *restrict t, struct tm *restrict tm) { diff --git a/src/time/localtime_r.c b/src/time/localtime_r.c index 2e62c29f..1a15b314 100644 --- a/src/time/localtime_r.c +++ b/src/time/localtime_r.c @@ -1,6 +1,6 @@ #include "time_impl.h" #include <errno.h> -#include "libc.h" +#include <limits.h> struct tm *__localtime_r(const time_t *restrict t, struct tm *restrict tm) { diff --git a/src/time/nanosleep.c b/src/time/nanosleep.c index a2ff4839..1e6f3922 100644 --- a/src/time/nanosleep.c +++ b/src/time/nanosleep.c @@ -1,6 +1,5 @@ #include <time.h> #include "syscall.h" -#include "libc.h" int nanosleep(const struct timespec *req, struct timespec *rem) { diff --git a/src/time/strftime.c b/src/time/strftime.c index ba18a27c..cc53d536 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -6,7 +6,6 @@ #include <time.h> #include <limits.h> #include "locale_impl.h" -#include "libc.h" #include "time_impl.h" static int is_leap(int y) diff --git a/src/time/wcsftime.c b/src/time/wcsftime.c index 31b30caf..8e1437b3 100644 --- a/src/time/wcsftime.c +++ b/src/time/wcsftime.c @@ -3,7 +3,6 @@ #include <locale.h> #include "locale_impl.h" #include "time_impl.h" -#include "libc.h" size_t __wcsftime_l(wchar_t *restrict s, size_t n, const wchar_t *restrict f, const struct tm *restrict tm, locale_t loc) { |