[CDRIVER-439] libbson and libmongoc should compile with -std=c99 and -D_XOPEN_SOURCE=600 Created: 08/Oct/14  Updated: 10/Aug/16  Resolved: 06/Jun/16

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

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

Issue Links:
Related
related to CDRIVER-1214 Error building with 1.3 Driver on Ubu... Closed
is related to CDRIVER-681 Test compilation in C89 strict mode Closed
Epic Link: C Driver in Evergreen

 Description   

libmongoc and libbson should compile with -std=c99 and -X_OPEN_SOURCE=600.

There's plenty of room for things like _GNU_SOURCE for syscall() on linux, but we should be able to fall back to c99 and posix from 2004



 Comments   
Comment by Hannes Magnusson [ 06/Jun/16 ]

I'm not sure which improvements are being referred to here, but we now have a build variant for this

Comment by Githook User [ 06/Jun/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-681 & CDRIVER-439 & CDRIVER-1315: c89 & c99 & c11

Also variants for
CDRIVER-673 & CDRIVER-677: w/wo OpenSSL & w/wo SASL
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/4d512851aa46fde3f730d7aacc585e034412d322

Comment by A. Jesse Jiryu Davis [ 02/Dec/15 ]

A quick test with GCC 4.9.2 shows that the public headers, at least, compile with these flags. We need an Evergreen build variant that compiles and tests the whole driver with c99 and X_OPEN_SOURCE.

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