Is it possible to tell the C preprocessor to check whether a function (not a macro) is declared? I tried the following, but it doesn\'t appear to work:
No. Preprocessor runs before the C compiler and the C compiler processes function declarations. The preprocessor is only there for text processing.
However, most header files have include guard macros like _STDIO_H_
that you can test for in the preprocessor stage. However, that solution is not portable as the include guard macro names are not standardized.