Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2000 07:38:10 -0500
From:      "Jim King" <king@sstar.com>
To:        "Graham Wheeler" <gram@cequrux.com>, <freebsd-stable@freebsd.org>
Subject:   Re: Any chance of changing struct member names in nameser.h?
Message-ID:  <00ce01bfe810$36da2510$08e48486@marble>
References:  <24c7bf729bd71b904dba8ca2d38e3205@cequrux.com> <18a82ff8d91179d356d8037283bdd5d8@cequrux.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Graham Wheeler wrote:

> Graham Wheeler wrote:
> >
> > Hi all
> >
> > I send a similar request to the KAME group a while back but got no
> > response.
> >
> > Recent versions of BIND have changed the name of one of the structure
> > members in nameser.h to be "class".
>
> Actually, I was wronng - the nameser.h in contrib/bind is fine. But the
> one in include/arpa/nameser.h is not, so this *is* specific to
> FreeBSD/KAME...


imho, the right way to handle this is in your source, using an 'extern "C"'
directive to tell the compiler that it's including a C header and not a C++
header.  e.g.

extern "C" {
#include <header_with_cpp_bogons.h>
}

If the #include directive is in another header file that might be used in
both C and C++ programs you'd probably want to put some '#ifdef __cplusplus'
around the extern's.  See section 9.2.4 in Stroustrup 3rd edition for a good
example.

Jim




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00ce01bfe810$36da2510$08e48486>