Create tag for version 0.99.1
[oscam.git] / oscam-types.h
blob25a4aefa1b218175b42c2b39b5b1c0fdac2e9292
1 #ifndef _TYPES_H_
2 #define _TYPES_H_
4 #if !defined(OS_AIX)
5 typedef unsigned char uchar;
6 #endif
8 //typedef unsigned short ushort;
10 #if defined(OS_CYGWIN32) || defined(OS_HPUX) || defined(OS_FREEBSD)
11 typedef unsigned long ulong;
12 #endif
14 typedef unsigned long long ullong;
16 #endif // _TYPES_H_
18 #ifndef NO_ENDIAN_H
19 #include <endian.h>
20 #include <byteswap.h>
21 #endif
23 #if defined(CS_EMBEDDED) || defined(OS_LINUX)
25 #ifdef ntohl
26 #undef ntohl
27 #endif
28 #ifdef ntohs
29 #undef ntohs
30 #endif
31 #ifdef htonl
32 #undef htonl
33 #endif
34 #ifdef htons
35 #undef htons
36 #endif
38 #if __BYTE_ORDER == __BIG_ENDIAN
39 # define ntohl(x) (x)
40 # define ntohs(x) (x)
41 # define htonl(x) (x)
42 # define htons(x) (x)
43 #else
44 # if __BYTE_ORDER == __LITTLE_ENDIAN
45 # define ntohl(x) __bswap_32 (x)
46 # define ntohs(x) __bswap_16 (x)
47 # define htonl(x) __bswap_32 (x)
48 # define htons(x) __bswap_16 (x)
49 # endif
50 #endif
52 #endif // CS_EMBEDDED || OS_LINUX