aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Moestl <tmm@FreeBSD.org>2001-04-04 18:00:52 +0000
committerThomas Moestl <tmm@FreeBSD.org>2001-04-04 18:00:52 +0000
commit7bd44e92236dee951d8c692333f2508155592550 (patch)
tree5d922128219676ab149f41475f9d3ad03382c5c7
parentf1f899e390a29bfb85c988ad3a831cbb68a349e9 (diff)
downloadsrc-7bd44e92236dee951d8c692333f2508155592550.tar.gz
src-7bd44e92236dee951d8c692333f2508155592550.zip
Prepare for the inclusion of libposix1e into libc: retire the old
Makefile, add Makefile.inc needed for libc build; add #include "namespace.h"/#include "un-namespace.h" pairs around the includes of sys/acl.h and sys/capability.h, and an additional underscore in front of the functions that will be overridden in libc_r. Approved by: rwatson Obtained from: TrustedBSD Project
Notes
Notes: svn path=/head/; revision=75185
-rw-r--r--lib/libc/posix1e/Makefile.inc (renamed from lib/libc/posix1e/Makefile)10
-rw-r--r--lib/libc/posix1e/acl_calc_mask.c2
-rw-r--r--lib/libc/posix1e/acl_copy.c2
-rw-r--r--lib/libc/posix1e/acl_delete.c4
-rw-r--r--lib/libc/posix1e/acl_delete_entry.c2
-rw-r--r--lib/libc/posix1e/acl_entry.c2
-rw-r--r--lib/libc/posix1e/acl_free.c2
-rw-r--r--lib/libc/posix1e/acl_from_text.c2
-rw-r--r--lib/libc/posix1e/acl_get.c6
-rw-r--r--lib/libc/posix1e/acl_init.c2
-rw-r--r--lib/libc/posix1e/acl_perm.c2
-rw-r--r--lib/libc/posix1e/acl_set.c6
-rw-r--r--lib/libc/posix1e/acl_size.c2
-rw-r--r--lib/libc/posix1e/acl_support.c2
-rw-r--r--lib/libc/posix1e/acl_to_text.c2
-rw-r--r--lib/libc/posix1e/acl_valid.c4
-rw-r--r--lib/libc/posix1e/cap_clear.c2
-rw-r--r--lib/libc/posix1e/cap_dup.c2
-rw-r--r--lib/libc/posix1e/cap_free.c2
-rw-r--r--lib/libc/posix1e/cap_get_fd.c4
-rw-r--r--lib/libc/posix1e/cap_get_file.c2
-rw-r--r--lib/libc/posix1e/cap_get_flag.c2
-rw-r--r--lib/libc/posix1e/cap_get_proc.c2
-rw-r--r--lib/libc/posix1e/cap_init.c2
-rw-r--r--lib/libc/posix1e/cap_set_fd.c4
-rw-r--r--lib/libc/posix1e/cap_set_file.c2
-rw-r--r--lib/libc/posix1e/cap_set_flag.c2
-rw-r--r--lib/libc/posix1e/cap_set_proc.c2
-rw-r--r--lib/libc/posix1e/cap_text.c2
29 files changed, 70 insertions, 12 deletions
diff --git a/lib/libc/posix1e/Makefile b/lib/libc/posix1e/Makefile.inc
index 1e2871f2eae2..fd4d8d14a906 100644
--- a/lib/libc/posix1e/Makefile
+++ b/lib/libc/posix1e/Makefile.inc
@@ -1,9 +1,9 @@
# $FreeBSD$
MAINTAINER= rwatson@FreeBSD.org
-LIB= posix1e
-SHLIB_MAJOR= 2
-SHLIB_MINOR= 0
+
+.PATH: ${.CURDIR}/../libc/posix1e
+
SRCS+= acl_calc_mask.c \
acl_copy.c \
acl_delete.c \
@@ -32,6 +32,8 @@ SRCS+= acl_calc_mask.c \
cap_set_proc.c \
cap_text.c
+.if ${LIB} == "c"
+
MAN= acl.3 \
acl_add_perm.3 \
acl_calc_mask.3 \
@@ -79,4 +81,4 @@ MLINKS+=acl_delete.3 acl_delete_def_file.3 \
acl_valid.3 acl_valid_file_np.3 \
acl_valid.3 acl_valid_fd_np.3
-.include <bsd.lib.mk>
+.endif
diff --git a/lib/libc/posix1e/acl_calc_mask.c b/lib/libc/posix1e/acl_calc_mask.c
index ebacb024395a..d9d93227f14c 100644
--- a/lib/libc/posix1e/acl_calc_mask.c
+++ b/lib/libc/posix1e/acl_calc_mask.c
@@ -27,7 +27,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
diff --git a/lib/libc/posix1e/acl_copy.c b/lib/libc/posix1e/acl_copy.c
index 86a24cc60ae3..972523125df1 100644
--- a/lib/libc/posix1e/acl_copy.c
+++ b/lib/libc/posix1e/acl_copy.c
@@ -27,7 +27,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
#include <string.h>
diff --git a/lib/libc/posix1e/acl_delete.c b/lib/libc/posix1e/acl_delete.c
index 36d50afe1a8a..2f5205d8a954 100644
--- a/lib/libc/posix1e/acl_delete.c
+++ b/lib/libc/posix1e/acl_delete.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <sys/errno.h>
int
@@ -53,5 +55,5 @@ int
acl_delete_fd_np(int filedes, acl_type_t type)
{
- return (__acl_delete_fd(filedes, type));
+ return (___acl_delete_fd(filedes, type));
}
diff --git a/lib/libc/posix1e/acl_delete_entry.c b/lib/libc/posix1e/acl_delete_entry.c
index d1f25d280b6e..e961ab269c2a 100644
--- a/lib/libc/posix1e/acl_delete_entry.c
+++ b/lib/libc/posix1e/acl_delete_entry.c
@@ -29,7 +29,9 @@
/* acl_delete_entry() - delete an ACL entry from an ACL */
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
#include <string.h>
diff --git a/lib/libc/posix1e/acl_entry.c b/lib/libc/posix1e/acl_entry.c
index a8755e9814af..47d66f698dfd 100644
--- a/lib/libc/posix1e/acl_entry.c
+++ b/lib/libc/posix1e/acl_entry.c
@@ -27,7 +27,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
#include <stdlib.h>
diff --git a/lib/libc/posix1e/acl_free.c b/lib/libc/posix1e/acl_free.c
index ab73018404a7..9dd9ee907df0 100644
--- a/lib/libc/posix1e/acl_free.c
+++ b/lib/libc/posix1e/acl_free.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <sys/errno.h>
#include <stdlib.h>
diff --git a/lib/libc/posix1e/acl_from_text.c b/lib/libc/posix1e/acl_from_text.c
index a772024b721f..8b4733860609 100644
--- a/lib/libc/posix1e/acl_from_text.c
+++ b/lib/libc/posix1e/acl_from_text.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <sys/errno.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/lib/libc/posix1e/acl_get.c b/lib/libc/posix1e/acl_get.c
index 00a1928b109c..2d5ebff0db12 100644
--- a/lib/libc/posix1e/acl_get.c
+++ b/lib/libc/posix1e/acl_get.c
@@ -35,7 +35,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
#include <stdlib.h>
@@ -72,7 +74,7 @@ acl_get_fd(int fd)
return (NULL);
}
- error = __acl_get_fd(fd, ACL_TYPE_ACCESS, aclp);
+ error = ___acl_get_fd(fd, ACL_TYPE_ACCESS, aclp);
if (error) {
acl_free(aclp);
return (NULL);
@@ -92,7 +94,7 @@ acl_get_fd_np(int fd, acl_type_t type)
return (NULL);
}
- error = __acl_get_fd(fd, type, aclp);
+ error = ___acl_get_fd(fd, type, aclp);
if (error) {
acl_free(aclp);
return (NULL);
diff --git a/lib/libc/posix1e/acl_init.c b/lib/libc/posix1e/acl_init.c
index 1963ed0cd425..d6e8f0531b0c 100644
--- a/lib/libc/posix1e/acl_init.c
+++ b/lib/libc/posix1e/acl_init.c
@@ -31,7 +31,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
diff --git a/lib/libc/posix1e/acl_perm.c b/lib/libc/posix1e/acl_perm.c
index 12ab17ae7c19..cdd8e3064774 100644
--- a/lib/libc/posix1e/acl_perm.c
+++ b/lib/libc/posix1e/acl_perm.c
@@ -27,7 +27,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
#include <string.h>
diff --git a/lib/libc/posix1e/acl_set.c b/lib/libc/posix1e/acl_set.c
index 58be508fbf63..172e9db3fb17 100644
--- a/lib/libc/posix1e/acl_set.c
+++ b/lib/libc/posix1e/acl_set.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
#include <stdlib.h>
@@ -71,7 +73,7 @@ acl_set_fd(int fd, acl_t acl)
return(-1);
}
- return (__acl_set_fd(fd, ACL_TYPE_ACCESS, acl));
+ return (___acl_set_fd(fd, ACL_TYPE_ACCESS, acl));
}
int
@@ -87,7 +89,7 @@ acl_set_fd_np(int fd, acl_t acl, acl_type_t type)
}
}
- return (__acl_set_fd(fd, type, acl));
+ return (___acl_set_fd(fd, type, acl));
}
/*
diff --git a/lib/libc/posix1e/acl_size.c b/lib/libc/posix1e/acl_size.c
index 156b7747564d..78ffff101e58 100644
--- a/lib/libc/posix1e/acl_size.c
+++ b/lib/libc/posix1e/acl_size.c
@@ -27,7 +27,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
diff --git a/lib/libc/posix1e/acl_support.c b/lib/libc/posix1e/acl_support.c
index 6a9a14186ca3..128e1fcb579a 100644
--- a/lib/libc/posix1e/acl_support.c
+++ b/lib/libc/posix1e/acl_support.c
@@ -31,7 +31,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <errno.h>
#include <grp.h>
#include <pwd.h>
diff --git a/lib/libc/posix1e/acl_to_text.c b/lib/libc/posix1e/acl_to_text.c
index 70f8b075ff96..20f2b9e0bf44 100644
--- a/lib/libc/posix1e/acl_to_text.c
+++ b/lib/libc/posix1e/acl_to_text.c
@@ -31,7 +31,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <sys/errno.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/lib/libc/posix1e/acl_valid.c b/lib/libc/posix1e/acl_valid.c
index 8c7ca674316b..fe50889d6184 100644
--- a/lib/libc/posix1e/acl_valid.c
+++ b/lib/libc/posix1e/acl_valid.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/acl.h>
+#include "un-namespace.h"
#include <sys/errno.h>
#include "acl_support.h"
@@ -93,5 +95,5 @@ acl_valid_fd_np(int fd, acl_type_t type, acl_t acl)
}
}
- return (__acl_aclcheck_fd(fd, type, acl));
+ return (___acl_aclcheck_fd(fd, type, acl));
}
diff --git a/lib/libc/posix1e/cap_clear.c b/lib/libc/posix1e/cap_clear.c
index eb6b39a3b95e..399886fb4fb8 100644
--- a/lib/libc/posix1e/cap_clear.c
+++ b/lib/libc/posix1e/cap_clear.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <string.h>
diff --git a/lib/libc/posix1e/cap_dup.c b/lib/libc/posix1e/cap_dup.c
index 7aacc811e0df..50db98113ede 100644
--- a/lib/libc/posix1e/cap_dup.c
+++ b/lib/libc/posix1e/cap_dup.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <string.h>
diff --git a/lib/libc/posix1e/cap_free.c b/lib/libc/posix1e/cap_free.c
index 3c77992f2c32..20ec1936d012 100644
--- a/lib/libc/posix1e/cap_free.c
+++ b/lib/libc/posix1e/cap_free.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <stdlib.h>
diff --git a/lib/libc/posix1e/cap_get_fd.c b/lib/libc/posix1e/cap_get_fd.c
index 5b0197ac4138..b8e98b92715d 100644
--- a/lib/libc/posix1e/cap_get_fd.c
+++ b/lib/libc/posix1e/cap_get_fd.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <sys/errno.h>
#include <stdlib.h>
@@ -45,7 +47,7 @@ cap_get_fd(int fd)
if (!cap)
return (NULL);
- error = __cap_get_fd(fd, cap);
+ error = ___cap_get_fd(fd, cap);
if (error) {
errno = error;
cap_free(cap);
diff --git a/lib/libc/posix1e/cap_get_file.c b/lib/libc/posix1e/cap_get_file.c
index a74bc4111d10..e453f01e5580 100644
--- a/lib/libc/posix1e/cap_get_file.c
+++ b/lib/libc/posix1e/cap_get_file.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <sys/errno.h>
#include <stdlib.h>
diff --git a/lib/libc/posix1e/cap_get_flag.c b/lib/libc/posix1e/cap_get_flag.c
index 37595ee8ed59..2f0f221dc6fc 100644
--- a/lib/libc/posix1e/cap_get_flag.c
+++ b/lib/libc/posix1e/cap_get_flag.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <sys/errno.h>
int
diff --git a/lib/libc/posix1e/cap_get_proc.c b/lib/libc/posix1e/cap_get_proc.c
index d2bf96bb3c51..5baa45aa081f 100644
--- a/lib/libc/posix1e/cap_get_proc.c
+++ b/lib/libc/posix1e/cap_get_proc.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <sys/errno.h>
#include <stdlib.h>
diff --git a/lib/libc/posix1e/cap_init.c b/lib/libc/posix1e/cap_init.c
index 377c524b43b9..61c0d59962e7 100644
--- a/lib/libc/posix1e/cap_init.c
+++ b/lib/libc/posix1e/cap_init.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <sys/errno.h>
#include <stdlib.h>
diff --git a/lib/libc/posix1e/cap_set_fd.c b/lib/libc/posix1e/cap_set_fd.c
index 70b7160bcd2c..f6791b93d48b 100644
--- a/lib/libc/posix1e/cap_set_fd.c
+++ b/lib/libc/posix1e/cap_set_fd.c
@@ -30,11 +30,13 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
int
cap_set_fd(int fd, cap_t cap_p)
{
- return (__cap_set_fd(fd, cap_p));
+ return (___cap_set_fd(fd, cap_p));
}
diff --git a/lib/libc/posix1e/cap_set_file.c b/lib/libc/posix1e/cap_set_file.c
index 4aa202ff1298..d1e5de1c59c2 100644
--- a/lib/libc/posix1e/cap_set_file.c
+++ b/lib/libc/posix1e/cap_set_file.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
int
diff --git a/lib/libc/posix1e/cap_set_flag.c b/lib/libc/posix1e/cap_set_flag.c
index bf150e93a138..dc4244c6ad1f 100644
--- a/lib/libc/posix1e/cap_set_flag.c
+++ b/lib/libc/posix1e/cap_set_flag.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <sys/errno.h>
int
diff --git a/lib/libc/posix1e/cap_set_proc.c b/lib/libc/posix1e/cap_set_proc.c
index 14fb44bad401..724add6a3c4f 100644
--- a/lib/libc/posix1e/cap_set_proc.c
+++ b/lib/libc/posix1e/cap_set_proc.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <sys/errno.h>
diff --git a/lib/libc/posix1e/cap_text.c b/lib/libc/posix1e/cap_text.c
index 367ff2068bcf..9b35c03eb1a4 100644
--- a/lib/libc/posix1e/cap_text.c
+++ b/lib/libc/posix1e/cap_text.c
@@ -30,7 +30,9 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <sys/capability.h>
+#include "un-namespace.h"
#include <sys/errno.h>
#include <stdio.h>