Remove unused defines from lang/cem/libcc.ansi/math/localmath.h

This undoes part of bfeb736, and returns to using DBL_MAX_EXP and
DBL_MIN_EXP from float.h.

Add a dependency on math/localmath.h and other local header files so
libc is rebuilt when those headers change.
This commit is contained in:
George Koehler 2016-11-06 15:49:47 -05:00
parent 19ca28e22f
commit 08f9869a63
2 changed files with 14 additions and 23 deletions

View file

@ -28,9 +28,9 @@ normalrule {
} }
for _, plat in ipairs(vars.plats) do for _, plat in ipairs(vars.plats) do
acklibrary { acklibrary {
name = "lib_"..plat, name = "lib_"..plat,
srcs = { srcs = {
"+ctype_files", "+ctype_files",
"+ctype_tab", "+ctype_tab",
"./ctype/*.c", "./ctype/*.c",
@ -43,20 +43,24 @@ for _, plat in ipairs(vars.plats) do
"./setjmp/*.c", "./setjmp/*.c",
"./setjmp/*.e", "./setjmp/*.e",
"./signal/*.c", "./signal/*.c",
"./assert/*.c", "./assert/*.c",
"./stdio/*.c", "./stdio/*.c",
"./stdlib/*.c", "./stdlib/*.c",
"./string/*.c", "./string/*.c",
"./time/*.c", "./time/*.c",
},
},
hdrs = {}, -- must be empty hdrs = {}, -- must be empty
deps = { deps = {
"lang/cem/libcc.ansi/headers+headers", "lang/cem/libcc.ansi/headers+headers",
"plat/"..plat.."/include+headers", "plat/"..plat.."/include+headers",
"./malloc/malloc.h",
"./math/localmath.h",
"./stdio/loc_incl.h",
"./stdlib/ext_fmt.h",
"./time/loc_time.h",
}, },
vars = { plat = plat } vars = { plat = plat }
} }
ackfile { ackfile {
name = "crt_"..plat, name = "crt_"..plat,

View file

@ -18,18 +18,5 @@
#define POLYNOM12(x, a) (POLYNOM11((x),(a)+1)*(x)+(a)[0]) #define POLYNOM12(x, a) (POLYNOM11((x),(a)+1)*(x)+(a)[0])
#define POLYNOM13(x, a) (POLYNOM12((x),(a)+1)*(x)+(a)[0]) #define POLYNOM13(x, a) (POLYNOM12((x),(a)+1)*(x)+(a)[0])
/* These are set up for 64-bit doubles. */ #define M_LN_MAX_D (M_LN2 * DBL_MAX_EXP)
#define M_LN_MIN_D (M_LN2 * (DBL_MIN_EXP - 1))
#ifndef M_MAX_D
#define M_MAX_D 1.7976931348623157e+308
#define M_MIN_D 2.2250738585072014e-308
#define M_DEXPLEN 11
#endif
#define M_DMAXEXP ((1 << (M_DEXPLEN - 1)) - 1)
#define M_DMINEXP (-M_DMAXEXP)
#define M_LN_MAX_D (M_LN2 * M_DMAXEXP)
#define M_LN_MIN_D (M_LN2 * (M_DMINEXP - 1))
#define HUGE M_MAX_D
#define MAXDOUBLE M_MAX_D