[CDRIVER-1538] libbson 1.4.0 can't be compiled with BSON_EXPERIMENTAL_FEATURES 0 Created: 12/Sep/16  Updated: 03/May/17  Resolved: 12/Sep/16

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: 1.4.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Shane Harvey Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

libbson/src/bson/bson-types.h only defines bson_decimal128_t if BSON_EXPERIMENTAL_FEATURES is defined, but libbson/src/bson/bson-decimal128.h and libbson/src/bson/bson-decimal128.c use bson_decimal128_t unconditionally.

This causes compile errors:

In file included from libbson/src/bson/bson-decimal128.c:23:
libbson/src/bson/bson-decimal128.h:49:34: error: unknown type name 'bson_decimal128_t'
bson_decimal128_to_string (const bson_decimal128_t *dec,
                                 ^
libbson/src/bson/bson-decimal128.h:56:30: error: unknown type name 'bson_decimal128_t'
                             bson_decimal128_t *dec);
                             ^
libbson/src/bson/bson-decimal128.c:124:34: error: unknown type name 'bson_decimal128_t'
bson_decimal128_to_string (const bson_decimal128_t *dec,        /* IN  */
                                 ^
libbson/src/bson/bson-decimal128.c:439:30: error: unknown type name 'bson_decimal128_t'
                             bson_decimal128_t *dec) /* OUT */
                             ^
4 errors generated.



 Comments   
Comment by Shane Harvey [ 12/Sep/16 ]

Actually this isn't a bug in libbson. It's only a problem because python-bsonjs does not use libbson's build system and unconditionally includes src/bson/bson-decimal128.h.

Generated at Wed Feb 07 21:12:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.