]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/filefn.h
Check for fdopen. Probably everywhere has it, but check until we are sure.
[wxWidgets.git] / include / wx / filefn.h
index 60853f0bce7f1e7132ee5899daa043a828a2d3ab..5cdc93b404cfd7800f382193353b702bdd00f781 100644 (file)
@@ -309,6 +309,15 @@ enum wxFileKind
         #endif
     #endif
 
+    #if wxHAS_HUGE_FILES
+        // wxFile is present and supports large files. Currently wxFFile
+        // doesn't have large file support with any Windows compiler (even
+        // Win64 ones).
+        #if wxUSE_FILE
+            #define WXFILE_LARGEFILE 1
+        #endif
+    #endif
+        
     // It's a private define, undefine it so nobody gets tempted to use it
     #undef wxHAS_HUGE_FILES
 #else // Unix platforms using configure
@@ -317,6 +326,14 @@ enum wxFileKind
         #define wxFileOffsetFmtSpec wxLongLongFmtSpec
         wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t),
                                 BadFileSizeType );
+        // wxFile is present and supports large files
+        #ifdef wxUSE_FILE
+            #define WXFILE_LARGEFILE
+        #endif
+        // wxFFile is present and supports large files
+        #if SIZEOF_LONG == 8 || defined HAVE_FSEEKO
+            #define WXFFILE_LARGEFILE
+        #endif
     #else
         #define wxFileOffsetFmtSpec _T("")
     #endif
@@ -351,8 +368,22 @@ enum wxFileKind
         #define   wxLstat      lstat
         #define   wxAccess     access
     #endif
+
+    #define wxHAVE_NATIVE_LSTAT
 #endif // platforms
 
+#ifdef O_BINARY
+    #define wxO_BINARY O_BINARY
+#else
+    #define wxO_BINARY 0
+#endif
+
+// if the platform doesn't have symlinks, define wxLstat to be the same as
+// wxStat to avoid #ifdefs in the code using it
+#ifndef wxHAVE_NATIVE_LSTAT
+    #define wxLstat wxStat
+#endif
+
 #if defined(__VISAGECPP__) && __IBMCPP__ >= 400
 //
 // VisualAge C++ V4.0 cannot have any external linkage const decs