Commit 75059d1b authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Rename MG_DISABLE_CGI -> MG_ENABLE_CGI

Also factor out CGI-related code from http.c, it's getting too big.

Build tests with -Wundef

PUBLISHED_FROM=a1e82fafba73812c249db0b49c59d1b48417b60d
parent 15e9a927
This diff is collapsed.
...@@ -454,7 +454,6 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle, ...@@ -454,7 +454,6 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
#define MG_DISABLE_SOCKETPAIR 1 #define MG_DISABLE_SOCKETPAIR 1
#define MG_DISABLE_SYNC_RESOLVER 1 #define MG_DISABLE_SYNC_RESOLVER 1
#define MG_DISABLE_POPEN 1 #define MG_DISABLE_POPEN 1
#define MG_DISABLE_CGI 1
#define MG_DISABLE_DAV 1 #define MG_DISABLE_DAV 1
#define MG_DISABLE_DIRECTORY_LISTING 1 #define MG_DISABLE_DIRECTORY_LISTING 1
#define MG_DISABLE_FILESYSTEM 1 #define MG_DISABLE_FILESYSTEM 1
...@@ -514,7 +513,6 @@ int inet_pton(int af, const char *src, void *dst); ...@@ -514,7 +513,6 @@ int inet_pton(int af, const char *src, void *dst);
#define MG_DISABLE_SOCKETPAIR 1 #define MG_DISABLE_SOCKETPAIR 1
#define MG_DISABLE_SYNC_RESOLVER 1 #define MG_DISABLE_SYNC_RESOLVER 1
#define MG_DISABLE_POPEN 1 #define MG_DISABLE_POPEN 1
#define MG_DISABLE_CGI 1
/* Only SPIFFS supports directories, SLFS does not. */ /* Only SPIFFS supports directories, SLFS does not. */
#ifndef CC3200_FS_SPIFFS #ifndef CC3200_FS_SPIFFS
#define MG_DISABLE_DAV 1 #define MG_DISABLE_DAV 1
...@@ -644,7 +642,6 @@ struct dirent *readdir(DIR *dir); ...@@ -644,7 +642,6 @@ struct dirent *readdir(DIR *dir);
#define MG_DISABLE_SOCKETPAIR 1 #define MG_DISABLE_SOCKETPAIR 1
#define MG_DISABLE_SYNC_RESOLVER 1 #define MG_DISABLE_SYNC_RESOLVER 1
#define MG_DISABLE_POPEN 1 #define MG_DISABLE_POPEN 1
#define MG_DISABLE_CGI 1
#define MG_DISABLE_DAV 1 #define MG_DISABLE_DAV 1
#define MG_DISABLE_DIRECTORY_LISTING 1 #define MG_DISABLE_DIRECTORY_LISTING 1
...@@ -1186,10 +1183,6 @@ const char *c_strnstr(const char *s, const char *find, size_t slen); ...@@ -1186,10 +1183,6 @@ const char *c_strnstr(const char *s, const char *find, size_t slen);
#ifndef CS_MONGOOSE_SRC_FEATURES_H_ #ifndef CS_MONGOOSE_SRC_FEATURES_H_
#define CS_MONGOOSE_SRC_FEATURES_H_ #define CS_MONGOOSE_SRC_FEATURES_H_
#ifndef MG_DISABLE_CGI
#define MG_DISABLE_CGI 0
#endif
#ifndef MG_DISABLE_DIRECTORY_LISTING #ifndef MG_DISABLE_DIRECTORY_LISTING
#define MG_DISABLE_DIRECTORY_LISTING 0 #define MG_DISABLE_DIRECTORY_LISTING 0
#endif #endif
...@@ -1262,6 +1255,10 @@ const char *c_strnstr(const char *s, const char *find, size_t slen); ...@@ -1262,6 +1255,10 @@ const char *c_strnstr(const char *s, const char *find, size_t slen);
#define MG_DISABLE_WS_RANDOM_MASK 0 #define MG_DISABLE_WS_RANDOM_MASK 0
#endif #endif
#ifndef MG_ENABLE_CGI
#define MG_ENABLE_CGI (CS_PLATFORM == CS_P_UNIX || CS_PLATFORM == CS_P_WINDOWS)
#endif
#ifndef MG_ENABLE_COAP #ifndef MG_ENABLE_COAP
#define MG_ENABLE_COAP 0 #define MG_ENABLE_COAP 0
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment