There is important information about booting non-ack images in docs/UPDATING. ack/aout-format images can't be built any more, and booting clang/ELF-format ones is a little different. Updating to the new boot monitor is recommended. Changes in this commit: . drop boot monitor -> allowing dropping ack support . facility to copy ELF boot files to /boot so that old boot monitor can still boot fairly easily, see UPDATING . no more ack-format libraries -> single-case libraries . some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases . drop several ack toolchain commands, but not all support commands (e.g. aal is gone but acksize is not yet). . a few libc files moved to netbsd libc dir . new /bin/date as minix date used code in libc/ . test compile fix . harmonize includes . /usr/lib is no longer special: without ack, /usr/lib plays no kind of special bootstrapping role any more and bootstrapping is done exclusively through packages, so releases depend even less on the state of the machine making them now. . rename nbsd_lib* to lib* . reduce mtree
47 lines
1 KiB
C
47 lines
1 KiB
C
/* $NetBSD: strtold_subr.c,v 1.1 2006/03/15 17:35:18 kleink Exp $ */
|
|
|
|
/*
|
|
* Written by Klaus Klein <kleink@NetBSD.org>, November 16, 2005.
|
|
* Public domain.
|
|
*/
|
|
|
|
/*
|
|
* NOTICE: This is not a standalone file. To use it, #include it in
|
|
* the format-specific strtold_*.c, like so:
|
|
*
|
|
* #define GDTOA_LD_FMT <gdtoa extended-precision format code>
|
|
* #include "strtold_subr.c"
|
|
*/
|
|
|
|
#include <sys/cdefs.h>
|
|
#if defined(LIBC_SCCS) && !defined(lint)
|
|
__RCSID("$NetBSD: strtold_subr.c,v 1.1 2006/03/15 17:35:18 kleink Exp $");
|
|
#endif /* LIBC_SCCS and not lint */
|
|
|
|
#include "namespace.h"
|
|
#include <math.h>
|
|
#include <stdlib.h>
|
|
#include "gdtoa.h"
|
|
|
|
#ifdef __weak_alias
|
|
__weak_alias(strtold, _strtold)
|
|
#endif
|
|
|
|
#ifndef __HAVE_LONG_DOUBLE
|
|
#error no extended-precision long double type
|
|
#endif
|
|
|
|
#ifndef GDTOA_LD_FMT
|
|
#error GDTOA_LD_FMT must be defined by format-specific source file
|
|
#endif
|
|
|
|
#define STRTOP(x) __CONCAT(strtop, x)
|
|
|
|
long double
|
|
strtold(const char *nptr, char **endptr)
|
|
{
|
|
long double ld;
|
|
|
|
(void)STRTOP(GDTOA_LD_FMT)(nptr, endptr, &ld);
|
|
return ld;
|
|
}
|