From nobody@FreeBSD.org  Mon Jul  6 18:33:53 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 543341065675
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  6 Jul 2009 18:33:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 42C218FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  6 Jul 2009 18:33:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n66IXqCj076525
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 6 Jul 2009 18:33:52 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n66IXqYQ076524;
	Mon, 6 Jul 2009 18:33:52 GMT
	(envelope-from nobody)
Message-Id: <200907061833.n66IXqYQ076524@www.freebsd.org>
Date: Mon, 6 Jul 2009 18:33:52 GMT
From: Monty Hall <kungfu_disciple@sbcglobal.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Can the following bluez macros be added to bluetooth.h
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         136386
>Category:       kern
>Synopsis:       [bluetooth] [headers] [request] Can the following bluez macros be added to bluetooth.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bluetooth
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 06 18:40:00 UTC 2009
>Closed-Date:    Wed Sep 29 18:43:11 UTC 2010
>Last-Modified:  Wed Sep 29 18:50:01 UTC 2010
>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@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:

From: monty hall <kungfu_disciple@sbcglobal.net>
To: bug-followup@FreeBSD.org,  monty_hall@rastar.merseine.nu
Cc:  
Subject: Re: kern/136386: [headers] [request] Can the following bluez macros
 be added to bluetooth.h
Date: Wed, 08 Jul 2009 09:42:52 -0400

 Please use: kungfu_disciple@sbcglobal.net
Responsible-Changed-From-To: freebsd-bugs->freebsd-bluetooth 
Responsible-Changed-By: arundel 
Responsible-Changed-When: Wed Sep 22 23:06:44 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136386 
State-Changed-From-To: open->patched 
State-Changed-By: emax 
State-Changed-When: Wed Sep 22 23:41:52 UTC 2010 
State-Changed-Why:  
fix committed to head 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136386 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/136386: commit references a PR
Date: Wed, 22 Sep 2010 23:41:07 +0000 (UTC)

 Author: emax
 Date: Wed Sep 22 23:41:02 2010
 New Revision: 213042
 URL: http://svn.freebsd.org/changeset/base/213042
 
 Log:
   Add the following Linux BlueZ compatibility macros: htobs(), htobl(),
   btohs() and btohl()
   
   PR:		kern/136386
   Submitted by:	Monty Hall < kungfu_disciple at sbcglobal dot net >
   MFC after:	1 week
 
 Modified:
   head/lib/libbluetooth/bluetooth.h
 
 Modified: head/lib/libbluetooth/bluetooth.h
 ==============================================================================
 --- head/lib/libbluetooth/bluetooth.h	Wed Sep 22 22:17:39 2010	(r213041)
 +++ head/lib/libbluetooth/bluetooth.h	Wed Sep 22 23:41:02 2010	(r213042)
 @@ -59,6 +59,10 @@ __BEGIN_DECLS
  #define	bacpy(dst, src)	memcpy((dst), (src), sizeof(bdaddr_t))
  #define ba2str(ba, str)	bt_ntoa((ba), (str))
  #define str2ba(str, ba)	(bt_aton((str), (ba)) == 1? 0 : -1)
 +#define htobs(d)	htole16(d)
 +#define htobl(d)	htole32(d)
 +#define btohs(d)	le16toh(d)
 +#define btohl(d)	le32toh(d)
  
  /*
   * Interface to the outside world
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: emax 
State-Changed-When: Wed Sep 29 18:42:32 UTC 2010 
State-Changed-Why:  
Fixed in CURRENT and RELENG_8 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136386 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/136386: commit references a PR
Date: Wed, 29 Sep 2010 18:41:53 +0000 (UTC)

 Author: emax
 Date: Wed Sep 29 18:41:47 2010
 New Revision: 213276
 URL: http://svn.freebsd.org/changeset/base/213276
 
 Log:
   MFC Revision: 213042
   
   Add the following Linux BlueZ compatibility macros: htobs(), htobl(),
   btohs() and btohl()
   
   PR:		kern/136386
   Submitted by:	Monty Hall < kungfu_disciple at sbcglobal dot net >
 
 Modified:
   stable/8/lib/libbluetooth/bluetooth.h
 Directory Properties:
   stable/8/lib/libbluetooth/   (props changed)
 
 Modified: stable/8/lib/libbluetooth/bluetooth.h
 ==============================================================================
 --- stable/8/lib/libbluetooth/bluetooth.h	Wed Sep 29 14:46:57 2010	(r213275)
 +++ stable/8/lib/libbluetooth/bluetooth.h	Wed Sep 29 18:41:47 2010	(r213276)
 @@ -59,6 +59,10 @@ __BEGIN_DECLS
  #define	bacpy(dst, src)	memcpy((dst), (src), sizeof(bdaddr_t))
  #define ba2str(ba, str)	bt_ntoa((ba), (str))
  #define str2ba(str, ba)	(bt_aton((str), (ba)) == 1? 0 : -1)
 +#define htobs(d)	htole16(d)
 +#define htobl(d)	htole32(d)
 +#define btohs(d)	le16toh(d)
 +#define btohl(d)	le32toh(d)
  
  /*
   * Interface to the outside world
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
