From owner-freebsd-hackers Tue Feb 19 0: 8: 3 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 6FAFA37B400; Tue, 19 Feb 2002 00:08:00 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 4D363AE2FD; Tue, 19 Feb 2002 00:08:00 -0800 (PST) Date: Tue, 19 Feb 2002 00:08:00 -0800 From: Alfred Perlstein To: Kip Macy Cc: hackers@FreeBSD.ORG, joe@freebsd.org, bde@freebsd.org Subject: Re: usb header not c++ friendly. Message-ID: <20020219080800.GI12136@elvis.mu.org> References: <20020219074842.GH12136@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Kip Macy [020218 23:53] wrote: > > > "struct usb_device_info" has a field "u_int8_t class" this causes > > C++ to barf. any suggestions? > > > Don't use reserved keywords. uh, yeah.... it's not my header. It's the system header it's gonna suck having to write a seperate C file instead of just being able to include my C++ one. Would this be acceptable? Index: usb.h =================================================================== RCS file: /home/ncvs/src/sys/dev/usb/usb.h,v retrieving revision 1.29 diff -u -r1.29 usb.h --- usb.h 16 Feb 2002 00:51:26 -0000 1.29 +++ usb.h 19 Feb 2002 08:13:17 -0000 @@ -593,7 +593,11 @@ u_int16_t productNo; u_int16_t vendorNo; u_int16_t releaseNo; +#ifdef __cplusplus + u_int8_t _class; +#else u_int8_t class; +#endif u_int8_t subclass; u_int8_t protocol; u_int8_t config; -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message