|
![](/i/fill.gif) |
Thorsten Froehlich wrote:
> BTW, as a shortcut to testing for various standard library functions
> existing, you could also test if a ISO C 1999 standard C library is
> present if you test that __STDC_VERSION__ is equal *or* greater than
> 199901L (make sure you compile it as C not C++ code, that is, use a ".c"
> rather than a ".cpp" extension and make sure to call a C not the C++
> compiler) i.e. with
>
> int main()
> {
> return __STDC_VERSION__;
> }
>
This is probably a bad idea. It looks like __STDC_VERSION__ is significantly
larger than 128. Some UNIX systems use only 1 byte to store the exit
code of a program and hence, this will fail on these systems.
I'd use a printf() statement instead.
Wolfgang
Post a reply to this message
|
![](/i/fill.gif) |