summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-12-13 00:20:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-12-13 00:20:29 +0000
commitb466dc6c744e98a10e772ce66e9471a7fd48176d (patch)
treeacf6d294a474069b6cf1eed52e892a8318abf9a7
parent4f7fbce48ac97e284436d50ff725faeff09064c9 (diff)
Don't define _BIG_ENDIAN on macpcc, only __BIG_ENDIAN__.
Adapted from netbsd.h. OK drahn@ deraadt@
-rw-r--r--gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h b/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h
index e5901fd1359..a82d47885fa 100644
--- a/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h
+++ b/gnu/usr.bin/gcc/gcc/config/rs6000/openbsd.h
@@ -35,6 +35,26 @@ Boston, MA 02111-1307, USA. */
} \
while (0)
+/* Override the default from rs6000.h to avoid conflicts with macros
+ defined in OpenBSD 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)
+
#undef CPP_OS_DEFAULT_SPEC
#define CPP_OS_DEFAULT_SPEC "%(cpp_os_openbsd)"