misc/136386: Can the following bluez macros be added to bluetooth.h

Monty Hall monty_hall at rastar.merseine.nu
Mon Jul 6 18:40:01 UTC 2009


>Number:         136386
>Category:       misc
>Synopsis:       Can the following bluez macros be added to bluetooth.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 06 18:40:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Monty Hall
>Release:        7.2
>Organization:
>Environment:
FreeBSD XXX 7.2-STABLE FreeBSD 7.2-STABLE #2: Mon Jun  8 19:06:28 EDT 2009     root at YYY:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
I'm porting some linux bluetooth software and have run into the macros, show below, several times.  Currently a few bluez macros are in bluetooth.h. I was wondering if the following can be added as well.
>How-To-Repeat:

>Fix:
bluetooth.h

/* 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

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list