xref: /netbsd-src/lib/libc/locale/wcstod.c (revision 87ad8af40911c313299cb753a3d7762ceb9ea441)
1*87ad8af4Schristos /* $NetBSD: wcstod.c,v 1.16 2017/12/09 22:48:00 christos Exp $ */
2a9c5a86aSyamt 
3a9c5a86aSyamt /*-
4f9de1ba5Stnozaki  * Copyright (c)2006 Citrus Project,
5a9c5a86aSyamt  * All rights reserved.
6a9c5a86aSyamt  *
7a9c5a86aSyamt  * Redistribution and use in source and binary forms, with or without
8a9c5a86aSyamt  * modification, are permitted provided that the following conditions
9a9c5a86aSyamt  * are met:
10a9c5a86aSyamt  * 1. Redistributions of source code must retain the above copyright
11a9c5a86aSyamt  *    notice, this list of conditions and the following disclaimer.
12a9c5a86aSyamt  * 2. Redistributions in binary form must reproduce the above copyright
13a9c5a86aSyamt  *    notice, this list of conditions and the following disclaimer in the
14a9c5a86aSyamt  *    documentation and/or other materials provided with the distribution.
15a9c5a86aSyamt  *
16a9c5a86aSyamt  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17a9c5a86aSyamt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18a9c5a86aSyamt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19a9c5a86aSyamt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20a9c5a86aSyamt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21a9c5a86aSyamt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22a9c5a86aSyamt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23a9c5a86aSyamt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24a9c5a86aSyamt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25a9c5a86aSyamt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26a9c5a86aSyamt  * SUCH DAMAGE.
27a9c5a86aSyamt  */
28a9c5a86aSyamt 
29a9c5a86aSyamt #include <sys/cdefs.h>
3088c3eadbSlukem #if defined(LIBC_SCCS) && !defined(lint)
31*87ad8af4Schristos __RCSID("$NetBSD: wcstod.c,v 1.16 2017/12/09 22:48:00 christos Exp $");
3288c3eadbSlukem #endif /* LIBC_SCCS and not lint */
3388c3eadbSlukem 
34f65c16a6Schristos #include "namespace.h"
35f65c16a6Schristos 
36a9c5a86aSyamt #include <assert.h>
37a9c5a86aSyamt #include <errno.h>
38f9de1ba5Stnozaki #include <math.h>
39a9c5a86aSyamt #include <stdlib.h>
40b0ed71feSerh #include <string.h>
41a9c5a86aSyamt #include <wchar.h>
42a9c5a86aSyamt #include <wctype.h>
43a9c5a86aSyamt 
442c277d7aSchristos __weak_alias(wcstod,_wcstod)
45*87ad8af4Schristos __weak_alias(wcstod_l,_wcstod_l)
462c277d7aSchristos 
47f9de1ba5Stnozaki #define _FUNCNAME	wcstod
48f9de1ba5Stnozaki #define _RETURN_TYPE	double
499a7fa6ffSjoerg #define _STRTOD_FUNC	strtod_l
509d0aec98Stnozaki 
51f9de1ba5Stnozaki #include "_wcstod.h"
52