Files
nuki_hub/components/espressif__libsodium/libsodium/test/quirks/quirks.h
iranl b673fb4d5c Add and remove libs and components for Arduino Core 3 (#400)
* Add and remove libs and components for Arduino Core 3

* Add back NimBLE-Arduino in resources
2024-06-20 23:34:49 +07:00

35 lines
488 B
C

#include <stdlib.h>
/* C++Builder defines a "random" macro */
#undef random
#ifdef __EMSCRIPTEN__
# define strcmp(s1, s2) xstrcmp(s1, s2)
static 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