From 6d099d5bae856af2b92ab3f7812632f0ea8ae7ea Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 22 Apr 2015 10:55:26 +0200 Subject: Undef basename before defining function. * path.cc (basename): Undefine basename before defining function to avoid type collision with prototype in string.h. Signed-off-by: Corinna Vinschen --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/path.cc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a190c24..eb79fcc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2015-04-22 Corinna Vinschen + + * path.cc (basename): Undefine basename before defining function to + avoid type collision with prototype in string.h. + 2015-04-21 Corinna Vinschen * include/libgen.h: Remove in favor of newlib version. diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index b05333f..1dd96cf 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -4727,6 +4727,8 @@ out: return buf; } +#undef basename + /* No need to be reentrant or thread-safe according to SUSv3. / and \\ are treated equally. Leading drive specifiers are kept intact as far as it makes sense. Everything else is -- cgit v1.1