public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Steve Ellcey <sje@cup.hp.com>
To: binutils@sources.redhat.com
Subject: Patch for IA64 HP-UX build
Date: Wed, 04 May 2005 23:59:00 -0000	[thread overview]
Message-ID: <200505042357.QAA16422@hpsje.cup.hp.com> (raw)

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

             reply	other threads:[~2005-05-04 23:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04 23:59 Steve Ellcey [this message]
2005-05-05  1:58 ` James E Wilson
2005-05-05 16:18   ` Steve Ellcey
2005-05-05 16:32     ` Steve Ellcey
2005-05-05 16:37   ` Steve Ellcey
2005-05-05 16:48     ` Daniel Jacobowitz
2005-05-05 17:14       ` Steve Ellcey
2005-05-05 17:52         ` James E Wilson
2005-05-05 19:28         ` James E Wilson
2005-05-05 16:58     ` H. J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200505042357.QAA16422@hpsje.cup.hp.com \
    --to=sje@cup.hp.com \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).