
"Angus Leeming" <angus.leeming@btopenworld.com> wrote in message news:dhbm6g$l6o$1@sea.gmane.org...
Angus Leeming wrote:
Beman,
you use the WinAPI call GetFileAttributesExA only twice in Boost.Filesystem, in _is_empty and file_size, but that means that the code won't run on Windows 95:
file is linked to missing export KERNEL32.DLL:GetFileAttributesExA
The msdn docs http://msdn.microsoft.com/library/en-us/fileio/fs/getfileattributesex.asp suggest that Win95 support requires only that you grab NewAPIs.h from the SDK Update Site.
Actually, Beman, can I suggest the following patch? This allows the code to compile unchanged out of the box. If I want to support Win95 I need to define WANT_GETFILEATTRIBUTESEX_WRAPPER and provide NewAPIs.h.
I can define the WANT_GETFILEATTRIBUTESEX_WRAPPER macro in my own config.h header file which is already #included by your library through BOOST_USER_CONFIG
Thereafter, in some source file of my own I need only add
#include <config.h>
#define COMPILE_NEWAPIS_STUBS #include <NewAPIs.h> #undef COMPILE_NEWAPIS_STUBS
and all works beautifully.
Angus, Have you tried the Boost.Filesystem "i18n" branch from CVS? In a week I'm due to present a proposal to the Library Working Group to add what is essentially Boost.Filesystem i18n to TR2. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1841.html Assuming the reaction is favorable, the plan is to move the i18n branch to the CVS HEAD. Thus while I'm quite interested in your suggestions, I'd like to see if they apply to the i18n code rather than the 1.33 code, which is essentially legacy code at this point. Thanks, --Beman