In file included from util.h:6:0,
from wrap.h:4,
from libm.c:3:
../include/k.h:85:0: error: "isnan" redefined [-Werror]
In file included from libm.c:1:0:
/usr/i686-pc-mingw32/sys-root/mingw/include/math.h:376:0: note: this is the location of the previous definition
isnan (and finite and log) from math.h are defined conditionally for WIN32 by k.h.
Solutions:
patch k.h to remove isnan — unreliable since k.h changes from time to time
fetch specific revision of k.h from code.kx.com and apply precise patch
#undef isnan after including k.h before including math.h (check whether k.h defines any reserved identifiers that could break math.h)
#undef WIN32 and _WIN32 before including k.h (perhaps redefine afterwards)
separate code so k.h and math.h aren't used in the same translation unit — overhead, especially in routines generated by wrap.h
Related:
check how nf and wf, which are defined differently for WIN32, are used in code — consider replacing with NAN and INFINITY
isnan
(andfinite
andlog
) frommath.h
are defined conditionally forWIN32
byk.h
.Solutions:
k.h
to removeisnan
— unreliable sincek.h
changes from time to timek.h
fromcode.kx.com
and apply precise patch#undef isnan
after includingk.h
before includingmath.h
(check whetherk.h
defines any reserved identifiers that could breakmath.h
)#undef WIN32
and_WIN32
before includingk.h
(perhaps redefine afterwards)k.h
andmath.h
aren't used in the same translation unit — overhead, especially in routines generated bywrap.h
Related:
nf
andwf
, which are defined differently forWIN32
, are used in code — consider replacing withNAN
andINFINITY