Jean-Marc Lasgouttes wrote: > Angus> It also adds these macros to the bottom of config.h. I'm happy > Angus> with the WANT_FOO_WRAPPER macros. Less happy about the presence > Angus> of WINVER here. > Angus> #if defined (_WIN32) || defined (__CYGWIN__) #define > Angus> WANT_GETLONGPATHNAME_WRAPPER 1 #endif > Angus> #if defined (_WIN32) #define WINVER 0x0500 #define > Angus> WANT_GETFILEATTRIBUTESEX_WRAPPER 1 #endif
> Why do you want to do this in config.h? I don't necessarily. I want WANT_..._WRAPPER defined appropriately. Appropriately, presumably, being dependent on platform and on --enable-win95-support. Importantly, I want WANT_GETFILEATTRIBUTESEX_WRAPPER to be visible to boost's operations_posix_windows.h, so shoving it into config.h seems the natural thing to do. (Note that WANT_..._WRAPPER is used internally in NewAPIs.h, so the macro needs to be named as such; thereafter we may as well use it ourselves.) > Angus> The WANT_FOO_WRAPPER macros are used to conditionally #include > Angus> <NewAPIs.h> meaning that the executable should now run on > Angus> Win95, Win98. > Is there a reason why we do not want to use this unconditionally? As > far as I can see, the code uses the real thing if necessary. > Also, I am nervous about including a Microsoft copyrighted file in our > distribution... Right. That answers the "why not use this unconditionally?" question. > Doesn't mingw distribute something similar? Nope. At least not in my version. I've posted a message to them though (see below) so we'll find out soon enough. > Angus> 1. Should we put LYX_ABS_INSTALLED_DATADIR, etc into config.h > Angus> rather than into src/support/Makefile? Would allow us to remove > Angus> all the package.C.in special casing and include package.C in > Angus> the repository. > I think there was a reason, but I cannot remember it :) It's hardly a pressing problem :) Probably makes maintenance easier in the future though. > Angus> 2. The definition of the WANT_FOO_WRAPPER macros in config.h > Angus> should be dependent on a configure switch. Jean-Marc, I'll need > Angus> some help here. Might I suggest that they're off by default on > Angus> Windows and can be enabled with --enable-win95-support > Why not use them always? Because not everybody will have NewAPIs.h and because including a Microsoft copyrighted file in our distribution makes you nervous. > Angus> 3. Hard-coding WINVER in config.h is a kludge. (It's needed to > Angus> enable boost/libs/filesystem/src/operations_posix_windows.cpp > Angus> to compile on MinGW. Looks like the correct fix would be to > Angus> protect the definition of some structs in > Angus> MinGW/include/winbase.h with "#if WINVER >= 0x04A", but whilst > Angus> I can submit a patch to the MinGW list, we still need a work > Angus> around. > So is this a boost bug? What do they have to say about it? There are two bugs and two bug reports: * In MinGW: http://article.gmane.org/gmane.comp.gnu.mingw.msys:2978 * In Boost: http://article.gmane.org/gmane.comp.lib.boost.devel:131928 -- Angus