pc 2 mac conversion for file operations
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -189,6 +189,25 @@ const off_t wxInvalidOffset = (off_t)-1;
|
|||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
|
#if defined(__WXMAC__) && !defined(__DARWIN__)
|
||||||
|
|
||||||
|
WXDLLEXPORT int wxStat( const wxChar *file_name, wxStructStat *buf )
|
||||||
|
{
|
||||||
|
return stat( wxMacStringToCString( file_name ), buf );
|
||||||
|
}
|
||||||
|
|
||||||
|
WXDLLEXPORT int wxAccess( const wxChar *pathname, int mode )
|
||||||
|
{
|
||||||
|
return access( wxMacStringToCString( pathname ), mode );
|
||||||
|
}
|
||||||
|
|
||||||
|
WXDLLEXPORT int wxOpen( const wxChar *pathname, int flags, mode_t mode )
|
||||||
|
{
|
||||||
|
return open( wxMacStringToCString( pathname ), flags, mode );
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef wxNEED_WX_UNISTD_H
|
#ifdef wxNEED_WX_UNISTD_H
|
||||||
|
|
||||||
WXDLLEXPORT int wxStat( const wxChar *file_name, wxStructStat *buf )
|
WXDLLEXPORT int wxStat( const wxChar *file_name, wxStructStat *buf )
|
||||||
|
@@ -51,6 +51,10 @@
|
|||||||
using namespace std ;
|
using namespace std ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
#include "wx/mac/private.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_WCHAR_T
|
#if wxUSE_WCHAR_T
|
||||||
size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n)
|
size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n)
|
||||||
{
|
{
|
||||||
@@ -1195,6 +1199,28 @@ WXDLLEXPORT long int wxStrtol(const wxChar *nptr, wxChar **endptr, int base)
|
|||||||
}
|
}
|
||||||
#endif // wxNEED_WX_STRING_H
|
#endif // wxNEED_WX_STRING_H
|
||||||
|
|
||||||
|
#if defined(__WXMAC__) && !defined(__DARWIN__)
|
||||||
|
WXDLLEXPORT FILE * wxFopen(const wxChar *path, const wxChar *mode)
|
||||||
|
{
|
||||||
|
return fopen( wxMacStringToCString(path), mode );
|
||||||
|
}
|
||||||
|
|
||||||
|
WXDLLEXPORT FILE * wxFreopen(const wxChar *path, const wxChar *mode, FILE *stream)
|
||||||
|
{
|
||||||
|
return freopen( wxMacStringToCString(path), mode, stream );
|
||||||
|
}
|
||||||
|
|
||||||
|
WXDLLEXPORT int wxRemove(const wxChar *path)
|
||||||
|
{
|
||||||
|
return remove( wxMacStringToCString(path) );
|
||||||
|
}
|
||||||
|
|
||||||
|
WXDLLEXPORT int wxRename(const wxChar *oldpath, const wxChar *newpath)
|
||||||
|
{
|
||||||
|
return rename( wxMacStringToCString(oldpath), wxMacStringToCString(newpath) );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef wxNEED_WX_STDIO_H
|
#ifdef wxNEED_WX_STDIO_H
|
||||||
WXDLLEXPORT FILE * wxFopen(const wxChar *path, const wxChar *mode)
|
WXDLLEXPORT FILE * wxFopen(const wxChar *path, const wxChar *mode)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user