mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 01:38:01 +08:00
Fix #1315, fix #1317 - use #ifndef instead of #pragma once for compilers that do not support #pragma once
This commit is contained in:
parent
497b8027f5
commit
3982e065c8
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')> $@
|
||||
(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')> $@
|
||||
|
||||
clean: EXAMPLE_TARGET = clean
|
||||
clean: ex
|
||||
|
@ -14,7 +14,9 @@
|
||||
//
|
||||
// Alternatively, you can license this software under a commercial
|
||||
// license, as set out in <https://www.cesanta.com/license>.
|
||||
#pragma once
|
||||
#ifndef MONGOOSE_H
|
||||
#define MONGOOSE_H
|
||||
|
||||
#define MG_VERSION "7.3"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -978,3 +980,4 @@ size_t mg_dns_decode_name(const uint8_t *, size_t, size_t, char *, size_t);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // MONGOOSE_H
|
||||
|
@ -1,4 +1,6 @@
|
||||
#pragma once
|
||||
#ifndef MONGOOSE_H
|
||||
#define MONGOOSE_H
|
||||
|
||||
#define MG_VERSION "7.3"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user