summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-02-06 21:33:40 -0500
committerRich Felker <dalias@aerifal.cx>2012-02-06 21:33:40 -0500
commitc09b6f8ab6edefba52183f8c5ecf6520a8b7ad8f (patch)
treeb6514274e5cbdfa706d8333be549c5116f3ac1b1
parente5a7f14c818a622ea7fbbc981657eb0c47ce3c00 (diff)
downloadmusl-c09b6f8ab6edefba52183f8c5ecf6520a8b7ad8f.tar.gz
musl-c09b6f8ab6edefba52183f8c5ecf6520a8b7ad8f.tar.bz2
musl-c09b6f8ab6edefba52183f8c5ecf6520a8b7ad8f.tar.xz
musl-c09b6f8ab6edefba52183f8c5ecf6520a8b7ad8f.zip
fix some omissions and mistakes in locale_t interface definitions
-rw-r--r--include/wctype.h24
-rw-r--r--src/locale/iswalnum_l.c2
-rw-r--r--src/locale/iswalpha_l.c2
-rw-r--r--src/locale/iswblank_l.c2
-rw-r--r--src/locale/iswcntrl_l.c2
-rw-r--r--src/locale/iswctype_l.c2
-rw-r--r--src/locale/iswdigit_l.c2
-rw-r--r--src/locale/iswgraph_l.c2
-rw-r--r--src/locale/iswlower_l.c2
-rw-r--r--src/locale/iswprint_l.c2
-rw-r--r--src/locale/iswpunct_l.c2
-rw-r--r--src/locale/iswspace_l.c2
-rw-r--r--src/locale/iswupper_l.c2
-rw-r--r--src/locale/iswxdigit_l.c2
14 files changed, 37 insertions, 13 deletions
diff --git a/include/wctype.h b/include/wctype.h
index ee5be7c6..f7be2cb0 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -43,6 +43,30 @@ wctype_t wctype(const char *);
#undef iswdigit
#define iswdigit(a) (((unsigned)(a)-L'0') < 10)
+#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+
+int iswalnum_l(wint_t, locale_t);
+int iswalpha_l(wint_t, locale_t);
+int iswblank_l(wint_t, locale_t);
+int iswcntrl_l(wint_t, locale_t);
+int iswdigit_l(wint_t, locale_t);
+int iswgraph_l(wint_t, locale_t);
+int iswlower_l(wint_t, locale_t);
+int iswprint_l(wint_t, locale_t);
+int iswpunct_l(wint_t, locale_t);
+int iswspace_l(wint_t, locale_t);
+int iswupper_l(wint_t, locale_t);
+int iswxdigit_l(wint_t, locale_t);
+int iswctype_l(wint_t, wctype_t, locale_t);
+wint_t towlower_l(wint_t, locale_t);
+wint_t towupper_l(wint_t, locale_t);
+wint_t towctrans_l(wint_t, wctrans_t, locale_t);
+wctrans_t wctrans_l(const char *, locale_t);
+wctype_t wctype_l(const char *, locale_t);
+
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/src/locale/iswalnum_l.c b/src/locale/iswalnum_l.c
index 8aaf1be6..c888060c 100644
--- a/src/locale/iswalnum_l.c
+++ b/src/locale/iswalnum_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswalnum_l(wint_t c, locale_t l)
+int iswalnum_l(wint_t c, locale_t l)
{
return iswalnum(c);
}
diff --git a/src/locale/iswalpha_l.c b/src/locale/iswalpha_l.c
index ebe5a05e..cd2be91e 100644
--- a/src/locale/iswalpha_l.c
+++ b/src/locale/iswalpha_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswalpha_l(wint_t c, locale_t l)
+int iswalpha_l(wint_t c, locale_t l)
{
return iswalpha(c);
}
diff --git a/src/locale/iswblank_l.c b/src/locale/iswblank_l.c
index 180a8f43..f3a2691f 100644
--- a/src/locale/iswblank_l.c
+++ b/src/locale/iswblank_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswblank_l(wint_t c, locale_t l)
+int iswblank_l(wint_t c, locale_t l)
{
return iswblank(c);
}
diff --git a/src/locale/iswcntrl_l.c b/src/locale/iswcntrl_l.c
index 50e97c5a..7681fe09 100644
--- a/src/locale/iswcntrl_l.c
+++ b/src/locale/iswcntrl_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswcntrl_l(wint_t c, locale_t l)
+int iswcntrl_l(wint_t c, locale_t l)
{
return iswcntrl(c);
}
diff --git a/src/locale/iswctype_l.c b/src/locale/iswctype_l.c
index be222d36..1dccef63 100644
--- a/src/locale/iswctype_l.c
+++ b/src/locale/iswctype_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswctype_l(wint_t c, wctype_t t, locale_t l)
+int iswctype_l(wint_t c, wctype_t t, locale_t l)
{
return iswctype(c, t);
}
diff --git a/src/locale/iswdigit_l.c b/src/locale/iswdigit_l.c
index 3f567fc1..3de678c2 100644
--- a/src/locale/iswdigit_l.c
+++ b/src/locale/iswdigit_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswdigit_l(wint_t c, locale_t l)
+int iswdigit_l(wint_t c, locale_t l)
{
return iswdigit(c);
}
diff --git a/src/locale/iswgraph_l.c b/src/locale/iswgraph_l.c
index 4a8f787c..34df64fc 100644
--- a/src/locale/iswgraph_l.c
+++ b/src/locale/iswgraph_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswgraph_l(wint_t c, locale_t l)
+int iswgraph_l(wint_t c, locale_t l)
{
return iswgraph(c);
}
diff --git a/src/locale/iswlower_l.c b/src/locale/iswlower_l.c
index 51e07f35..c52421a0 100644
--- a/src/locale/iswlower_l.c
+++ b/src/locale/iswlower_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswlower_l(wint_t c, locale_t l)
+int iswlower_l(wint_t c, locale_t l)
{
return iswlower(c);
}
diff --git a/src/locale/iswprint_l.c b/src/locale/iswprint_l.c
index eeacb94e..73d83ab3 100644
--- a/src/locale/iswprint_l.c
+++ b/src/locale/iswprint_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswprint_l(wint_t c, locale_t l)
+int iswprint_l(wint_t c, locale_t l)
{
return iswprint(c);
}
diff --git a/src/locale/iswpunct_l.c b/src/locale/iswpunct_l.c
index 60e2ccf6..831e0e54 100644
--- a/src/locale/iswpunct_l.c
+++ b/src/locale/iswpunct_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswpunct_l(wint_t c, locale_t l)
+int iswpunct_l(wint_t c, locale_t l)
{
return iswpunct(c);
}
diff --git a/src/locale/iswspace_l.c b/src/locale/iswspace_l.c
index befccc8f..b507e9e3 100644
--- a/src/locale/iswspace_l.c
+++ b/src/locale/iswspace_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswspace_l(wint_t c, locale_t l)
+int iswspace_l(wint_t c, locale_t l)
{
return iswspace(c);
}
diff --git a/src/locale/iswupper_l.c b/src/locale/iswupper_l.c
index 867edc63..fc988ef1 100644
--- a/src/locale/iswupper_l.c
+++ b/src/locale/iswupper_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswupper_l(wint_t c, locale_t l)
+int iswupper_l(wint_t c, locale_t l)
{
return iswupper(c);
}
diff --git a/src/locale/iswxdigit_l.c b/src/locale/iswxdigit_l.c
index 8df3f738..9527cf3e 100644
--- a/src/locale/iswxdigit_l.c
+++ b/src/locale/iswxdigit_l.c
@@ -1,6 +1,6 @@
#include <wctype.h>
-wint_t iswxdigit_l(wint_t c, locale_t l)
+int iswxdigit_l(wint_t c, locale_t l)
{
return iswxdigit(c);
}