Home | History | Annotate | Download | only in sound
      1 #ifndef __TYPE_COMPAT_H
      2 #define __TYPE_COMPAT_H
      3 
      4 #ifndef DOC_HIDDEN
      5 #include <stdint.h>
      6 typedef uint8_t __u8;
      7 typedef uint16_t __u16;
      8 typedef uint32_t __u32;
      9 typedef int8_t __s8;
     10 typedef int16_t __s16;
     11 typedef int32_t __s32;
     12 
     13 #include <endian.h>
     14 #include <byteswap.h>
     15 #if __BYTE_ORDER == __LITTLE_ENDIAN
     16 #define __cpu_to_le32(x) (x)
     17 #define __cpu_to_be32(x) bswap_32(x)
     18 #define __cpu_to_le16(x) (x)
     19 #define __cpu_to_be16(x) bswap_16(x)
     20 #else
     21 #define __cpu_to_le32(x) bswap_32(x)
     22 #define __cpu_to_be32(x) (x)
     23 #define __cpu_to_le16(x) bswap_16(x)
     24 #define __cpu_to_be16(x) (x)
     25 #endif
     26 
     27 #define __le32_to_cpu __cpu_to_le32
     28 #define __be32_to_cpu __cpu_to_be32
     29 #define __le16_to_cpu __cpu_to_le16
     30 #define __be16_to_cpu __cpu_to_be16
     31 
     32 #define __le64 __u64
     33 #define __le32 __u32
     34 #define __le16 __u16
     35 #define __be64 __u64
     36 #define __be32 __u32
     37 #define __be16 __u16
     38 #endif /* DOC_HIDDEN */
     39 
     40 #endif /* __TYPE_COMPAT_H */
     41