X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6294ac2e91af3408cfa04910b90ad7ace94f1220..7f73c398d5bb0d820520dde635c712b8b7c66634:/src/msw/wince/filefnwce.cpp diff --git a/src/msw/wince/filefnwce.cpp b/src/msw/wince/filefnwce.cpp index ba56448e41..3ece11a640 100644 --- a/src/msw/wince/filefnwce.cpp +++ b/src/msw/wince/filefnwce.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: filefn.cpp +// Name: src/msw/wince/filefn.cpp // Purpose: File- and directory-related functions // Author: Julian Smart // Modified by: @@ -17,28 +17,24 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "filefn.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/defs.h" -#include "wx/file.h" #ifdef __BORLANDC__ #pragma hdrstop #endif +#include "wx/file.h" + #include #include #include #include -#include -#ifdef __WINCE__ +#ifdef __WXWINCE__ +#include "wx/msw/wince/missing.h" -int wxOpen(const wxChar *filename, int oflag, int WXUNUSED(pmode)) +int wxCRT_Open(const wxChar *filename, int oflag, int WXUNUSED(pmode)) { DWORD access = 0; DWORD shareMode = 0; @@ -101,7 +97,7 @@ int wxOpen(const wxChar *filename, int oflag, int WXUNUSED(pmode)) return fd; } -int wxAccess(const wxChar *name, int WXUNUSED(how)) +int wxCRT_Access(const wxChar *name, int WXUNUSED(how)) { HANDLE fileHandle = ::CreateFile(name, 0, FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); @@ -127,12 +123,12 @@ int wxEof(int fd) DWORD off0 = SetFilePointer((HANDLE) fd, 0, &high0, FILE_CURRENT); if (off0 == 0xFFFFFFFF && GetLastError() != NO_ERROR) return -1; - + LONG high1 = 0; DWORD off1 = SetFilePointer((HANDLE) fd, 0, &high0, FILE_END); if (off1 == 0xFFFFFFFF && GetLastError() != NO_ERROR) return -1; - + if (off0 == off1 && high0 == high1) return 1; else @@ -211,4 +207,4 @@ int wxFsync(int WXUNUSED(fd)) return 0; } -#endif //__WINCE__ +#endif //__WXWINCE__