From nobody@FreeBSD.org  Tue Mar 28 22:23:30 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21])
	by hub.freebsd.org (Postfix) with ESMTP id EC2AF37B5CD
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 28 Mar 2000 22:23:29 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.9.3/8.9.2) id WAA80817;
	Tue, 28 Mar 2000 22:23:29 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Message-Id: <200003290623.WAA80817@freefall.freebsd.org>
Date: Tue, 28 Mar 2000 22:23:29 -0800 (PST)
From: rse@engelschall.com
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: <arpa/nameser.h> conflicts with C++ "class" reserverd word
X-Send-Pr-Version: www-1.0

>Number:         17656
>Category:       misc
>Synopsis:       <arpa/nameser.h> conflicts with C++ "class" reserverd word
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 28 22:30:01 PST 2000
>Closed-Date:    Thu Mar 30 13:00:55 PST 2000
>Last-Modified:  Thu Mar 30 13:03:50 PST 2000
>Originator:     Ralf S. Engelschall
>Release:        3.4-RELEASE
>Organization:
>Environment:
FreeBSD en1.engelschall.com 3.4-RELEASE FreeBSD 3.4-RELEASE #6: Sun Jan 30 17:44:46 CET 2000     rse@en1.engelschall.com:/usr/src/sys/compile/EN1  i386
>Description:
I've tried to compile lftp (http://ftp.yars.free.net/projects/lftp/)
and its Resolver.cc includes <arpa/nameser.h>. Because it's a 
C++ source file, the header has to pass the same C++ compiler.
Unfortunately in /usr/include/arpa/nameser.h there
is a definition of ns_rr which contains a field named "class".
This obviously conflicts with the C++ reserved word "class".
I worked around the problem by using "#define class dummy"
and "#undef class" around the "#include <arpa/nameser.h>", of course.
But as a long-term solution one should fix <arpa/nameser.h>,
because it will cause trouble in the future with C++ compilers again.
I think we just can rename the field name, because it is already
used only through accessor macors, here ns_rr_class().
>How-To-Repeat:
include <arpa/nameser.h> in a C++ program.
>Fix:
Rename the field name and adjust the ns_rr_class() macro
accordingly to use new name.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nectar 
State-Changed-When: Thu Mar 30 13:00:55 PST 2000 
State-Changed-Why:  
Duplicate PR, see misc/11670.  
>Unformatted:
