Blame SOURCES/libsodium-1.0.18/test/quirks/quirks.h

ca16be
ca16be
#include <stdlib.h>
ca16be
ca16be
/* C++Builder defines a "random" macro */
ca16be
#undef random
ca16be
ca16be
#ifdef __EMSCRIPTEN__
ca16be
# define strcmp(s1, s2) xstrcmp(s1, s2)
ca16be
ca16be
static int
ca16be
strcmp(const char *s1, const char *s2)
ca16be
{
ca16be
    while (*s1 == *s2++) {
ca16be
        if (*s1++ == 0) {
ca16be
            return 0;
ca16be
        }
ca16be
    }
ca16be
    return *(unsigned char *) s1 - *(unsigned char *) --s2;
ca16be
}
ca16be
#endif
ca16be
ca16be
#ifdef _WIN32
ca16be
static void
ca16be
srandom(unsigned seed)
ca16be
{
ca16be
    srand(seed);
ca16be
}
ca16be
ca16be
static long
ca16be
random(void)
ca16be
{
ca16be
    return (long) rand();
ca16be
}
ca16be
#endif