Opened 14 years ago

Last modified 11 years ago

#2881 new Bugs

Macros conflict: BOOST_HAS_FTIME and BOOST_NO_GETSYSTEMTIMEASFILETIME

Reported by: Andrey Semashev Owned by: az_sw_dude
Milestone: Boost 1.39.0 Component: date_time
Version: Boost 1.38.0 Severity: Problem
Keywords: BOOST_HAS_FTIME BOOST_NO_GETSYSTEMTIMEASFILETIME Cc:

Description

There are two macros related to the WinAPI FILETIME-related functions: BOOST_HAS_FTIME and BOOST_NO_GETSYSTEMTIMEASFILETIME. The first one is documented as the one that is defined if the GetSystemTimeAsFileTime API is available, whereas the second one is defined when it's not (while other functions and the FILETIME type itself are available). On Windows Mobile it is possible to get both these macros defined, which is quite contradictory to the documentation.

I believe, docs and tests should be corrected so that BOOST_HAS_FTIME is defined if the FILETIME type is available, and BOOST_NO_GETSYSTEMTIMEASFILETIME is only defined when the GetSystemTimeAsFileTime function is not available. A quick search shows that these macros are only used in Boost.DateTime and in the described meaning.

Change History (4)

comment:1 by John Maddock, 13 years ago

Status: newassigned

Will fix: but when we're not in a run-up to release.

comment:2 by Marshall Clow, 11 years ago

How about now? ;-)

comment:3 by John Maddock, 11 years ago

(In [73058]) Document BOOST_HAS_GETSYSTEMTIMEASFILETIME, add test case, and change test for BOOST_HAS_FTIME. Refs #2881.

comment:4 by John Maddock, 11 years ago

Component: configdate_time
Owner: changed from John Maddock to az_sw_dude
Status: assignednew

Fixed in Boost.Config Trunk, but.... note that DateTime's use of these macros seems to be in a mess, and frankly BOOST_HAS_GETSYSTEMTIMEASFILETIME could be probably be removed altogether. Reassigning.

Note: See TracTickets for help on using tickets.