Boost C++ Libraries: Ticket #4578: asio: always use pselect() on hpux11.31 over select() https://svn.boost.org/trac10/ticket/4578 <p> Using &lt;boost/asio.hpp&gt; with gcc (4.2.4) on hpux11.31 results in this error with boost-1.39.0: </p> <p> /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&amp;)': /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*)' </p> <p> Unfortunately, the application has included &lt;time.h&gt; before &lt;boost/asio.hpp&gt; - and thus before &lt;sys/time.h&gt;. This causes select() to be declared with 'int*' instead of 'fd_set*' arguments. </p> <p> Since hpux11.31, there is pselect() in &lt;sys/select.h&gt;. Before hpux11.31, there is no &lt;sys/select.h&gt; (and no pselect). Additionally, hpux11.31 defines {double _}SELECT in &lt;sys/time.h&gt;, so it seems to be better to listen to this one instead of _HP_aCC when deciding to use pselect(). </p> <p> 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). </p> <p> Thank you! </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4578 Trac 1.4.3 Michael Haubenwallner <michael.haubenwallner@…> Fri, 20 Aug 2010 15:14:52 GMT attachment set https://svn.boost.org/trac10/ticket/4578 https://svn.boost.org/trac10/ticket/4578 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-1.39.0-hpux-gcc-asio.patch</span> </li> </ul> <p> Patch for boost-1.39.0 to always use pselect() on hpux when available </p> Ticket chris_kohlhoff Sat, 16 Oct 2010 11:39:33 GMT <link>https://svn.boost.org/trac10/ticket/4578#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4578#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/66014" title="Always use pselect() on HP-UX, if it is available. Refs #4578. ">[66014]</a>) Always use pselect() on HP-UX, if it is available. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4578" title="#4578: Patches: asio: always use pselect() on hpux11.31 over select() (closed: fixed)">#4578</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Sun, 17 Oct 2010 12:25:02 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4578#comment:2 https://svn.boost.org/trac10/ticket/4578#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/66037" title="Merge from trunk. ........ r65998 | chris_kohlhoff | 2010-10-16 ...">[66037]</a>) Merge from trunk. </p> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/65998" title="Make unit tests build faster. ">r65998</a> | chris_kohlhoff | 2010-10-16 15:30:12 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Make unit tests build faster. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66002" title="Add a test case for bug where a deadline timer never fires if the ...">r66002</a> | chris_kohlhoff | 2010-10-16 16:13:46 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> 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 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4568" title="#4568: Bugs: deadline_timer stop at boost-1.4.4 (closed: fixed)">#4568</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66004" title="Fix the way the kqueue_reactor is interrupted when a new timer is ...">r66004</a> | chris_kohlhoff | 2010-10-16 16:43:03 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix the way the kqueue_reactor is interrupted when a new timer is scheduled. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4568" title="#4568: Bugs: deadline_timer stop at boost-1.4.4 (closed: fixed)">#4568</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66005" title="Fix a const-correctness issue that prevents valid uses of ...">r66005</a> | chris_kohlhoff | 2010-10-16 17:27:45 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix a const-correctness issue that prevents valid uses of has_service&lt;&gt; from compiling. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4638" title="#4638: Bugs: Compile error using boost::asio::has_service() (closed: fixed)">#4638</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66006" title="Use lower-case to keep MinGW cross-compilers happy. Refs #4491. ">r66006</a> | chris_kohlhoff | 2010-10-16 18:06:18 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Use lower-case to keep MinGW cross-compilers happy. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4491" title="#4491: Bugs: asio : WinError.h case incorrect ? (closed: fixed)">#4491</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66007" title="Don't use deprecated system functions. Refs #4672. ">r66007</a> | chris_kohlhoff | 2010-10-16 18:24:47 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Don't use deprecated system functions. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4672" title="#4672: Bugs: asio uses deprecated functions from Boost.System (closed: fixed)">#4672</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66008" title="Ensure close()/closesocket() failures are correctly propagated. Refs ...">r66008</a> | chris_kohlhoff | 2010-10-16 20:47:11 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Ensure close()/closesocket() failures are correctly propagated. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4573" title="#4573: Bugs: boost/asio/detail/impl/socket_ops.ipp:315: int 'result' shadows ... (closed: fixed)">#4573</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66009" title="Check return code of InitializeCriticalSectionAndSpinCount. Refs #4574. ">r66009</a> | chris_kohlhoff | 2010-10-16 21:01:14 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Check return code of <a class="missing wiki">InitializeCriticalSectionAndSpinCount</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4574" title="#4574: Bugs: boost/asio/detail/impl/win_mutex.ipp:57: return value of ... (closed: fixed)">#4574</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66010" title="Add support for hardware flow control on QNX. Refs #4625. ">r66010</a> | chris_kohlhoff | 2010-10-16 22:04:08 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Add support for hardware flow control on QNX. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4625" title="#4625: Patches: Can't set or unset serial hardware flow control on QNX (closed: fixed)">#4625</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66014" title="Always use pselect() on HP-UX, if it is available. Refs #4578. ">r66014</a> | chris_kohlhoff | 2010-10-16 22:39:13 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Always use pselect() on HP-UX, if it is available. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4578" title="#4578: Patches: asio: always use pselect() on hpux11.31 over select() (closed: fixed)">#4578</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66017" title="Ensure handler arguments are passed as lvalues. Refs #4744. ">r66017</a> | chris_kohlhoff | 2010-10-16 23:23:56 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Ensure handler arguments are passed as lvalues. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4744" title="#4744: Bugs: Some handler arguments are not passed as lvalues (closed: fixed)">#4744</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66018" title="Fix Windows build when thread support is disabled. Refs #4680. ">r66018</a> | chris_kohlhoff | 2010-10-16 23:39:06 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix Windows build when thread support is disabled. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4680" title="#4680: Bugs: error asio compilation with BOOST_ASIO_DISABLE_THREADS (closed: fixed)">#4680</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66020" title="Timers with expiry times set more than 5 minutes in the future need ...">r66020</a> | chris_kohlhoff | 2010-10-16 23:59:29 +1100 (Sat, 16 Oct 2010) | 3 lines </p> </blockquote> <p> </p> <blockquote> <p> Timers with expiry times set more than 5 minutes in the future need the waitable timer to be periodic. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4745" title="#4745: Bugs: On Windows, timers that expire more than 5 minutes in the future may ... (closed: fixed)">#4745</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66035" title="Version bump. ">r66035</a> | chris_kohlhoff | 2010-10-17 22:33:28 +1100 (Sun, 17 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Version bump. </p> </blockquote> <p> ........ </p> Ticket