mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 01:38:01 +08:00
Place config.h before arch*.h
This commit is contained in:
parent
328a87b02a
commit
a09238debd
2
Makefile
2
Makefile
@ -118,7 +118,7 @@ mongoose.c: $(SRCS) Makefile
|
||||
(cat src/license.h; echo; echo '#include "mongoose.h"' ; (for F in src/private.h src/*.c ; do echo; echo '#ifdef MG_ENABLE_LINES'; echo "#line 1 \"$$F\""; echo '#endif'; cat $$F | sed -e 's,#include ".*,,'; done))> $@
|
||||
|
||||
mongoose.h: $(HDRS) Makefile
|
||||
(cat src/license.h src/version.h ; cat src/arch.h src/arch_*.h src/config.h src/str.h src/log.h src/timer.h src/util.h src/url.h src/iobuf.h src/base64.h src/md5.h src/sha1.h src/event.h src/net.h src/http.h src/ssi.h src/tls.h src/ws.h src/sntp.h src/mqtt.h src/dns.h | sed -e 's,#include ".*,,' -e 's,^#pragma once,,'; echo; echo '#ifdef __cplusplus'; echo '}'; echo '#endif'; echo '#endif // MONGOOSE_H')> $@
|
||||
(cat src/license.h src/version.h ; cat src/config.h src/arch.h src/arch_*.h src/str.h src/log.h src/timer.h src/util.h src/url.h src/iobuf.h src/base64.h src/md5.h src/sha1.h src/event.h src/net.h src/http.h src/ssi.h src/tls.h src/ws.h src/sntp.h src/mqtt.h src/dns.h | sed -e 's,#include ".*,,' -e 's,^#pragma once,,'; echo; echo '#ifdef __cplusplus'; echo '}'; echo '#endif'; echo '#endif // MONGOOSE_H')> $@
|
||||
|
||||
clean: EXAMPLE_TARGET = clean
|
||||
clean: ex
|
||||
|
133
mongoose.h
133
mongoose.h
@ -25,6 +25,74 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef MG_ENABLE_SOCKET
|
||||
#define MG_ENABLE_SOCKET 1
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_MBEDTLS
|
||||
#define MG_ENABLE_MBEDTLS 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_OPENSSL
|
||||
#define MG_ENABLE_OPENSSL 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_PACKED_FS
|
||||
#define MG_ENABLE_PACKED_FS 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_STDIO
|
||||
#define MG_ENABLE_STDIO 1
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_SSI
|
||||
#define MG_ENABLE_SSI 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_IPV6
|
||||
#define MG_ENABLE_IPV6 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_LOG
|
||||
#define MG_ENABLE_LOG 1
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_MD5
|
||||
#define MG_ENABLE_MD5 0
|
||||
#endif
|
||||
|
||||
// Set MG_ENABLE_WINSOCK=0 for Win32 builds with external IP stack (like LWIP)
|
||||
#ifndef MG_ENABLE_WINSOCK
|
||||
#define MG_ENABLE_WINSOCK 1
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_DIRECTORY_LISTING
|
||||
#define MG_ENABLE_DIRECTORY_LISTING 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_SOCKETPAIR
|
||||
#define MG_ENABLE_SOCKETPAIR 0
|
||||
#endif
|
||||
|
||||
// Granularity of the send/recv IO buffer growth
|
||||
#ifndef MG_IO_SIZE
|
||||
#define MG_IO_SIZE 512
|
||||
#endif
|
||||
|
||||
// Maximum size of the recv IO buffer
|
||||
#ifndef MG_MAX_RECV_BUF_SIZE
|
||||
#define MG_MAX_RECV_BUF_SIZE (3 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
#ifndef MG_MAX_HTTP_HEADERS
|
||||
#define MG_MAX_HTTP_HEADERS 40
|
||||
#endif
|
||||
|
||||
#ifndef MG_PATH_MAX
|
||||
#define MG_PATH_MAX PATH_MAX
|
||||
#endif
|
||||
|
||||
|
||||
#define MG_ARCH_CUSTOM 0
|
||||
#define MG_ARCH_UNIX 1
|
||||
#define MG_ARCH_WIN32 2
|
||||
@ -287,7 +355,6 @@ struct timeval {
|
||||
#include <unistd.h>
|
||||
|
||||
#define MG_DIRSEP '/'
|
||||
#define MG_ENABLE_POSIX 1
|
||||
#define MG_INT64_FMT "%" PRId64
|
||||
|
||||
#endif
|
||||
@ -395,70 +462,6 @@ static __inline struct tm *localtime_r(time_t *t, struct tm *tm) {
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef MG_ENABLE_SOCKET
|
||||
#define MG_ENABLE_SOCKET 1
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_MBEDTLS
|
||||
#define MG_ENABLE_MBEDTLS 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_OPENSSL
|
||||
#define MG_ENABLE_OPENSSL 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_STDIO
|
||||
#define MG_ENABLE_STDIO 1
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_SSI
|
||||
#define MG_ENABLE_SSI 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_IPV6
|
||||
#define MG_ENABLE_IPV6 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_LOG
|
||||
#define MG_ENABLE_LOG 1
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_MD5
|
||||
#define MG_ENABLE_MD5 0
|
||||
#endif
|
||||
|
||||
// Set MG_ENABLE_WINSOCK=0 for Win32 builds with external IP stack (like LWIP)
|
||||
#ifndef MG_ENABLE_WINSOCK
|
||||
#define MG_ENABLE_WINSOCK 1
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_DIRECTORY_LISTING
|
||||
#define MG_ENABLE_DIRECTORY_LISTING 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_SOCKETPAIR
|
||||
#define MG_ENABLE_SOCKETPAIR 0
|
||||
#endif
|
||||
|
||||
// Granularity of the send/recv IO buffer growth
|
||||
#ifndef MG_IO_SIZE
|
||||
#define MG_IO_SIZE 512
|
||||
#endif
|
||||
|
||||
// Maximum size of the recv IO buffer
|
||||
#ifndef MG_MAX_RECV_BUF_SIZE
|
||||
#define MG_MAX_RECV_BUF_SIZE (3 * 1024 * 1024)
|
||||
#endif
|
||||
|
||||
#ifndef MG_MAX_HTTP_HEADERS
|
||||
#define MG_MAX_HTTP_HEADERS 40
|
||||
#endif
|
||||
|
||||
#ifndef MG_PATH_MAX
|
||||
#define MG_PATH_MAX PATH_MAX
|
||||
#endif
|
||||
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#define MG_DIRSEP '/'
|
||||
#define MG_ENABLE_POSIX 1
|
||||
#define MG_INT64_FMT "%" PRId64
|
||||
|
||||
#endif
|
||||
|
@ -12,6 +12,10 @@
|
||||
#define MG_ENABLE_OPENSSL 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_PACKED_FS
|
||||
#define MG_ENABLE_PACKED_FS 0
|
||||
#endif
|
||||
|
||||
#ifndef MG_ENABLE_STDIO
|
||||
#define MG_ENABLE_STDIO 1
|
||||
#endif
|
||||
|
@ -17,6 +17,7 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp);
|
||||
|
||||
#define MG_DIRSEP '/'
|
||||
#define MG_INT64_FMT "%lld"
|
||||
#undef MG_PATH_MAX
|
||||
#define MG_PATH_MAX 100
|
||||
#undef MG_ENABLE_SOCKET
|
||||
#define MG_ENABLE_SOCKET 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user