From 239941a891c4d2ee95919c88e23ce749f90ea1b2 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 16 Aug 2004 10:17:17 +0000 Subject: [PATCH] hcidump: Don't use asm/* includes --- tools/parser/rfcomm.c | 1 - tools/parser/rfcomm.h | 19 +++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tools/parser/rfcomm.c b/tools/parser/rfcomm.c index 46f124161..8629d4ab7 100644 --- a/tools/parser/rfcomm.c +++ b/tools/parser/rfcomm.c @@ -33,7 +33,6 @@ #include #include #include -#include #include diff --git a/tools/parser/rfcomm.h b/tools/parser/rfcomm.h index e5535e917..ac309fd74 100644 --- a/tools/parser/rfcomm.h +++ b/tools/parser/rfcomm.h @@ -27,6 +27,8 @@ #ifndef __RFCOMM_H #define __RFCOMM_H +#include + #define RFCOMM_PSM 3 #define TRUE 1 @@ -112,7 +114,7 @@ #define MCC_CMD 1 /* Multiplexer command */ #define MCC_RSP 0 /* Multiplexer response */ -#ifdef __LITTLE_ENDIAN_BITFIELD +#if __BYTE_ORDER == __LITTLE_ENDIAN typedef struct parameter_mask{ uint8_t bit_rate:1; @@ -151,7 +153,7 @@ typedef struct rpn_values{ parameter_mask pm; } __attribute__ ((packed)) rpn_values; -#elif defined(__BIG_ENDIAN_BITFIELD) +#elif __BYTE_ORDER == __BIG_ENDIAN typedef struct parameter_mask{ uint8_t res1:1; @@ -195,15 +197,15 @@ typedef struct rpn_values{ parameter_mask pm; } __attribute__ ((packed)) rpn_values; -#else /* __XXX_BITFIELD */ -#error Processor endianness unknown! +#else +#error "Unknown byte order" #endif /* Typedefinitions of stuctures used for creating and parsing packets, for a * further description of the structures please se the bluetooth core * specification part F:1 and the ETSI TS 07.10 specification */ -#ifdef __LITTLE_ENDIAN_BITFIELD +#if __BYTE_ORDER == __LITTLE_ENDIAN typedef struct address_field { uint8_t ea:1; @@ -349,7 +351,7 @@ typedef struct nsc_msg { uint8_t fcs; } __attribute__ ((packed)) nsc_msg; -#elif defined(__BIG_ENDIAN_BITFIELD) +#elif __BYTE_ORDER == __BIG_ENDIAN typedef struct address_field { uint8_t server_chn:5; @@ -489,8 +491,9 @@ typedef struct nsc_msg { uint8_t fcs; } __attribute__ ((packed)) nsc_msg; -#else /* __XXX_ENDIAN */ +#else +#error "Unknown byte order" #error Processor endianness unknown! -#endif /* __XXX_ENDIAN */ +#endif #endif /* __RFCOMM_H */ -- 2.47.3