diff options
author | kientzle <kientzle@FreeBSD.org> | 2005-04-23 17:56:34 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2005-04-23 17:56:34 +0000 |
commit | 47cfd711c77f00faf0e75f838246f0ae88874eeb (patch) | |
tree | 900cd623433175792c5244946a83cce75279aff4 /lib/libarchive | |
parent | 5be5ef99a1a65426e3fb8f581e36ff43adddf0c4 (diff) | |
download | FreeBSD-src-47cfd711c77f00faf0e75f838246f0ae88874eeb.zip FreeBSD-src-47cfd711c77f00faf0e75f838246f0ae88874eeb.tar.gz |
Fix broken ACL configuration on FreeBSD 4 and Linux.
Thanks to: Greg Lewis, Juergen Lock, Jaakko Heinonen for reporting and testing
Diffstat (limited to 'lib/libarchive')
-rw-r--r-- | lib/libarchive/Makefile | 5 | ||||
-rw-r--r-- | lib/libarchive/archive_platform.h | 17 | ||||
-rw-r--r-- | lib/libarchive/configure.ac.in | 4 |
3 files changed, 19 insertions, 7 deletions
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile index 2aff28f..ecfea60 100644 --- a/lib/libarchive/Makefile +++ b/lib/libarchive/Makefile @@ -7,7 +7,7 @@ LIB= archive -VERSION= 1.02.017 +VERSION= 1.02.019 ARCHIVE_API_FEATURE= 2 ARCHIVE_API_VERSION= 1 SHLIB_MAJOR= ${ARCHIVE_API_VERSION} @@ -204,7 +204,8 @@ distfile: cat ${.CURDIR}/configure.ac.in | \ sed 's/@VERSION@/${VERSION}/' | \ cat > ${DIST_WORK_DIR}/configure.ac - (cd ${DIST_WORK_DIR} && aclocal19 && autoheader259 && autoconf259 && automake19 -a --foreign) + (cd ${DIST_WORK_DIR} && aclocal && autoheader) + (cd ${DIST_WORK_DIR} && autoconf && automake -a --foreign) (cd ${DIST_WORK_DIR} && ./configure && make distcheck && make dist) mv ${DIST_WORK_DIR}/${DISTFILE} ${.OBJDIR} @echo ================================================== diff --git a/lib/libarchive/archive_platform.h b/lib/libarchive/archive_platform.h index 0e98ad3..770d808 100644 --- a/lib/libarchive/archive_platform.h +++ b/lib/libarchive/archive_platform.h @@ -43,6 +43,11 @@ /* A default configuration for FreeBSD, used if there is no config.h. */ #ifdef __FreeBSD__ +#if __FreeBSD__ > 4 +#define HAVE_ACL_CREATE_ENTRY 1 +#define HAVE_ACL_INIT 1 +#define HAVE_ACL_SET_FILE 1 +#endif #define HAVE_BZLIB_H 1 #define HAVE_CHFLAGS 1 #define HAVE_DECL_STRERROR_R 1 @@ -74,9 +79,7 @@ #define HAVE_STRRCHR 1 #define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 #define HAVE_STRUCT_STAT_ST_RDEV 1 -#if __FreeBSD__ > 4 #define HAVE_SYS_ACL_H 1 -#endif #define HAVE_SYS_IOCTL_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_TIME_H 1 @@ -111,9 +114,13 @@ #define uintmax_t uint64_t #endif -/* TODO: Test for the functions we use as well... */ -#if HAVE_SYS_ACL_H -#define HAVE_POSIX_ACLS 1 +/* + * If this platform has <sys/acl.h>, acl_create(), acl_init(), and + * acl_set_file(), we assume it has the rest of the POSIX.1e draft + * functions used in archive_read_extract.c. + */ +#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE +#define HAVE_POSIX_ACL 1 #endif /* Set up defaults for internal error codes. */ diff --git a/lib/libarchive/configure.ac.in b/lib/libarchive/configure.ac.in index 0068c8d..537b577 100644 --- a/lib/libarchive/configure.ac.in +++ b/lib/libarchive/configure.ac.in @@ -12,6 +12,9 @@ AC_PROG_RANLIB AC_CHECK_TOOL([STRIP],[strip]) # Checks for libraries. +# Since libarchive is a library, we don't need this for linkage, +# but we do need it for later ACL function tests. +AC_CHECK_LIB(acl,acl_set_file) # Checks for header files. AC_HEADER_STDC @@ -69,6 +72,7 @@ AC_FUNC_MALLOC AC_FUNC_MEMCMP AC_FUNC_STAT AC_FUNC_STRERROR_R +AC_CHECK_FUNCS([acl_create_entry acl_init acl_set_file]) AC_CHECK_FUNCS([chflags fchdir lchmod lchown lutimes memmove]) AC_CHECK_FUNCS([memset mkdir mkfifo strchr strdup strerror strrchr]) |