diff --git a/docs/README.md b/docs/README.md index 419d2e73..bc945c88 100644 --- a/docs/README.md +++ b/docs/README.md @@ -2682,7 +2682,7 @@ char *msg = mg_mprintf("Double quoted string: %Q!", "hi"); free(msg); ``` -### mg\_rprintf(), mg\_vrprintf() +### mg\_xprintf(), mg\_vxprintf() ```c size_t mg_xprintf(void (*out)(char, void *), void *param, const char *fmt, ...); diff --git a/mongoose.h b/mongoose.h index 6e068974..b56d93bb 100644 --- a/mongoose.h +++ b/mongoose.h @@ -168,6 +168,7 @@ extern "C" { #include #include #include +#include #include #include #include @@ -201,17 +202,12 @@ static inline void *mg_calloc(int cnt, size_t size) { #define calloc(a, b) mg_calloc((a), (b)) #define free(a) vPortFree(a) #define malloc(a) pvPortMalloc(a) - #define mkdir(a, b) (-1) #ifndef MG_IO_SIZE #define MG_IO_SIZE 512 #endif -#ifndef MG_PATH_MAX -#define MG_PATH_MAX 128 -#endif - #endif // MG_ARCH == MG_ARCH_FREERTOS_LWIP @@ -230,9 +226,11 @@ static inline void *mg_calloc(int cnt, size_t size) { #include #include +#include +#include + #include #include -#include // Why FreeRTOS-TCP did not implement a clean BSD API, but its own thing // with FreeRTOS_ prefix, is beyond me diff --git a/src/arch_freertos_lwip.h b/src/arch_freertos_lwip.h index 623f0e55..61555ab1 100644 --- a/src/arch_freertos_lwip.h +++ b/src/arch_freertos_lwip.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -38,15 +39,10 @@ static inline void *mg_calloc(int cnt, size_t size) { #define calloc(a, b) mg_calloc((a), (b)) #define free(a) vPortFree(a) #define malloc(a) pvPortMalloc(a) - #define mkdir(a, b) (-1) #ifndef MG_IO_SIZE #define MG_IO_SIZE 512 #endif -#ifndef MG_PATH_MAX -#define MG_PATH_MAX 128 -#endif - #endif // MG_ARCH == MG_ARCH_FREERTOS_LWIP diff --git a/src/arch_freertos_tcp.h b/src/arch_freertos_tcp.h index d4af7006..e8a215cf 100644 --- a/src/arch_freertos_tcp.h +++ b/src/arch_freertos_tcp.h @@ -15,9 +15,11 @@ #include #include +#include +#include + #include #include -#include // Why FreeRTOS-TCP did not implement a clean BSD API, but its own thing // with FreeRTOS_ prefix, is beyond me