Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Oct 2009 16:58:10 +0000
From:      Masoom Shaikh <masoom.shaikh@gmail.com>
To:        Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: bluetooth.h, c++ include error
Message-ID:  <b10011eb0910050958j49eed45diee0c36f3947f094@mail.gmail.com>
In-Reply-To: <bb4a86c70910041126r3bfb7cc5w71281fb3b5f8ccd@mail.gmail.com>
References:  <b10011eb0910011142p480deee4j220ebb41623f58e0@mail.gmail.com> <b10011eb0910011232r13ddb42axd97a65b3cb025de9@mail.gmail.com> <b10011eb0910041042r7edd20afhf5ec42e652514b81@mail.gmail.com> <bb4a86c70910041126r3bfb7cc5w71281fb3b5f8ccd@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 4, 2009 at 6:26 PM, Maksim Yevmenkin <maksim.yevmenkin@gmail.com
> wrote:

> On Sun, Oct 4, 2009 at 10:42 AM, Masoom Shaikh <masoom.shaikh@gmail.com>
> 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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b10011eb0910050958j49eed45diee0c36f3947f094>