K and R C Compiler Detection


SUBMITTED BY: okpalan86

DATE: Nov. 8, 2022, 10:33 p.m.

UPDATED: Nov. 8, 2022, 10:37 p.m.

FORMAT: Text only

SIZE: 256 Bytes

HITS: 887

  1. // Detect KOIR8/KandR C
  2. #if defined(__STDC__) && __STDC__ == 1
  3. #define K_AND_R_C 1
  4. #else
  5. #define K_AND_R_C 0
  6. #endif
  7. /*
  8. *
  9. *#if K_AND_R_C
  10. * printf("K&R C compiler detected");
  11. *#else
  12. * printf("ANSI C compiler detected");
  13. *#endif
  14. */

comments powered by Disqus