Fix KWSys SystemTools build on cygwin with -mwin32
Commit "Optimize KWSys SystemTools::FileExists on Windows" accidentally added "#undef _WIN32" when including <windows.h> on cygwin, which breaks builds using the -mwin32 flag. This commit removes that line and fixes the real error it was intended to avoid.
This commit is contained in:
parent
6f45c1d88c
commit
4e121af95e
@ -70,7 +70,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
# undef _WIN32
|
|
||||||
extern "C" void cygwin_conv_to_win32_path(const char *path, char *win32_path);
|
extern "C" void cygwin_conv_to_win32_path(const char *path, char *win32_path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2614,7 +2613,7 @@ bool SystemTools::FileIsDirectory(const char* name)
|
|||||||
struct stat fs;
|
struct stat fs;
|
||||||
if(stat(name, &fs) == 0)
|
if(stat(name, &fs) == 0)
|
||||||
{
|
{
|
||||||
#if defined( _WIN32 )
|
#if defined( _WIN32 ) && !defined(__CYGWIN__)
|
||||||
return ((fs.st_mode & _S_IFDIR) != 0);
|
return ((fs.st_mode & _S_IFDIR) != 0);
|
||||||
#else
|
#else
|
||||||
return S_ISDIR(fs.st_mode);
|
return S_ISDIR(fs.st_mode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user