From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44723 invoked by alias); 29 May 2016 17:35:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 44705 invoked by uid 89); 29 May 2016 17:35:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=difficulty X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 29 May 2016 17:35:23 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 067588553B; Sun, 29 May 2016 17:35:22 +0000 (UTC) Received: from greed.delorie.com (ovpn-116-6.phx2.redhat.com [10.3.116.6]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4THZLX4021205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 29 May 2016 13:35:21 -0400 Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.14.7/8.14.7) with ESMTP id u4THZKFp023582; Sun, 29 May 2016 13:35:20 -0400 From: DJ Delorie To: Ed Schouten Cc: gdb-patches@sourceware.org Subject: Re: Likely incorrect patch: remove the faulty basename() prototype from libiberty In-Reply-To: (message from Ed Schouten on Sun, 29 May 2016 19:24:13 +0200) Date: Sun, 29 May 2016 17:35:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00530.txt.bz2 Libiberty provides basename() for those platforms that do not have one. On platforms that *do* have one, you need to tell libiberty that you already have one. In your case, including some other header that prototypes it, and *telling* libiberty that you have done so, is the right solution. Including a header that prototypes it, and *not* telling libiberty that you have done so, leads to the error. So each project must decide if it has a basename, and if not, it relies on libiberty to provide one. If you decide you have a basename and *also* ask libiberty to provide one, you end up with a conflict. Most of this difficulty comes from the fact that autoconf is run by gdb, not libiberty, to control the macros that libiberty's includes see when included by gdb. There is no way for libiberty's autoconf to tell gdb what to do. So, we can't have a solution that's 100% controlled by libiberty alone.