strcpy( gwxMacFileName , dir ) ;
wxUnix2MacFilename( gwxMacFileName ) ;
const char *dirname = gwxMacFileName;
-#else
+#else // !Mac
const char *dirname = dir.c_str();
-#endif
+#endif // Mac/!Mac
+ // assume mkdir() has 2 args on non Windows platforms and on Windows too
+ // for the GNU compiler
+#if !defined(__WXMSW__) || (defined(__GNUWIN32__) && !defined(__MINGW32__))
if ( mkdir(dirname, perm) != 0 )
+#else // MSW
+ if ( mkdir(dirname) != 0 )
+#endif // !MSW/MSW
{
wxLogSysError(_("Directory '%s' couldn't be created"), dirname);