diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/emscripten.h | 9 |
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 |