fork(1) download
  1. #include <stdio.h>
  2.  
  3. #define DEBUG 1
  4. #define MYDEF 1
  5.  
  6. #define TRACE(x) do { if (DEBUG) printf x; } while (0)
  7.  
  8. #ifdef MYDEF
  9.  
  10. #define IF_MY(x,y) x y
  11.  
  12. #else
  13.  
  14. #define IF_MY(x,y) x
  15.  
  16. #endif
  17.  
  18. int main(void) {
  19. char *msg="aaa";
  20.  
  21. TRACE((IF_MY("Message: %s", "Additional stuff"), msg));
  22.  
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 2052KB
stdin
Standard input is empty
stdout
Message: aaaAdditional stuff