Comments (6)
@scaprile prepending MG_
is the way to go, we should not be polluting user's namespace
Will you take care of it please?
from mongoose.
I think the best way to deal with the realpath() type of issues, as well as all the other issues that arise from using things like mimalloc and similar tools, is to avoid using arch_win32.h
- basically, our headers.
@gvanem So the realpath issue is different from the ENCRYPT macro, and should be fixed this way:
- Set
-DMG_ARCH=DMG_ARCH_CUSTOM
- Make your own "mongoose_custom.h" and include there whatever deemed necessary - mimalloc, whatever.
@scaprile so please do just the ENCRYPT fix and don't touch realpath
from mongoose.
@cpq This is in the PD tls_aes128.[ch]
files.
How should we proceed, do we prepend MG_
in both files or just #undef
at the head of .h
?
from mongoose.
Here is another case; but only a redefinition warning. For this program:
#include <string.h>
#include <malloc.h>
#include <mimalloc/mimalloc-override.h> // From https://github.com/microsoft/mimalloc
#include <mongoose.h>
int main (void)
{
return (0);
}
I get:
In file included from mongoose-ntddndis-error.c:6:
./externals\mongoose.h(499,9): warning: 'realpath' macro redefined [-Wmacro-redefined]
499 | #define realpath(a, b) _fullpath((b), (a), MG_PATH_MAX)
| ^
./externals\mimalloc/mimalloc-override.h(28,9): note: previous definition is here
28 | #define realpath(f,n) mi_realpath(f,n)
| ^
1 warning generated.
Since _fullpath()
allocates memory internally, mimalloc has this override function mi_realpath()
for it.
from mongoose.
Thank you @gvanem !
from mongoose.
@cpq How should we proceed with this last one ? Redefinition will depend on the order of inclusion, if we undef
then the other one will warn. There is no undef in mimalloc-override https://github.com/microsoft/mimalloc/blob/master/include/mimalloc-override.h . Checking for mi_realpath
and using theirs may not be a good choice.
from mongoose.
Related Issues (20)
- MG_ARCH_FREERTOS_LWIP is not available in Mongoose 7.12 HOT 1
- Mongoose documentation SSL/TLS tutorial is inaccurate for mg_tls_opts. HOT 2
- Mongoose prematurely closes connections when the second request in a pipeline is invalid
- Mongoose closes the connection without responding to POST requests that don't have explicit lengths HOT 2
- Discrepancy Between Mongoose Versions on Espressif Component Registry and Official Release HOT 1
- The maximum DNS response count should be a larger value HOT 1
- Mbedtls error and memory leak when connecting through WebSocket HOT 1
- Reading post data from https connection fails now and then HOT 24
- bind define conflict between "lwip/sockets.h" and c++ <functional> HOT 1
- Remove examples/device-dashboards/screenshots
- Change struct mg_str :: ptr to struct mg_str :: buf
- Device Dashboard tutorial - nitpick changes
- Simplify cmsispack mongoose_custom.h HOT 3
- Enforce text/html Content-Type for Custom 404 Page Responses Regardless of Requested URI Extension HOT 2
- Reading larger POST data with enabled tls fails HOT 1
- Reading larger POST data with enabled tls fails HOT 5
- Latest release (7.13) missing CMSIS Pack Assets HOT 3
- 7.13 MG_EV_READ event has no data HOT 1
- Does he support multithreading? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongoose.