The "correct" solution to this problem (as used by many projects) is to create a configure script.
The configure script runs various tests that include compiling and running small programs to determine compiler and system properties. The script then writes out it's findings as a header file, or a makefile, or both. Of course, yours can do anything you like.
There are tools some tools to do this sort of thing semi-automatically, but they're probably overkill for you. If you'd like to take a look the names are autoconf and automake. Beware, they're not simple to learn, but they generate configure scripts and makefiles that should work on just about any platform as long as it has a unix-style shell, and GNU make.
sizeof(double) > 8
. Although not portable either, it'll probably still work in most cases. – Bridgettbridgettesizeof(double) < sizeof(long double)
or am I missing something? – Bucolicsizeof
. – Anastos