Moved mod_lua.c to src/lua.c

This commit is contained in:
Sergey Lyubka committed 2013-10-01 15:16:09 +01:00
1 parent d3577b7877
commit 70154f6c23
6 files changed
+409 -15

No files matched your search

+3 -3
View File
@@ -21,13 +21,13 @@
PROG = mongoose
EXE_SUFFIX =
CFLAGS = -std=c99 -O2 -W -Wall -pedantic -pthread -pipe -I.. $(CFLAGS_EXTRA)
CFLAGS = -std=c99 -O2 -W -Wall -pedantic -pthread -pipe -I. -I.. $(CFLAGS_EXTRA)
VERSION = $(shell perl -lne \
'print $$1 if /define\s+MONGOOSE_VERSION\s+"(\S+)"/' ../mongoose.c)
# The order in which files are listed is important
SOURCES = src/internal.h src/string.c src/parse_date.c src/options.c \
src/crypto.c src/auth.c src/mongoose.c
src/crypto.c src/auth.c src/mongoose.c src/lua.c
TINY_SOURCES = ../mongoose.c main.c
LUA_SOURCES = $(TINY_SOURCES) sqlite3.c lsqlite3.c lua_5.2.1.c
@@ -60,7 +60,7 @@ endif
all:
@echo "make (unix|windows|macos)"
../mongoose.c: mod_lua.c ../mongoose.h Makefile $(SOURCES)
../mongoose.c: ../mongoose.h Makefile $(SOURCES)
cat $(SOURCES) | sed '/#include "internal.h"/d' > $@
unix_unit_test: $(LUA_SOURCES) Makefile ../test/unit_test.c
+6
View File
@@ -460,3 +460,9 @@ struct de {
static FILE *mg_fopen(const char *path, const char *mode);
static int mg_stat(const char *path, struct file *filep);
#ifdef USE_LUA
#include "lua_5.2.1.h"
static int handle_lsp_request(struct mg_connection *, const char *,
struct file *, struct lua_State *);
#endif
+3 -2
View File
@@ -1,5 +1,6 @@
#include "lua_5.2.1.h"
#include "internal.h"
#ifdef USE_LUA
#ifdef _WIN32
static void *mmap(void *addr, int64_t len, int prot, int flags, int fd,
int offset) {
@@ -20,7 +21,6 @@ static void *mmap(void *addr, int64_t len, int prot, int flags, int fd,
static const char *LUASOCKET = "luasocket";
// Forward declarations
static void handle_request(struct mg_connection *);
static int handle_lsp_request(struct mg_connection *, const char *,
struct file *, struct lua_State *);
@@ -387,3 +387,4 @@ static int handle_lsp_request(struct mg_connection *conn, const char *path,
return error;
}
#endif // USE_LUA
-4
View File
@@ -2842,10 +2842,6 @@ static uint32_t get_remote_ip(const struct mg_connection *conn) {
return ntohl(* (uint32_t *) &conn->client.rsa.sin.sin_addr);
}
#ifdef USE_LUA
#include "build/mod_lua.c"
#endif // USE_LUA
FILE *mg_upload(struct mg_connection *conn, const char *destination_dir,
char *path, int path_len) {
const char *content_type_header, *boundary_start;