summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/netbsd.h
diff options
context:
space:
mode:
authorthorpej <thorpej@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-26 15:46:40 +0000
committerthorpej <thorpej@138bc75d-0d04-0410-961f-82ee72b054a4>2002-11-26 15:46:40 +0000
commita429a994b6a96837c5484ee906c2d5daf8066855 (patch)
tree0a32cf922d630f6ada80600fc881203cd80c9825 /gcc/config/rs6000/netbsd.h
parent5a5e802f600359d457380237bf5d499909907c44 (diff)
downloadgcc-a429a994b6a96837c5484ee906c2d5daf8066855.tar.gz
* config/rs6000/rs6000.h (RS6000_CPU_CPP_ENDIAN_BUILTINS): New.
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Use RS6000_CPU_CPP_ENDIAN_BUILTINS. * config/rs6000/netbsd.h (RS6000_CPU_CPP_ENDIAN_BUILTINS): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59518 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/netbsd.h')
-rw-r--r--gcc/config/rs6000/netbsd.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/config/rs6000/netbsd.h b/gcc/config/rs6000/netbsd.h
index 6791a4d6622..b473a8a868f 100644
--- a/gcc/config/rs6000/netbsd.h
+++ b/gcc/config/rs6000/netbsd.h
@@ -31,6 +31,26 @@ Boston, MA 02111-1307, USA. */
} \
while (0)
+/* Override the default from rs6000.h to avoid conflicts with macros
+ defined in NetBSD header files. */
+
+#undef RS6000_CPU_CPP_ENDIAN_BUILTINS
+#define RS6000_CPU_CPP_ENDIAN_BUILTINS() \
+ do \
+ { \
+ if (BYTES_BIG_ENDIAN) \
+ { \
+ builtin_define ("__BIG_ENDIAN__"); \
+ builtin_assert ("machine=bigendian"); \
+ } \
+ else \
+ { \
+ builtin_define ("__LITTLE_ENDIAN__"); \
+ builtin_assert ("machine=littleendian"); \
+ } \
+ } \
+ while (0)
+
/* Make GCC agree with <machine/ansi.h>. */
#undef SIZE_TYPE