From fb90c504a695719d9eb097a31988c88fb0700b39 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Fri, 22 Oct 2021 14:00:31 +0100 Subject: [PATCH] Remove private.h --- Makefile | 2 +- mongoose.c | 5 ----- mongoose.h | 1 + src/net.h | 1 + src/private.h | 1 - 5 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 src/private.h diff --git a/Makefile b/Makefile index fee95c02..6a06ec33 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ uninstall: rm -rf $(DESTDIR)$(PREFIX)/lib/libmongoose.a $(DESTDIR)$(PREFIX)/lib/libmongoose.so.$(VERSION) $(DESTDIR)$(PREFIX)/include/mongoose.h $(DESTDIR)$(PREFIX)/lib/libmongoose.so mongoose.c: Makefile $(wildcard src/*) - (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))> $@ + (cat src/license.h; echo; echo '#include "mongoose.h"' ; (for F in 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; echo; echo '#ifndef MONGOOSE_H'; echo '#define MONGOOSE_H'; echo; cat src/version.h ; echo; echo '#ifdef __cplusplus'; echo 'extern "C" {'; echo '#endif'; cat src/config.h src/arch.h src/arch_*.h src/str.h src/log.h src/timer.h src/util.h src/fs.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')> $@ diff --git a/mongoose.c b/mongoose.c index 38bebb6e..4b18ad6b 100644 --- a/mongoose.c +++ b/mongoose.c @@ -17,11 +17,6 @@ #include "mongoose.h" -#ifdef MG_ENABLE_LINES -#line 1 "src/private.h" -#endif -void mg_connect_resolved(struct mg_connection *); - #ifdef MG_ENABLE_LINES #line 1 "src/base64.c" #endif diff --git a/mongoose.h b/mongoose.h index c3be53d3..8a73373d 100644 --- a/mongoose.h +++ b/mongoose.h @@ -819,6 +819,7 @@ struct mg_connection *mg_listen(struct mg_mgr *, const char *url, mg_event_handler_t fn, void *fn_data); struct mg_connection *mg_connect(struct mg_mgr *, const char *url, mg_event_handler_t fn, void *fn_data); +void mg_connect_resolved(struct mg_connection *); bool mg_send(struct mg_connection *, const void *, size_t); int mg_printf(struct mg_connection *, const char *fmt, ...); int mg_vprintf(struct mg_connection *, const char *fmt, va_list ap); diff --git a/src/net.h b/src/net.h index 0950db9c..527bf78d 100644 --- a/src/net.h +++ b/src/net.h @@ -67,6 +67,7 @@ struct mg_connection *mg_listen(struct mg_mgr *, const char *url, mg_event_handler_t fn, void *fn_data); struct mg_connection *mg_connect(struct mg_mgr *, const char *url, mg_event_handler_t fn, void *fn_data); +void mg_connect_resolved(struct mg_connection *); bool mg_send(struct mg_connection *, const void *, size_t); int mg_printf(struct mg_connection *, const char *fmt, ...); int mg_vprintf(struct mg_connection *, const char *fmt, va_list ap); diff --git a/src/private.h b/src/private.h deleted file mode 100644 index eeb40939..00000000 --- a/src/private.h +++ /dev/null @@ -1 +0,0 @@ -void mg_connect_resolved(struct mg_connection *);