This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix build failure of solaris-hosted cross debuggers.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 9 Jan 2010 08:55:04 +0400
- Subject: [commit] Fix build failure of solaris-hosted cross debuggers.
The following patch fixes a build failure due to a GCC warning that
_FILE_OFFSET_BITS is redefined: One comes from the GCC include-fixed
ctype.h, and the other from GDB's config.h. This does not show up on
native solaris because the AC_SYS_LARGEFILE autoconf macro is not used
on native sparc-solaris (see ACX_LARGEFILE in config/largefile.m4).
The problem came from the fact that we were including <ctype.h>
before including "defs.h". Fixed thusly.
gdb/ChangeLog:
* ada-valprint.c, parse.c: Include defs.h before including ctype.h.
--
Joel
gdb/ChangeLog:
* ada-valprint.c, parse.c: Include defs.h before including ctype.h.
---
gdb/ada-valprint.c | 2 +-
gdb/parse.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 7c96db0..7f3c960 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -19,8 +19,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <ctype.h>
#include "defs.h"
+#include <ctype.h>
#include "gdb_string.h"
#include "symtab.h"
#include "gdbtypes.h"
diff --git a/gdb/parse.c b/gdb/parse.c
index 8cfdeaa..2885506 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -31,9 +31,8 @@
during the process of parsing; the lower levels of the tree always
come first in the result. */
-#include <ctype.h>
-
#include "defs.h"
+#include <ctype.h>
#include "arch-utils.h"
#include "gdb_string.h"
#include "symtab.h"
--
1.5.4.3