| 1 | /* emx/gcc */
|
|---|
| 2 | #ifndef _UTILS_H_
|
|---|
| 3 | #define _UTILS_H_
|
|---|
| 4 |
|
|---|
| 5 | #ifdef TCPV40HDRS
|
|---|
| 6 |
|
|---|
| 7 | /** @name tcpip40 function mappings.
|
|---|
| 8 | * @{ */
|
|---|
| 9 | #define lswap tcpip40_lswap
|
|---|
| 10 | #define bswap tcpip40_bswap
|
|---|
| 11 | #define rexec tcpip40_rexec
|
|---|
| 12 | /* @} */
|
|---|
| 13 | unsigned long _System lswap(unsigned long);
|
|---|
| 14 | unsigned short _System bswap(unsigned short);
|
|---|
| 15 | int _System rexec(char **, int, char *, char *, char *, int *);
|
|---|
| 16 |
|
|---|
| 17 | /* Definition for bswap */
|
|---|
| 18 | #ifndef htonl
|
|---|
| 19 | #include <machine/endian.h>
|
|---|
| 20 | #endif
|
|---|
| 21 |
|
|---|
| 22 | #define ovbcopy(x,y,z) bcopy((x),(y),(z))
|
|---|
| 23 | #define copyout(x,y,z) memcpy((y),(x),(z))
|
|---|
| 24 | #ifndef XP_OS2_VACPP /* mozilla */
|
|---|
| 25 | #define strcasecmp(x,y) strcmpi((x),(y))
|
|---|
| 26 | #define strncasecmp(x,y,z) strnicmp(x,y,z)
|
|---|
| 27 | #endif
|
|---|
| 28 |
|
|---|
| 29 | #ifndef MIN
|
|---|
| 30 | #define MIN(a,b) (((a)<(b))?(a):(b))
|
|---|
| 31 | #define imin(x,y) MIN((x),(y))
|
|---|
| 32 | #define MAX(a,b) (((a)>(b))?(a):(b))
|
|---|
| 33 | #endif
|
|---|
| 34 | #ifndef min
|
|---|
| 35 | #define min(a,b) (((a)<(b))?(a):(b))
|
|---|
| 36 | #endif
|
|---|
| 37 | /* timercmp */
|
|---|
| 38 | #include <sys/time.h>
|
|---|
| 39 |
|
|---|
| 40 | #else
|
|---|
| 41 | int _System rexec(char **, int, char *, char *, char *, int *);
|
|---|
| 42 | #endif /*TCPV40HDRS*/
|
|---|
| 43 |
|
|---|
| 44 | #endif
|
|---|