]> git.saurik.com Git - wxWidgets.git/commitdiff
OpenWatcom fixed the problem of fileno being missing, and so it should be
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 3 Apr 2005 20:39:44 +0000 (20:39 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 3 Apr 2005 20:39:44 +0000 (20:39 +0000)
there in OW 1.4 when it comes out.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filefn.cpp

index 55aa0e7ce8c0087363560901ac11d663278a5f47..2d28e3ac96b73efce806c5bc9e285d661a117414 100644 (file)
@@ -1954,12 +1954,14 @@ wxFileKind wxGetFileKind(int fd)
 
 wxFileKind wxGetFileKind(FILE *fp)
 {
-    // note: the watcom rtl dll doesn't have fileno (the static lib does)
-#if !defined wxFILEKIND_STUB && !(defined __WATCOMC__ && defined __SW_BR)
-    return wxGetFileKind(fileno(fp));
-#else
+    // Note: The watcom rtl dll doesn't have fileno (the static lib does).
+    //       Should be fixed in version 1.4.
+#if defined(wxFILEKIND_STUB) || \
+        (defined(__WATCOMC__) && __WATCOMC__ <= 1230 && defined(__SW_BR))
     (void)fp;
     return wxFILE_KIND_DISK;
+#else
+    return wxGetFileKind(fileno(fp));
 #endif
 }