1231673Stheraven/*-
2231673Stheraven * Copyright (c) 2011, 2012 The FreeBSD Foundation
3231673Stheraven * All rights reserved.
4231673Stheraven *
5231673Stheraven * This software was developed by David Chisnall under sponsorship from
6231673Stheraven * the FreeBSD Foundation.
7231673Stheraven *
8231673Stheraven * Redistribution and use in source and binary forms, with or without
9231673Stheraven * modification, are permitted provided that the following conditions
10231673Stheraven * are met:
11231673Stheraven * 1. Redistributions of source code must retain the above copyright
12231673Stheraven *    notice, this list of conditions and the following disclaimer.
13231673Stheraven * 2. Redistributions in binary form must reproduce the above copyright
14231673Stheraven *    notice, this list of conditions and the following disclaimer in the
15231673Stheraven *    documentation and/or other materials provided with the distribution.
16231673Stheraven *
17231673Stheraven * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18231673Stheraven * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19231673Stheraven * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20231673Stheraven * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21231673Stheraven * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22231673Stheraven * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23231673Stheraven * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24231673Stheraven * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25231673Stheraven * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26231673Stheraven * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27231673Stheraven * SUCH DAMAGE.
28231673Stheraven *
29231673Stheraven * $FreeBSD$
30231673Stheraven */
31231673Stheraven
32231673Stheraven/*
33231673Stheraven * Extended locale versions of the locale-aware functions from stdlib.h.
34231673Stheraven *
35231673Stheraven * Include <stdlib.h> before <xlocale.h> to expose these.
36231673Stheraven */
37231673Stheravendouble			 atof_l(const char *, locale_t);
38231673Stheravenint			 atoi_l(const char *, locale_t);
39231673Stheravenlong			 atol_l(const char *, locale_t);
40231673Stheravenlong long		 atoll_l(const char *, locale_t);
41231673Stheravenint			 mblen_l(const char *, size_t, locale_t);
42231673Stheravensize_t			 mbstowcs_l(wchar_t * __restrict,
43231673Stheraven			    const char * __restrict, size_t, locale_t);
44231673Stheravenint			 mbtowc_l(wchar_t * __restrict,
45231673Stheraven			    const char * __restrict, size_t, locale_t);
46231673Stheravendouble			 strtod_l(const char *, char **, locale_t);
47231673Stheravenfloat			 strtof_l(const char *, char **, locale_t);
48231673Stheravenlong			 strtol_l(const char *, char **, int, locale_t);
49231673Stheravenlong double		 strtold_l(const char *, char **, locale_t);
50231673Stheravenlong long		 strtoll_l(const char *, char **, int, locale_t);
51231673Stheravenunsigned long		 strtoul_l(const char *, char **, int, locale_t);
52231673Stheravenunsigned long long	 strtoull_l(const char *, char **, int, locale_t);
53231673Stheravensize_t			 wcstombs_l(char * __restrict,
54231673Stheraven			    const wchar_t * __restrict, size_t, locale_t);
55231673Stheravenint			 wctomb_l(char *, wchar_t, locale_t);
56231673Stheraven
57231673Stheravenint			 ___mb_cur_max_l(locale_t);
58231673Stheraven#define MB_CUR_MAX_L(x) (___mb_cur_max_l(x))
59231673Stheraven
60