diff --git a/lang/cem/libcc.ansi/build.lua b/lang/cem/libcc.ansi/build.lua index 3ca95b629..601a50de4 100644 --- a/lang/cem/libcc.ansi/build.lua +++ b/lang/cem/libcc.ansi/build.lua @@ -28,9 +28,9 @@ normalrule { } for _, plat in ipairs(vars.plats) do - acklibrary { - name = "lib_"..plat, - srcs = { + acklibrary { + name = "lib_"..plat, + srcs = { "+ctype_files", "+ctype_tab", "./ctype/*.c", @@ -43,20 +43,24 @@ for _, plat in ipairs(vars.plats) do "./setjmp/*.c", "./setjmp/*.e", "./signal/*.c", - "./assert/*.c", + "./assert/*.c", "./stdio/*.c", "./stdlib/*.c", "./string/*.c", "./time/*.c", - - }, + }, hdrs = {}, -- must be empty deps = { "lang/cem/libcc.ansi/headers+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 { name = "crt_"..plat, diff --git a/lang/cem/libcc.ansi/math/localmath.h b/lang/cem/libcc.ansi/math/localmath.h index 7c9a67465..e85c81c0a 100644 --- a/lang/cem/libcc.ansi/math/localmath.h +++ b/lang/cem/libcc.ansi/math/localmath.h @@ -18,18 +18,5 @@ #define POLYNOM12(x, a) (POLYNOM11((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. */ - -#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 - +#define M_LN_MAX_D (M_LN2 * DBL_MAX_EXP) +#define M_LN_MIN_D (M_LN2 * (DBL_MIN_EXP - 1))