aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-02-14 21:48:46 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-02-14 21:48:46 +0000
commitb74cf6dcf17dd06d3b530f7d4bec6191728f24b9 (patch)
tree00a985b9380f82c7f307d0bcf2af19ad578ceabb /include
parenta40c00a535e3b71a50072880ef05e22b0cf2732b (diff)
downloadsrc-b74cf6dcf17dd06d3b530f7d4bec6191728f24b9.tar.gz
src-b74cf6dcf17dd06d3b530f7d4bec6191728f24b9.zip
Revert r231673 and r231682 for now, until we can run a full make
universe with them. Sorry for the breakage. Pointy hat to: me and brooks
Notes
Notes: svn path=/head/; revision=231714
Diffstat (limited to 'include')
-rw-r--r--include/Makefile4
-rw-r--r--include/_xlocale_ctype.h (renamed from include/xlocale/_ctype.h)54
-rw-r--r--include/ctype.h4
-rw-r--r--include/langinfo.h4
-rw-r--r--include/locale.h47
-rw-r--r--include/runetype.h20
-rw-r--r--include/string.h4
-rw-r--r--include/time.h4
-rw-r--r--include/wchar.h4
-rw-r--r--include/wctype.h5
-rw-r--r--include/xlocale.h227
-rw-r--r--include/xlocale/Makefile8
-rw-r--r--include/xlocale/_inttypes.h44
-rw-r--r--include/xlocale/_langinfo.h42
-rw-r--r--include/xlocale/_locale.h56
-rw-r--r--include/xlocale/_monetary.h45
-rw-r--r--include/xlocale/_stdio.h64
-rw-r--r--include/xlocale/_stdlib.h59
-rw-r--r--include/xlocale/_string.h61
-rw-r--r--include/xlocale/_time.h58
-rw-r--r--include/xlocale/_wchar.h133
21 files changed, 269 insertions, 678 deletions
diff --git a/include/Makefile b/include/Makefile
index e54f9cd84c4b..5fc39230bde5 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -6,7 +6,7 @@
.include <bsd.own.mk>
CLEANFILES= osreldate.h version vers.c
-SUBDIR= arpa gssapi protocols rpcsvc rpc xlocale
+SUBDIR= arpa gssapi protocols rpcsvc rpc
INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \
db.h \
dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \
@@ -24,7 +24,7 @@ INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \
strings.h sysexits.h tar.h termios.h tgmath.h \
time.h timeconv.h timers.h ttyent.h \
ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h vis.h \
- wchar.h wctype.h wordexp.h xlocale.h
+ wchar.h wctype.h wordexp.h xlocale.h _xlocale_ctype.h
MHDRS= float.h floatingpoint.h stdarg.h
diff --git a/include/xlocale/_ctype.h b/include/_xlocale_ctype.h
index d8d68b93a37f..1b2e21b0f1fe 100644
--- a/include/xlocale/_ctype.h
+++ b/include/_xlocale_ctype.h
@@ -6,18 +6,17 @@
* the FreeBSD Foundation.
*
* Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * modification, are permitted provided that the following conditions * are met:
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -28,45 +27,28 @@
*
* $FreeBSD$
*/
-
-
-#if (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \
- (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H))
-
-#ifdef _XLOCALE_WCTYPES
-#define _XLOCALE_WCTYPE_H
-#else
-#define _XLOCALE_CTYPE_H
-#endif
-
-#ifndef _LOCALE_T_DEFINED
-#define _LOCALE_T_DEFINED
-typedef struct _xlocale *locale_t;
+#ifndef _XLOCALE_H_
+#error This header should only be included by <xlocale.h>, never directly.
#endif
#ifndef _XLOCALE_CTYPE_H_
-unsigned long ___runetype_l(__ct_rune_t, locale_t) __pure;
-__ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __pure;
-__ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __pure;
+__BEGIN_DECLS
+unsigned long ___runetype_l(__ct_rune_t, locale_t) __pure;
+__ct_rune_t ___tolower_l(__ct_rune_t, locale_t) __pure;
+__ct_rune_t ___toupper_l(__ct_rune_t, locale_t) __pure;
_RuneLocale *__runes_for_locale(locale_t, int*);
+__END_DECLS
#endif
#ifndef _XLOCALE_INLINE
#if __GNUC__ && !__GNUC_STDC_INLINE__
-/* GNU89 inline has nonstandard semantics. */
#define _XLOCALE_INLINE extern inline
#else
-/* Hack to work around people who define inline away */
-#ifdef inline
-#define _XLOCALE_INLINE __inline static
-#else
-/* Define with C++ / C99 compatible semantics */
#define _XLOCALE_INLINE inline
#endif
#endif
-#endif /* _XLOCALE_INLINE */
-#ifdef _XLOCALE_WCTYPES
+#ifdef XLOCALE_WCTYPES
static __inline int
__maskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale)
{
@@ -126,7 +108,7 @@ XLOCALE_ISCTYPE(upper, _CTYPE_U)
XLOCALE_ISCTYPE(xdigit, _CTYPE_X)
#undef XLOCALE_ISCTYPE
-#ifdef _XLOCALE_WCTYPES
+#ifdef XLOCALE_WCTYPES
_XLOCALE_INLINE int towlower_l(int c, locale_t locale)
{
int mb_sb_limit;
@@ -158,7 +140,7 @@ wctype_t wctype_l(const char *property, locale_t locale);
wint_t towctrans_l(wint_t wc, wctrans_t desc, locale_t locale);
wint_t nextwctype_l(wint_t wc, wctype_t wct, locale_t locale);
wctrans_t wctrans_l(const char *charclass, locale_t locale);
-#undef _XLOCALE_WCTYPES
+#undef XLOCALE_WCTYPES
#else
_XLOCALE_INLINE int digittoint_l(int c, locale_t locale)
{ return __sbmaskrune_l((c), 0xFF, locale); }
@@ -178,5 +160,3 @@ _XLOCALE_INLINE int toupper_l(int c, locale_t locale)
runes->__mapupper[c];
}
#endif
-#endif /* (defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_WCTYPE_H)) || \
- (!defined(_XLOCALE_WCTYPES) && !defined(_XLOCALE_CTYPE_H)) */
diff --git a/include/ctype.h b/include/ctype.h
index f0ca79798b79..c3f80f3b5f35 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -78,10 +78,6 @@ int isphonogram(int);
int isrune(int);
int isspecial(int);
#endif
-
-#if __POSIX_VISIBLE >= 200809
-#include <xlocale/_ctype.h>
-#endif
__END_DECLS
#ifndef __cplusplus
diff --git a/include/langinfo.h b/include/langinfo.h
index 42ad832bb486..6d6b95f2cc4e 100644
--- a/include/langinfo.h
+++ b/include/langinfo.h
@@ -130,10 +130,6 @@ typedef __nl_item nl_item;
__BEGIN_DECLS
char *nl_langinfo(nl_item);
-
-#if __POSIX_VISIBLE >= 200809
-#include <xlocale/_langinfo.h>
-#endif
__END_DECLS
#endif /* !_LANGINFO_H_ */
diff --git a/include/locale.h b/include/locale.h
index 0edc3eab716d..8df0a6a8882b 100644
--- a/include/locale.h
+++ b/include/locale.h
@@ -77,11 +77,54 @@ struct lconv {
__BEGIN_DECLS
struct lconv *localeconv(void);
char *setlocale(int, const char *);
+__END_DECLS
#if __POSIX_VISIBLE >= 200809
-#include <xlocale/_locale.h>
-#endif
+
+#define LC_COLLATE_MASK (1<<0)
+#define LC_CTYPE_MASK (1<<1)
+#define LC_MESSAGES_MASK (1<<2)
+#define LC_MONETARY_MASK (1<<3)
+#define LC_NUMERIC_MASK (1<<4)
+#define LC_TIME_MASK (1<<5)
+#define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | \
+ LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK)
+
+#define LC_GLOBAL_LOCALE ((locale_t)-1)
+
+__BEGIN_DECLS
+
+typedef struct _xlocale *locale_t;
+/**
+ * Creates a new locale.
+ */
+locale_t newlocale(int mask, const char *locale, locale_t base);
+
+/**
+ * Returns an identical duplicate of the passed locale. The returned locale
+ * must be freed with freelocale(). The returned locale will share components
+ * with the original.
+ */
+locale_t duplocale(locale_t base);
+/*
+ * Free a locale_t. This is quite a poorly named function. It actually
+ * disclaims a reference to a locale_t, rather than freeing it.
+ */
+int freelocale(locale_t loc);
+
+/*
+ * Returns the name of the locale for a particular component of a locale_t.
+ */
+const char *querylocale(int mask, locale_t loc);
+
+/*
+ * Installs the specified locale_t as this thread's locale.
+ */
+locale_t uselocale(locale_t loc);
+
__END_DECLS
+#endif /* __POSIX_VISIBLE >= 200809 */
+
#endif /* _LOCALE_H_ */
diff --git a/include/runetype.h b/include/runetype.h
index 5aeea093ca13..c33ea2b6904f 100644
--- a/include/runetype.h
+++ b/include/runetype.h
@@ -85,21 +85,11 @@ typedef struct {
#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */
__BEGIN_DECLS
extern const _RuneLocale _DefaultRuneLocale;
-extern const _RuneLocale *_CurrentRuneLocale;
-#if defined(__NO_TLS) || defined(__RUNETYPE_INTERNAL)
-extern const _RuneLocale *__getCurrentRuneLocale(void);
-#else
-extern const _Thread_local _RuneLocale *_ThreadRuneLocale;
-static inline const _RuneLocale *__getCurrentRuneLocale(void)
-{
-
- if (_ThreadRuneLocale)
- return _ThreadRuneLocale;
- if (_CurrentRuneLocale)
- return _CurrentRuneLocale;
- return &_DefaultRuneLocale;
-}
-#endif /* __NO_TLS || __RUNETYPE_INTERNAL */
+__attribute__((deprecated))
+extern _RuneLocale *_CurrentRuneLocale;
+/* TODO: This is called quite a lot, so we should use a __thread variable when
+ * it's available. */
+extern _RuneLocale *__getCurrentRuneLocale(void);
#define _CurrentRuneLocale (__getCurrentRuneLocale())
__END_DECLS
diff --git a/include/string.h b/include/string.h
index 074c20471910..239a76f5ec1a 100644
--- a/include/string.h
+++ b/include/string.h
@@ -132,10 +132,6 @@ void swab(const void * __restrict, void * __restrict, ssize_t);
#endif /* _SWAB_DECLARED */
#endif /* __BSD_VISIBLE */
-
-#if __POSIX_VISIBLE >= 200809
-#include <xlocale/_string.h>
-#endif
__END_DECLS
#endif /* _STRING_H_ */
diff --git a/include/time.h b/include/time.h
index 812575a86e71..add970e5df74 100644
--- a/include/time.h
+++ b/include/time.h
@@ -183,10 +183,6 @@ void tzsetwall(void);
time_t timelocal(struct tm * const);
time_t timegm(struct tm * const);
#endif /* __BSD_VISIBLE */
-
-#if __POSIX_VISIBLE >= 200809
-#include <xlocale/_time.h>
-#endif
__END_DECLS
#endif /* !_TIME_H_ */
diff --git a/include/wchar.h b/include/wchar.h
index 4e44b53633a1..c641165baf9b 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -224,10 +224,6 @@ wchar_t *fgetwln(FILE * __restrict, size_t * __restrict);
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
-#include <xlocale/_wchar.h>
-#endif
__END_DECLS
#endif /* !_WCHAR_H_ */
diff --git a/include/wctype.h b/include/wctype.h
index 2a2abd9c460d..183a2cd76534 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -87,11 +87,6 @@ wint_t iswrune(wint_t);
wint_t iswspecial(wint_t);
wint_t nextwctype(wint_t, wctype_t);
#endif
-
-#if __POSIX_VISIBLE >= 200809
-#define _XLOCALE_WCTYPES 1
-#include <xlocale/_ctype.h>
-#endif /* __POSIX_VISIBLE >= 200809 */
__END_DECLS
#ifndef __cplusplus
diff --git a/include/xlocale.h b/include/xlocale.h
index cdeff3edddf8..1f27894f9c97 100644
--- a/include/xlocale.h
+++ b/include/xlocale.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
+ * Copyright (c) 2011 The FreeBSD Foundation
* All rights reserved.
*
* This software was developed by David Chisnall under sponsorship from
@@ -8,16 +8,16 @@
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -33,51 +33,224 @@
#define _XLOCALE_H_
#include <locale.h>
+
__BEGIN_DECLS
-#include <xlocale/_locale.h>
+/*
+ * Extended locale versions of the locale-aware functions from string.h.
+ *
+ * Include <string.h> before <xlocale.h> to expose these.
+ */
#ifdef _STRING_H_
-#include <xlocale/_string.h>
+int strcoll_l(const char *, const char *, locale_t);
+size_t strxfrm_l(char *, const char *, size_t, locale_t);
+int strcasecmp_l(const char *, const char *, locale_t);
+char *strcasestr_l(const char *, const char *, locale_t);
+int strncasecmp_l(const char *, const char *, size_t, locale_t);
#endif
-
+/*
+ * Extended locale versions of the locale-aware functions from inttypes.h.
+ *
+ * Include <inttypes.h> before <xlocale.h> to expose these.
+ */
#ifdef _INTTYPES_H_
-#include <xlocale/_inttypes.h>
+intmax_t
+strtoimax_l(const char * __restrict, char ** __restrict, int, locale_t);
+uintmax_t
+strtoumax_l(const char * __restrict, char ** __restrict, int, locale_t);
+intmax_t
+wcstoimax_l(const wchar_t * __restrict, wchar_t ** __restrict, int , locale_t);
+uintmax_t
+wcstoumax_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t);
#endif
-
+/*
+ * Extended locale versions of the locale-aware functions from monetary.h.
+ *
+ * Include <monetary.h> before <xlocale.h> to expose these.
+ */
#ifdef _MONETARY_H_
-#include <xlocale/_monetary.h>
+ssize_t strfmon_l(char *, size_t, locale_t, const char *, ...)
+# if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7
+ __attribute__((__format__ (__strfmon__, 4, 5)))
+# endif
+ ;
#endif
+/*
+ * Extended locale versions of the locale-aware functions from stdlib.h.
+ *
+ * Include <stdlib.h> before <xlocale.h> to expose these.
+ */
#ifdef _STDLIB_H_
-#include <xlocale/_stdlib.h>
-#endif
+double atof_l(const char *, locale_t);
+int atoi_l(const char *, locale_t);
+long atol_l(const char *, locale_t);
+long long atoll_l(const char *, locale_t);
+int mblen_l(const char *, size_t, locale_t);
+size_t
+mbstowcs_l(wchar_t * __restrict, const char * __restrict, size_t, locale_t);
+int
+mbtowc_l(wchar_t * __restrict, const char * __restrict, size_t, locale_t);
+double strtod_l(const char *, char **, locale_t);
+float strtof_l(const char *, char **, locale_t);
+long strtol_l(const char *, char **, int, locale_t);
+long double strtold_l(const char *, char **, locale_t);
+long long strtoll_l(const char *, char **, int, locale_t);
+unsigned long strtoul_l(const char *, char **, int, locale_t);
+unsigned long long strtoull_l(const char *, char **, int, locale_t);
+size_t
+wcstombs_l(char * __restrict, const wchar_t * __restrict, size_t, locale_t);
+int wctomb_l(char *, wchar_t, locale_t);
+int ___mb_cur_max_l(locale_t);
+#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x))
+
+#endif
+/*
+ * Extended locale versions of the locale-aware functions from time.h.
+ *
+ * Include <time.h> before <xlocale.h> to expose these.
+ */
#ifdef _TIME_H_
-#include <xlocale/_time.h>
+size_t
+strftime_l(char * __restrict, size_t, const char * __restrict, const
+ struct tm * __restrict, locale_t)
+# if __GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 7
+ __attribute__((__format__ (__strftime__, 3, 0)))
+# endif
+ ;
+char *
+strptime_l(const char * __restrict, const char * __restrict,
+ struct tm * __restrict, locale_t);
#endif
-
#ifdef _LANGINFO_H_
-#include <xlocale/_langinfo.h>
+char *nl_langinfo_l(nl_item, locale_t);
#endif
-
#ifdef _CTYPE_H_
-#include <xlocale/_ctype.h>
+#include <_xlocale_ctype.h>
#endif
-
#ifdef _WCTYPE_H_
-#define _XLOCALE_WCTYPES 1
-#include <xlocale/_ctype.h>
+#define XLOCALE_WCTYPES 1
+#include <_xlocale_ctype.h>
#endif
#ifdef _STDIO_H_
-#include <xlocale/_stdio.h>
-#endif
+int fprintf_l(FILE * __restrict, locale_t, const char * __restrict, ...)
+ __printflike(3, 4);
+int fscanf_l(FILE * __restrict, locale_t, const char * __restrict, ...)
+ __scanflike(3, 4);
+int printf_l(locale_t, const char * __restrict, ...) __printflike(2, 3);
+int scanf_l(locale_t, const char * __restrict, ...) __scanflike(2, 3);
+int sprintf_l(char * __restrict, locale_t, const char * __restrict, ...)
+ __printflike(3, 4);
+int sscanf_l(const char * __restrict, locale_t, const char * __restrict, ...)
+ __scanflike(3, 4);
+int vfprintf_l(FILE * __restrict, locale_t, const char * __restrict, __va_list)
+ __printflike(3, 0);
+int vprintf_l(locale_t, const char * __restrict, __va_list) __printflike(2, 0);
+int vsprintf_l(char * __restrict, locale_t, const char * __restrict, __va_list)
+ __printflike(3, 0);
-#ifdef _WCHAR_H_
-#include <xlocale/_wchar.h>
+int snprintf_l(char * __restrict, size_t, locale_t, const char * __restrict,
+ ...) __printflike(4, 5);
+int vfscanf_l(FILE * __restrict, locale_t, const char * __restrict, __va_list)
+ __scanflike(3, 0);
+int vscanf_l(locale_t, const char * __restrict, __va_list) __scanflike(2, 0);
+int vsnprintf_l(char * __restrict, size_t, locale_t, const char * __restrict,
+ __va_list) __printflike(4, 0);
+int vsscanf_l(const char * __restrict, locale_t, const char * __restrict,
+ __va_list) __scanflike(3, 0);
+int dprintf_l(int, locale_t, const char * __restrict, ...) __printflike(3, 4);
+int vdprintf_l(int, locale_t, const char * __restrict, __va_list)
+ __printflike(3, 0);
+int asprintf_l(char **, locale_t, const char *, ...) __printflike(3, 4);
+int vasprintf_l(char **, locale_t, const char *, __va_list) __printflike(3, 0);
#endif
+#ifdef _WCHAR_H_
+wint_t btowc_l(int, locale_t);
+wint_t fgetwc_l(FILE *, locale_t);
+wchar_t *
+fgetws_l(wchar_t * __restrict, int, FILE * __restrict, locale_t);
+wint_t fputwc_l(wchar_t, FILE *, locale_t);
+int
+fputws_l(const wchar_t * __restrict, FILE * __restrict, locale_t);
+int
+fwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict,
+ ...);
+int
+fwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict, ...);
+wint_t getwc_l(FILE *, locale_t);
+wint_t getwchar_l(locale_t);
+size_t
+mbrlen_l(const char * __restrict, size_t, mbstate_t * __restrict, locale_t);
+size_t
+mbrtowc_l(wchar_t * __restrict, const char * __restrict, size_t,
+ mbstate_t * __restrict, locale_t);
+int mbsinit_l(const mbstate_t *, locale_t);
+size_t
+mbsrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t,
+ mbstate_t * __restrict, locale_t);
+wint_t putwc_l(wchar_t, FILE *, locale_t);
+wint_t putwchar_l(wchar_t, locale_t);
+int
+swprintf_l(wchar_t * __restrict, size_t n, locale_t,
+ const wchar_t * __restrict, ...);
+int
+swscanf_l(const wchar_t * __restrict, locale_t, const wchar_t * __restrict,
+ ...);
+wint_t ungetwc_l(wint_t, FILE *, locale_t);
+int
+vfwprintf_l(FILE * __restrict, locale_t, const wchar_t * __restrict,
+ __va_list);
+int
+vswprintf_l(wchar_t * __restrict, size_t n, locale_t,
+ const wchar_t * __restrict, __va_list);
+int vwprintf_l(locale_t, const wchar_t * __restrict, __va_list);
+size_t
+wcrtomb_l(char * __restrict, wchar_t, mbstate_t * __restrict, locale_t);
+int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
+size_t
+wcsftime_l(wchar_t * __restrict, size_t, const wchar_t * __restrict,
+ const struct tm * __restrict, locale_t);
+size_t
+wcsrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t,
+ mbstate_t * __restrict, locale_t);
+double wcstod_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t);
+long
+wcstol_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t);
+unsigned long
+wcstoul_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t);
+int wcswidth_l(const wchar_t *, size_t, locale_t);
+size_t
+wcsxfrm_l(wchar_t * __restrict, const wchar_t * __restrict, size_t, locale_t);
+int wctob_l(wint_t, locale_t);
+int wcwidth_l(wchar_t, locale_t);
+int wprintf_l(locale_t, const wchar_t * __restrict, ...);
+int wscanf_l(locale_t, const wchar_t * __restrict, ...);
+int
+vfwscanf_l(FILE * __restrict, locale_t, const wchar_t * __restrict,
+ __va_list);
+int vswscanf_l(const wchar_t * __restrict, locale_t,
+const wchar_t *__restrict, __va_list);
+int vwscanf_l(locale_t, const wchar_t * __restrict, __va_list);
+float wcstof_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t);
+long double
+wcstold_l(const wchar_t * __restrict, wchar_t ** __restrict, locale_t);
+long long
+wcstoll_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t);
+unsigned long long
+wcstoull_l(const wchar_t * __restrict, wchar_t ** __restrict, int, locale_t);
+size_t
+mbsnrtowcs_l(wchar_t * __restrict, const char ** __restrict, size_t, size_t,
+ mbstate_t * __restrict, locale_t);
+int wcscasecmp_l(const wchar_t *, const wchar_t *, locale_t);
+int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t, locale_t);
+size_t
+wcsnrtombs_l(char * __restrict, const wchar_t ** __restrict, size_t, size_t,
+ mbstate_t * __restrict, locale_t);
+#endif
struct lconv *localeconv_l(locale_t);
__END_DECLS
diff --git a/include/xlocale/Makefile b/include/xlocale/Makefile
deleted file mode 100644
index e45ddca8e84d..000000000000
--- a/include/xlocale/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-NO_OBJ=
-INCS= _ctype.h _inttypes.h _langinfo.h _locale.h _monetary.h _stdio.h\
- _stdlib.h _string.h _time.h _wchar.h
-INCSDIR=${INCLUDEDIR}/xlocale
-
-.include <bsd.prog.mk>
diff --git a/include/xlocale/_inttypes.h b/include/xlocale/_inttypes.h
deleted file mode 100644
index 58e434ecf3d5..000000000000
--- a/include/xlocale/_inttypes.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by David Chisnall under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-
-/*
- * Extended locale versions of the locale-aware functions from inttypes.h.
- * Include <inttypes.h> before <xlocale.h> to expose these.
- */
-intmax_t strtoimax_l(const char * __restrict, char ** __restrict,
- int, locale_t);
-uintmax_t strtoumax_l(const char * __restrict, char ** __restrict, int,
- locale_t);
-intmax_t wcstoimax_l(const wchar_t * __restrict, wchar_t ** __restrict,
- int , locale_t);
-uintmax_t wcstoumax_l(const wchar_t * __restrict, wchar_t ** __restrict,
- int, locale_t);
diff --git a/include/xlocale/_langinfo.h b/include/xlocale/_langinfo.h
deleted file mode 100644
index e4f8c50a27a3..000000000000
--- a/include/xlocale/_langinfo.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by David Chisnall under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _XLOCALE_LANGINFO_H
-#define _XLOCALE_LANGINFO_H
-
-#ifndef _LOCALE_T_DEFINED
-#define _LOCALE_T_DEFINED
-typedef struct _xlocale *locale_t;
-#endif
-
-char *nl_langinfo_l(nl_item, locale_t);
-
-#endif /* _XLOCALE_LANGINFO_H */
diff --git a/include/xlocale/_locale.h b/include/xlocale/_locale.h
deleted file mode 100644
index f8aafb8a1ba9..000000000000
--- a/include/xlocale/_locale.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by David Chisnall under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _XLOCALE_LOCALE_H
-#define _XLOCALE_LOCALE_H
-
-#define LC_COLLATE_MASK (1<<0)
-#define LC_CTYPE_MASK (1<<1)
-#define LC_MESSAGES_MASK (1<<2)
-#define LC_MONETARY_MASK (1<<3)
-#define LC_NUMERIC_MASK (1<<4)
-#define LC_TIME_MASK (1<<5)
-#define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | \
- LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK)
-#define LC_GLOBAL_LOCALE ((locale_t)-1)
-
-#ifndef _LOCALE_T_DEFINED
-#define _LOCALE_T_DEFINED
-typedef struct _xlocale *locale_t;
-#endif
-
-locale_t duplocale(locale_t base);
-int freelocale(locale_t loc);
-locale_t newlocale(int mask, const char *locale, locale_t base);
-const char *querylocale(int mask, locale_t loc);
-locale_t uselocale(locale_t loc);
-
-#endif /* _XLOCALE_LOCALE_H */
diff --git a/include/xlocale/_monetary.h b/include/xlocale/_monetary.h
deleted file mode 100644
index 3481278acf01..000000000000
--- a/include/xlocale/_monetary.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by David Chisnall under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _LOCALE_T_DEFINED
-#define _LOCALE_T_DEFINED
-typedef struct _xlocale *locale_t;
-#endif
-
-#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
-#ifndef _XLOCALE_MONETARY_H
-#define _XLOCALE_MONETARY_H
-
-ssize_t strfmon_l(char *, size_t, locale_t, const char *, ...)
- __strfmonlike(4, 5);
-
-#endif /* _XLOCALE_MONETARY_H */
-#endif /* __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) */
diff --git a/include/xlocale/_stdio.h b/include/xlocale/_stdio.h
deleted file mode 100644
index 0aebdcf97bf8..000000000000
--- a/include/xlocale/_stdio.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by David Chisnall under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-int asprintf_l(char **, locale_t, const char *, ...) __printflike(3, 4);
-int dprintf_l(int, locale_t, const char * __restrict, ...)
- __printflike(3, 4);
-int fprintf_l(FILE * __restrict, locale_t, const char * __restrict, ...)
- __printflike(3, 4);
-int fscanf_l(FILE * __restrict, locale_t, const char * __restrict, ...)
- __scanflike(3, 4);
-int printf_l(locale_t, const char * __restrict, ...) __printflike(2, 3);
-int scanf_l(locale_t, const char * __restrict, ...) __scanflike(2, 3);
-int snprintf_l(char * __restrict, size_t, locale_t,
- const char * __restrict, ...) __printflike(4, 5);
-int sprintf_l(char * __restrict, locale_t, const char * __restrict, ...)
- __printflike(3, 4);
-int sscanf_l(const char * __restrict, locale_t, const char * __restrict,
- ...) __scanflike(3, 4);
-int vfprintf_l(FILE * __restrict, locale_t, const char * __restrict,
- __va_list) __printflike(3, 0);
-int vprintf_l(locale_t, const char * __restrict, __va_list)
- __printflike(2, 0);
-int vsprintf_l(char * __restrict, locale_t, const char * __restrict,
- __va_list) __printflike(3, 0);
-int vfscanf_l(FILE * __restrict, locale_t, const char * __restrict,
- __va_list) __scanflike(3, 0);
-int vscanf_l(locale_t, const char * __restrict, __va_list)
- __scanflike(2, 0);
-int vsnprintf_l(char * __restrict, size_t, locale_t,
- const char * __restrict, __va_list) __printflike(4, 0);
-int vsscanf_l(const char * __restrict, locale_t, const char * __restrict,
- __va_list) __scanflike(3, 0);
-int vdprintf_l(int, locale_t, const char * __restrict, __va_list)
- __printflike(3, 0);
-int vasprintf_l(char **, locale_t, const char *, __va_list)
- __printflike(3, 0);
diff --git a/include/xlocale/_stdlib.h b/include/xlocale/_stdlib.h
deleted file mode 100644
index 35a2580d4157..000000000000
--- a/include/xlocale/_stdlib.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by David Chisnall under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-/*
- * Extended locale versions of the locale-aware functions from stdlib.h.
- *
- * Include <stdlib.h> before <xlocale.h> to expose these.
- */
-double atof_l(const char *, locale_t);
-int atoi_l(const char *, locale_t);
-long atol_l(const char *, locale_t);
-long long atoll_l(const char *, locale_t);
-int mblen_l(const char *, size_t, locale_t);
-size_t mbstowcs_l(wchar_t * __restrict,
- const char * __restrict, size_t, locale_t);
-int mbtowc_l(wchar_t * __restrict,
- const char * __restrict, size_t, locale_t);
-double strtod_l(const char *, char **, locale_t);
-float strtof_l(const char *, char **, locale_t);
-long strtol_l(const char *, char **, int, locale_t);
-long double strtold_l(const char *, char **, locale_t);
-long long strtoll_l(const char *, char **, int, locale_t);
-unsigned long strtoul_l(const char *, char **, int, locale_t);
-unsigned long long strtoull_l(const char *, char **, int, locale_t);
-size_t wcstombs_l(char * __restrict,
- const wchar_t * __restrict, size_t, locale_t);
-int wctomb_l(char *, wchar_t, locale_t);
-
-int ___mb_cur_max_l(locale_t);
-#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x))
-
diff --git a/include/xlocale/_string.h b/include/xlocale/_string.h
deleted file mode 100644
index 262728066c27..000000000000
--- a/include/xlocale/_string.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _LOCALE_T_DEFINED
-#define _LOCALE_T_DEFINED
-typedef struct _xlocale *locale_t;
-#endif
-
-/*
- * This file is included from both string.h and xlocale.h. We need to expose
- * the declarations unconditionally if we are included from xlocale.h, but only
- * if we are in POSIX2008 mode if included from string.h.
- */
-
-#ifndef _XLOCALE_STRING1_H
-#define _XLOCALE_STRING1_H
-
-/*
- * POSIX2008 functions
- */
-int strcoll_l(const char *, const char *, locale_t);
-size_t strxfrm_l(char *, const char *, size_t, locale_t);
-#endif /* _XLOCALE_STRING1_H */
-
-/*
- * xlocale extensions
- */
-#ifdef _XLOCALE_H_
-#ifndef _XLOCALE_STRING2_H
-#define _XLOCALE_STRING2_H
-int strcasecmp_l(const char *, const char *, locale_t);
-char *strcasestr_l(const char *, const char *, locale_t);
-int strncasecmp_l(const char *, const char *, size_t, locale_t);
-
-#endif /* _XLOCALE_STRING2_H */
-#endif /* _XLOCALE_H_ */
diff --git a/include/xlocale/_time.h b/include/xlocale/_time.h
deleted file mode 100644
index 4493fdd449b5..000000000000
--- a/include/xlocale/_time.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by David Chisnall under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _LOCALE_T_DEFINED
-#define _LOCALE_T_DEFINED
-typedef struct _xlocale *locale_t;
-#endif
-
-/*
- * This file is included from both locale.h and xlocale.h. We need to expose
- * the declarations unconditionally if we are included from xlocale.h, but only
- * if we are in POSIX2008 mode if included from locale.h.
- */
-#ifndef _XLOCALE_LOCALE1_H
-#define _XLOCALE_LOCALE1_H
-
-size_t strftime_l(char * __restrict, size_t, const char * __restrict,
- const struct tm * __restrict, locale_t) __strftimelike(3, 0);
-
-#endif /* _XLOCALE_LOCALE1_H */
-
-#ifdef _XLOCALE_H_
-#ifndef _XLOCALE_LOCALE2_H
-#define _XLOCALE_LOCALE2_H
-
-char *strptime_l(const char * __restrict, const char * __restrict,
- struct tm * __restrict, locale_t);
-
-#endif /* _XLOCALE_LOCALE2_H */
-#endif /* _XLOCALE_H_ */
diff --git a/include/xlocale/_wchar.h b/include/xlocale/_wchar.h
deleted file mode 100644
index 6b02d05c96d2..000000000000
--- a/include/xlocale/_wchar.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*-
- * Copyright (c) 2011, 2012 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by David Chisnall under sponsorship from
- * the FreeBSD Foundation.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
- */
-
-#ifndef _LOCALE_T_DEFINED
-#define _LOCALE_T_DEFINED
-typedef struct _xlocale *locale_t;
-#endif
-
-#ifndef _XLOCALE_WCHAR1_H
-#define _XLOCALE_WCHAR1_H
-int wcscasecmp_l(const wchar_t *, const wchar_t *,
- locale_t);
-int wcsncasecmp_l(const wchar_t *, const wchar_t *, size_t,
- locale_t);
-int wcscoll_l(const wchar_t *, const wchar_t *, locale_t);
-size_t wcsxfrm_l(wchar_t * __restrict,
- const wchar_t * __restrict, size_t, locale_t);
-
-#endif /* _XLOCALE_WCHAR1_H */
-
-/*
- * Only declare the non-POSIX functions if we're included from xlocale.h.
- */
-
-#ifdef _XLOCALE_H_
-#ifndef _XLOCALE_WCHAR2_H
-#define _XLOCALE_WCHAR2_H
-
-wint_t btowc_l(int, locale_t);
-wint_t fgetwc_l(FILE *, locale_t);
-wchar_t *fgetws_l(wchar_t * __restrict, int, FILE * __restrict,
- locale_t);
-wint_t fputwc_l(wchar_t, FILE *, locale_t);
-int fputws_l(const wchar_t * __restrict, FILE * __restrict,
- locale_t);
-int fwprintf_l(FILE * __restrict, locale_t,
- const wchar_t * __restrict, ...);
-int fwscanf_l(FILE * __restrict, locale_t,
- const wchar_t * __restrict, ...);
-wint_t getwc_l(FILE *, locale_t);
-wint_t getwchar_l(locale_t);
-size_t mbrlen_l(const char * __restrict, size_t,
- mbstate_t * __restrict, locale_t);
-size_t mbrtowc_l(wchar_t * __restrict,
- const char * __restrict, size_t,
- mbstate_t * __restrict, locale_t);
-int mbsinit_l(const mbstate_t *, locale_t);
-size_t mbsrtowcs_l(wchar_t * __restrict,
- const char ** __restrict, size_t,
- mbstate_t * __restrict, locale_t);
-wint_t putwc_l(wchar_t, FILE *, locale_t);
-wint_t putwchar_l(wchar_t, locale_t);
-int swprintf_l(wchar_t * __restrict, size_t n, locale_t,
- const wchar_t * __restrict, ...);
-int swscanf_l(const wchar_t * __restrict, locale_t,
- const wchar_t * __restrict, ...);
-wint_t ungetwc_l(wint_t, FILE *, locale_t);
-int vfwprintf_l(FILE * __restrict, locale_t,
- const wchar_t * __restrict, __va_list);
-int vswprintf_l(wchar_t * __restrict, size_t n, locale_t,
- const wchar_t * __restrict, __va_list);
-int vwprintf_l(locale_t, const wchar_t * __restrict,
- __va_list);
-size_t wcrtomb_l(char * __restrict, wchar_t,
- mbstate_t * __restrict, locale_t);
-size_t wcsftime_l(wchar_t * __restrict, size_t,
- const wchar_t * __restrict,
- const struct tm * __restrict, locale_t);
-size_t wcsrtombs_l(char * __restrict,
- const wchar_t ** __restrict, size_t,
- mbstate_t * __restrict, locale_t);
-double wcstod_l(const wchar_t * __restrict,
- wchar_t ** __restrict, locale_t);
-long wcstol_l(const wchar_t * __restrict,
- wchar_t ** __restrict, int, locale_t);
-unsigned long wcstoul_l(const wchar_t * __restrict,
- wchar_t ** __restrict, int, locale_t);
-int wcswidth_l(const wchar_t *, size_t, locale_t);
-int wctob_l(wint_t, locale_t);
-int wcwidth_l(wchar_t, locale_t);
-int wprintf_l(locale_t, const wchar_t * __restrict, ...);
-int wscanf_l(locale_t, const wchar_t * __restrict, ...);
-int vfwscanf_l(FILE * __restrict, locale_t,
- const wchar_t * __restrict, __va_list);
-int vswscanf_l(const wchar_t * __restrict, locale_t,
- const wchar_t *__restrict, __va_list);
-int vwscanf_l(locale_t, const wchar_t * __restrict,
- __va_list);
-float wcstof_l(const wchar_t * __restrict,
- wchar_t ** __restrict, locale_t);
-long double wcstold_l(const wchar_t * __restrict,
- wchar_t ** __restrict, locale_t);
-long long wcstoll_l(const wchar_t * __restrict,
- wchar_t ** __restrict, int, locale_t);
-unsigned long long wcstoull_l(const wchar_t * __restrict,
- wchar_t ** __restrict, int, locale_t);
-size_t mbsnrtowcs_l(wchar_t * __restrict,
- const char ** __restrict, size_t, size_t,
- mbstate_t * __restrict, locale_t);
-size_t wcsnrtombs_l(char * __restrict,
- const wchar_t ** __restrict, size_t, size_t,
- mbstate_t * __restrict, locale_t);
-
-#endif /* _XLOCALE_WCHAR_H */
-#endif /* _XLOCALE_H_ */