title: Wrapping functions using C macros (with renaming)
body: <p>I am trying to define a function using macros that would actually wrap an existing function into an other one with a prefix.
  Let's say for example:</p>
  
  <pre><code>int   f1(int a, void *b, char c) { return 1; }
  int   f2(void *a) { return 1; }
  void  f3(void *a, int b) {}
  void  f4() {}
  
  #define WRAP(prefix, f) // do something
  WRAP(a, f1) or WRAP(a,f1,int,void*,char) or WRAP(a,f1,int,a,void*,b,char,c)
  </code></pre>
  
  <p>This should produce something like:</p>
  
  <pre><code>int a_f1(int a, void *b, char c);
  int a_f1(int a, void *b, char c) { return f1(a,b,c); }
  </code></pre>
  
  <p>I'm trying to do it so it could work with any of f1, f2, f3 or f4.
  If anyone has an idea on how to do that I would be really thanksfull. </p>