diff options
author | Robert de Bath <rdebath@poboxes.com> | 2005-01-23 15:31:04 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:48:50 +0200 |
commit | 62c27c1c5cb6257b13dfc9be0394e0d2e86f2735 (patch) | |
tree | f702b7e5f80293367e1b6f9812bd45e80378be26 /libc/misc | |
parent | 6cb598cc5f1c8ae6d14381c2776338584368257e (diff) | |
download | dev86-62c27c1c5cb6257b13dfc9be0394e0d2e86f2735.tar.gz |
Import Dev86src-0.16.17.tar.gzv0.16.17
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/Makefile | 2 | ||||
-rw-r--r-- | libc/misc/atof.c | 16 | ||||
-rw-r--r-- | libc/misc/strtod.c | 4 |
3 files changed, 17 insertions, 5 deletions
diff --git a/libc/misc/Makefile b/libc/misc/Makefile index b779802..85614a7 100644 --- a/libc/misc/Makefile +++ b/libc/misc/Makefile @@ -27,7 +27,7 @@ endif # No ELKS strtod() until BCC does 16 bit FP... ifneq ($(LIB_CPU),i86) -OBJ+=strtod.o +OBJ+=strtod.o atof.o endif CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS) diff --git a/libc/misc/atof.c b/libc/misc/atof.c new file mode 100644 index 0000000..aeadaa5 --- /dev/null +++ b/libc/misc/atof.c @@ -0,0 +1,16 @@ +/* Copyright (C) Robert de Bath <robert@debath.co.uk> + * This file is part of the Linux-8086 C library and is distributed + * under the GNU Library General Public License. + */ + +double +#ifdef __STDC__ +atof(const char *p) +#else +atof(p) +char *p; +#endif +{ + return strtod(p, (char**)0); +} + diff --git a/libc/misc/strtod.c b/libc/misc/strtod.c index cef9d9f..8acb423 100644 --- a/libc/misc/strtod.c +++ b/libc/misc/strtod.c @@ -20,9 +20,6 @@ #include <stdlib.h> #include <ctype.h> -#ifndef __AS386_16__ -/* BCC-16 has broken FP code */ - double strtod(const char *nptr, char ** endptr) { @@ -97,4 +94,3 @@ strtod(const char *nptr, char ** endptr) } return (negative ? -number:number); } -#endif |