From: Vadim Zeitlin Date: Sat, 30 May 2009 17:15:36 +0000 (+0000) Subject: define HAVE_LARGEFILE_SUPPORT in setup.h when large files support is available and... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/68fe70ea1f131471b82747ee2759dba7a19a0c23 define HAVE_LARGEFILE_SUPPORT in setup.h when large files support is available and test for it in wx/filefn.h (closes #10844); document that wx/filefn.h must be included before testing for wxHAS_LARGE_(F)FILES git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/doxygen/mainpages/const_cpp.h b/docs/doxygen/mainpages/const_cpp.h index 3d7aa7d000..b5a9c833f5 100644 --- a/docs/doxygen/mainpages/const_cpp.h +++ b/docs/doxygen/mainpages/const_cpp.h @@ -197,8 +197,12 @@ Currently the following symbols exist: implemented in a generic way, using a critical section.} @itemdef{wxHAS_CONFIG_TEMPLATE_RW, Defined if the currently used compiler supports template Read() and Write() methods in wxConfig.} -@itemdef{wxHAS_LARGE_FILES, Defined if wxFile supports files more than 4GB in size.} -@itemdef{wxHAS_LARGE_FFILES, Defined if wxFFile supports files more than 4GB in size.} +@itemdef{wxHAS_LARGE_FILES, Defined if wxFile supports files more than 4GB in + size (notice that you must include @c wx/filefn.h before testing for this + symbol).} +@itemdef{wxHAS_LARGE_FFILES, Defined if wxFFile supports files more than 4GB in + size (notice that you must include @c wx/filefn.h before testing for this + symbol).} @itemdef{wxHAS_MULTIPLE_FILEDLG_FILTERS, Defined if wxFileDialog supports multiple ('|'-separated) filters.} @itemdef{wxHAS_POWER_EVENTS, Defined if wxPowerEvent are ever generated on the current platform.} @itemdef{wxHAS_RADIO_MENU_ITEMS, diff --git a/include/wx/filefn.h b/include/wx/filefn.h index a55a97b677..5ccb74e730 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -446,16 +446,16 @@ enum wxFileKind #define wxHAS_NATIVE_LSTAT #else // Unix or Windows using unknown compiler, assume POSIX supported typedef off_t wxFileOffset; - #ifdef _LARGE_FILES + #ifdef HAVE_LARGEFILE_SUPPORT #define wxFileOffsetFmtSpec wxLongLongFmtSpec wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t), BadFileSizeType ); // wxFile is present and supports large files - #ifdef wxUSE_FILE + #if wxUSE_FILE #define wxHAS_LARGE_FILES #endif // wxFFile is present and supports large files - #if SIZEOF_LONG == 8 || defined HAVE_FSEEKO + #if wxUSE_FFILE && (SIZEOF_LONG == 8 || defined HAVE_FSEEKO) #define wxHAS_LARGE_FFILES #endif #else diff --git a/setup.h.in b/setup.h.in index 71782da9ae..cff68110b4 100644 --- a/setup.h.in +++ b/setup.h.in @@ -753,8 +753,11 @@ * Define if compiler has __thread keyword. */ #undef HAVE___THREAD_KEYWORD +/* + * Define if large (64 bit file offsets) files are supported. + */ +#undef HAVE_LARGEFILE_SUPPORT -/* compatibility */ /* * Use OpenGL */