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=3d96fa70720a2b08c553bde7171bf943cd585d84

commit 3d96fa70720a2b08c553bde7171bf943cd585d84
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 774828f..589e0c7 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 5439a16..ea55956 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -4726,6 +4726,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]