Porting old C and ieeefp.h

resglowing

Registered
Hi All, I'm trying to port an old C program to OS X/Darwin. The makefile asks
that we create the macros and programs to handle NaNs (Not A Number). Two files will be created, MakeNaN.c and NaN.h. If the system has IEEE standard floating point we use:
make IEEE-NaN

Here's what I get:
cc -no-cpp-precomp -static -D__macosx TestNaN.c -lm -lgdbm -ldl
TestNaN.c:4: ieeefp.h: No such file or directory
make: *** [IEEE-NaN] Error 1

I looked and indeed there is no ieeefp.h! I imagine this lib is for IEEE standard floating point. Does OS X/Darwin support ieeefp?

So I thought I would look on the Darwin CVS
http://www.opensource.apple.com/cgi-bin/registered/cvs/Libraries/BSD/include/ (you need to have registered to get this). I figured Darwin is based on BSD, so I'll use a BSD lib. I copied ieeefp.h into usr/lib and tried the make again:

cc -no-cpp-precomp -static -D__macosx -DSVR4 TestNaN.c -lm -lgdbm -ldl
In file included from TestNaN.c:4:
/usr/include/ieeefp.h:19: parse error before `fpgetround'
/usr/include/ieeefp.h:19: warning: data definition has no type or storage class
/usr/include/ieeefp.h:20: parse error before `fpsetround'
/usr/include/ieeefp.h:20: warning: parameter names (without types) in function declaration
/usr/include/ieeefp.h:20: warning: data definition has no type or storage class
/usr/include/ieeefp.h:21: parse error before `fpgetmask'
/usr/include/ieeefp.h:21: warning: data definition has no type or storage class
/usr/include/ieeefp.h:22: parse error before `fpsetmask'
/usr/include/ieeefp.h:22: warning: parameter names (without types) in function declaration
/usr/include/ieeefp.h:22: warning: data definition has no type or storage class
/usr/include/ieeefp.h:23: parse error before `fpgetsticky'
/usr/include/ieeefp.h:23: warning: data definition has no type or storage class
/usr/include/ieeefp.h:24: parse error before `fpsetsticky'
/usr/include/ieeefp.h:24: warning: parameter names (without types) in function declaration
/usr/include/ieeefp.h:24: warning: data definition has no type or storage class
make: *** [IEEE-NaN] Error 1

Ouch!

What gives?

Thanks for any help.

Ari
 

wadesworld

Mac Developer
Don't know. You'd have to look at the header file to see what it's complaining about.

Chances are though, you're still missing a required component.

Wade
 
Top