|
Boost : |
Subject: Re: [boost] cygwin API: posix or windows
From: Boris Schaeling (boris_at_[hidden])
Date: 2011-01-08 05:19:12
On Thu, 06 Jan 2011 22:32:16 +0100, vicente.botet
<vicente.botet_at_[hidden]> wrote:
> Hi,
>
> while trying to make Boost.System and Boost.Chrono configurable header
> only libs we need to include windows.h on some include files. To avoid
> the inclusion of this intrusive file, we decided sometime ago to include
> some files in detail/win that will present just the needed interfaces.
>
> In my humble opinion cygwin is a wrapper of posix intefaces under
> windows OS. So, boost libraries shouldn't use Windows interfaces when
> working under cygwin.
>
> What's the experience of others?
The last time I played around with the Boost libraries on Cygwin (that was
in 2008) the Windows API was used by default. Building the libraries with
"bjam cxxflags=-DBOOST_POSIX_API" was enough though to use the POSIX API.
Whether that worked for all libraries I don't remember anymore (I only
remember that the Boost.Process draft at that time could only be built
with the POSIX API on Cygwin). Being able to use both APIs and simply
switching with a macro seemed pretty good though?
Boris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk