You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
538 B

31 years ago
31 years ago
31 years ago
31 years ago
  1. /* Return the compiler identification, if possible. */
  2. #include "Python.h"
  3. #ifndef COMPILER
  4. // Note the __clang__ conditional has to come before the __GNUC__ one because
  5. // clang pretends to be GCC.
  6. #if defined(__clang__)
  7. #define COMPILER "\n[Clang " __clang_version__ "]"
  8. #elif defined(__GNUC__)
  9. #define COMPILER "\n[GCC " __VERSION__ "]"
  10. // Generic fallbacks.
  11. #elif defined(__cplusplus)
  12. #define COMPILER "[C++]"
  13. #else
  14. #define COMPILER "[C]"
  15. #endif
  16. #endif /* !COMPILER */
  17. const char *
  18. Py_GetCompiler(void)
  19. {
  20. return COMPILER;
  21. }