Date: Tue, 28 Mar 2000 22:23:29 -0800 (PST) From: rse@engelschall.com To: freebsd-gnats-submit@FreeBSD.org Subject: misc/17656: <arpa/nameser.h> conflicts with C++ "class" reserverd word Message-ID: <200003290623.WAA80817@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 17656 >Category: misc >Synopsis: <arpa/nameser.h> 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 <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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003290623.WAA80817>