From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22849 invoked by alias); 4 May 2005 23:57:17 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 22805 invoked from network); 4 May 2005 23:57:10 -0000 Received: from unknown (HELO palrel12.hp.com) (156.153.255.237) by sourceware.org with SMTP; 4 May 2005 23:57:10 -0000 Received: from smtp1.ptp.hp.com (smtp1.ptp.hp.com [15.1.28.250]) by palrel12.hp.com (Postfix) with ESMTP id C81A3402196 for ; Wed, 4 May 2005 16:57:09 -0700 (PDT) Received: from hpsje.cup.hp.com (hpsje.cup.hp.com [15.244.96.221]) by smtp1.ptp.hp.com (Postfix) with ESMTP id AB4EF14F383 for ; Wed, 4 May 2005 23:57:09 +0000 (UTC) Received: (from sje@localhost) by hpsje.cup.hp.com (8.9.3 (PHNE_24419+JAGae58098)/8.7.3 TIS Messaging 5.0) id QAA16422 for binutils@sources.redhat.com; Wed, 4 May 2005 16:57:09 -0700 (PDT) Date: Wed, 04 May 2005 23:59:00 -0000 From: Steve Ellcey Message-Id: <200505042357.QAA16422@hpsje.cup.hp.com> To: binutils@sources.redhat.com Subject: Patch for IA64 HP-UX build Reply-To: sje@cup.hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2005-05/txt/msg00127.txt.bz2 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 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 ! #else #ifdef HAVE_STRINGS_H #include ! #else extern char *strchr (); extern char *strrchr (); - #endif #endif #ifdef HAVE_STDLIB_H --- 41,55 ---- #ifdef HAVE_STRING_H #include ! #endif ! #ifdef HAVE_STRINGS_H #include ! #endif ! ! #if !defined(HAVE_STRING_H) && !defined(HAVE_STRINGS_H) extern char *strchr (); extern char *strrchr (); #endif #ifdef HAVE_STDLIB_H