Add libsodium to the tree and build what's needed from source.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3859 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-03-08 03:42:47 +00:00
parent efc5eb2aff
commit 352f33f5a1
584 changed files with 140249 additions and 2 deletions

34
deps/libsodium/test/quirks/quirks.h vendored Normal file
View File

@ -0,0 +1,34 @@
#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