summaryrefslogtreecommitdiff
path: root/src/locale
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-09-12 00:08:09 -0400
committerRich Felker <dalias@aerifal.cx>2018-09-12 14:34:37 -0400
commit5ce3737931bb411a8d167356d4d0287b53b0cbdc (patch)
tree726fc5dde9cc462316faa715158c38f0da72292d /src/locale
parent0676c3a34c7bf12b33f8f5efb92476f4ffc7f20e (diff)
downloadmusl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.tar.gz
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/locale')
-rw-r--r--src/locale/__lctrans.c1
-rw-r--r--src/locale/dcngettext.c1
-rw-r--r--src/locale/freelocale.c1
-rw-r--r--src/locale/langinfo.c1
-rw-r--r--src/locale/newlocale.c1
-rw-r--r--src/locale/strcoll.c1
-rw-r--r--src/locale/strxfrm.c1
-rw-r--r--src/locale/textdomain.c2
-rw-r--r--src/locale/wcscoll.c1
-rw-r--r--src/locale/wcsxfrm.c1
10 files changed, 0 insertions, 11 deletions
diff --git a/src/locale/__lctrans.c b/src/locale/__lctrans.c
index 107fe14a..9fbe762a 100644
--- a/src/locale/__lctrans.c
+++ b/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)
{
diff --git a/src/locale/dcngettext.c b/src/locale/dcngettext.c
index fc1018df..eefa31a8 100644
--- a/src/locale/dcngettext.c
+++ b/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"
diff --git a/src/locale/freelocale.c b/src/locale/freelocale.c
index e75acd66..802b8bfe 100644
--- a/src/locale/freelocale.c
+++ b/src/locale/freelocale.c
@@ -1,6 +1,5 @@
#include <stdlib.h>
#include "locale_impl.h"
-#include "libc.h"
void freelocale(locale_t l)
{
diff --git a/src/locale/langinfo.c b/src/locale/langinfo.c
index 83be6433..14773093 100644
--- a/src/locale/langinfo.c
+++ b/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"
diff --git a/src/locale/newlocale.c b/src/locale/newlocale.c
index f50bbe91..8fb006a7 100644
--- a/src/locale/newlocale.c
+++ b/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)
{
diff --git a/src/locale/strcoll.c b/src/locale/strcoll.c
index 84f199ff..dd3cbc48 100644
--- a/src/locale/strcoll.c
+++ b/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)
{
diff --git a/src/locale/strxfrm.c b/src/locale/strxfrm.c
index 14b76a63..c66c6203 100644
--- a/src/locale/strxfrm.c
+++ b/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)
diff --git a/src/locale/textdomain.c b/src/locale/textdomain.c
index c501501d..d7275397 100644
--- a/src/locale/textdomain.c
+++ b/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;
diff --git a/src/locale/wcscoll.c b/src/locale/wcscoll.c
index 14bb8b9f..ad2cc691 100644
--- a/src/locale/wcscoll.c
+++ b/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)
diff --git a/src/locale/wcsxfrm.c b/src/locale/wcsxfrm.c
index 0a0b776d..05e3e115 100644
--- a/src/locale/wcsxfrm.c
+++ b/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)