From owner-freebsd-bugs Tue Mar 28 22:30: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 41D4E37BC15 for ; Tue, 28 Mar 2000 22:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id WAA82561; Tue, 28 Mar 2000 22:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id EC2AF37B5CD for ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/17656: conflicts with C++ "class" reserverd word Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 17656 >Category: misc >Synopsis: conflicts with C++ "class" reserverd word >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 28 22:30:01 PST 2000 >Closed-Date: >Last-Modified: >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 . 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 ", of course. But as a long-term solution one should fix , 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 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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message