mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 19:40:33 +08:00
winsup/cygwin: rework basename redefinition handling in path.cc
This fixes the compile after commit 79e419de6261c4e04785908828096cb4d56b8680. * path.cc: Rework basename redefinition handling. Explain why.
This commit is contained in:
parent
79e419de62
commit
c9b3716279
@ -1,3 +1,7 @@
|
|||||||
|
2015-07-06 Yaakov Selkowitz <yselkowi@redhat.com>
|
||||||
|
|
||||||
|
* path.cc: Rework basename redefinition handling. Explain why.
|
||||||
|
|
||||||
2015-07-05 Corinna Vinschen <corinna@vinschen.de>
|
2015-07-05 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* dcrt0.cc (CYGWIN_GUARD): Remove.
|
* dcrt0.cc (CYGWIN_GUARD): Remove.
|
||||||
|
@ -48,7 +48,12 @@
|
|||||||
c: means c:\.
|
c: means c:\.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _BASENAME_DEFINED
|
/* This file includes both the XPG and GNU basename functions, with the
|
||||||
|
former exported as "basename" for ABI compatibility but the latter
|
||||||
|
declared as such for source compatibility with glibc. This tells
|
||||||
|
<string.h> not to declare the GNU variant in order to prevent a conflicting
|
||||||
|
declaration error with the XPG variant implemented herein. */
|
||||||
|
#define basename basename
|
||||||
#include "winsup.h"
|
#include "winsup.h"
|
||||||
#include "miscfuncs.h"
|
#include "miscfuncs.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -70,6 +75,7 @@
|
|||||||
#include <ntdll.h>
|
#include <ntdll.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
|
#undef basename
|
||||||
|
|
||||||
suffix_info stat_suffixes[] =
|
suffix_info stat_suffixes[] =
|
||||||
{
|
{
|
||||||
@ -4739,8 +4745,6 @@ out:
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef basename
|
|
||||||
|
|
||||||
/* No need to be reentrant or thread-safe according to SUSv3.
|
/* No need to be reentrant or thread-safe according to SUSv3.
|
||||||
/ and \\ are treated equally. Leading drive specifiers are
|
/ and \\ are treated equally. Leading drive specifiers are
|
||||||
kept intact as far as it makes sense. Everything else is
|
kept intact as far as it makes sense. Everything else is
|
||||||
|
Loading…
x
Reference in New Issue
Block a user