[PATCH] winsup/cygwin: fix compile of path.cc after basename changes

Yaakov Selkowitz yselkowi@redhat.com
Mon Jul 6 19:41:00 GMT 2015


---
 winsup/cygwin/path.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 446d746..5eb076f 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -48,7 +48,7 @@
      c: means c:\.
   */
 
-#define _BASENAME_DEFINED
+#define basename basename
 #include "winsup.h"
 #include "miscfuncs.h"
 #include <ctype.h>
@@ -70,6 +70,7 @@
 #include <ntdll.h>
 #include <wchar.h>
 #include <wctype.h>
+#undef basename
 
 suffix_info stat_suffixes[] =
 {
@@ -4739,8 +4740,6 @@ 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
-- 
2.4.4



More information about the Cygwin-patches mailing list