machdep_ldisx.c revision 112163
1251881Speter/*-
2251881Speter * Copyright (c) 2003 David Schultz <das@FreeBSD.ORG>
3251881Speter * All rights reserved.
4251881Speter *
5251881Speter * Redistribution and use in source and binary forms, with or without
6251881Speter * modification, are permitted provided that the following conditions
7251881Speter * are met:
8251881Speter * 1. Redistributions of source code must retain the above copyright
9251881Speter *    notice, this list of conditions and the following disclaimer.
10251881Speter * 2. Redistributions in binary form must reproduce the above copyright
11251881Speter *    notice, this list of conditions and the following disclaimer in the
12251881Speter *    documentation and/or other materials provided with the distribution.
13251881Speter *
14251881Speter * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15251881Speter * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16251881Speter * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17251881Speter * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18251881Speter * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19251881Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20251881Speter * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21251881Speter * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22251881Speter * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23251881Speter * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24251881Speter * SUCH DAMAGE.
25251881Speter */
26251881Speter
27251881Speter/*
28251881Speter * Machine-dependent glue to integrate David Gay's gdtoa
29251881Speter * package into libc for architectures where a long double
30251881Speter * is an IEEE extended precision number.
31251881Speter */
32251881Speter
33251881Speter#include <sys/cdefs.h>
34251881Speter__FBSDID("$FreeBSD: head/lib/libc/gdtoa/machdep_ldisx.c 112163 2003-03-12 20:30:00Z das $");
35251881Speter
36251881Speter#include "gdtoaimp.h"
37251881Speter
38251881Speterlong double
39251881Speterstrtold(const char * __restrict s, char ** __restrict sp)
40251881Speter{
41251881Speter	long double result;
42251881Speter
43251881Speter	strtopx(s, sp, result);
44251881Speter	return result;
45251881Speter}
46251881Speter