This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 3/8] Make sure __LITTLE_ENDIAN/__BIG_ENDIAN are defined in libunwind-frame.c
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Tue, 28 Dec 2010 08:43:01 +0400
- Subject: [PATCH 3/8] Make sure __LITTLE_ENDIAN/__BIG_ENDIAN are defined in libunwind-frame.c
- References: <1293511386-7384-1-git-send-email-brobecker@adacore.com>
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/libunwind-frame.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/gdb/libunwind-frame.c b/gdb/libunwind-frame.c
index ece93bd..dc28064 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 <endian.h>.
+ 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;
--
1.7.1