From fca41b9c6f241edda014e6e9e3a68ca7d2224879 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 29 Aug 2001 17:53:45 +0000 Subject: [PATCH] o src/sys/capability.h provides a number of support macros that are not documented by POSIX.1e, and understand the opaque capability structures. Introduce support in the userland POSIX.1e library for a _CAPABILITY_NEEDMACROS define to remove these macros from the normal namespace, but allow the libc functions to use them. Submitted by: tmm Obtained from: TrustedBSD Project --- lib/libc/posix1e/cap_get_flag.c | 2 ++ lib/libc/posix1e/cap_set_flag.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/libc/posix1e/cap_get_flag.c b/lib/libc/posix1e/cap_get_flag.c index 2f0f221dc6f..3694cbb829c 100644 --- a/lib/libc/posix1e/cap_get_flag.c +++ b/lib/libc/posix1e/cap_get_flag.c @@ -31,7 +31,9 @@ #include #include "namespace.h" +#define _CAPABILITY_NEEDMACROS #include +#undef _CAPABILITY_NEEDMACROS #include "un-namespace.h" #include diff --git a/lib/libc/posix1e/cap_set_flag.c b/lib/libc/posix1e/cap_set_flag.c index dc4244c6ad1..79e438ff486 100644 --- a/lib/libc/posix1e/cap_set_flag.c +++ b/lib/libc/posix1e/cap_set_flag.c @@ -31,7 +31,10 @@ #include #include "namespace.h" +/* need capability.h macros */ +#define _CAPABILITY_NEEDMACROS #include +#undef _CAPABILITY_NEEDMACROS #include "un-namespace.h" #include