Peter Willis
unread,Nov 9, 2012, 6:40:55 PM11/9/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wx-u...@googlegroups.com
I managed to change the file :
'wxWidgets-2.8.12/src/common/filefn.cpp'
The changes allow compilation to continue under cygwin using configure --host=i686-w64-mingw32 --build=i686-pc-cygwin.
The only changes I made were to the definitions of routines 'wxMkdir' and 'wxRmdir'
My file now reads as follows for those routines:
bool wxMkdir(const wxString& dir, int perm)
{
#if defined(__WXPALMOS__)
return false;
#elif defined(__WXMAC__) && !defined(__UNIX__)
return (mkdir( wxFNCONV(dir) , 0 ) == 0);
#else // !Mac
const wxChar *dirname = dir.c_str();
// assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too
// for the GNU compiler
#if (!(defined(__WXMSW__) || defined(__OS2__) || defined(__DOS__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WINE__) || defined(__WXMICROWIN__)
#if defined(MSVCRT)
wxUnusedVar(perm);
if ( mkdir(wxFNCONV(dirname)) != 0 )
#else
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
#endif
#elif defined(__MINGW32__)
if ( mkdir(wxFNCONV(dirname)) != 0 )
#elif defined(__OS2__)
wxUnusedVar(perm);
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
#elif defined(__DOS__)
#if defined(__WATCOMC__)
(void)perm;
if ( wxMkDir(wxFNSTRINGCAST wxFNCONV(dirname)) != 0 )
#elif defined(__DJGPP__)
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
#else
#error "Unsupported DOS compiler!"
#endif
#else // !MSW, !DOS and !OS/2 VAC++
wxUnusedVar(perm);
#ifdef __WXWINCE__
if ( !CreateDirectory(dirname, NULL) )
#else
if ( wxMkDir(dir.fn_str()) != 0 )
#endif
#endif // !MSW/MSW
{
wxLogSysError(_("Directory '%s' couldn't be created"), dirname);
return false;
}
return true;
#endif // Mac/!Mac
}
bool wxRmdir(const wxString& dir, int WXUNUSED(flags))
{
#if defined(__VMS__)
return false; //to be changed since rmdir exists in VMS7.x
#elif defined(__OS2__)
return (::DosDeleteDir((PSZ)dir.c_str()) == 0);
#elif defined(__WXWINCE__)
return (RemoveDirectory(dir) != 0);
#elif defined(__WXPALMOS__)
// TODO with VFSFileRename()
return false;
#elif defined(__MINGW32__)
return (rmdir(OS_FILENAME(dir)) == 0);
#else
return (wxRmDir(OS_FILENAME(dir)) == 0);
#endif
}