This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Patch for IA64 HP-UX build
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: binutils at sources dot redhat dot com
- Date: Wed, 4 May 2005 16:57:09 -0700 (PDT)
- Subject: Patch for IA64 HP-UX build
- Reply-to: sje at cup dot hp dot com
I have been trying to build the latest binutils on IA64 HP-UX and ran
into several problems involving the newly added use of -Werror. Here is
the first of several patches to fix them. If approved, I think I need
someone to check it in for me too, I have GCC tree write access but I
have never checked anything in to the binutils tree.
The problem being addressed here is that bfd/sysdep.h only includes
strings.h if it hasn't already included string.h. HP-UX has both and
ffs() is only defined in strings.h. I hope there are no platforms where
including both will cause a problem. If there are, HP-UX could also be
made to work by checking for strings.h before string.h.
Tested on an HP-UX IA64 build which gets further with this change then
without it.
Steve Ellcey
sje@cup.hp.com
bfd/ChangeLog:
2005-05-04 Steve Ellcey <sje@cup.hp.com>
sysdep.h: Change ifdefs around include of string.h and strings.h.
*** src.orig/bfd/sysdep.h Wed May 4 16:31:48 2005
--- src/bfd/sysdep.h Wed May 4 16:32:00 2005
*************** extern int errno;
*** 41,53 ****
#ifdef HAVE_STRING_H
#include <string.h>
! #else
#ifdef HAVE_STRINGS_H
#include <strings.h>
! #else
extern char *strchr ();
extern char *strrchr ();
- #endif
#endif
#ifdef HAVE_STDLIB_H
--- 41,55 ----
#ifdef HAVE_STRING_H
#include <string.h>
! #endif
!
#ifdef HAVE_STRINGS_H
#include <strings.h>
! #endif
!
! #if !defined(HAVE_STRING_H) && !defined(HAVE_STRINGS_H)
extern char *strchr ();
extern char *strrchr ();
#endif
#ifdef HAVE_STDLIB_H