#ifndef _FILEFN_H_
#define _FILEFN_H_
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "filefn.h"
#endif
#if wxUSE_UNICODE
#if wxUSE_UNICODE_MSLU
- WXDLLEXPORT int wxOpen(const wxChar *name, int flags, int mode);
+ #define wxOpen wxMSLU__wopen
+ #define wxAccess wxMSLU__waccess
+ #define wxMkDir wxMSLU__wmkdir
+ #define wxRmDir wxMSLU__wrmdir
+ #define wxStat wxMSLU__wstat
#else
#define wxOpen _wopen
+ #define wxAccess _waccess
+ #define wxMkDir _wmkdir
+ #define wxRmDir _wrmdir
+ #define wxStat _wstat
#endif
- #define wxAccess _waccess
-
- #define wxMkDir _wmkdir
- #define wxRmDir _wrmdir
-
- #define wxStat _wstat
#else // !wxUSE_UNICODE
#define wxOpen _open
#define wxAccess _access
-
#define wxMkDir _mkdir
#define wxRmDir _rmdir
-
#define wxStat _stat
#endif
#endif // O_RDONLY
#else
// functions
- #define wxOpen open
#define wxClose close
#define wxRead read
#define wxWrite write
#define wxLseek lseek
#define wxFsync commit
- #define wxAccess access
#define wxEof eof
#define wxMkDir mkdir
#define wxTell(fd) lseek(fd, 0, SEEK_CUR)
- #define wxStat stat
-
- // types
#define wxStructStat struct stat
+
+#if wxUSE_UNICODE
+# define wxNEED_WX_UNISTD_H
+WXDLLEXPORT int wxStat( const wxChar *file_name, wxStructStat *buf );
+WXDLLEXPORT int wxAccess( const wxChar *pathname, int mode );
+WXDLLEXPORT int wxOpen( const wxChar *pathname, int flags, mode_t mode );
+#else
+ #define wxOpen open
+ #define wxStat stat
+ #define wxAccess access
+#endif
#endif // VC++
#define wxPATH_SEP_MAC wxT(";")
// platform independent versions
-#if defined(__UNIX__)
+#if defined(__UNIX__) && !defined(__CYGWIN__)
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
#define wxPATH_SEP wxPATH_SEP_UNIX
#elif defined(__MAC__)
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_MAC
#define wxPATH_SEP wxPATH_SEP_MAC
+#elif defined(__CYGWIN__) // Cygwin
+ #define wxFILE_SEP_PATH wxFILE_SEP_PATH_DOS
+ #define wxPATH_SEP wxPATH_SEP_UNIX
#else // Windows and OS/2
#define wxFILE_SEP_PATH wxFILE_SEP_PATH_DOS
#define wxPATH_SEP wxPATH_SEP_DOS