Opened 9 years ago
Closed 8 years ago
#9918 closed Bugs (fixed)
chrono compilation error on Solaris, funciton timegm
Reported by: | 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 )
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 (7)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Description: | modified (diff) |
---|
comment:3 by , 9 years ago
Status: | new → assigned |
---|
I suspect that the use of sun is because sun compilers defines either sun or sun.
comment:4 by , 9 years ago
All Sun compilers always define __sun when running on Solaris (SunOS). Old Sun compilers also defined sun, but that practice stopped some time ago. Maybe old versions of gcc or some other vendor's compilers didn't follow the practice of defining __sun. That I don't know. As I said before, unless someone knows of a specific reason for checking for sun, I suggest checking only for __sun.
comment:5 by , 9 years ago
Milestone: | To Be Determined → Boost 1.56.0 |
---|
This doesn't works this way. The way it works is"until we don't have a reason to change something we don't change it :)
https://github.com/boostorg/chrono/commit/9e3c81e439b3de5ca3e0d109f6245301119c84de
comment:7 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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: