From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 24 02:00:13 2015 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B42AE489; Sat, 24 Jan 2015 02:00:13 +0000 (UTC) Received: from m.saper.info (m.saper.info [IPv6:2a01:4f8:a0:7383::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "m.saper.info", Issuer "Marcin Cieslak 2011" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 303BB3B0; Sat, 24 Jan 2015 02:00:12 +0000 (UTC) Received: from m.saper.info (saper@localhost [127.0.0.1]) by m.saper.info (8.14.9/8.14.9) with ESMTP id t0O209rO076242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 24 Jan 2015 02:00:10 GMT (envelope-from saper@saper.info) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=saper.info; s=Sep2014; t=1422064810; bh=L+9s04eKJ+NwIh4fV3XI6h9/jJl6H0IfkMPqyWaJUZU=; h=Date:From:To:Subject; b=TpoE9UgZ/uiKIpeH2qi5rEErv+Md4tbWuRLcjO0rPz3nJnaG3KYddzOCI8Ti1TBkW xZAzjDBjMl9UJvE4qavl+U1jd6bunurKG5RB4iFDjDkWK/LgcLuUEOmCcggUaHGiQ7 Dp2ngrv1fO1ZZi2kDwpeXNZsLQfCoUa3wm/35dVQ= Received: from localhost (saper@localhost) by m.saper.info (8.14.9/8.14.9/Submit) with ESMTP id t0O209xa076239; Sat, 24 Jan 2015 02:00:09 GMT (envelope-from saper@saper.info) X-Authentication-Warning: m.saper.info: saper owned process doing -bs Date: Sat, 24 Jan 2015 02:00:09 +0000 From: Marcin Cieslak To: freebsd-hackers@FreeBSD.org, pjd@FreeBSD.org Subject: Do I need in ? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 02:00:13 -0000 I am trying to write a GEOM gate module in C++ - for the project that is already written 100% in C++ .... Unfortunately, trying to #include fails: In file included from GEOMGate.cpp:1: In file included from /usr/include/geom/gate/g_gate.h:37: /usr/include/geom/geom.h:118:21: error: expected ';' after struct LIST_ENTRY(g_class) class; ^ /usr/include/geom/geom.h:118:22: error: declaration of anonymous class must be a definition LIST_ENTRY(g_class) class; ^ /usr/include/geom/geom.h:131:19: error: expected member name or ';' after declaration specifiers struct g_class *class; ~~~~~~ ^ /usr/include/geom/geom.h:186:10: error: expected member name or ';' after declaration specifiers void *private; ~~~~ ^ /usr/include/geom/geom.h:215:10: error: expected member name or ';' after declaration specifiers void *private; ~~~~ ^ I think C++ does not like using "class" in this context. One idea would be to get rid of this word in ; but I also noticed that including in does not seem necessary at all (as this is the userland interface). At least our sample ggate userland programs compile fine without it, and ggate kernel module includes separately. Would that be ok to remove seemingly unnecessary include directive? //Marcin [1] http://thread.gmane.org/gmane.os.freebsd.devel.hackers/52098