Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6340

TIME_UTC is a macro in C11, compilation of lines, containing boost::TIME_UTC will fail with glibc 2.16

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.2.0-rc0
    • Component/s: Internal Client
    • Labels:
    • Environment:
      latest glibc (2.16) gcc 4.7.1
    • Operating System:
      ALL

      Description

      TIME_UTC is a macro in C11, compilation of lines, containing boost::TIME_UTC will fail with glibc 2.16
      boost now (version 1.50, may be 1.49) use TIME_UTC_ with underscore at the end.
      Compilation using c++ driver will fail with glibc 2.16 becouse c++ preprocessor will replace TIME_UTC with number (1 in my case) and boost::1 will couse error in lines like boost::xtime_get(&xt, boost::TIME_UTC);

      Just try to compile one line file
      #include <client/dbclient.h>
      and compilation fails if glibc version 2.16.
      in case boost 1.50 "boost::TIME_UTC" will be not found (it's renamed to "boost::TIME_UTC_")

      boost ticket for "TIME_UTC is a macro in C11" error:
      https://svn.boost.org/trac/boost/ticket/6940

      So there is two errors
      1. TIME_UTC is macro in glibc 2.16
      2. boost::TIME_UTC renamed to boost::TIME_UTC_ in boost 1.50

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: