diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-10-02 03:07:51 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-10-02 03:07:51 +0000 |
commit | b6f447b44cefaab49790b85869c019df88950311 (patch) | |
tree | 767acbca7ca3bcb31ee2da9624b3ccd276862699 | |
parent | 01c4c2ef8970342795244c5c97b44f6993713a9c (diff) | |
download | FreeBSD-src-b6f447b44cefaab49790b85869c019df88950311.zip FreeBSD-src-b6f447b44cefaab49790b85869c019df88950311.tar.gz |
Use __BEGIN_DECLS and __END_DECLS around userland function prototypes
so that mac.h may be more safely included in userland C++ applications.
PR: bin/56595
Submitted by: "KONDOU, Kazuhiro" <kazuhiro@alib.jp>
-rw-r--r-- | sys/security/mac/mac_framework.h | 2 | ||||
-rw-r--r-- | sys/sys/mac.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index a50d269..7955c25a 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -76,6 +76,7 @@ typedef struct mac *mac_t; * Extended non-POSIX.1e interfaces that offer additional services * available from the userland and kernel MAC frameworks. */ +__BEGIN_DECLS int mac_execve(char *fname, char **argv, char **envv, mac_t _label); int mac_free(mac_t _label); int mac_from_text(mac_t *_label, const char *_text); @@ -96,6 +97,7 @@ int mac_set_link(const char *_path, mac_t _label); int mac_set_proc(const mac_t _label); int mac_syscall(const char *_policyname, int _call, void *_arg); int mac_to_text(mac_t mac, char **_text); +__END_DECLS #else /* _KERNEL */ diff --git a/sys/sys/mac.h b/sys/sys/mac.h index a50d269..7955c25a 100644 --- a/sys/sys/mac.h +++ b/sys/sys/mac.h @@ -76,6 +76,7 @@ typedef struct mac *mac_t; * Extended non-POSIX.1e interfaces that offer additional services * available from the userland and kernel MAC frameworks. */ +__BEGIN_DECLS int mac_execve(char *fname, char **argv, char **envv, mac_t _label); int mac_free(mac_t _label); int mac_from_text(mac_t *_label, const char *_text); @@ -96,6 +97,7 @@ int mac_set_link(const char *_path, mac_t _label); int mac_set_proc(const mac_t _label); int mac_syscall(const char *_policyname, int _call, void *_arg); int mac_to_text(mac_t mac, char **_text); +__END_DECLS #else /* _KERNEL */ |