From owner-freebsd-bugs Sat Jan 8 3:10: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 7EAEA152CE for ; Sat, 8 Jan 2000 03:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id DAA74875; Sat, 8 Jan 2000 03:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 0394814CC1; Sat, 8 Jan 2000 03:09:14 -0800 (PST) Message-Id: <20000108110914.0394814CC1@hub.freebsd.org> Date: Sat, 8 Jan 2000 03:09:14 -0800 (PST) From: afo@zlug.org To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/15983: C++ keywords in kernel header files Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 15983 >Category: kern >Synopsis: C++ keywords in kernel header files >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: Sat Jan 8 03:10:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Andre Fornacon >Release: FreeBSD 3.3R >Organization: zLUG >Environment: FreeBSD rox.zlug.org 3.3-RELEASE FreeBSD 3.3-RELEASE #16: Fri Jan 7 18:52:41 CET 2000 root@rox.zlug.org:/usr/src/sys/compile/ROX i386 >Description: use of c++ keyword 'class' in kernel header file dev/sub/usb.h, around line 496 in struct usb_device_info i this need this header file for application programming. problem affects current kernel source - cvsup'd 2000/01/08 - too i hope the included patch catches all access of the class field of struct usb_device_info >How-To-Repeat: compile the following sample code with g++ -I/src/sys/dev -c main.c: -- begin main.c -- #include -- end main.c -- compile gives: In file included from main.c:1: /usr/src/sys/dev/usb/usb.h:476: parse error before `;' >Fix: cvs diff: Diffing . Index: usb.h =================================================================== RCS file: /home/FreeBSD/CURRENT/src/sys/dev/usb/usb.h,v retrieving revision 1.17 diff -u -r1.17 usb.h --- usb.h 1999/12/29 04:35:47 1.17 +++ usb.h 2000/01/01 18:16:27 @@ -489,7 +489,7 @@ u_int16_t productNo; /* idProduct */ u_int16_t vendorNo; /* idVendor */ u_int16_t releaseNo; /* bcdDevice */ - u_int8_t class; /* bDeviceClass */ + u_int8_t clazz; /* bDeviceClass */ u_int8_t subclass; /* bDeviceSubclass */ u_int8_t protocol; /* bDeviceProtocol */ u_int8_t config; /* config index */ Index: usb_subr.c =================================================================== RCS file: /home/FreeBSD/CURRENT/src/sys/dev/usb/usb_subr.c,v retrieving revision 1.21 diff -u -r1.21 usb_subr.c --- usb_subr.c 1999/12/03 08:41:11 1.21 +++ usb_subr.c 2000/01/08 11:53:17 @@ -1160,7 +1160,7 @@ di->vendorNo = UGETW(dev->ddesc.idVendor); di->productNo = UGETW(dev->ddesc.idProduct); di->releaseNo = UGETW(dev->ddesc.bcdDevice); - di->class = dev->ddesc.bDeviceClass; + di->clazz = dev->ddesc.bDeviceClass; di->subclass = dev->ddesc.bDeviceSubClass; di->protocol = dev->ddesc.bDeviceProtocol; di->config = dev->config; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message