However, the first will only be predefined for standard C headers.
The last two break in pre-C1X compilers. Maybe they'll also need
different quoting of \ and " than a plain #include statement.
Instead I suggest:
#pragma STDC tryinclude <foo.h>
#if __STDC_TRYINCLUDE__ /* nonzero iff last tryinclude succeeded */
Programs may usually prefer to #ifndef <macro defined in foo.h> instead
of __STDC_TRYINCLUDE__. If nothing else, the FOO_H or whatever which
foo.h will commonly use to ensure its contents is only read once.
However some include files define no useful macro for this purpose,
and those who do might still rename FOO_H in a later version.
--
Hallvard