mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-06 15:51:25 +00:00
Add MG_ARCH_NEWLIB
This commit is contained in:
1 parent
d621fbfab1
commit
38557aac7f
7 files changed
+54
-45
No files matched your search
@@ -10,6 +10,7 @@
|
||||
#define MG_ARCH_AZURERTOS 7
|
||||
#define MG_ARCH_RTX_LWIP 8
|
||||
#define MG_ARCH_ZEPHYR 9
|
||||
#define MG_ARCH_NEWLIB 10
|
||||
|
||||
#if !defined(MG_ARCH)
|
||||
#if defined(__unix__) || defined(__APPLE__)
|
||||
@@ -47,6 +48,7 @@
|
||||
#include "arch_esp8266.h"
|
||||
#include "arch_freertos_lwip.h"
|
||||
#include "arch_freertos_tcp.h"
|
||||
#include "arch_newlib.h"
|
||||
#include "arch_unix.h"
|
||||
#include "arch_win32.h"
|
||||
#include "arch_zephyr.h"
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#if MG_ARCH == MG_ARCH_NEWLIB
|
||||
#define _POSIX_TIMERS
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define MG_PATH_MAX 100
|
||||
#define MG_ENABLE_SOCKET 0
|
||||
#define MG_ENABLE_DIRLIST 0
|
||||
|
||||
#endif
|
||||
@@ -29,6 +29,7 @@ struct mg_mgr {
|
||||
uint16_t mqtt_id; // MQTT IDs for pub/sub
|
||||
void *active_dns_requests; // DNS requests in progress
|
||||
struct mg_timer *timers; // Active timers
|
||||
void *priv; // Used by the experimental stack
|
||||
#if MG_ARCH == MG_ARCH_FREERTOS_TCP
|
||||
SocketSet_t ss; // NOTE(lsm): referenced from socket struct
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user