title: Check whether function is declared with C preprocessor?
body: <p>Is it possible to tell the <strong>C</strong> preprocessor to check whether a function (not a macro) is declared? I tried the following, but it doesn't appear to work:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void)
  {
  #if defined(printf)
      printf("You support printf!\n");
  #else
      puts("Either you don't support printf, or this test doesn't work.");
  #endif
      return 0;
  }
  </code></pre>