]> git.saurik.com Git - wxWidgets.git/commitdiff
Define INVALID_FILE_ATTRIBUTES in filename.cpp too.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Nov 2009 03:37:41 +0000 (03:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 28 Nov 2009 03:37:41 +0000 (03:37 +0000)
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

src/common/filename.cpp

index 130d42951006eb9adb1202bae00dbe310f94e3fd..49c5ed0f573c2d26042a1b6d484bcaf017bbf9fb 100644 (file)
 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