Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 1 | /*********************************************************** |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 2 | Copyright (c) 2000, BeOpen.com. |
| 3 | Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
| 4 | Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
| 5 | All rights reserved. |
Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 6 | |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 7 | See the file "Misc/COPYRIGHT" for information on usage and |
| 8 | redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 9 | ******************************************************************/ |
| 10 | |
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 11 | /* Return the compiler identification, if possible. */ |
| 12 | |
| 13 | #include "Python.h" |
Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 14 | |
| 15 | #ifndef COMPILER |
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 16 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 17 | #ifdef __GNUC__ |
| 18 | #define COMPILER " [GCC " __VERSION__ "]" |
| 19 | #endif |
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 20 | |
Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 21 | #endif /* !COMPILER */ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 22 | |
| 23 | #ifndef COMPILER |
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 24 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 25 | #ifdef __cplusplus |
| 26 | #define COMPILER "[C++]" |
| 27 | #else |
| 28 | #define COMPILER "[C]" |
| 29 | #endif |
Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 30 | |
Guido van Rossum | f857a6b | 1996-05-23 22:50:26 +0000 | [diff] [blame] | 31 | #endif /* !COMPILER */ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 32 | |
Guido van Rossum | 8fb26ed | 1997-07-19 19:48:41 +0000 | [diff] [blame] | 33 | const char * |
Thomas Wouters | f70ef4f | 2000-07-22 18:47:25 +0000 | [diff] [blame] | 34 | Py_GetCompiler(void) |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 35 | { |
| 36 | return COMPILER; |
| 37 | } |