]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/filefn.h
fixed hash collisions in ZIP files (patch 1082026)
[wxWidgets.git] / include / wx / filefn.h
index 976292adb96df14e5ded6faa2a610dc218f4dbba..8894f9a788e207204e94b4f3efb27c41ab10788e 100644 (file)
@@ -352,9 +352,15 @@ enum wxFileKind
     #endif
 #endif // platforms
 
-#if defined __WXMSW__ && !defined __WXWINCE__ 
+#if defined(__WXMSW__) && !defined(__WXWINCE__)
     // get the HANDLE associated with a file descriptor
-    inline HANDLE wxGetOSFHandle(int fd) { return (HANDLE)_get_osfhandle(fd); }
+#   ifdef __CYGWIN__
+#       include "wx/msw/private.h" // for HANDLE
+#       include <io.h> // for get_osfhandle()
+        inline HANDLE wxGetOSFHandle(int fd) { return (HANDLE) get_osfhandle(fd); }
+#   else
+        inline HANDLE wxGetOSFHandle(int fd) { return (HANDLE) _get_osfhandle(fd); }
+#   endif
 #endif
 
 #if defined(__VISAGECPP__) && __IBMCPP__ >= 400