aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2016-05-29 16:10:01 +0000
committerEd Schouten <ed@FreeBSD.org>2016-05-29 16:10:01 +0000
commita25e1dd4dfeb0f5683bf7bc12bea2f52928b086c (patch)
tree8300298424ddd233669a6ae37cd1b03b5e2c2d02 /contrib
parent9f790a1756e35c932a96363a830322af42f757dc (diff)
downloadsrc-a25e1dd4dfeb0f5683bf7bc12bea2f52928b086c.tar.gz
src-a25e1dd4dfeb0f5683bf7bc12bea2f52928b086c.zip
Replace local prototype of basename() with an inclusion of <libgen.h>.
libiberty currently defines the prototype for basename() itself instead of using <libgen.h>. 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 <libgen.h>. 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
Notes
Notes: svn path=/head/; revision=300960
Diffstat (limited to 'contrib')
-rw-r--r--contrib/binutils/include/libiberty.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/binutils/include/libiberty.h b/contrib/binutils/include/libiberty.h
index 4e697343fb6f..555f5c7ec574 100644
--- a/contrib/binutils/include/libiberty.h
+++ b/contrib/binutils/include/libiberty.h
@@ -102,7 +102,7 @@ extern int writeargv PARAMS ((char **, FILE *));
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 <libgen.h>
#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