From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30385 invoked by alias); 14 Mar 2002 21:28:48 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30289 invoked from network); 14 Mar 2002 21:28:46 -0000 Received: from unknown (HELO potter.sfbay.redhat.com) (209.249.29.60) by sources.redhat.com with SMTP; 14 Mar 2002 21:28:46 -0000 Received: from dot.sfbay.redhat.com (dot.sfbay.redhat.com [205.180.230.224]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g2ELN1h29461 for ; Thu, 14 Mar 2002 13:23:01 -0800 Received: (from rth@localhost) by dot.sfbay.redhat.com (8.11.6/8.11.6) id g2ELSjm25193 for gdb-patches@sources.redhat.com; Thu, 14 Mar 2002 13:28:45 -0800 X-Authentication-Warning: dot.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Thu, 14 Mar 2002 13:28:00 -0000 From: Richard Henderson To: gdb-patches@sources.redhat.com Subject: declare canonicalize_file_name Message-ID: <20020314132845.A25190@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-SW-Source: 2002-03/txt/msg00217.txt.bz2 GDB uses canonicalize_file_name if it detects it in libc, but doesn't define _GNU_SOURCE to get it declared. This results in the compiler thinking that the function returns an integer, which results in the pointer value being truncated on ia64. I figured providing a declaration was safer than forcing _GNU_SOURCE. Ok? r~ * configure.in (canonicalize_file_name): Look for declaration. * configure, config.in: Rebuild. * utils.c (canonicalize_file_name): Provide decl if required. Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.83 diff -c -p -d -r1.83 configure.in *** configure.in 2002/03/06 21:16:00 1.83 --- configure.in 2002/03/14 21:24:49 *************** BFD_NEED_DECLARATION(free) *** 241,247 **** BFD_NEED_DECLARATION(strerror) BFD_NEED_DECLARATION(strdup) BFD_NEED_DECLARATION(strstr) ! # The following save_state_t checkery is only necessary for HPUX # versions earlier than 10.20. When those fade from memory, this --- 241,247 ---- BFD_NEED_DECLARATION(strerror) BFD_NEED_DECLARATION(strdup) BFD_NEED_DECLARATION(strstr) ! BFD_NEED_DECLARATION(canonicalize_file_name) # The following save_state_t checkery is only necessary for HPUX # versions earlier than 10.20. When those fade from memory, this Index: utils.c =================================================================== RCS file: /cvs/src/src/gdb/utils.c,v retrieving revision 1.68 diff -c -p -d -r1.68 utils.c *** utils.c 2002/03/01 06:19:24 1.68 --- utils.c 2002/03/14 21:24:49 *************** extern PTR realloc (); *** 81,86 **** --- 81,91 ---- #ifdef NEED_DECLARATION_FREE extern void free (); #endif + /* Actually, we'll never have the decl, since we don't define _GNU_SOURCE. */ + #if defined(HAVE_CANONICALIZE_FILE_NAME) \ + && defined(NEED_DECLARATION_CANONICALIZE_FILE_NAME) + extern char *canonicalize_file_name (const char *); + #endif #undef XMALLOC #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))