Sha256: 30ab1194e93d82df0c9a414a97730450b7f230f30b88118c9364b847618fb619

Contents?: true

Size: 388 Bytes

Versions: 6

Compression:

Stored size: 388 Bytes

Contents

#include <stdlib.h>

#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

#ifdef _WIN32
static void
srandom(unsigned seed)
{
    srand(seed);
}

static long
random(void)
{
    return (long) rand();
}
#endif

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rbnacl-libsodium-1.0.8 vendor/libsodium/test/quirks/quirks.h
rbnacl-libsodium-1.0.7 vendor/libsodium/test/quirks/quirks.h
rbnacl-libsodium-1.0.6 vendor/libsodium/test/quirks/quirks.h
rbnacl-libsodium-1.0.5 vendor/libsodium/test/quirks/quirks.h
rbnacl-libsodium-1.0.4 vendor/libsodium/test/quirks/quirks.h
rbnacl-libsodium-1.0.3 vendor/libsodium/test/quirks/quirks.h