mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
Add CS_P_NXP_LPC - platform def for NXP LPC MCUs
PUBLISHED_FROM=d6ed793313a98545d5a89faafc8526b658ffff66
This commit is contained in:
1 parent
7411ff1fca
commit
92b15395a4
2 files changed
+110
-14
No files matched your search
+24
-8
@@ -721,9 +721,10 @@ typedef int cs_dirent_dummy;
|
||||
/*
|
||||
* There is no sys/time.h on ARMCC.
|
||||
*/
|
||||
#if !(defined(__ARMCC_VERSION) || defined(__ICCARM__)) && \
|
||||
(!defined(CS_PLATFORM) || \
|
||||
(CS_PLATFORM != CS_P_CC3200 && CS_PLATFORM != CS_P_MSP432))
|
||||
#if !(defined(__ARMCC_VERSION) || defined(__ICCARM__)) && \
|
||||
(!defined(CS_PLATFORM) || \
|
||||
(CS_PLATFORM != CS_P_CC3200 && CS_PLATFORM != CS_P_MSP432 && \
|
||||
CS_PLATFORM != CS_P_NXP_LPC))
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#else
|
||||
@@ -1722,10 +1723,7 @@ const char *c_strnstr(const char *s, const char *find, size_t slen) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* ARM C Compiler doesn't have strdup, so we provide it
|
||||
*/
|
||||
#if defined(__ARMCC_VERSION)
|
||||
#if CS_ENABLE_STRDUP
|
||||
char *strdup(const char *src) {
|
||||
size_t len = strlen(src) + 1;
|
||||
char *ret = malloc(len);
|
||||
@@ -1766,6 +1764,24 @@ void cs_from_hex(char *to, const char *p, size_t len) {
|
||||
*to = '\0';
|
||||
}
|
||||
|
||||
#if CS_ENABLE_TO64
|
||||
int64_t cs_to64(const char *s) {
|
||||
int64_t result = 0;
|
||||
int64_t neg = 1;
|
||||
while (*s && isspace((unsigned char) *s)) s++;
|
||||
if (*s == '-') {
|
||||
neg = -1;
|
||||
s++;
|
||||
}
|
||||
while (isdigit((unsigned char) *s)) {
|
||||
result *= 10;
|
||||
result += (*s - '0');
|
||||
s++;
|
||||
}
|
||||
return result * neg;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EXCLUDE_COMMON */
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/net.c"
|
||||
@@ -11528,7 +11544,7 @@ void sl_restart_cb(struct mg_mgr *mgr) {
|
||||
|
||||
#if MG_NET_IF == MG_NET_IF_LWIP_LOW_LEVEL
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct mg_lwip_conn_state {
|
||||
union {
|
||||
|
||||
Reference in new issue
Block a user