Bluetooth & bluez

monty_hall

Member

Reaction score: 5
Messages: 43

bluetooth.h already has a few macros for linux bluez compatibility. How do I request the following bluez macros be added? (this is straight out of bluez's bluetooth.h). I'm porting some Linux Bluetooth software, and find heavy use of these macros.

Monty
Code:
/* Byte order conversions */
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htobs(d)  (d)
#define htobl(d)  (d)
#define btohs(d)  (d)
#define btohl(d)  (d)
#elif __BYTE_ORDER == __BIG_ENDIAN
#define htobs(d)  bswap_16(d)
#define htobl(d)  bswap_32(d)
#define btohs(d)  bswap_16(d)
#define btohl(d)  bswap_32(d)
#else
#error "Unknown byte order"
#endif
 

BrockyL

New Member


Messages: 10

There are already those specific macros, you just need to find them in /usr/include/sys and add them to the include, and make sure your automake is either cross/compiling or not to the proper architecture.
 
Top