M
metaperl.j
Compilation error:
make
gcc -O -c -o a.o a.c
In file included from j.h:39,
from a.c:14:
je.h:191: error: 'nan' redeclared as different kind of symbol
/usr/include/math.h:177: error: previous declaration of 'nan' was here
je.h declares nan as extern D where type is typedef double D
math.h declares nan as:
extern double nan _PARAMS((const char *));
nan is only used in a few places in the code:
find . -type f -print0 | xargs -0 -e grep -nH -e nan
../i.c:77: MC(&nan,XNAN,(size_t)sizeof(D));
../j.c:31 nan;
../je.h:191:extern D nan;
../je.h-:193:extern D nan;
../wn.c:20: if('-'==*s&&3>n){x=1==n?infc=*(1+s),c=='-')?-inf:c=='.'?
nan:0; if(x){*v=x; R 1;}}
So I'm wondering what technique would be best to rename all the nan
calls in the code to something else to avoid conflicts. Perhaps some
sort of #define is in order.
make
gcc -O -c -o a.o a.c
In file included from j.h:39,
from a.c:14:
je.h:191: error: 'nan' redeclared as different kind of symbol
/usr/include/math.h:177: error: previous declaration of 'nan' was here
je.h declares nan as extern D where type is typedef double D
math.h declares nan as:
extern double nan _PARAMS((const char *));
nan is only used in a few places in the code:
find . -type f -print0 | xargs -0 -e grep -nH -e nan
../i.c:77: MC(&nan,XNAN,(size_t)sizeof(D));
../j.c:31 nan;
../je.h:191:extern D nan;
../je.h-:193:extern D nan;
../wn.c:20: if('-'==*s&&3>n){x=1==n?infc=*(1+s),c=='-')?-inf:c=='.'?
nan:0; if(x){*v=x; R 1;}}
So I'm wondering what technique would be best to rename all the nan
calls in the code to something else to avoid conflicts. Perhaps some
sort of #define is in order.