machdep_ldisQ.c revision 112163
1112163Sdas/*-
2112163Sdas * Copyright (c) 2003 David Schultz <das@FreeBSD.ORG>
3112163Sdas * All rights reserved.
4112163Sdas *
5112163Sdas * Redistribution and use in source and binary forms, with or without
6112163Sdas * modification, are permitted provided that the following conditions
7112163Sdas * are met:
8112163Sdas * 1. Redistributions of source code must retain the above copyright
9112163Sdas *    notice, this list of conditions and the following disclaimer.
10112163Sdas * 2. Redistributions in binary form must reproduce the above copyright
11112163Sdas *    notice, this list of conditions and the following disclaimer in the
12112163Sdas *    documentation and/or other materials provided with the distribution.
13112163Sdas *
14112163Sdas * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15112163Sdas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16112163Sdas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17112163Sdas * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18112163Sdas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19112163Sdas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20112163Sdas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21112163Sdas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22112163Sdas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23112163Sdas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24112163Sdas * SUCH DAMAGE.
25112163Sdas */
26112163Sdas
27112163Sdas/*
28112163Sdas * Machine-dependent glue to integrate David Gay's gdtoa
29112163Sdas * package into libc for architectures where a long double
30112163Sdas * uses quad precision, such as sparc64.
31112163Sdas */
32112163Sdas
33112163Sdas#include <sys/cdefs.h>
34112163Sdas__FBSDID("$FreeBSD: head/lib/libc/gdtoa/machdep_ldisQ.c 112163 2003-03-12 20:30:00Z das $");
35112163Sdas
36112163Sdas#include "gdtoaimp.h"
37112163Sdas
38112163Sdaslong double
39112163Sdasstrtold(const char * __restrict s, char ** __restrict sp)
40112163Sdas{
41112163Sdas	long double result;
42112163Sdas
43112163Sdas	strtopQ(s, sp, result);
44112163Sdas	return result;
45112163Sdas}
46