title: How to "undeclare" a function prototype or hide a function prototype or #uninclude a header
body: <p>I would like to have function <code>A()</code> call <code>B()</code> as an inline macro, but I don't want <code>B()</code> to be visible to the world. I only want <code>A()</code> visible and if the user uses <code>B()</code> accidentally, I want a compiler error.</p>
  
  <p>I know how to do it without inlining:</p>
  
  <pre><code>// a.h
  void A(void);
  
  // a.c
  #include "b.h"
  void A(void) { B(); }
  </code></pre>
  
  <p>If I <code>#include "a.h"</code>, then I have access to <code>A()</code> but not <code>B()</code>. That's fine; that's what I want.</p>
  
  <p>Now I want to do the same, but reduce one level of call complexity by inlining <code>B</code> into <code>A</code>, but I want to hide <code>B</code>.</p>
  
  <pre><code>// a.h
  #include "b.h"
  #define A() B()
  #uninclude "b.h"   &lt;----This is bogus, but I want the equivalent.
  
  
  // main.c
  #include "a.h"
  A();  &lt;-- ok
  B();  &lt;-- undefined function
  </code></pre>
  
  <p>This is for low-level firmware, where the call overhead does make a difference but I don't want to abandon high-level code management just for efficiency.  In C++, this is trivial, but I am looking for <code>cpp</code> hacks to do it in pure C.</p>
  
  <p>(In my case, <code>a</code> represents a HAL and <code>b</code> represents a BSP. The HAL is processor specific, while the BSP is board (PCB) specific)</p>