Index: configure.ac =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.61 diff -u -p -r1.61 configure.ac --- configure.ac 29 Sep 2005 13:25:36 -0000 1.61 +++ configure.ac 29 Sep 2005 17:47:31 -0000 @@ -249,7 +249,7 @@ AC_LANG_POP(C) # some standard header files AC_HEADER_DIRENT AC_HEADER_MAJOR -AC_CHECK_HEADERS(sys/time.h sys/types.h sys/select.h strings.h locale.h utime.h sys/utime.h io.h process.h) +AC_CHECK_HEADERS(sys/time.h sys/types.h sys/select.h strings.h locale.h utime.h sys/utime.h io.h process.h NewAPIs.h) # some standard structures AC_HEADER_STAT @@ -405,6 +405,10 @@ int mkstemp(char*); #ifdef __CYGWIN__ #define BOOST_POSIX 1 +#endif + +#if definded (HAVE_NEWAPIS_H) && defined (_WIN32) +# define WANT_GETFILEATTRIBUTESEX_WRAPPER 1 #endif #endif Index: boost/libs/filesystem/src/operations_posix_windows.cpp =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/libs/filesystem/src/operations_posix_windows.cpp,v retrieving revision 1.3 diff -u -p -r1.3 operations_posix_windows.cpp --- boost/libs/filesystem/src/operations_posix_windows.cpp 20 Nov 2004 09:08:44 -0000 1.3 +++ boost/libs/filesystem/src/operations_posix_windows.cpp 29 Sep 2005 17:47:32 -0000 @@ -46,6 +46,50 @@ namespace fs = boost::filesystem; # if defined(BOOST_WINDOWS) # include "windows.h" + + ////////////////////////////////////////////////////////////////////// + // + // Enable Boost.Filesystem to run on Win95 using the emulation + // of GetFileAttributesEx available in the Microsoft Platform SDK + // header file NewAPIs.h. + // + // The user needs only to define WANT_GETFILEATTRIBUTESEX_WRAPPER + // to enable this emulation. + // + // Please note, however, that this block of preprocessor code enables + // the user to compile against the emulation code. To link the + // executable the user must also compile the function definitions in + // NewAPIs.h. See NewAPIs.h for further details. + // + // This code should work both with Microsoft's native implementation + // of the winapi headers and also with MinGW/Cygwin's version. + // + ////////////////////////////////////////////////////////////////////// +# if defined(WANT_GETFILEATTRIBUTESEX_WRAPPER) +# if (defined(__MINGW__) || defined(__CYGWIN__)) && WINVER < 0x040A + // MinGW/Cygwin's winapi header files and NewAPIs.h do not live + // well together because NewAPIs.h redefines + // WIN32_FILE_ATTRIBUTE_DATA if WINVER < 0x04A. +# include +# if __W32API_MAJOR_VERSION < 3 || \ + __W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION <= 3 +# define BOOST_FILESYSTEM_WINVER WINVER +# undef WINVER +# define WINVER 0x040A +# endif +# endif + +# include + + // Return macro definitions to their original state. +# ifdef BOOST_FILESYSTEM_WINVER +# undef WINVER +# define WINVER BOOST_FILESYSTEM_WINVER +# undef BOOST_FILESYSTEM_WINVER +# endif +# endif + ////////////////////////////////////////////////////////////////////// + # if defined(__BORLANDC__) || defined(__MWERKS__) # if defined(__BORLANDC__) using std::time_t; @@ -391,7 +435,7 @@ namespace boost : path_stat.st_size == 0; # else WIN32_FILE_ATTRIBUTE_DATA fad; - if ( !::GetFileAttributesExA( ph.string().c_str(), + if ( !::GetFileAttributesEx( ph.string().c_str(), ::GetFileExInfoStandard, &fad ) ) boost::throw_exception( filesystem_error( "boost::filesystem::is_empty", @@ -538,7 +582,7 @@ namespace boost # else // by now, intmax_t is 64-bits on all Windows compilers WIN32_FILE_ATTRIBUTE_DATA fad; - if ( !::GetFileAttributesExA( ph.string().c_str(), + if ( !::GetFileAttributesEx( ph.string().c_str(), ::GetFileExInfoStandard, &fad ) ) boost::throw_exception( filesystem_error( "boost::filesystem::file_size",