Fix broken ACL configuration on FreeBSD 4 and Linux.
Thanks to: Greg Lewis, Juergen Lock, Jaakko Heinonen for reporting and testing
This commit is contained in:
parent
256543d9b1
commit
8d8311c95f
@ -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 ==================================================
|
||||
|
@ -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. */
|
||||
|
@ -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])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user