Index: libs/filesystem/v3/src/operations.cpp =================================================================== --- libs/filesystem/v3/src/operations.cpp (revision 72238) +++ libs/filesystem/v3/src/operations.cpp (working copy) @@ -10,6 +10,26 @@ //--------------------------------------------------------------------------------------// +// This must be first +#if !(defined(__HP_aCC) && defined(_ILP32) && \ + !defined(_STATVFS_ACPP_PROBLEMS_FIXED)) +#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect, +#endif +#if !defined(__PGI) +#define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX + // 64-bit systems or on 32-bit systems which don't have files larger + // than can be represented by a traditional POSIX/UNIX off_t type. + // OTOH, defining them should kick in 64-bit off_t's (and thus + // st_size)on 32-bit systems that provide the Large File + // Support (LFS)interface, such as Linux, Solaris, and IRIX. + // The defines are given before any headers are included to + // ensure that they are available to all included headers. + // That is required at least on Solaris, and possibly on other + // systems as well. +#else +#define _FILE_OFFSET_BITS 64 +#endif + #include #if !defined( BOOST_NO_STD_WSTRING ) // Boost.Filesystem V3 and later requires std::wstring support. @@ -30,25 +50,6 @@ # define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this #endif -#if !defined(__QNXNTO__) && !(defined(__HP_aCC) && defined(_ILP32) && \ - !defined(_STATVFS_ACPP_PROBLEMS_FIXED)) -#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect, -#endif -#if !defined(__PGI) -#define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX - // 64-bit systems or on 32-bit systems which don't have files larger - // than can be represented by a traditional POSIX/UNIX off_t type. - // OTOH, defining them should kick in 64-bit off_t's (and thus - // st_size)on 32-bit systems that provide the Large File - // Support (LFS)interface, such as Linux, Solaris, and IRIX. - // The defines are given before any headers are included to - // ensure that they are available to all included headers. - // That is required at least on Solaris, and possibly on other - // systems as well. -#else -#define _FILE_OFFSET_BITS 64 -#endif - #include #include #include