[Boost-bugs] [Boost C++ Libraries] #8435: Can't compile Chrono on HP-UX due no CLOCK_REALTIME macro.

Subject: [Boost-bugs] [Boost C++ Libraries] #8435: Can't compile Chrono on HP-UX due no CLOCK_REALTIME macro.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-13 17:20:14


#8435: Can't compile Chrono on HP-UX due no CLOCK_REALTIME macro.
---------------------------------------------------------+------------------
 Reporter: konrad.zemek@… | Owner: viboes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: chrono
  Version: Boost 1.53.0 | Severity: Showstopper
 Keywords: chrono, hp-ux, hpux, clock_realtime, time.h |
---------------------------------------------------------+------------------
 We're trying to compile Chrono library on HP-UX 11i23, to be used with
 conjunction with threads. The compilation fails with


 {{{
 #error <time.h> does not supply CLOCK_REALTIME
 }}}


 This is due to the following code in system_clocks.hpp:

 {{{
 # if defined( BOOST_CHRONO_POSIX_API )
 # if ! defined(CLOCK_REALTIME)
 # error <time.h> does not supply CLOCK_REALTIME
 # endif
 # endif
 }}}

 HP-UX provides CLOCK_REALTIME, although as an enum, not a macro, so the
 ifdef fails. This is true for version 11i23 and I suspect that also for
 other HP-UX versions (I cannot confirm this though, and it's hard to get
 any information on HP-UX through googling).

 I'm not sure what solution would be right here, but simple ifdef does not
 cut it. I sidestepped this issue by modyfying it to

 {{{
 # if ! defined(CLOCK_REALTIME) || defined(__hpux)
 }}}

 but it's more of a hack than a solution, especially since I'm not certain
 that every version of HP-UX supply CLOCK_REALTIME.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8435>
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:12 UTC