aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralon@honor <none@none>2010-09-27 20:12:10 -0700
committeralon@honor <none@none>2010-09-27 20:12:10 -0700
commit6e3892161b56e941a55d6d869074a3cbd68f51ab (patch)
tree9d9d52d5cd71bb0d32c4eadf9f8b455b36b689bd
parentcc72cb44f12fe732309bc839f01f102a6bb645d2 (diff)
emscripten.h tweaks
-rw-r--r--src/include/emscripten.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/include/emscripten.h b/src/include/emscripten.h
index f8cb6ada..1974fc71 100644
--- a/src/include/emscripten.h
+++ b/src/include/emscripten.h
@@ -27,10 +27,15 @@
#ifdef EMSCRIPTEN
template<class T>
int es_sizeof(T* x) { return int(&x[1]); }
- #define ES_SIZEOF(T) es_sizeof((T*)NULL)
+ #define ES_SIZEOF(T) es_sizeof((T*)0)
template<class T>
- int es_sizeov(T* x) { return es_sizeof((T*)NULL); }
+ int es_sizeov(T* x) { return es_sizeof((T*)0); }
#define ES_SIZEOV(V) es_sizeof(V)
+
+ // Undefine normal archs, so asm is not attempted
+ #define __EMSCRIPTEN__
+ #undef __i386__
+ #undef __x86_64__
#else
#define ES_SIZEOF(T) sizeof(T)
#endif