From 3e5e6e2ab5b4552ea14e7e8e461c0f38f23db377 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Thu, 13 Jan 2011 16:23:11 +0000 Subject: [PATCH] Make sure __LITTLE_ENDIAN/__BIG_ENDIAN are defined in libunwind-frame.c These macros do not seem to exist on ia64-hpux. gdb/ChangeLog: * libunwind-frame.c (__LITTLE_ENDIAN, __BIG_ENDIAN): Define if not already defined. --- gdb/ChangeLog | 5 +++++ gdb/libunwind-frame.c | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e52214d7f4..b7fe880fce 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-01-13 Joel Brobecker + + * libunwind-frame.c (__LITTLE_ENDIAN, __BIG_ENDIAN): Define if + not already defined. + 2011-01-13 Joel Brobecker * ia64-tdep.c (ia64_struct_type_p): New function. diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c index 2cdb1ab1f1..53c42d935b 100644 --- a/gdb/libunwind-frame.c +++ b/gdb/libunwind-frame.c @@ -41,6 +41,16 @@ #include "complaints.h" +/* The following two macros are normally defined in . + But systems such as ia64-hpux do not provide such header, so + we just define them here if not already defined. */ +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN 1234 +#endif +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN 4321 +#endif + static int libunwind_initialized; static struct gdbarch_data *libunwind_descr_handle;