blob: 0f441deb84d0b22af5a48dbf60c97cad6e9ff292 [file] [log] [blame]
Guido van Rossumf857a6b1996-05-23 22:50:26 +00001
Guido van Rossum582646a1996-05-28 22:30:17 +00002/* Return the compiler identification, if possible. */
3
4#include "Python.h"
Guido van Rossumf857a6b1996-05-23 22:50:26 +00005
6#ifndef COMPILER
Guido van Rossum582646a1996-05-28 22:30:17 +00007
Guido van Rossum667d7041995-08-04 04:20:48 +00008#ifdef __GNUC__
Guido van Rossumf26cda62000-09-05 04:40:39 +00009#define COMPILER "\n[GCC " __VERSION__ "]"
Guido van Rossum667d7041995-08-04 04:20:48 +000010#endif
Guido van Rossum582646a1996-05-28 22:30:17 +000011
Guido van Rossumf857a6b1996-05-23 22:50:26 +000012#endif /* !COMPILER */
Guido van Rossum667d7041995-08-04 04:20:48 +000013
14#ifndef COMPILER
Guido van Rossum582646a1996-05-28 22:30:17 +000015
Guido van Rossum667d7041995-08-04 04:20:48 +000016#ifdef __cplusplus
17#define COMPILER "[C++]"
18#else
19#define COMPILER "[C]"
20#endif
Guido van Rossum582646a1996-05-28 22:30:17 +000021
Guido van Rossumf857a6b1996-05-23 22:50:26 +000022#endif /* !COMPILER */
Guido van Rossum667d7041995-08-04 04:20:48 +000023
Guido van Rossum8fb26ed1997-07-19 19:48:41 +000024const char *
Thomas Woutersf70ef4f2000-07-22 18:47:25 +000025Py_GetCompiler(void)
Guido van Rossum667d7041995-08-04 04:20:48 +000026{
27 return COMPILER;
28}