In our previous episode, Adriaan van Os said: > I have to import the math.h libc functions listed here > <http://pubs.opengroup.org/onlinepubs/009695399/toc.htm>. What is the > recommended way to do this for general Linux compatibility ?
Not do this ? :-) > Simply declare them external ? Load them from libc dynamically ? Just declare them external in a separate unit, mathc or so and keep them in your project. > Anything else ? Macros, structured constants etc, obviously might require extra work(and mathh has some, like the is* functions are typically macros) Long double is probably 10-byte extended, but verify that by compiling and running a small C program for your distro. > I know that the FPC runtime lib itself jumps through some hoops to be as > independent of libc (or a specific version of libc) as possible. The FPC RTL can use libc (compile with -DFPC_USE_LIBC), but this is nowadays little tested outside of OS X, and maybe a couple of smaller targets. The libc policy is due a multitude of small issues, some of which might be historic, and the idea was to allow the maintainer to chose what approach fits his target best. Anyway it only touches redistributable code to be merged with FPC to keep the .tar somewhat distribution indepedent. For your private stuff you don't have to worry about it. _______________________________________________ fpc-pascal maillist - email@example.com http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal