From owner-cvs-src-old@FreeBSD.ORG Fri Jun 10 20:11:26 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27EAC106564A for ; Fri, 10 Jun 2011 20:11:26 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 13CF08FC24 for ; Fri, 10 Jun 2011 20:11:26 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p5AKBPQq064796 for ; Fri, 10 Jun 2011 20:11:25 GMT (envelope-from gibbs@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p5AKBP1x064795 for cvs-src-old@freebsd.org; Fri, 10 Jun 2011 20:11:25 GMT (envelope-from gibbs@repoman.freebsd.org) Message-Id: <201106102011.p5AKBP1x064795@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to gibbs@repoman.freebsd.org using -f From: "Justin T. Gibbs" Date: Fri, 10 Jun 2011 20:10:30 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/cddl/compat/opensolaris/include assert.h src/sys/cddl/compat/opensolaris/sys kstat.h src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys arc.h ddt.h dsl_pool.h spa.h zfs_ioctl.h zio.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2011 20:11:26 -0000 gibbs 2011-06-10 20:10:30 UTC FreeBSD src repository Modified files: cddl/compat/opensolaris/include assert.h sys/cddl/compat/opensolaris/sys kstat.h sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys arc.h ddt.h dsl_pool.h spa.h zfs_ioctl.h zio.h Log: SVN rev 222950 on 2011-06-10 20:10:30Z by gibbs Remove C constructs that are incompatible with C++ from various OpenSolaris and ZFS header files. These changes are sufficient to allow a C++ program to use the libzfs library. Note: The majority of these files already included 'extern "C"' declarations, so the intention of providing C++ compatibility already existed even if it wasn't provided. cddl/compat/opensolaris/include/assert.h: Wrap our compatibility assert implementation in 'extern "C"'. Since this is a compatibility header I matched the Solaris style of doing this explicitly rather than rely on FreeBSD's __BEGIN/END_DECLS macro. sys/cddl/compat/opensolaris/sys/kstat.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h: Rename parameters in function declarations that conflict with C++ keywords. This was the solution preferred by members of the Illumos community. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h: In C, nested structures are visible in the global namespace, but in C++, they take on the namespace of the structure in which they are contained. Flatten nested structure definitions within struct zfs_cmd so these structures are visible in the global namespace when compiled in both languages. Sponsored by: Spectra Logic Corporation Revision Changes Path 1.2 +9 -0 src/cddl/compat/opensolaris/include/assert.h 1.3 +2 -2 src/sys/cddl/compat/opensolaris/sys/kstat.h 1.9 +6 -6 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h 1.2 +6 -6 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h 1.8 +2 -2 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h 1.9 +1 -1 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h 1.8 +89 -73 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h 1.13 +12 -11 src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h