Jack Jansen | 42218ce | 1997-01-31 16:15:11 +0000 | [diff] [blame] | 1 | /*********************************************************** |
| 2 | Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam, |
| 3 | The Netherlands. |
| 4 | |
| 5 | All Rights Reserved |
| 6 | |
| 7 | Permission to use, copy, modify, and distribute this software and its |
| 8 | documentation for any purpose and without fee is hereby granted, |
| 9 | provided that the above copyright notice appear in all copies and that |
| 10 | both that copyright notice and this permission notice appear in |
| 11 | supporting documentation, and that the names of Stichting Mathematisch |
| 12 | Centrum or CWI or Corporation for National Research Initiatives or |
| 13 | CNRI not be used in advertising or publicity pertaining to |
| 14 | distribution of the software without specific, written prior |
| 15 | permission. |
| 16 | |
| 17 | While CWI is the initial source for this software, a modified version |
| 18 | is made available by the Corporation for National Research Initiatives |
| 19 | (CNRI) at the Internet address ftp://ftp.python.org. |
| 20 | |
| 21 | STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH |
| 22 | REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF |
| 23 | MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH |
| 24 | CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL |
| 25 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 26 | PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 27 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 28 | PERFORMANCE OF THIS SOFTWARE. |
| 29 | |
| 30 | ******************************************************************/ |
| 31 | |
Guido van Rossum | 6e39e53 | 1995-08-08 14:11:07 +0000 | [diff] [blame] | 32 | /* Return a string representing the compiler name */ |
| 33 | |
Jack Jansen | 007fa82 | 1996-08-19 11:36:59 +0000 | [diff] [blame] | 34 | #include "config.h" |
| 35 | |
Guido van Rossum | 6e39e53 | 1995-08-08 14:11:07 +0000 | [diff] [blame] | 36 | #ifdef __MWERKS__ |
Jack Jansen | 2d1306b | 2000-04-07 09:10:49 +0000 | [diff] [blame] | 37 | #ifdef USE_GUSI1 |
| 38 | #define HASGUSI " w/GUSI1" |
| 39 | #else |
| 40 | #ifdef USE_GUSI2 |
| 41 | #define HASGUSI " w/GUSI2" |
Jack Jansen | c743c8d | 1996-02-14 16:02:30 +0000 | [diff] [blame] | 42 | #else |
| 43 | #define HASGUSI "" |
| 44 | #endif |
Jack Jansen | 2d1306b | 2000-04-07 09:10:49 +0000 | [diff] [blame] | 45 | #endif |
| 46 | |
Jack Jansen | 2d1306b | 2000-04-07 09:10:49 +0000 | [diff] [blame] | 47 | #ifdef WITH_THREAD |
| 48 | #define HASTHREAD " w/THREADS" |
| 49 | #else |
| 50 | #define HASTHREAD "" |
| 51 | #endif |
| 52 | |
Jack Jansen | d9f6e92 | 2000-06-04 21:51:36 +0000 | [diff] [blame] | 53 | #ifdef TARGET_API_MAC_CARBON |
| 54 | #define TARGET_API " CARBON" |
| 55 | #else |
| 56 | #define TARGET_API "" |
| 57 | #endif |
| 58 | |
Guido van Rossum | 6e39e53 | 1995-08-08 14:11:07 +0000 | [diff] [blame] | 59 | #ifdef __powerc |
Jack Jansen | d9f6e92 | 2000-06-04 21:51:36 +0000 | [diff] [blame] | 60 | #define COMPILER " [CW PPC" TARGET_API HASGUSI HASTHREAD"]" |
Guido van Rossum | 6e39e53 | 1995-08-08 14:11:07 +0000 | [diff] [blame] | 61 | #else |
Jack Jansen | f717ac2 | 1995-08-14 12:30:15 +0000 | [diff] [blame] | 62 | #ifdef __CFM68K__ |
Jack Jansen | d9f6e92 | 2000-06-04 21:51:36 +0000 | [diff] [blame] | 63 | #define COMPILER " [CW CFM68K" TARGET_API HASGUSI HASTHREAD"]" |
Jack Jansen | f717ac2 | 1995-08-14 12:30:15 +0000 | [diff] [blame] | 64 | #else |
Jack Jansen | d9f6e92 | 2000-06-04 21:51:36 +0000 | [diff] [blame] | 65 | #define COMPILER " [CW 68K" TARGET_API HASGUSI HASTHREAD"]" |
Guido van Rossum | 6e39e53 | 1995-08-08 14:11:07 +0000 | [diff] [blame] | 66 | #endif |
| 67 | #endif |
Jack Jansen | f717ac2 | 1995-08-14 12:30:15 +0000 | [diff] [blame] | 68 | #endif |
Guido van Rossum | 6e39e53 | 1995-08-08 14:11:07 +0000 | [diff] [blame] | 69 | |
| 70 | #ifdef MPW |
| 71 | #ifdef __SC__ |
| 72 | #define COMPILER " [Symantec MPW]" |
| 73 | #else |
| 74 | #define COMPILER " [Apple MPW]" |
| 75 | #endif |
| 76 | #endif |
| 77 | |
| 78 | char * |
Jack Jansen | a547dca | 1996-07-10 15:48:25 +0000 | [diff] [blame] | 79 | Py_GetCompiler() |
Guido van Rossum | 6e39e53 | 1995-08-08 14:11:07 +0000 | [diff] [blame] | 80 | { |
| 81 | return COMPILER; |
| 82 | } |