/* * Copyright (C) 2010, Broadcom Corporation * All Rights Reserved. * * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. * $Id: typedefs.h,v 1.96.28.1.8.1 2009/11/30 22:27:30 Exp $ */ #ifndef _TYPEDEFS_H_ #define _TYPEDEFS_H_ #ifdef __cplusplus #define TYPEDEF_BOOL #ifndef FALSE #define FALSE false #endif #ifndef TRUE #define TRUE true #endif #else #endif #if defined(__x86_64__) #define TYPEDEF_UINTPTR typedef unsigned long long int uintptr; #endif #if defined(TARGETOS_nucleus) #include #define TYPEDEF_FLOAT_T #endif #if defined(LINUX_PORT) #define TYPEDEF_UINT #define TYPEDEF_USHORT #define TYPEDEF_ULONG #ifdef __KERNEL__ #include #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)) #define TYPEDEF_BOOL #endif #endif #endif #if defined(__GNUC__) && defined(__STRICT_ANSI__) #define TYPEDEF_INT64 #define TYPEDEF_UINT64 #endif #if !defined(__BOB__) && !defined(TARGETOS_nucleus) #if defined(__KERNEL__) #if defined(LINUX_PORT) #include #endif #else #include #endif #endif #define USE_TYPEDEF_DEFAULTS #ifdef USE_TYPEDEF_DEFAULTS #undef USE_TYPEDEF_DEFAULTS /* * Tachtler * #ifndef TYPEDEF_BOOL * typedef unsigned char bool; * #endif */ #ifndef TYPEDEF_UCHAR typedef unsigned char uchar; #endif #ifndef TYPEDEF_USHORT typedef unsigned short ushort; #endif #ifndef TYPEDEF_UINT typedef unsigned int uint; #endif #ifndef TYPEDEF_ULONG typedef unsigned long ulong; #endif #ifndef TYPEDEF_UINT8 typedef unsigned char uint8; #endif #ifndef TYPEDEF_UINT16 typedef unsigned short uint16; #endif #ifndef TYPEDEF_UINT32 typedef unsigned int uint32; #endif #ifndef TYPEDEF_UINT64 typedef unsigned long long uint64; #endif #ifndef TYPEDEF_UINTPTR typedef unsigned int uintptr; #endif #ifndef TYPEDEF_INT8 typedef signed char int8; #endif #ifndef TYPEDEF_INT16 typedef signed short int16; #endif #ifndef TYPEDEF_INT32 typedef signed int int32; #endif #ifndef TYPEDEF_INT64 typedef signed long long int64; #endif #ifndef TYPEDEF_FLOAT32 typedef float float32; #endif #ifndef TYPEDEF_FLOAT64 typedef double float64; #endif #ifndef TYPEDEF_FLOAT_T #if defined(FLOAT32) typedef float32 float_t; #else typedef float64 float_t; #endif #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef NULL #define NULL 0 #endif #ifndef OFF #define OFF 0 #endif #ifndef ON #define ON 1 #endif #define AUTO (-1) #ifndef PTRSZ #define PTRSZ sizeof(char*) #endif #if defined(__GNUC__) #define BWL_COMPILER_GNU #elif defined(__CC_ARM) && __CC_ARM #define BWL_COMPILER_ARMCC #else #error "Unknown compiler!" #endif #ifndef INLINE #if defined(BWL_COMPILER_MICROSOFT) #define INLINE __inline #elif defined(BWL_COMPILER_GNU) #define INLINE __inline__ #elif defined(BWL_COMPILER_ARMCC) #define INLINE __inline #else #define INLINE #endif #endif #undef TYPEDEF_BOOL #undef TYPEDEF_UCHAR #undef TYPEDEF_USHORT #undef TYPEDEF_UINT #undef TYPEDEF_ULONG #undef TYPEDEF_UINT8 #undef TYPEDEF_UINT16 #undef TYPEDEF_UINT32 #undef TYPEDEF_UINT64 #undef TYPEDEF_UINTPTR #undef TYPEDEF_INT8 #undef TYPEDEF_INT16 #undef TYPEDEF_INT32 #undef TYPEDEF_INT64 #undef TYPEDEF_FLOAT32 #undef TYPEDEF_FLOAT64 #undef TYPEDEF_FLOAT_T #endif #define UNUSED_PARAMETER(x) (void)(x) #include #endif