Sha256: 3a407aa7dbbab669c749f0c9825c4dc44da318c7ca6920e8dc97d4e0c8bb841f

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

#include <stdlib.h>

/* C++Builder defines a "random" macro */
#undef random

#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

2 entries across 2 versions & 1 rubygems

Version Path
rbnacl-libsodium-1.0.10 vendor/libsodium/test/quirks/quirks.h
rbnacl-libsodium-1.0.9 vendor/libsodium/test/quirks/quirks.h