From owner-freebsd-hackers Tue Feb 19 0:13: 3 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx01-a.netapp.com (mx01-a.netapp.com [198.95.226.53]) by hub.freebsd.org (Postfix) with ESMTP id 6E0D537B404 for ; Tue, 19 Feb 2002 00:12:52 -0800 (PST) Received: from frejya.corp.netapp.com (frejya [10.10.20.91]) by mx01-a.netapp.com (8.11.1/8.11.1/NTAP-1.2) with ESMTP id g1J8Cl305535; Tue, 19 Feb 2002 00:12:47 -0800 (PST) Received: from cranford-be.eng (localhost [127.0.0.1]) by frejya.corp.netapp.com (8.12.2/8.12.2/NTAP-1.4) with ESMTP id g1J8Ckr4022997; Tue, 19 Feb 2002 00:12:46 -0800 (PST) Received: from localhost (kmacy@localhost) by cranford-be.eng (8.10.2+Sun/8.10.2) with ESMTP id g1J8Ck117964; Tue, 19 Feb 2002 00:12:46 -0800 (PST) Date: Tue, 19 Feb 2002 00:12:46 -0800 (PST) From: Kip Macy To: Alfred Perlstein Cc: hackers@FreeBSD.ORG, joe@FreeBSD.ORG, bde@FreeBSD.ORG Subject: Re: usb header not c++ friendly. In-Reply-To: <20020219080800.GI12136@elvis.mu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 http://web.netapp.com/engineering/projects/raidv2/testing/global/ > > uh, yeah.... it's not my header. Oh duh, sorry... If you do that then you have to modify all the files including it correspondingly. Will putting an extern "C" { ... } around the file not fix the problem? -Kip > > 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