[SERVER-11378] bson.h not compilable in isolation due to use of undefined macro dassert in bson_field.h Created: 25/Oct/13  Updated: 11/Jul/16  Resolved: 14/Jan/14

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: None
Fix Version/s: 2.5.4

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by auto [ 25/Oct/13 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-11378 Remove dassert from client facing header
Branch: master
https://github.com/mongodb/mongo/commit/befe2af3c63844b08519452a5fd11eadef2b273f

Generated at Thu Feb 08 03:25:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.