[newlib-cygwin/cygwin-2.0] Undef basename before defining function.

Corinna Vinschen corinna@sourceware.org
Thu Apr 23 20:53:00 GMT 2015


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6d099d5bae856af2b92ab3f7812632f0ea8ae7ea

commit 6d099d5bae856af2b92ab3f7812632f0ea8ae7ea
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Apr 22 10:55:26 2015 +0200

    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 <corinna@vinschen.de>

Diff:
---
 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  <corinna@vinschen.de>
+
+	* path.cc (basename): Undefine basename before defining function to
+	avoid type collision with prototype in string.h.
+
 2015-04-21  Corinna Vinschen  <corinna@vinschen.de>
 
 	* 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



More information about the Cygwin-cvs mailing list