-
Notifications
You must be signed in to change notification settings - Fork 1
/
emscripten.patch
29 lines (26 loc) · 918 Bytes
/
emscripten.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
diff --git a/inchi/INCHI_BASE/util.c b/inchi/INCHI_BASE/util.c
index ccb8853..4366637 100644
--- a/inchi/INCHI_BASE/util.c
+++ b/inchi/INCHI_BASE/util.c
@@ -44,8 +44,9 @@
#include "mode.h"
-#if defined(COMPILE_ANSI_ONLY) && defined(__APPLE__)
+#if defined(COMPILE_ANSI_ONLY) && (defined(__APPLE__) || defined(__EMSCRIPTEN__))
/* For build under OSX, advice from Burt Leland */
+/* JAF: Emscripten builds also need this support!*/
#include "ichicomp.h" /* Needed for __isascii define */
#endif
diff --git a/rinchi/lib/rinchi_platform.h b/rinchi/lib/rinchi_platform.h
index 7d0d89d..81b04fb 100644
--- a/rinchi/lib/rinchi_platform.h
+++ b/rinchi/lib/rinchi_platform.h
@@ -71,6 +71,9 @@
// #define ON_APPLE
#define ON_LINUX
const char DIR_SEPARATOR = '/';
+#elif defined(__EMSCRIPTEN__)
+ #define ON_LINUX
+ const char DIR_SEPARATOR = '/';
#else
#error "unsupported platform"
#endif