diff --git a/test/default/cmptest.h b/test/default/cmptest.h index f9f93d68..13180fbf 100644 --- a/test/default/cmptest.h +++ b/test/default/cmptest.h @@ -26,6 +26,14 @@ # define rand(X) arc4random(X) #endif +#ifdef __EMSCRIPTEN__ +# define strcmp(s1, s2) xstrcmp(s1, s2) +int strcmp(const char *s1, const char *s2) { + while (*s1 == *s2++) { if (*s1++ == 0) return 0; } + return *(unsigned char *) s1 - *(unsigned char *) --s2; +} +#endif + FILE *fp_res; int xmain(void);