From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73593 invoked by alias); 2 Jun 2016 21:27:40 -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 73579 invoked by uid 89); 2 Jun 2016 21:27:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:U*dj, Likely, Delorie, delorie X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 02 Jun 2016 21:27:29 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1b8a9F-0002Qp-Tl from joseph_myers@mentor.com ; Thu, 02 Jun 2016 14:27:26 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Thu, 2 Jun 2016 22:27:24 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.86_2) (envelope-from ) id 1b8a9D-000539-74; Thu, 02 Jun 2016 21:27:23 +0000 Date: Thu, 02 Jun 2016 21:27:00 -0000 From: Joseph Myers To: DJ Delorie CC: Ed Schouten , Subject: Re: Likely incorrect patch: remove the faulty basename() prototype from libiberty In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2016-06/txt/msg00045.txt.bz2 On Sun, 29 May 2016, DJ Delorie wrote: > I think the right path to go down is to add libgen.h to the list in > AC_CHECK_HEADERS for every project that uses basename() (including > libiberty itself, and binutils, gdb, and gcc), and then everyone who > uses basename() from libiberty.h would need to include libgen.h *if* > it's found by configure. Note that there are two different and incompatible basename functions. libgen.h has the POSIX one. libiberty has the GNU one (which glibc declares in with _GNU_SOURCE). If you include libgen.h with glibc, you get basename defined to __xpg_basename, which presumably is not what is wanted by applications using libiberty. -- Joseph S. Myers joseph@codesourcery.com