From owner-freebsd-bugs Wed Sep 25 14: 0:31 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01B7E37B404 for ; Wed, 25 Sep 2002 14:00:29 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0412B43E77 for ; Wed, 25 Sep 2002 14:00:27 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8PL0RCo024619 for ; Wed, 25 Sep 2002 14:00:27 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8PL0RNS024618; Wed, 25 Sep 2002 14:00:27 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DD44D37B401 for ; Wed, 25 Sep 2002 13:58:34 -0700 (PDT) Received: from fump.kawo2.rwth-aachen.de (fump.kawo2.RWTH-Aachen.DE [134.130.181.148]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14A0E43E4A for ; Wed, 25 Sep 2002 13:58:34 -0700 (PDT) (envelope-from alex@fump.kawo2.rwth-aachen.de) Received: from fump.kawo2.rwth-aachen.de (localhost [127.0.0.1]) by fump.kawo2.rwth-aachen.de (8.12.5/8.12.5) with ESMTP id g8PKxku6042715 for ; Wed, 25 Sep 2002 22:59:46 +0200 (CEST) (envelope-from alex@fump.kawo2.rwth-aachen.de) Received: (from alex@localhost) by fump.kawo2.rwth-aachen.de (8.12.5/8.12.5/Submit) id g8PKxjMs042714; Wed, 25 Sep 2002 22:59:45 +0200 (CEST) Message-Id: <200209252059.g8PKxjMs042714@fump.kawo2.rwth-aachen.de> Date: Wed, 25 Sep 2002 22:59:45 +0200 (CEST) From: Alexander Langer To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/43372: Broken struct ufs_args in ufsmount.h Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 43372 >Category: bin >Synopsis: Broken struct ufs_args in ufsmount.h >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 25 14:00:08 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Alexander Langer >Release: FreeBSD 5.0-CURRENT i386 >Organization: none >Environment: FreeBSD FreeBSD 5.0-CURRENT #11: Wed Sep 11 16:45:23 CEST 2002 i386 >Description: ufsmount.h is broken for C++. It uses a reserved keyword "export" for a member of the struct ufs_args: struct ufs_args { char *fspec; /* block special device to mount */ struct export_args export; /* network export information */ }; alex@zerogravity ~ $ cat ufsmount.cc extern "C" { #include #include #include } alex@zerogravity ~ $ c++ --version c++ (GCC) 3.2.1 [FreeBSD] 20020901 (prerelease) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. alex@zerogravity ~ $ cc -c ufsmount.cc In file included from ufsmount.cc:4: /usr/include/ufs/ufs/ufsmount.h:45: syntax error before `export' >How-To-Repeat: see above >Fix: As a workaround, you can #define export _export before you include ufsmount.h, and undefine it later. This is an ugly hack, but working for certain uses. A real fix is to proberly name the member of the struct. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message