Modify

Ticket #4578 (closed Patches: fixed)

Opened 4 years ago

Last modified 4 years ago

asio: always use pselect() on hpux11.31 over select()

Reported by: Michael Haubenwallner <michael.haubenwallner@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

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!

Attachments

boost-1.39.0-hpux-gcc-asio.patch Download (883 bytes) - added by Michael Haubenwallner <michael.haubenwallner@…> 4 years ago.
Patch for boost-1.39.0 to always use pselect() on hpux when available

Change History

Changed 4 years ago by Michael Haubenwallner <michael.haubenwallner@…>

Patch for boost-1.39.0 to always use pselect() on hpux when available

comment:1 Changed 4 years ago by chris_kohlhoff

(In [66014]) Always use pselect() on HP-UX, if it is available. Refs #4578.

comment:2 Changed 4 years ago by chris_kohlhoff

  • Status changed from new to closed
  • Resolution set to fixed

(In [66037]) Merge from trunk.

........

r65998 | chris_kohlhoff | 2010-10-16 15:30:12 +1100 (Sat, 16 Oct 2010) | 2 lines

Make unit tests build faster.

........

r66002 | chris_kohlhoff | 2010-10-16 16:13:46 +1100 (Sat, 16 Oct 2010) | 2 lines

Add a test case for bug where a deadline timer never fires if the io_service is run in a background thread. N.B. fails only on platforms that use kqueue. Fixes #4568.

........

r66004 | chris_kohlhoff | 2010-10-16 16:43:03 +1100 (Sat, 16 Oct 2010) | 2 lines

Fix the way the kqueue_reactor is interrupted when a new timer is scheduled. Fixes #4568.

........

r66005 | chris_kohlhoff | 2010-10-16 17:27:45 +1100 (Sat, 16 Oct 2010) | 2 lines

Fix a const-correctness issue that prevents valid uses of has_service<> from compiling. Fixes #4638.

........

r66006 | chris_kohlhoff | 2010-10-16 18:06:18 +1100 (Sat, 16 Oct 2010) | 2 lines

Use lower-case to keep MinGW cross-compilers happy. Fixes #4491.

........

r66007 | chris_kohlhoff | 2010-10-16 18:24:47 +1100 (Sat, 16 Oct 2010) | 2 lines

Don't use deprecated system functions. Fixes #4672.

........

r66008 | chris_kohlhoff | 2010-10-16 20:47:11 +1100 (Sat, 16 Oct 2010) | 2 lines

Ensure close()/closesocket() failures are correctly propagated. Fixes #4573.

........

r66009 | chris_kohlhoff | 2010-10-16 21:01:14 +1100 (Sat, 16 Oct 2010) | 2 lines

Check return code of InitializeCriticalSectionAndSpinCount?. Fixes #4574.

........

r66010 | chris_kohlhoff | 2010-10-16 22:04:08 +1100 (Sat, 16 Oct 2010) | 2 lines

Add support for hardware flow control on QNX. Fixes #4625.

........

r66014 | chris_kohlhoff | 2010-10-16 22:39:13 +1100 (Sat, 16 Oct 2010) | 2 lines

Always use pselect() on HP-UX, if it is available. Fixes #4578.

........

r66017 | chris_kohlhoff | 2010-10-16 23:23:56 +1100 (Sat, 16 Oct 2010) | 2 lines

Ensure handler arguments are passed as lvalues. Fixes #4744.

........

r66018 | chris_kohlhoff | 2010-10-16 23:39:06 +1100 (Sat, 16 Oct 2010) | 2 lines

Fix Windows build when thread support is disabled. Fixes #4680.

........

r66020 | chris_kohlhoff | 2010-10-16 23:59:29 +1100 (Sat, 16 Oct 2010) | 3 lines

Timers with expiry times set more than 5 minutes in the future need the waitable timer to be periodic. Fixes #4745.

........

r66035 | chris_kohlhoff | 2010-10-17 22:33:28 +1100 (Sun, 17 Oct 2010) | 2 lines

Version bump.

........

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.