From owner-svn-src-all@freebsd.org Sun May 29 16:10:03 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 224DFB53A28; Sun, 29 May 2016 16:10:03 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D98D01E1B; Sun, 29 May 2016 16:10:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4TGA2Rk020813; Sun, 29 May 2016 16:10:02 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4TGA2cJ020812; Sun, 29 May 2016 16:10:02 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201605291610.u4TGA2cJ020812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Sun, 29 May 2016 16:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300960 - head/contrib/binutils/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 16:10:03 -0000 Author: ed Date: Sun May 29 16:10:01 2016 New Revision: 300960 URL: https://svnweb.freebsd.org/changeset/base/300960 Log: Replace local prototype of basename() with an inclusion of . libiberty currently defines the prototype for basename() itself instead of using . It still uses the BSD-style prototype instead of the POSIX one, meaning that if FreeBSD would switch over to the POSIX one, you wouldn't be able to use libiberty.h and libgen.h in a single source file. It turns out that kgdb does this. Patch up libiberty to just include . I'm currently talking to upstream to see whether we can come up with a more complete solution that could be integrated, but for our unmaintained copy of GDB in base, let's just apply the simplest workaround possible. Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D6631 Modified: head/contrib/binutils/include/libiberty.h Modified: head/contrib/binutils/include/libiberty.h ============================================================================== --- head/contrib/binutils/include/libiberty.h Sun May 29 15:46:19 2016 (r300959) +++ head/contrib/binutils/include/libiberty.h Sun May 29 16:10:01 2016 (r300960) @@ -102,7 +102,7 @@ extern int writeargv PARAMS ((char **, F is 1, we found it so don't provide any declaration at all. */ #if !HAVE_DECL_BASENAME #if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME) -extern char *basename (const char *); +#include #else /* Do not allow basename to be used if there is no prototype seen. We either need to use the above prototype or have one from