Subject: [Boost-bugs] [Boost C++ Libraries] #4578: asio: always use pselect() on hpux11.31 over select()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-08-20 15:14:12
#4578: asio: always use pselect() on hpux11.31 over select()
----------------------------------------------------------------------+-----
Reporter: Michael Haubenwallner <michael.haubenwallner@â¦> | Owner: chris_kohlhoff
Type: Patches | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost Development Trunk | Severity: Problem
Keywords: |
----------------------------------------------------------------------+-----
Using <boost/asio.hpp> with gcc (4.2.4) on hpux11.31 results in this error
with boost-1.39.0:
/path/to/boost/asio/detail/socket_ops.hpp: In
function 'int boost::asio::detail::socket_ops::select(int, fd_set*,
fd_set*,
fd_set*, timeval*, boost::system::error_code&)':
/path/to/boost/asio/detail/socket_ops.hpp:647:
error: cannot convert 'fd_set*' to 'int*' for argument '2' to 'int
select(size_t, int*, int*, int*, const timeval*)'
Unfortunately, the application has included <time.h> before
<boost/asio.hpp> - and thus before <sys/time.h>. This causes select() to
be declared with 'int*' instead of 'fd_set*' arguments.
Since hpux11.31, there is pselect() in <sys/select.h>.
Before hpux11.31, there is no <sys/select.h> (and no pselect).
Additionally, hpux11.31 defines {double _}SELECT in <sys/time.h>, so it
seems to be better to listen to this one instead of _HP_aCC when deciding
to use pselect().
Attached patch is for boost-1.39.0, but this code looks unchanged in trunk
(parts of socket_ops.hpp were moved to impl/socket_ops.ipp).
Thank you!
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4578> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC