From 49218365128550645b500e6056f777b1573dee4d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 23 Jan 2015 10:41:28 +0100 Subject: [PATCH] Move quirks inclusion to cmptest.h, emscsripten quirks to quirks.h --- test/default/auth5.c | 2 -- test/default/auth7.c | 2 -- test/default/box8.c | 2 -- test/default/cmptest.h | 9 +-------- test/default/onetimeauth7.c | 2 -- test/default/secretbox8.c | 2 -- 6 files changed, 1 insertion(+), 18 deletions(-) diff --git a/test/default/auth5.c b/test/default/auth5.c index bee53469..498e804c 100644 --- a/test/default/auth5.c +++ b/test/default/auth5.c @@ -1,6 +1,4 @@ -#include "quirks.h" - #define TEST_NAME "auth5" #include "cmptest.h" diff --git a/test/default/auth7.c b/test/default/auth7.c index e431e43f..f463b9d7 100644 --- a/test/default/auth7.c +++ b/test/default/auth7.c @@ -1,6 +1,4 @@ -#include "quirks.h" - #define TEST_NAME "auth7" #include "cmptest.h" diff --git a/test/default/box8.c b/test/default/box8.c index af6fb11f..75b59a24 100644 --- a/test/default/box8.c +++ b/test/default/box8.c @@ -1,6 +1,4 @@ -#include "quirks.h" - #define TEST_NAME "box8" #include "cmptest.h" diff --git a/test/default/cmptest.h b/test/default/cmptest.h index 13180fbf..ee849790 100644 --- a/test/default/cmptest.h +++ b/test/default/cmptest.h @@ -9,6 +9,7 @@ #include #include "sodium.h" +#include "quirks.h" #ifdef __EMSCRIPTEN__ # undef TEST_SRCDIR @@ -26,14 +27,6 @@ # 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); diff --git a/test/default/onetimeauth7.c b/test/default/onetimeauth7.c index 8d9a283b..54689038 100644 --- a/test/default/onetimeauth7.c +++ b/test/default/onetimeauth7.c @@ -1,6 +1,4 @@ -#include "quirks.h" - #define TEST_NAME "onetimeauth7" #include "cmptest.h" diff --git a/test/default/secretbox8.c b/test/default/secretbox8.c index 21ace132..60d93e36 100644 --- a/test/default/secretbox8.c +++ b/test/default/secretbox8.c @@ -1,6 +1,4 @@ -#include "quirks.h" - #define TEST_NAME "secretbox8" #include "cmptest.h"