Merge pull request #402 from ttytm/civetweb-readme

Add readme about required modifications to civetweb
This commit is contained in:
Turiiya 2024-06-09 16:02:46 +02:00 committed by GitHub
commit c3e2e821c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

13
src/civetweb/README.md Normal file
View File

@ -0,0 +1,13 @@
Changes currently required when updating the submodule to ensure full direct interoperability for wrappers:
- Prevent warnings for e.g. `malloc` and `snprintf` usage outside civetweb.
```diff
+ #ifndef NDEBUG
#define malloc DO_NOT_USE_THIS_FUNCTION__USE_mg_malloc
#define calloc DO_NOT_USE_THIS_FUNCTION__USE_mg_calloc
#define realloc DO_NOT_USE_THIS_FUNCTION__USE_mg_realloc
#define free DO_NOT_USE_THIS_FUNCTION__USE_mg_free
#define snprintf DO_NOT_USE_THIS_FUNCTION__USE_mg_snprintf
+ #endif
```