repo.or.cz
/
tomato.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libsodium 1.0.8
[tomato.git]
/
release
/
src
/
router
/
libsodium
/
test
/
quirks
/
quirks.h
blob
00caf7c9272233bdc456d1bb006e47ff81bddc4a
1
2
#include <stdlib.h>
3
4
#ifdef __EMSCRIPTEN__
5
# define strcmp(s1, s2) xstrcmp(s1, s2)
6
7
int
8
strcmp
(
const char
*
s1
,
const char
*
s2
) {
9
while
(*
s1
== *
s2
++) {
if
(*
s1
++ ==
0
)
return
0
; }
10
return
*(
unsigned char
*)
s1
- *(
unsigned char
*) --
s2
;
11
}
12
#endif
13
14
#ifdef _WIN32
15
static void
16
srandom
(
unsigned
seed
)
17
{
18
srand
(
seed
);
19
}
20
21
static long
22
random
(
void
)
23
{
24
return
(
long
)
rand
();
25
}
26
#endif