Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2014 14:54:56 +0000 (UTC)
From:      Jonathan Anderson <jonathan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262166 - head/sys/sys
Message-ID:  <201402181454.s1IEsuVN096094@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jonathan
Date: Tue Feb 18 14:54:56 2014
New Revision: 262166
URL: http://svnweb.freebsd.org/changeset/base/262166

Log:
  Add more __BEGIN_DECLS / __END_DECLS to <sys/capability.h>.
  
  capability.h currently only wraps some of its declarations in __BEGIN_DECLS/__END_DECLS, so cap_enter(), cap_sandboxed(), etc. are usable from C++ code but cap_rights_init(), cap_rights_is_valid() etc. are not. This commit fixes this distinction.
  
  Approved by:	rwatson (mentor)
  MFC after:	1 week
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/sys/capability.h

Modified: head/sys/sys/capability.h
==============================================================================
--- head/sys/sys/capability.h	Tue Feb 18 14:53:36 2014	(r262165)
+++ head/sys/sys/capability.h	Tue Feb 18 14:54:56 2014	(r262166)
@@ -315,6 +315,8 @@
 
 #define	CAP_IOCTLS_ALL	SSIZE_MAX
 
+__BEGIN_DECLS
+
 #define	cap_rights_init(...)						\
 	__cap_rights_init(CAP_RIGHTS_VERSION, __VA_ARGS__, 0ULL)
 cap_rights_t *__cap_rights_init(int version, cap_rights_t *rights, ...);
@@ -336,6 +338,8 @@ cap_rights_t *cap_rights_merge(cap_right
 cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
 bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);
 
+__END_DECLS
+
 #ifdef _KERNEL
 
 #include <sys/systm.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402181454.s1IEsuVN096094>