From owner-freebsd-bluetooth@FreeBSD.ORG Mon Oct 5 16:58:12 2009 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BFB41065788 for ; Mon, 5 Oct 2009 16:58:12 +0000 (UTC) (envelope-from masoom.shaikh@gmail.com) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id 2D82F8FC17 for ; Mon, 5 Oct 2009 16:58:11 +0000 (UTC) Received: by pzk40 with SMTP id 40so3234033pzk.7 for ; Mon, 05 Oct 2009 09:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=4FSS5VA9IBw1DeYSt9+I2pHJoKtz+tDqZg+A7SQsCRo=; b=r3JLoO/y0EbjFs3z/65K27h3e6i5CZf/OOHmBZLssfC9X1tjK6TEgrxA0rvpvMd0gQ F1eqAjtv0GYQEQ9yiQoxpO2OVTVR/QV5z2jPWKPezlb0cAubx2iTCS+pphKhrohf0lbj e1dY7eU18J8i6k+vxbXwTqt81tm7CEAd6wbaA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=l0XEy+9GLVkYJHFSGpc3ZPscguiEtapiaElkwVfT0/Zyvv9SOWb/G3g1T0/FAOtB8B QgjPfcs2v//nPWcwUEbyr+XljDs0xk8LiLNT7tDjHul6DxFJzutEcsw0os5z3C+QQJJW 2aX1hyynPLl95ej0VeiGg/2ZzqWAmxNPlI/CU= MIME-Version: 1.0 Received: by 10.114.2.34 with SMTP id 34mr341643wab.213.1254761890833; Mon, 05 Oct 2009 09:58:10 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Oct 2009 16:58:10 +0000 Message-ID: From: Masoom Shaikh To: Maksim Yevmenkin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-bluetooth@freebsd.org Subject: Re: bluetooth.h, c++ include error X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Oct 2009 16:58:12 -0000 On Sun, Oct 4, 2009 at 6:26 PM, Maksim Yevmenkin wrote: > On Sun, Oct 4, 2009 at 10:42 AM, Masoom Shaikh > wrote: > > posting here after @current and @questions ignored > > > > Hello, > > > > while going through bluetooth.h, I observed > > > > int bt_devfilter(int s, struct bt_devfilter const *new, struct > bt_devfilter > > *old); > > > > this line appears in bluetooth.h @ line # 166, rv197571 > > > > see ? the variable named 'new' will cause trouble to c++ source files > > i honestly believe this is not intentional, c++ programmers will have to > > perform some acrobats to get past this > > > patches are welcome > > thanks, > max > what i am requesting is just variable name change ;-) my tree is at revision 197571, thus the patch i am presenting is also generated against it reject this if you want patch against latest revision renamed second argument of bt_devfilter() from 'new' to 'dfnew'. df for device filter to maintain uniformity renamed third argument from 'old' to 'dfold'. the patch follows Index: bluetooth.h =================================================================== --- bluetooth.h (revision 197571) +++ bluetooth.h (working copy) @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $Id: bluetooth.h,v 1.5 2003/09/14 23:28:42 max Exp $ - * $FreeBSD$ + * $FreeBSD: stable/8/lib/libbluetooth/bluetooth.h 191388 2009-04-22 15:50:03Z emax $ */ #ifndef _BLUETOOTH_H_ @@ -163,8 +163,8 @@ int bt_devsend (int s, uint16_t opcode, void *param, size_t plen); ssize_t bt_devrecv (int s, void *buf, size_t size, time_t to); int bt_devreq (int s, struct bt_devreq *r, time_t to); -int bt_devfilter(int s, struct bt_devfilter const *new, - struct bt_devfilter *old); +int bt_devfilter(int s, struct bt_devfilter const *dfnew, + struct bt_devfilter *dfold); void bt_devfilter_pkt_set(struct bt_devfilter *filter, uint8_t type); void bt_devfilter_pkt_clr(struct bt_devfilter *filter, uint8_t type); int bt_devfilter_pkt_tst(struct bt_devfilter const *filter, uint8_t type);