From: Michael Wetherell Date: Sat, 5 Mar 2005 23:24:17 +0000 (+0000) Subject: Fix for problem with wxGetFileKind on WinCE X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9802983f157c32177e92e8c0f6b1ce44aec0ebca Fix for problem with wxGetFileKind on WinCE git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/filefn.h b/include/wx/filefn.h index c58e9e5ace..280a1ffbed 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -459,7 +459,7 @@ WXDLLIMPEXP_BASE bool wxRmdir(const wxString& dir, int flags = 0); // Return the type of an open file WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(int fd); -inline wxFileKind wxGetFileKind (FILE *fp) { return wxGetFileKind(fileno(fp)); } +WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(FILE *fp); // compatibility defines, don't use in new code #define wxDirExists wxPathExists diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index fbb1a719bb..9f34f44509 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1936,11 +1936,22 @@ wxFileKind wxGetFileKind(int fd) return wxFILE_KIND_DISK; #else + #define wxFILEKIND_STUB (void)fd; return wxFILE_KIND_DISK; #endif } +wxFileKind wxGetFileKind(FILE *fp) +{ +#ifndef wxFILEKIND_STUB + return wxGetFileKind(fileno(fp)); +#else + (void)fp; + return wxFILE_KIND_DISK; +#endif +} + #ifdef __VISUALC__ #pragma warning(default:4706) // assignment within conditional expression #endif // VC++