summaryrefslogtreecommitdiffstats
path: root/package/wlcompat/src/include/typedefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'package/wlcompat/src/include/typedefs.h')
-rw-r--r--package/wlcompat/src/include/typedefs.h139
1 files changed, 38 insertions, 101 deletions
diff --git a/package/wlcompat/src/include/typedefs.h b/package/wlcompat/src/include/typedefs.h
index 6b0c25e04..574a1df74 100644
--- a/package/wlcompat/src/include/typedefs.h
+++ b/package/wlcompat/src/include/typedefs.h
@@ -1,45 +1,22 @@
/*
- * Copyright 2004, 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.
+ * Copyright 2006, 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$
*/
#ifndef _TYPEDEFS_H_
#define _TYPEDEFS_H_
-
-/* Define 'SITE_TYPEDEFS' in the compile to include a site specific
- * typedef file "site_typedefs.h".
- *
- * If 'SITE_TYPEDEFS' is not defined, then the "Inferred Typedefs"
- * section of this file makes inferences about the compile environment
- * based on defined symbols and possibly compiler pragmas.
+/*
+ * Inferred Typedefs
*
- * Following these two sections is the "Default Typedefs"
- * section. This section is only prcessed if 'USE_TYPEDEF_DEFAULTS' is
- * defined. This section has a default set of typedefs and a few
- * proprocessor symbols (TRUE, FALSE, NULL, ...).
*/
-#ifdef SITE_TYPEDEFS
-
-/*******************************************************************************
- * Site Specific Typedefs
- *******************************************************************************/
-
-#include "site_typedefs.h"
-
-#else
-
-/*******************************************************************************
- * Inferred Typedefs
- *******************************************************************************/
-
/* Infer the compile environment based on preprocessor symbols and pramas.
* Override type definitions as needed, and include configuration dependent
* header files to define types.
@@ -55,40 +32,15 @@
#define TRUE true
#endif
-#else /* ! __cplusplus */
-
-/* for Windows build, define bool as a uchar instead of the default int */
-#if defined(_WIN32)
-
-#define TYPEDEF_BOOL
-typedef unsigned char bool;
+#endif /* __cplusplus */
-#endif /* _WIN32 */
-
-#endif /* ! __cplusplus */
-
-#ifdef _MSC_VER /* Microsoft C */
-#define TYPEDEF_INT64
-#define TYPEDEF_UINT64
-typedef signed __int64 int64;
-typedef unsigned __int64 uint64;
-#endif
-
-#if defined(MACOSX) && defined(KERNEL)
-#define TYPEDEF_BOOL
+#if defined(_NEED_SIZE_T_)
+typedef long unsigned int size_t;
#endif
-
-#if defined(linux)
#define TYPEDEF_UINT
#define TYPEDEF_USHORT
#define TYPEDEF_ULONG
-#endif
-
-#if !defined(linux) && !defined(_WIN32) && !defined(PMON) && !defined(_CFE_)
-#define TYPEDEF_UINT
-#define TYPEDEF_USHORT
-#endif
/* Do not support the (u)int64 types with strict ansi for GNU C */
@@ -97,57 +49,29 @@ typedef unsigned __int64 uint64;
#define TYPEDEF_UINT64
#endif
-/* ICL accepts unsigned 64 bit type only, and complains in ANSI mode
- * for singned or unsigned */
-#if defined(__ICL)
-
-#define TYPEDEF_INT64
-
-#if defined(__STDC__)
-#define TYPEDEF_UINT64
-#endif
-
-#endif /* __ICL */
-
-
-#if !defined(_WIN32) && !defined(PMON) && !defined(_CFE_)
-
/* pick up ushort & uint from standard types.h */
#if defined(linux) && defined(__KERNEL__)
-
#include <linux/types.h> /* sys/types.h and linux/types.h are oil and water */
-
#else
-
-#include <sys/types.h>
-
+#include <sys/types.h>
#endif
-#endif /* !_WIN32 && !PMON && !_CFE_ */
-
-#if defined(MACOSX) && defined(KERNEL)
-#include <IOKit/IOTypes.h>
-#endif
-
-
/* use the default typedefs in the next section of this file */
#define USE_TYPEDEF_DEFAULTS
-#endif /* SITE_TYPEDEFS */
-
-
-/*******************************************************************************
+/*
* Default Typedefs
- *******************************************************************************/
+ *
+ */
#ifdef USE_TYPEDEF_DEFAULTS
#undef USE_TYPEDEF_DEFAULTS
#ifndef TYPEDEF_BOOL
-typedef int bool;
+typedef /* @abstract@ */ unsigned char bool;
#endif
-/*----------------------- define uchar, ushort, uint, ulong ----------------*/
+/* define uchar, ushort, uint, ulong */
#ifndef TYPEDEF_UCHAR
typedef unsigned char uchar;
@@ -165,7 +89,7 @@ typedef unsigned int uint;
typedef unsigned long ulong;
#endif
-/*----------------------- define [u]int8/16/32/64 --------------------------*/
+/* define [u]int8/16/32/64, uintptr */
#ifndef TYPEDEF_UINT8
typedef unsigned char uint8;
@@ -183,6 +107,10 @@ typedef unsigned int uint32;
typedef unsigned long long uint64;
#endif
+#ifndef TYPEDEF_UINTPTR
+typedef unsigned int uintptr;
+#endif
+
#ifndef TYPEDEF_INT8
typedef signed char int8;
#endif
@@ -199,7 +127,7 @@ typedef signed int int32;
typedef signed long long int64;
#endif
-/*----------------------- define float32/64, float_t -----------------------*/
+/* define float32/64, float_t */
#ifndef TYPEDEF_FLOAT32
typedef float float32;
@@ -225,14 +153,14 @@ typedef float64 float_t;
#endif /* TYPEDEF_FLOAT_T */
-/*----------------------- define macro values -----------------------------*/
+/* define macro values */
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
-#define TRUE 1
+#define TRUE 1 /* TRUE */
#endif
#ifndef NULL
@@ -244,13 +172,15 @@ typedef float64 float_t;
#endif
#ifndef ON
-#define ON 1
+#define ON 1 /* ON = 1 */
#endif
-/*----------------------- define PTRSZ, INLINE ----------------------------*/
+#define AUTO (-1) /* Auto = -1 */
+
+/* define PTRSZ, INLINE */
#ifndef PTRSZ
-#define PTRSZ sizeof (char*)
+#define PTRSZ sizeof(char*)
#endif
#ifndef INLINE
@@ -280,6 +210,7 @@ typedef float64 float_t;
#undef TYPEDEF_UINT16
#undef TYPEDEF_UINT32
#undef TYPEDEF_UINT64
+#undef TYPEDEF_UINTPTR
#undef TYPEDEF_INT8
#undef TYPEDEF_INT16
#undef TYPEDEF_INT32
@@ -290,4 +221,10 @@ typedef float64 float_t;
#endif /* USE_TYPEDEF_DEFAULTS */
+/*
+ * Including the bcmdefs.h here, to make sure everyone including typedefs.h
+ * gets this automatically
+*/
+#include <bcmdefs.h>
+
#endif /* _TYPEDEFS_H_ */