1b725ae77Skettenis /* This test file is part of GDB, the GNU debugger. 2b725ae77Skettenis 3b725ae77Skettenis Copyright 1995, 1999, 2003, 2004 Free Software Foundation, Inc. 4b725ae77Skettenis 5b725ae77Skettenis This program is free software; you can redistribute it and/or modify 6b725ae77Skettenis it under the terms of the GNU General Public License as published by 7b725ae77Skettenis the Free Software Foundation; either version 2 of the License, or 8b725ae77Skettenis (at your option) any later version. 9b725ae77Skettenis 10b725ae77Skettenis This program is distributed in the hope that it will be useful, 11b725ae77Skettenis but WITHOUT ANY WARRANTY; without even the implied warranty of 12b725ae77Skettenis MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13b725ae77Skettenis GNU General Public License for more details. 14b725ae77Skettenis 15b725ae77Skettenis You should have received a copy of the GNU General Public License 16b725ae77Skettenis along with this program; if not, write to the Free Software 17b725ae77Skettenis Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18b725ae77Skettenis 19*11efff7fSkettenis */ 20b725ae77Skettenis 21b725ae77Skettenis /* This file is exactly like compiler.c. I could just use compiler.c if 22b725ae77Skettenis I could be sure that every C++ compiler accepted extensions of ".c". */ 23b725ae77Skettenis 24*11efff7fSkettenis /* Note the semicolon at the end of this line. Older versions of 25*11efff7fSkettenis hp c++ have a bug in string preprocessing: if the last token on a 26*11efff7fSkettenis line is a string, then the preprocessor concatenates the next line 27*11efff7fSkettenis onto the current line and eats the newline! That messes up TCL of 28*11efff7fSkettenis course. That happens with HP aC++ A.03.13, but it no longer happens 29*11efff7fSkettenis with HP aC++ A.03.45. */ 30*11efff7fSkettenis 31*11efff7fSkettenis set compiler_info "unknown" ; 32b725ae77Skettenis 33b725ae77Skettenis #if defined (__GNUC__) 34*11efff7fSkettenis #if defined (__GNUC_PATCHLEVEL__) 35*11efff7fSkettenis /* Only GCC versions >= 3.0 define the __GNUC_PATCHLEVEL__ macro. */ 36*11efff7fSkettenis set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__} -] 37b725ae77Skettenis #else 38*11efff7fSkettenis set compiler_info [join {gcc __GNUC__ __GNUC_MINOR__ "unknown"} -] 39*11efff7fSkettenis #endif 40*11efff7fSkettenis #endif 41*11efff7fSkettenis 42*11efff7fSkettenis #if defined (__HP_CXD_SPP) 43*11efff7fSkettenis /* older hp ansi c, such as A.11.01.25171.gp, defines this */ 44*11efff7fSkettenis set compiler_info [join {hpcc __HP_CXD_SPP} -] 45b725ae77Skettenis #endif 46b725ae77Skettenis 47b725ae77Skettenis #if defined (__HP_cc) 48*11efff7fSkettenis /* newer hp ansi c, such as B.11.11.28706.gp, defines this */ 49b725ae77Skettenis set compiler_info [join {hpcc __HP_cc} -] 50b725ae77Skettenis #endif 51b725ae77Skettenis 52b725ae77Skettenis #if defined (__HP_aCC) 53b725ae77Skettenis set compiler_info [join {hpacc __HP_aCC} -] 54b725ae77Skettenis #endif 55