[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-437-ga3fbb53
Michael Adam
obnox at samba.org
Mon Dec 3 15:55:57 GMT 2007
The branch, v3-2-test has been updated
via a3fbb5323222334c86c0dc360df8c6a39039bbe6 (commit)
via 834a16225a8fb905a8f870a17ba67670e622eccc (commit)
via 8ec10c4ab1aa890c9f03d34bd872c93ae5c4d84c (commit)
via 07e6cfdc626c2778292e5b0b338a35046c482cf9 (commit)
from ba2a544baf1e1cc3652512ed5df2bb408fa8bdfd (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit a3fbb5323222334c86c0dc360df8c6a39039bbe6
Author: Michael Adam <obnox at samba.org>
Date: Mon Dec 3 16:52:44 2007 +0100
Remove workaround for broken capabilites.h from lib/system.c - now in lib/replace.
Michael
commit 834a16225a8fb905a8f870a17ba67670e622eccc
Author: Michael Adam <obnox at samba.org>
Date: Mon Dec 3 16:50:55 2007 +0100
Reformat configure checks for broken capabilities.h.
Michael
commit 8ec10c4ab1aa890c9f03d34bd872c93ae5c4d84c
Author: Michael Adam <obnox at samba.org>
Date: Mon Dec 3 16:43:51 2007 +0100
Move check for broken system capabilites.h headers to lib/replace.
Michael
commit 07e6cfdc626c2778292e5b0b338a35046c482cf9
Author: Michael Adam <obnox at samba.org>
Date: Mon Dec 3 16:42:08 2007 +0100
Add check for ppc statfs.h header to workaround for broken capabilities.h.
Taken from s3:lib/system.c
Michael
-----------------------------------------------------------------------
Summary of changes:
source/configure.in | 30 -------------------------
source/lib/replace/system/capability.h | 4 ++-
source/lib/replace/system/config.m4 | 38 ++++++++++++++++++++++++++++++++
source/lib/system.c | 18 ---------------
4 files changed, 41 insertions(+), 49 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/configure.in b/source/configure.in
index b6cd77b..8a945a2 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -3227,36 +3227,6 @@ if test x"$samba_cv_HAVE_STAT_ST_FLAGS" = x"yes"; then
[Whether the stat struct has a st_flags member])
fi
-case "$host_os" in
-*linux*)
-AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[
-AC_TRY_COMPILE([
-#ifdef HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif
-#ifdef HAVE_SYS_CAPABILITY_H
-#include <sys/capability.h>
-#endif
-],[int i;],
- samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no,samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes)])
-if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
- AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files])
-fi
-
-AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[
-AC_TRY_COMPILE([
-#ifdef HAVE_SYS_CAPABILITY_H
-#include <sys/capability.h>
-#endif
-#include <linux/types.h>
-],[__s8 i;],
- samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no,samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes)])
-if test x"$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
- AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h])
-fi
-;;
-esac
-
AC_CACHE_CHECK([for broken nisplus include files],samba_cv_BROKEN_NISPLUS_INCLUDE_FILES,[
AC_TRY_COMPILE([
#include <sys/types.h>
diff --git a/source/lib/replace/system/capability.h b/source/lib/replace/system/capability.h
index b314237..a7b78f0 100644
--- a/source/lib/replace/system/capability.h
+++ b/source/lib/replace/system/capability.h
@@ -27,8 +27,9 @@
#ifdef HAVE_SYS_CAPABILITY_H
-#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H)
+#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) && !defined(_PPC_STATFS_H)
#define _I386_STATFS_H
+#define _PPC_STATFS_H
#define BROKEN_REDHAT_7_STATFS_WORKAROUND
#endif
@@ -44,6 +45,7 @@
#endif
#ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND
+#undef _PPC_STATFS_H
#undef _I386_STATFS_H
#undef BROKEN_REDHAT_7_STATFS_WORKAROUND
#endif
diff --git a/source/lib/replace/system/config.m4 b/source/lib/replace/system/config.m4
index 6500535..799187a 100644
--- a/source/lib/replace/system/config.m4
+++ b/source/lib/replace/system/config.m4
@@ -16,6 +16,44 @@ AC_HEADER_SYS_WAIT
# capability
AC_CHECK_HEADERS(sys/capability.h)
+case "$host_os" in
+*linux*)
+AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[
+AC_TRY_COMPILE([
+ #ifdef HAVE_SYS_VFS_H
+ #include <sys/vfs.h>
+ #endif
+ #ifdef HAVE_SYS_CAPABILITY_H
+ #include <sys/capability.h>
+ #endif
+ ],[
+ int i;
+ ],
+ samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no,
+ samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
+)])
+if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
+ AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files])
+fi
+
+AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[
+AC_TRY_COMPILE([
+ #ifdef HAVE_SYS_CAPABILITY_H
+ #include <sys/capability.h>
+ #endif
+ #include <linux/types.h>
+ ],[
+ __s8 i;
+ ],
+ samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no,
+ samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes
+)])
+if test x"$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER" = x"yes"; then
+ AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h])
+fi
+;;
+esac
+
# passwd
AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h)
AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r)
diff --git a/source/lib/system.c b/source/lib/system.c
index 5013cc5..00d1e98 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -680,24 +680,6 @@ int sys_chroot(const char *dname)
#if defined(HAVE_POSIX_CAPABILITIES)
-#ifdef HAVE_SYS_CAPABILITY_H
-
-#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) && !defined(_I386_STATFS_H) && !defined(_PPC_STATFS_H)
-#define _I386_STATFS_H
-#define _PPC_STATFS_H
-#define BROKEN_REDHAT_7_STATFS_WORKAROUND
-#endif
-
-#include <sys/capability.h>
-
-#ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND
-#undef _I386_STATFS_H
-#undef _PPC_STATFS_H
-#undef BROKEN_REDHAT_7_STATFS_WORKAROUND
-#endif
-
-#endif /* HAVE_SYS_CAPABILITY_H */
-
/**************************************************************************
Try and abstract process capabilities (for systems that have them).
****************************************************************************/
--
Samba Shared Repository
More information about the samba-cvs
mailing list