From owner-freebsd-stable Fri Jul 7 7:39:23 2000 Delivered-To: freebsd-stable@freebsd.org Received: from raditex.se (gandalf.raditex.se [192.5.36.18]) by hub.freebsd.org (Postfix) with ESMTP id 09C3437C212 for ; Fri, 7 Jul 2000 07:39:14 -0700 (PDT) (envelope-from kaj@raditex.se) Received: (from kaj@localhost) by raditex.se (8.9.3/8.9.3) id QAA37435; Fri, 7 Jul 2000 16:39:05 +0200 (CEST) (envelope-from kaj@raditex.se) X-Authentication-Warning: frodo.sickla.raditex.se: kaj set sender to kaj@raditex.se using -f To: "Jim King" Cc: "Thomas David Rivers" , , Subject: Re: Any chance of changing struct member names in nameser.h? References: <200007071320.JAA86645@lakes.dignus.com> <003d01bfe81e$553eb8a0$a44b8486@jking> From: Rasmus Kaj Cc: Rasmus Kaj Organization: Raditex AB - http://Raditex.se/ X-Face: M9cR~WYav<"fu%MaslX0`43PAYY?uIsM8[#E(0\Xuy9rj>4gE\h3jm.7DD?]R8*^7T\o&vT U@[53Dwkuup4[0@gw#~kyu>`unH?kVj9CJa02(h>Ki\+i=%rn%sDf^KC.!?IHkKjMAbkd\jgmphp^' d|Q;OeXEAhq?ybGqOs1CHb6TJT42'C`Krnk61//AOfXtNjj/t'`5>Vw0QX!dKfOL$.f+S"LIuwR<;I Z0Qnnx(F^F]o@*V%TUtEV'1Z[TkOl^FFV9Z~A[b19%}uP*,huCU Date: 07 Jul 2000 16:39:05 +0200 In-Reply-To: "Jim King"'s message of "Fri, 7 Jul 2000 09:19:10 -0500" Message-ID: <847layqa2e.fsf@frodo.sickla.raditex.se> Lines: 38 User-Agent: Gnus/5.0806 (Gnus v5.8.6) XEmacs/20.4 (Emerald) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >>>>> "JK" == Jim King writes: >> > > extern "C" { >> > > #include >> > > } JK> You're right, my bad. Son of a gun, I've used 'extern "C"' for gobs of JK> stuff but I guess I never ran into C header files that had C++ reserved JK> words. JK> In that case, although it's considerably more work I'd take a look at JK> writing some C wrappers around the offending stuff. You could write the JK> wrappers such that they'd compile with the offending include file, and be JK> callable from C++. Sounds tedious and time consuming, but it might be JK> quicker than waiting for someone to fix the headers in question. Here's something that *might* work: extern "C" { // For function definitions #define class c_class #include #undef class } After this, you just use the struct as usual, but call the class field c_class in your source. The name shouldn't matter, since it's just an offset in the struct anyway ... Of course, it woulde be better to have the bad header fixed, but as Jim says, that probably will take some time ... If the bad header uses any other words that is reserved in C++, they can be handled in the same way ... -- Rasmus Kaj -------------------- rasmus@kaj.se - http://Raditex.se/~kaj/ \ Pro is to con as progress is to Congress \------------------------------------------------- http://Raditex.se/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message