]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filename.cpp
wxMac uses wxStandardPathsCF to mean wxStandardPaths in its wxBase
[wxWidgets.git] / src / common / filename.cpp
index 83731a291ab6ee7c598095510924d660df00f6b9..94799d1a964f9aba107c9dc2ea67042523b700bf 100644 (file)
@@ -87,6 +87,9 @@
 // For GetShort/LongPathName
 #ifdef __WIN32__
 #include "wx/msw/wrapwin.h"
+#if defined(__MINGW32__)
+#include "wx/msw/gccpriv.h"
+#endif
 #endif
 
 #ifdef __WXWINCE__
@@ -234,8 +237,8 @@ static void ConvertWxToFileTime(FILETIME *ft, const wxDateTime& dt)
 {
     SYSTEMTIME st;
     st.wDay = dt.GetDay();
-    st.wMonth = dt.GetMonth() + 1;
-    st.wYear = dt.GetYear();
+    st.wMonth = (WORD)(dt.GetMonth() + 1);
+    st.wYear = (WORD)dt.GetYear();
     st.wHour = dt.GetHour();
     st.wMinute = dt.GetMinute();
     st.wSecond = dt.GetSecond();
@@ -1049,7 +1052,12 @@ bool wxFileName::GetShortcutTarget(const wxString& shortcutPath, wxString& targe
             if (SUCCEEDED(hres))
             {
                 wxChar buf[2048];
+                // Wrong prototype in early versions
+#if defined(__MINGW32__) && !wxCHECK_W32API_VERSION(2, 2)
+                psl->GetPath((CHAR*) buf, 2048, NULL, SLGP_UNCPRIORITY);
+#else
                 psl->GetPath(buf, 2048, NULL, SLGP_UNCPRIORITY);
+#endif
                 targetFilename = wxString(buf);
                 success = (shortcutPath != targetFilename);