Commit 04df6730 by Neil Booth Committed by Neil Booth

sol2.h, [...]: Use c_dialect_ macros.

	* config/sol2.h, config/alpha/alpha.h, config/alpha/linux.h,
	config/i386/i386-interix.h, config/ia64/hpux.h, config/mips/iris6.h,
	config/mips/linux.h, config/mips/mips.h, config/pa/pa-hpux.h,
	config/pa/pa-hpux10.h, config/pa/pa-hpux11.h, config/pa/pa-pro-end.h,
	config/pa/pa.h, config/pa/rtems.h: Use c_dialect_ macros.

From-SVN: r68763
parent 5ee78c21
2003-07-01 Neil Booth <neil@daikokuya.co.uk>
* config/sol2.h, config/alpha/alpha.h, config/alpha/linux.h,
config/i386/i386-interix.h, config/ia64/hpux.h, config/mips/iris6.h,
config/mips/linux.h, config/mips/mips.h, config/pa/pa-hpux.h,
config/pa/pa-hpux10.h, config/pa/pa-hpux11.h, config/pa/pa-pro-end.h,
config/pa/pa.h, config/pa/rtems.h: Use c_dialect_ macros.
2003-07-01 Andreas Jaeger <aj@suse.de> 2003-07-01 Andreas Jaeger <aj@suse.de>
* final.c: Convert prototypes to ISO C90. * final.c: Convert prototypes to ISO C90.
......
...@@ -78,14 +78,14 @@ Boston, MA 02111-1307, USA. */ ...@@ -78,14 +78,14 @@ Boston, MA 02111-1307, USA. */
{ \ { \
if (preprocessing_asm_p ()) \ if (preprocessing_asm_p ()) \
builtin_define_std ("LANGUAGE_ASSEMBLY"); \ builtin_define_std ("LANGUAGE_ASSEMBLY"); \
else if (c_language == clk_c) \ else if (c_dialect_cxx ()) \
builtin_define_std ("LANGUAGE_C"); \
else if (c_language == clk_cplusplus) \
{ \ { \
builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \ builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \
builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \ builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \
} \ } \
if (flag_objc) \ else \
builtin_define_std ("LANGUAGE_C"); \
if (c_dialect_objc ()) \
{ \ { \
builtin_define ("__LANGUAGE_OBJECTIVE_C"); \ builtin_define ("__LANGUAGE_OBJECTIVE_C"); \
builtin_define ("__LANGUAGE_OBJECTIVE_C__"); \ builtin_define ("__LANGUAGE_OBJECTIVE_C__"); \
......
...@@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */
builtin_define_std ("unix"); \ builtin_define_std ("unix"); \
builtin_assert ("system=linux"); \ builtin_assert ("system=linux"); \
/* The GNU C++ standard library requires this. */ \ /* The GNU C++ standard library requires this. */ \
if (c_language == clk_cplusplus) \ if (c_dialect_cxx ()) \
builtin_define ("_GNU_SOURCE"); \ builtin_define ("_GNU_SOURCE"); \
} while (0) } while (0)
......
...@@ -71,9 +71,9 @@ Boston, MA 02111-1307, USA. */ ...@@ -71,9 +71,9 @@ Boston, MA 02111-1307, USA. */
else \ else \
{ \ { \
builtin_define_std ("LANGUAGE_C"); \ builtin_define_std ("LANGUAGE_C"); \
if (c_language == clk_cplusplus) \ if (c_dialect_cxx ()) \
builtin_define_std ("LANGUAGE_C_PLUS_PLUS"); \ builtin_define_std ("LANGUAGE_C_PLUS_PLUS"); \
if (flag_objc) \ if (c_dialect_objc ()) \
builtin_define_std ("LANGUAGE_OBJECTIVE_C"); \ builtin_define_std ("LANGUAGE_OBJECTIVE_C"); \
} \ } \
} \ } \
......
...@@ -42,7 +42,7 @@ do { \ ...@@ -42,7 +42,7 @@ do { \
builtin_define("__fpreg=long double"); \ builtin_define("__fpreg=long double"); \
builtin_define("__float80=long double"); \ builtin_define("__float80=long double"); \
builtin_define("__float128=long double"); \ builtin_define("__float128=long double"); \
if (c_language == clk_cplusplus || !flag_iso) \ if (c_dialect_cxx () || !flag_iso) \
{ \ { \
builtin_define("_HPUX_SOURCE"); \ builtin_define("_HPUX_SOURCE"); \
builtin_define("__STDC_EXT__"); \ builtin_define("__STDC_EXT__"); \
......
...@@ -128,11 +128,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -128,11 +128,11 @@ Boston, MA 02111-1307, USA. */
/* IRIX 6.5.18 and above provide many ISO C99 \ /* IRIX 6.5.18 and above provide many ISO C99 \
features protected by the __c99 macro. \ features protected by the __c99 macro. \
libstdc++ v3 needs them as well. */ \ libstdc++ v3 needs them as well. */ \
if ((c_language == clk_c && flag_isoc99) \ if ((!c_dialect_cxx () && flag_isoc99) \
|| c_language == clk_cplusplus) \ || c_dialect_cxx ()) \
builtin_define ("__c99"); \ builtin_define ("__c99"); \
\ \
if (c_language == clk_cplusplus) \ if (c_dialect_cxx ()) \
{ \ { \
builtin_define ("__EXTENSIONS__"); \ builtin_define ("__EXTENSIONS__"); \
builtin_define ("_SGI_SOURCE"); \ builtin_define ("_SGI_SOURCE"); \
......
...@@ -126,7 +126,7 @@ void FN () \ ...@@ -126,7 +126,7 @@ void FN () \
builtin_define_std ("linux"); \ builtin_define_std ("linux"); \
builtin_assert ("system=linux"); \ builtin_assert ("system=linux"); \
/* The GNU C++ standard library requires this. */ \ /* The GNU C++ standard library requires this. */ \
if (c_language == clk_cplusplus) \ if (c_dialect_cxx ()) \
builtin_define ("_GNU_SOURCE"); \ builtin_define ("_GNU_SOURCE"); \
\ \
if (mips_abi == ABI_N32) \ if (mips_abi == ABI_N32) \
......
...@@ -479,18 +479,18 @@ extern void sbss_section PARAMS ((void)); ...@@ -479,18 +479,18 @@ extern void sbss_section PARAMS ((void));
builtin_define_std ("LANGUAGE_ASSEMBLY"); \ builtin_define_std ("LANGUAGE_ASSEMBLY"); \
builtin_define ("_LANGUAGE_ASSEMBLY"); \ builtin_define ("_LANGUAGE_ASSEMBLY"); \
} \ } \
else if (c_language == clk_c) \ else if (c_dialect_cxx ()) \
{ \
builtin_define_std ("LANGUAGE_C"); \
builtin_define ("_LANGUAGE_C"); \
} \
else if (c_language == clk_cplusplus) \
{ \ { \
builtin_define ("_LANGUAGE_C_PLUS_PLUS"); \ builtin_define ("_LANGUAGE_C_PLUS_PLUS"); \
builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \ builtin_define ("__LANGUAGE_C_PLUS_PLUS"); \
builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \ builtin_define ("__LANGUAGE_C_PLUS_PLUS__"); \
} \ } \
if (flag_objc) \ else \
{ \
builtin_define_std ("LANGUAGE_C"); \
builtin_define ("_LANGUAGE_C"); \
} \
if (c_dialect_objc ()) \
{ \ { \
builtin_define ("_LANGUAGE_OBJECTIVE_C"); \ builtin_define ("_LANGUAGE_OBJECTIVE_C"); \
builtin_define ("__LANGUAGE_OBJECTIVE_C"); \ builtin_define ("__LANGUAGE_OBJECTIVE_C"); \
......
...@@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__hpux__"); \ builtin_define ("__hpux__"); \
builtin_define ("__unix"); \ builtin_define ("__unix"); \
builtin_define ("__unix__"); \ builtin_define ("__unix__"); \
if (c_language == clk_cplusplus) \ if (c_dialect_cxx ()) \
{ \ { \
builtin_define ("_HPUX_SOURCE"); \ builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \ builtin_define ("_INCLUDE_LONGLONG"); \
......
...@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__hpux__"); \ builtin_define ("__hpux__"); \
builtin_define ("__unix"); \ builtin_define ("__unix"); \
builtin_define ("__unix__"); \ builtin_define ("__unix__"); \
if (c_language == clk_cplusplus) \ if (c_dialect_cxx ()) \
{ \ { \
builtin_define ("_HPUX_SOURCE"); \ builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \ builtin_define ("_INCLUDE_LONGLONG"); \
......
...@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
builtin_define ("__hpux__"); \ builtin_define ("__hpux__"); \
builtin_define ("__unix"); \ builtin_define ("__unix"); \
builtin_define ("__unix__"); \ builtin_define ("__unix__"); \
if (c_language == clk_cplusplus) \ if (c_dialect_cxx ()) \
{ \ { \
builtin_define ("_HPUX_SOURCE"); \ builtin_define ("_HPUX_SOURCE"); \
builtin_define ("_INCLUDE_LONGLONG"); \ builtin_define ("_INCLUDE_LONGLONG"); \
......
...@@ -29,8 +29,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,8 +29,7 @@ Boston, MA 02111-1307, USA. */
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
do \ do \
{ \ { \
if (c_language != clk_cplusplus \ if (!c_dialect_cxx () && !flag_iso) \
&& !flag_iso) \
{ \ { \
builtin_define ("hppa"); \ builtin_define ("hppa"); \
builtin_define_std ("PWB"); \ builtin_define_std ("PWB"); \
......
...@@ -388,8 +388,7 @@ do { \ ...@@ -388,8 +388,7 @@ do { \
builtin_define_std ("hp800"); \ builtin_define_std ("hp800"); \
builtin_define_std ("hp9000"); \ builtin_define_std ("hp9000"); \
builtin_define_std ("hp9k8"); \ builtin_define_std ("hp9k8"); \
if (c_language != clk_cplusplus \ if (!c_dialect_cxx () && !flag_iso) \
&& !flag_iso) \
builtin_define ("hppa"); \ builtin_define ("hppa"); \
builtin_define_std ("spectrum"); \ builtin_define_std ("spectrum"); \
builtin_define_std ("unix"); \ builtin_define_std ("unix"); \
......
...@@ -25,8 +25,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -25,8 +25,7 @@ Boston, MA 02111-1307, USA. */
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
do \ do \
{ \ { \
if (c_language != clk_cplusplus \ if (!c_dialect_cxx () && !flag_iso) \
&& !flag_iso) \
{ \ { \
builtin_define ("hppa"); \ builtin_define ("hppa"); \
builtin_define_std ("PWB"); \ builtin_define_std ("PWB"); \
......
...@@ -66,7 +66,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -66,7 +66,7 @@ Boston, MA 02111-1307, USA. */
/* For C++ we need to add some additional macro \ /* For C++ we need to add some additional macro \
definitions required by the C++ standard \ definitions required by the C++ standard \
library. */ \ library. */ \
if (c_language == clk_cplusplus) \ if (c_dialect_cxx ()) \
{ \ { \
builtin_define ("_XOPEN_SOURCE=500"); \ builtin_define ("_XOPEN_SOURCE=500"); \
builtin_define ("_LARGEFILE_SOURCE=1"); \ builtin_define ("_LARGEFILE_SOURCE=1"); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment