[MONGOCRYPT-218] Wrap tls specific files if ifdefs Created: 11/Dec/19 Updated: 28/Oct/23 Resolved: 13/Dec/19 |
|
| Status: | Closed |
| Project: | Libmongocrypt |
| Component/s: | C library |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.1 |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Kevin Albertson | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
As a convenience for bundling (and the libmongocrypt build itself), wrap the TLS C files with ifdefs so they're safe to compile regardless of the TLS library used. |
| Comments |
| Comment by Jeremy Mikola [ 20/Dec/19 ] |
|
Thanks for confirming. We removed them in the latest PHP PR. |
| Comment by Kevin Albertson [ 20/Dec/19 ] |
|
Yes, _WIN32 should be defined by MSVC. libbson also relies on it being defined in order to use Windows specific headers an APIs: (example). I found no references to MONGOCRYPT_IS_POSIX or MONGOCRYPT_IS_WIN in libmongocrypt or the history (using "git log -p -S MONGOCRYPT_IS_POSIX"). |
| Comment by Jeremy Mikola [ 20/Dec/19 ] |
|
kevin.albertson: I noticed that 2626864 also removed conditional compilation of the POSIX and WIN32 source files. They now depend on _WIN32 being defined. Am I correct to assume we can just rely on the Windows compiler to set this for us? I don't see anything in CMakeLists.txt that suggests we need to define it ourselves. andreas.braun's PR for |
| Comment by Githook User [ 13/Dec/19 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message: |