Opened 9 years ago

Last modified 8 years ago

#9918 closed Bugs

chrono compilation error on Solaris, funciton timegm — at Version 2

Reported by: Stephen Clamage <stephen.clamage@…> Owned by: viboes
Milestone: Boost 1.56.0 Component: chrono
Version: Boost 1.55.0 Severity: Problem
Keywords: timegm gmtime Cc:

Description (last modified by viboes)

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".

Change History (2)

comment:1 by Stephen Clamage <stephen.clamage@…>, 9 years ago

Rats. I see that the underbars in macro names screwed up the formatting of the text. I don't see a way to edit the original note. Here are the diffs again:

% 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)) \

comment:2 by viboes, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.