]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed Cygwin compilation (there's no _get_osfhandle)
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Mon, 14 Feb 2005 14:48:35 +0000 (14:48 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Mon, 14 Feb 2005 14:48:35 +0000 (14:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/filefn.h

index 976292adb96df14e5ded6faa2a610dc218f4dbba..a42adcc9c6b5eef1c0917c86698896b2eef18c1e 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