Skip to content

Broken feature detection with unified headers #332

@mperepelitsyn

Description

@mperepelitsyn

Description

I've encountered a couple of issues with unified headers in r14 that I didn't see using r13b.

  1. Boost Log
    Missing: pthread_spin_init
    Detection: #if defined(_POSIX_SPIN_LOCKS) && _POSIX_SPIN_LOCKS > 0
    Code: https://github.com/boostorg/log/blob/boost-1.58.0/include/boost/log/detail/spin_mutex.hpp#L198
    Available in API >= 24

  2. Boost Thread
    Missing: pthread_mutex_timedlock
    Detection: #if _POSIX_TIMEOUTS >= 0 && _POSIX_TIMEOUTS>=200112L
    Code: https://github.com/boostorg/thread/blob/develop/include/boost/thread/pthread/mutex.hpp#L251
    Available in API >= 21

  3. Sqlite3
    Missing: mmap
    Detection:

    # if defined(__linux__) \
      || defined(_WIN32) \
      || (defined(__APPLE__) && defined(__MACH__)) \
      || defined(__sun) \
      || defined(__FreeBSD__) \
      || defined(__DragonFly__)
    #   define SQLITE_MAX_MMAP_SIZE 0x7fff0000  /* 2147418112 */
    # else
    #   define SQLITE_MAX_MMAP_SIZE 0
    # endif
    

    Available in API >= 21

Environment Details

  • NDK Version: 14.0.3770861
  • Build sytem: custom
  • Host OS: Linux
  • Compiler: Clang
  • ABI: x86
  • STL: gnustl_shared
  • NDK API level: 19
  • Device API level: 19

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions