16a66acb5SDavid Schultz /*-
2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause
3d915a14eSPedro F. Giffuni *
46a66acb5SDavid Schultz * Copyright (c) 2003 David Schultz <das@FreeBSD.ORG>
56a66acb5SDavid Schultz * All rights reserved.
66a66acb5SDavid Schultz *
73c87aa1dSDavid Chisnall * Copyright (c) 2011 The FreeBSD Foundation
85b5fa75aSEd Maste *
93c87aa1dSDavid Chisnall * Portions of this software were developed by David Chisnall
103c87aa1dSDavid Chisnall * under sponsorship from the FreeBSD Foundation.
113c87aa1dSDavid Chisnall *
126a66acb5SDavid Schultz * Redistribution and use in source and binary forms, with or without
136a66acb5SDavid Schultz * modification, are permitted provided that the following conditions
146a66acb5SDavid Schultz * are met:
156a66acb5SDavid Schultz * 1. Redistributions of source code must retain the above copyright
166a66acb5SDavid Schultz * notice, this list of conditions and the following disclaimer.
176a66acb5SDavid Schultz * 2. Redistributions in binary form must reproduce the above copyright
186a66acb5SDavid Schultz * notice, this list of conditions and the following disclaimer in the
196a66acb5SDavid Schultz * documentation and/or other materials provided with the distribution.
206a66acb5SDavid Schultz *
216a66acb5SDavid Schultz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
226a66acb5SDavid Schultz * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
236a66acb5SDavid Schultz * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
246a66acb5SDavid Schultz * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
256a66acb5SDavid Schultz * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
266a66acb5SDavid Schultz * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
276a66acb5SDavid Schultz * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
286a66acb5SDavid Schultz * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
296a66acb5SDavid Schultz * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
306a66acb5SDavid Schultz * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
316a66acb5SDavid Schultz * SUCH DAMAGE.
326a66acb5SDavid Schultz */
336a66acb5SDavid Schultz
346a66acb5SDavid Schultz /*
356a66acb5SDavid Schultz * Machine-dependent glue to integrate David Gay's gdtoa
366a66acb5SDavid Schultz * package into libc for architectures where a long double
376a66acb5SDavid Schultz * is the same as a double, such as the Alpha.
386a66acb5SDavid Schultz */
396a66acb5SDavid Schultz
406a66acb5SDavid Schultz #include "gdtoaimp.h"
413c87aa1dSDavid Chisnall #undef strtold_l
426a66acb5SDavid Schultz
436a66acb5SDavid Schultz long double
strtold_l(const char * __restrict s,char ** __restrict sp,locale_t locale)443c87aa1dSDavid Chisnall strtold_l(const char * __restrict s, char ** __restrict sp, locale_t locale)
456a66acb5SDavid Schultz {
466a66acb5SDavid Schultz
473c87aa1dSDavid Chisnall return strtod_l(s, sp, locale);
486a66acb5SDavid Schultz }
49