Re: [Boost-bugs] [Boost C++ Libraries] #9918: chrono compilation error on Solaris, funciton timegm

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9918: chrono compilation error on Solaris, funciton timegm
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-04-18 16:34:52


#9918: chrono compilation error on Solaris, funciton timegm
-------------------------------------------------+-------------------------
  Reporter: Stephen Clamage | Owner: viboes
  <stephen.clamage@…> | Status: new
      Type: Bugs | Component: chrono
 Milestone: To Be Determined | Severity: Problem
   Version: Boost 1.55.0 | Keywords: timegm
Resolution: | gmtime
-------------------------------------------------+-------------------------
Description changed by viboes:

Old description:

> See bug 8696, which claims that timegm is available on Solaris 11 when
> the sunpro tool chain is used. That claim is not correct. The fix for bug
> 8696 needs to apply when __sun is defined, not just when both __sun and
> __GNU_C__ are defined.
>
> Here is a fix:
>
> % diff time_point_io.hpp /tmp
> 39c39
> < || ( (defined(sun) || defined(__sun)) && defined __GNUC__) \
> ---
> > || (defined(sun) || defined(__sun)) \
> 44c44
> < || ( (defined(sun) || defined(__sun)) && defined __GNUC__) \
> ---
> > || (defined(sun) || defined(__sun)) \
>
> I made the minimal change here. I'm not sure that checking for "sun" is a
> good idea, since "sun" is in the user's namespace and might mean
> something other than compiling on SunOS. Maybe the original author knows
> of a reason to check for "sun" as well as for "__sun".

New description:

 See bug 8696, which claims that timegm is available on Solaris 11 when the
 sunpro tool chain is used. That claim is not correct. The fix for bug 8696
 needs to apply when __sun is defined, not just when both __sun and
 __GNU_C__ are defined.

 Here is a fix:


 {{{
 % diff time_point_io.hpp /tmp
 39c39
 < || ( (defined(sun) || defined(__sun)) && defined __GNUC__) \
 ---
> || (defined(sun) || defined(__sun)) \
 44c44
 < || ( (defined(sun) || defined(__sun)) && defined __GNUC__) \
 ---
> || (defined(sun) || defined(__sun)) \
 }}}


 I made the minimal change here. I'm not sure that checking for "sun" is a
 good idea, since "sun" is in the user's namespace and might mean something
 other than compiling on SunOS. Maybe the original author knows of a reason
 to check for "sun" as well as for "__sun".

--
-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9918#comment:2>
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:16 UTC