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

bson.h not compilable in isolation due to use of undefined macro dassert in bson_field.h

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.4
    • Affects Version/s: None
    • Component/s: Internal Client
    • None
    • ALL
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      In commit e82786a9 a dassert was added to bson_field.h, however when bson_field.h is included by way of bson.h in a non-mongo-compile environment, the macro dassert is not defined.

      This renders the bson.h header unusable for end users.

      We can either add a new definition for dassert to bson.h, or we can make bson.h work like dbclient.h and use the redef/undef trick. I believe that the current setup of the bson.h header is intended to afford header only use of the bson library, but I'm not sure that this is still actually possible or desired. If we still want that ability, then the former solution is the only viable one.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: