mirror of
https://github.com/cesanta/mongoose.git
synced 2026-12-04 21:58:22 +00:00
Changes to make Mongoose compile on ESP RTOS SDK
PUBLISHED_FROM=863a47416ee5e30f20f6523374ebd510cc022d99
This commit is contained in:
1 parent
6cfc696439
commit
3298030b8e
2 files changed
+10
-7
No files matched your search
+1
-3
@@ -1551,9 +1551,7 @@ void cs_hmac_sha1(const unsigned char *key, size_t keylen,
|
|||||||
/* Amalgamated: #include "osdep.h" */
|
/* Amalgamated: #include "osdep.h" */
|
||||||
/* Amalgamated: #include "str_util.h" */
|
/* Amalgamated: #include "str_util.h" */
|
||||||
|
|
||||||
#if !(_XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L) && \
|
#ifdef _MG_PROVIDE_STRNLEN
|
||||||
!(__DARWIN_C_LEVEL >= 200809L) && !defined(RTOS_SDK) || \
|
|
||||||
defined(_WIN32)
|
|
||||||
size_t strnlen(const char *s, size_t maxlen) {
|
size_t strnlen(const char *s, size_t maxlen) {
|
||||||
size_t l = 0;
|
size_t l = 0;
|
||||||
for (; l < maxlen && s[l] != '\0'; l++) {
|
for (; l < maxlen && s[l] != '\0'; l++) {
|
||||||
|
|||||||
+9
-4
@@ -105,7 +105,6 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@@ -234,8 +233,11 @@ struct dirent *readdir(DIR *dir);
|
|||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef LWIP_PROVIDE_ERRNO
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
@@ -519,9 +521,12 @@ extern "C" {
|
|||||||
int c_snprintf(char *buf, size_t buf_size, const char *format, ...);
|
int c_snprintf(char *buf, size_t buf_size, const char *format, ...);
|
||||||
int c_vsnprintf(char *buf, size_t buf_size, const char *format, va_list ap);
|
int c_vsnprintf(char *buf, size_t buf_size, const char *format, va_list ap);
|
||||||
|
|
||||||
#if !(_XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L) && \
|
#if (!(defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700) && \
|
||||||
!(__DARWIN_C_LEVEL >= 200809L) && !defined(RTOS_SDK) || \
|
!(defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L) && \
|
||||||
|
!(defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200809L) && \
|
||||||
|
!defined(RTOS_SDK)) || \
|
||||||
defined(_WIN32)
|
defined(_WIN32)
|
||||||
|
#define _MG_PROVIDE_STRNLEN
|
||||||
size_t strnlen(const char *s, size_t maxlen);
|
size_t strnlen(const char *s, size_t maxlen);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user