Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 1 | |
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 2 | /* Return the compiler identification, if possible. */ |
3 | |||||
4 | #include "Python.h" | ||||
Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 5 | |
6 | #ifndef COMPILER | ||||
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 7 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 8 | #ifdef __GNUC__ |
Guido van Rossum | f26cda6 | 2000-09-05 04:40:39 +0000 | [diff] [blame] | 9 | #define COMPILER "\n[GCC " __VERSION__ "]" |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 10 | #endif |
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 11 | |
Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 12 | #endif /* !COMPILER */ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 13 | |
14 | #ifndef COMPILER | ||||
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 15 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 16 | #ifdef __cplusplus |
17 | #define COMPILER "[C++]" | ||||
18 | #else | ||||
19 | #define COMPILER "[C]" | ||||
20 | #endif | ||||
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 21 | |
Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 22 | #endif /* !COMPILER */ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 23 | |
Guido van Rossum | 8fb26ed | 1997-07-19 19:48:41 +0000 | [diff] [blame] | 24 | const char * |
Thomas Wouters | f70ef4f | 2000-07-22 18:47:25 +0000 | [diff] [blame] | 25 | Py_GetCompiler(void) |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 26 | { |
27 | return COMPILER; | ||||
28 | } |