aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Chisnall <theraven@FreeBSD.org>2012-03-28 12:11:54 +0000
committerDavid Chisnall <theraven@FreeBSD.org>2012-03-28 12:11:54 +0000
commit3ac9d659890471a1936268bfec06e74caf9025df (patch)
tree017678a192a23335e68a28fe397622367d1cc587
parent86e4703fa6904240616f9ab1d313c10e3ec80afa (diff)
downloadsrc-3ac9d659890471a1936268bfec06e74caf9025df.tar.gz
src-3ac9d659890471a1936268bfec06e74caf9025df.zip
Correctly expose xlocale functions if people include the headers in the wrong
order (as some ports apparently do). Approved by: dim (mentor)
Notes
Notes: svn path=/head/; revision=233600
-rw-r--r--include/ctype.h2
-rw-r--r--include/inttypes.h3
-rw-r--r--include/langinfo.h2
-rw-r--r--include/monetary.h3
-rw-r--r--include/stdio.h3
-rw-r--r--include/stdlib.h3
-rw-r--r--include/string.h2
-rw-r--r--include/time.h2
-rw-r--r--include/wchar.h2
9 files changed, 17 insertions, 5 deletions
diff --git a/include/ctype.h b/include/ctype.h
index f0ca79798b79..299b5028ed27 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -79,7 +79,7 @@ int isrune(int);
int isspecial(int);
#endif
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#include <xlocale/_ctype.h>
#endif
__END_DECLS
diff --git a/include/inttypes.h b/include/inttypes.h
index 9aad660eb28d..f702d2c3ca3a 100644
--- a/include/inttypes.h
+++ b/include/inttypes.h
@@ -45,6 +45,9 @@ typedef struct {
} imaxdiv_t;
__BEGIN_DECLS
+#ifdef _XLOCALE_H_
+#include <xlocale/_inttypes.h>
+#endif
intmax_t imaxabs(intmax_t) __pure2;
imaxdiv_t imaxdiv(intmax_t, intmax_t) __pure2;
diff --git a/include/langinfo.h b/include/langinfo.h
index 42ad832bb486..8c88efccfa29 100644
--- a/include/langinfo.h
+++ b/include/langinfo.h
@@ -131,7 +131,7 @@ typedef __nl_item nl_item;
__BEGIN_DECLS
char *nl_langinfo(nl_item);
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#include <xlocale/_langinfo.h>
#endif
__END_DECLS
diff --git a/include/monetary.h b/include/monetary.h
index ade6a88b511f..93f82c1cbdeb 100644
--- a/include/monetary.h
+++ b/include/monetary.h
@@ -43,6 +43,9 @@ typedef __ssize_t ssize_t;
#endif
__BEGIN_DECLS
+#ifdef _XLOCALE_H_
+#include <xlocale/_monetary.h>
+#endif
ssize_t strfmon(char * __restrict, size_t, const char * __restrict, ...);
__END_DECLS
diff --git a/include/stdio.h b/include/stdio.h
index 02032d9788fd..2fd91259e800 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -225,6 +225,9 @@ __END_DECLS
#define stderr __stderrp
__BEGIN_DECLS
+#ifdef _XLOCALE_H_
+#include <xlocale/_stdio.h>
+#endif
/*
* Functions defined in ANSI C standard.
*/
diff --git a/include/stdlib.h b/include/stdlib.h
index 11ac074374dd..7aa5db62fd04 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -72,6 +72,9 @@ typedef struct {
#define RAND_MAX 0x7fffffff
__BEGIN_DECLS
+#ifdef _XLOCALE_H_
+#include <xlocale/_stdlib.h>
+#endif
extern int __mb_cur_max;
extern int ___mb_cur_max(void);
#define MB_CUR_MAX (___mb_cur_max())
diff --git a/include/string.h b/include/string.h
index 074c20471910..e6a910b96fd3 100644
--- a/include/string.h
+++ b/include/string.h
@@ -133,7 +133,7 @@ void swab(const void * __restrict, void * __restrict, ssize_t);
#endif /* __BSD_VISIBLE */
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#include <xlocale/_string.h>
#endif
__END_DECLS
diff --git a/include/time.h b/include/time.h
index 812575a86e71..19c948d646a7 100644
--- a/include/time.h
+++ b/include/time.h
@@ -184,7 +184,7 @@ time_t timelocal(struct tm * const);
time_t timegm(struct tm * const);
#endif /* __BSD_VISIBLE */
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#include <xlocale/_time.h>
#endif
__END_DECLS
diff --git a/include/wchar.h b/include/wchar.h
index 4e44b53633a1..1ebb72f58223 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -225,7 +225,7 @@ size_t wcslcat(wchar_t *, const wchar_t *, size_t);
size_t wcslcpy(wchar_t *, const wchar_t *, size_t);
#endif
-#if __POSIX_VISIBLE >= 200809
+#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#include <xlocale/_wchar.h>
#endif
__END_DECLS