From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 29 17:50:11 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85B4E106566C for ; Wed, 29 Feb 2012 17:50:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 62FEC8FC1C for ; Wed, 29 Feb 2012 17:50:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1THoBtH015941 for ; Wed, 29 Feb 2012 17:50:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q1THoBtm015940; Wed, 29 Feb 2012 17:50:11 GMT (envelope-from gnats) Resent-Date: Wed, 29 Feb 2012 17:50:11 GMT Resent-Message-Id: <201202291750.q1THoBtm015940@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Jim C." Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33B5B106564A for ; Wed, 29 Feb 2012 17:46:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 22F6F8FC13 for ; Wed, 29 Feb 2012 17:46:38 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q1THkb9u044908 for ; Wed, 29 Feb 2012 17:46:37 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q1THkbc6044907; Wed, 29 Feb 2012 17:46:37 GMT (envelope-from nobody) Message-Id: <201202291746.q1THkbc6044907@red.freebsd.org> Date: Wed, 29 Feb 2012 17:46:37 GMT From: "Jim C." To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/165559: ufsmount.h uses the 'export' keyword as a structure member name X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Feb 2012 17:50:11 -0000 >Number: 165559 >Category: kern >Synopsis: ufsmount.h uses the 'export' keyword as a structure member name >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Feb 29 17:50:11 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Jim C. >Release: 8.2-RELEASE-p4 >Organization: Carroll-Net, Inc. >Environment: FreeBSD bv601.hck.carroll.com 8.2-RELEASE-p4 FreeBSD 8.2-RELEASE-p4 #0: Fri Nov 18 15:50:11 EST 2011 >Description: While compiling some GNU C++ code against the include file /usr/include/ufs/ufs/ufsmount.h, we discovered the ufs_args structure has a member variable named 'export'. G++ chokes with the following error: /usr/include/ufs/ufs/ufsmount.h:43: error: expected unqualified-id before 'export' The reason is that the term 'export' is a reserved, but presently unused keyword in the C++ language. To solve our problem, we've copied the header locally to our project folder, and renamed the reference. But if possible, I was hoping this could be folded back into the main tree. I recognize this could present a breaking change for any projects that link against libufs -- but sooner or later this change will need to be accepted or someone is going to have to convince the folks at GNU/C++ to add a compiler directive to ignore the 'export' keyword (fyi -- I checked, but so far this looks like a no go). FYI -- the folks at the openssl project encountered had a similar problem and eventually they were forced to just rename the member variable. >How-To-Repeat: Create my.cpp, paste in #include #include #include #include #include #include g++ -c my.cpp ~ ~ >Fix: --- ufsmount.h 2012-02-29 12:33:04.000000000 -0500 +++ /usr/include/ufs/ufs/ufsmount.h 2012-02-29 12:32:28.000000000 -0500 @@ -40,7 +40,7 @@ */ struct ufs_args { char *fspec; /* block special device to mount */ - struct oexport_args export_; /* network export information */ + struct oexport_args export; /* network export information */ }; #ifdef _KERNEL >Release-Note: >Audit-Trail: >Unformatted: