Use standard C99 integral types. This offers better type safety.
Notice that I had to change a couple of function declarations
because the compiler caught the inconsistency with the new typedefs.
Change-Id: I202fd1dc086de41e1cfe083eb1a5f74a942d01e5
diff --git a/gki/ulinux/data_types.h b/gki/ulinux/data_types.h
index 2c4347b..e9d5097 100644
--- a/gki/ulinux/data_types.h
+++ b/gki/ulinux/data_types.h
@@ -19,51 +19,46 @@
#ifndef DATA_TYPES_H
#define DATA_TYPES_H
+#include <stdint.h>
+#include <stdbool.h>
+
#ifndef NULL
-#define NULL 0
+# define NULL (void *)0
#endif
#ifndef FALSE
-#define FALSE 0
+# define FALSE false
#endif
-typedef unsigned char UINT8;
-typedef unsigned short UINT16;
-typedef unsigned long UINT32;
-typedef unsigned long long UINT64;
+#ifndef TRUE
+# define TRUE true
+#endif
-typedef signed long INT32;
-typedef signed char INT8;
-typedef signed short INT16;
-typedef unsigned char BOOLEAN;
+typedef uint8_t UINT8;
+typedef uint16_t UINT16;
+typedef uint32_t UINT32;
+typedef uint64_t UINT64;
+typedef int8_t INT8;
+typedef int16_t INT16;
+typedef int32_t INT32;
+typedef bool BOOLEAN;
typedef UINT32 TIME_STAMP;
-#ifndef TRUE
-#define TRUE (!FALSE)
-#endif
-
-typedef unsigned char UBYTE;
-
#ifdef __arm
-#define PACKED __packed
-#define INLINE __inline
+# define PACKED __packed
+# define INLINE __inline
#else
-#define PACKED
-#define INLINE
+# define PACKED
+# define INLINE
#endif
-#define UINT16_LOW_BYTE(x) ((x) & 0xff)
-#define UINT16_HI_BYTE(x) ((x) >> 8)
+#ifndef BIG_ENDIAN
+#define BIG_ENDIAN FALSE
+#endif
-
-#define BCM_STRCAT_S(x1,x2,x3) strcat((x1),(x3))
-#define BCM_STRNCAT_S(x1,x2,x3,x4) strncat((x1),(x3),(x4))
#define BCM_STRCPY_S(x1,x2,x3) strcpy((x1),(x3))
#define BCM_STRNCPY_S(x1,x2,x3,x4) strncpy((x1),(x3),(x4))
-
-
#endif
-
diff --git a/stack/btm/btm_ble_gap.c b/stack/btm/btm_ble_gap.c
index 608fa7e..39f344c 100644
--- a/stack/btm/btm_ble_gap.c
+++ b/stack/btm/btm_ble_gap.c
@@ -55,7 +55,7 @@
BD_ADDR_PTR p_addr_ptr,
tBLE_ADDR_TYPE *p_init_addr_type,
tBLE_ADDR_TYPE *p_own_addr_type);
-static BOOLEAN btm_ble_start_adv(void);
+static tBTM_STATUS btm_ble_start_adv(void);
static tBTM_STATUS btm_ble_stop_adv(void);
diff --git a/stack/include/l2c_api.h b/stack/include/l2c_api.h
index 7679d26..0da7f79 100644
--- a/stack/include/l2c_api.h
+++ b/stack/include/l2c_api.h
@@ -647,7 +647,7 @@
** Returns TRUE if valid Channel, else FALSE
**
*******************************************************************************/
-L2C_API extern BOOLEAN L2CA_SendTestSFrame (UINT16 cid, BOOLEAN rr_or_rej,
+L2C_API extern BOOLEAN L2CA_SendTestSFrame (UINT16 cid, UINT8 sup_type,
UINT8 back_track);
/*******************************************************************************