This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Undef basename before defining function.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]