aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-07-03 00:58:05 +0200
committerkdx <kikoodx@paranoici.org>2023-07-03 00:58:05 +0200
commita7ce97902e64a06d61c7b6bb6d3f8a92fedbb071 (patch)
tree6143cb059c26e1856bc17787fb976c9a3cb8aeaf
parentea0485e7c4806d3407d2f86d52f4f28fed55331b (diff)
downloadtzr-a7ce97902e64a06d61c7b6bb6d3f8a92fedbb071.tar.gz
c++ emscripten fix
-rw-r--r--_head.h3
-rwxr-xr-xcreate_TZR.h.sh5
2 files changed, 3 insertions, 5 deletions
diff --git a/_head.h b/_head.h
index a6ffa1e..0efaa41 100644
--- a/_head.h
+++ b/_head.h
@@ -1,5 +1,8 @@
/* Licensing information can be found at the end of the file. */
#pragma once
+#ifdef __EMSCRIPTEN__
+#include <emscripten.h>
+#endif
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/create_TZR.h.sh b/create_TZR.h.sh
index 61f1b43..aacd282 100755
--- a/create_TZR.h.sh
+++ b/create_TZR.h.sh
@@ -22,11 +22,6 @@ HEADER=TZR ProcessHeader
cp _head.h "$BUILDDIR/out"
sort -u "$BUILDDIR/includes" >>"$BUILDDIR/out"
-cat <<EOF >>"$BUILDDIR/out"
-#ifdef __EMSCRIPTEN__
-#include <emscripten.h>
-#endif
-EOF
printf '\n' >>"$BUILDDIR/out"
cat "$BUILDDIR/sources" >>"$BUILDDIR/out"
printf '\n#ifdef __cplusplus\n}\n#endif\n' >>"$BUILDDIR/out"