From owner-svn-src-all@FreeBSD.ORG Wed Sep 22 23:41:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F4B5106566C; Wed, 22 Sep 2010 23:41:03 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2B8C8FC1D; Wed, 22 Sep 2010 23:41:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8MNf2Q5047636; Wed, 22 Sep 2010 23:41:02 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8MNf25m047634; Wed, 22 Sep 2010 23:41:02 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201009222341.o8MNf25m047634@svn.freebsd.org> From: Maksim Yevmenkin Date: Wed, 22 Sep 2010 23:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213042 - head/lib/libbluetooth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2010 23:41:03 -0000 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