OpenSSL 1.0.2f
[tomato.git] / release / src / router / xl2tpd / osport.h
blob319b3085dd52b8b3a3e6215c805d694ab93607e2
1 /*
2 * Layer Two Tunnelling Protocol Daemon
3 * Copyright (C) 1998 Adtran, Inc.
4 * Copyright (C) 2002 Jeff McAdams
6 * Mark Spencer
8 * This software is distributed under the terms
9 * of the GPL, which you should have received
10 * along with this source.
12 * OS Portability header file. try to map some
13 * "standard" routines into OS-specific routines.
17 #ifndef _OSPORT_H_
18 #define _OSPORT_H_
20 #if defined(SOLARIS)
22 # define index(x, y) strchr(x, y)
23 # define bcopy(S1, S2, LEN) ((void)memmove(S2, S1, LEN))
24 # define bzero(S1, LEN) ((void)memset(S1, 0, LEN))
25 # define bcmp(S1,S2,LEN) ((memcmp(S2, S1, LEN)==0)?0:1)
27 /* pre 2.6 solaris didn't include random(), etc prototypes
28 * <stdlib.h> (as of 2.6) has the correct prototypes.
31 # if SOLARIS < 260
32 # define random(X) ((int)rand(X))
33 # define srandom(X) ((void)srand(X))
34 # endif /* SOLARIS < 260 */
36 #endif /* defined(SOLARIS) */
38 #endif /* _OSPORT_H_ */