[Boost-bugs] [Boost C++ Libraries] #12863: some API detection #ifdefs not valid

Subject: [Boost-bugs] [Boost C++ Libraries] #12863: some API detection #ifdefs not valid
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-02-22 20:46:40


#12863: some API detection #ifdefs not valid
------------------------------+----------------------------
 Reporter: danalbert@… | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.61.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------------
 There are a couple of guards checking for APIs that are quite fragile and
 do not work with the latest Android NDK: (your spam detection captcha
 isn't working, it's issue #302 on the android-ndk/ndk github project)

 The first is assuming `cfsetspeed` is available if `_BSD_SOURCE` is set:
 https://github.com/boostorg/asio/blob/develop/include/boost/asio/impl/serial_port_base.ipp#L117

 `_BSD_SOURCE` is something the user defines if they want access to the BSD
 extensions, and indicates nothing about what the implementation provides.

 Second is guarding `epoll_create1` based on the presence of
 `EPOLL_CLOEXEC`:
 https://github.com/boostorg/asio/blob/develop/include/boost/asio/detail/impl/epoll_reactor.ipp#L462

 This breaks implementations like the following:

 {{{
 #define EPOLL_CLOEXEC O_CLOEXEC
 int epoll_create1(int)
 __attribute__((availability(android,introduced=21)));
 }}}

 (Android here is just an example, this could well be the case on other
 platforms)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12863>
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-22 20:50:07 UTC