|
Boost : |
From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2005-09-29 15:04:29
Beman Dawes wrote:
>> 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.
> Angus,
> Have you tried the Boost.Filesystem "i18n" branch from CVS?
Hi, Beman.
I still haven't tried out the i18n branch but my proposed patch has
evolved. It will now compile against MinGW or MSVC out of the box and will
enable Boost.Filesystem to run on Win95 boxes when the code is compiled
against NewAPIs.h by defining only WANT_GETFILEATTRIBUTESEX_WRAPPER.
It turned out that I had to jump through some preprocessing hoops in order
to compile against MinGW's implementation of the winapi headers. I
suggested that the MinGW developers make some changes to these headers to
make them play well with NewAPIs.h but they have decided not to do so.
They feel that the terms of the NewAPIs.h licence are too restrictive for
them to read the source. Unfortunately, there is no publicly-available
documentation of WANT_GETFILEATTRIBUTESEX_WRAPPER other than NewAPIs.h
itself. Net result: no change :(
That means, I'm afraid that gymnastics must be put into the Boost file.
I attach the patch that I've proposed be added to the LyX source repository
(Boost 1.32). It shows the changes to Boost.Filesystem and also the
configure magic that I need to make it "just work". As you can see, I test
for the existence of NewAPIs.h and then use this to define
WANT_GETFILEATTRIBUTESEX_WRAPPER. This latter macro is all that
Boost.Filesystem needs.
Are you happy with this patch? If so, I'll try it out on the i18n branch
and throw something the way of my Win95 tester to try out. If not...
suggestions please!
Regards,
Angus
ps, this is independent of the exists() discussion.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk