]> git.saurik.com Git - wxWidgets.git/commitdiff
fix wxFilesystem compilation if wxUSE_FFILE is 0 but wxUSE_FILE is 1; disable wxFileS...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 3 Oct 2006 14:38:58 +0000 (14:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 3 Oct 2006 14:38:58 +0000 (14:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/chkconf.h
src/common/filesys.cpp

index 2c947629842558e77d68d5ffb0f649fbdf93f503..9642a39b8eff59c2a282a9c737acb6b2e90a876e 100644 (file)
 #           define wxUSE_STREAMS 1
 #       endif
 #   endif
+#   if !wxUSE_FILE && !wxUSE_FFILE
+#       ifdef wxABORT_ON_CONFIG_ERROR
+#           error "wxUSE_FILESYSTEM requires either wxUSE_FILE or wxUSE_FFILE"
+#       else
+#           undef wxUSE_FILESYSTEM
+#           define wxUSE_FILESYSTEM 0
+#       endif
+#   endif
 #endif /* wxUSE_FILESYSTEM */
 
 #if wxUSE_FS_INET
index 2d44cf8c5fc5028037469240f4346b75b17d377a..57fc6e3712e92e001da5e259d84a77f10a6eba5d 100644 (file)
@@ -214,7 +214,13 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString&
 
     // we need to check whether we can really read from this file, otherwise
     // wxFSFile is not going to work
+#if wxUSE_FILE
+    wxFileInputStream *is = new wxFileInputStream(fullpath);
+#elif wxUSE_FFILE
     wxFFileInputStream *is = new wxFFileInputStream(fullpath);
+#else
+#error One of wxUSE_FILE or wxUSE_FFILE must be set to 1 for wxFSHandler to work
+#endif
     if ( !is->Ok() )
     {
         delete is;