From: Vadim Zeitlin Date: Sat, 28 Nov 2009 03:37:41 +0000 (+0000) Subject: Define INVALID_FILE_ATTRIBUTES in filename.cpp too. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/85b1997c095b18cd5e9e54e9d39feaa71c5ffa06 Define INVALID_FILE_ATTRIBUTES in filename.cpp too. Fix VC6 compilation: INVALID_FILE_ATTRIBUTES is not defined in its headers so we need to do it ourselves (this was done in filefn.cpp before but part of the code using this constant was moved to filename.cpp in r62735 so now we need to define it here too). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 130d429510..49c5ed0f57 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -144,6 +144,13 @@ extern const wxULongLong wxInvalidSize = (unsigned)-1; #endif // wxUSE_LONGLONG +#ifdef __WIN32__ + // this define is missing from VC6 headers + #ifndef INVALID_FILE_ATTRIBUTES + #define INVALID_FILE_ATTRIBUTES ((DWORD)-1) + #endif +#endif // __WIN32__ + namespace { @@ -574,7 +581,7 @@ bool wxFileName::FileExists() const /* static */ bool wxFileName::FileExists( const wxString &filePath ) { - #if defined(__WXPALMOS__) +#if defined(__WXPALMOS__) return false; #elif defined(__WIN32__) && !defined(__WXMICROWIN__) // we must use GetFileAttributes() instead of the ANSI C functions because