pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/libarchive/files Detect vfsconf for DragonFl...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d8f440df8798
branches:  trunk
changeset: 349008:d8f440df8798
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Jun 23 13:39:03 2016 +0000

description:
Detect vfsconf for DragonFly, since it doesn't use xvfsconf like
FreeBSD.

diffstat:

 archivers/libarchive/files/config.h.in                          |   3 +
 archivers/libarchive/files/configure                            |  17 ++++++++++
 archivers/libarchive/files/configure.ac                         |   8 ++++
 archivers/libarchive/files/libarchive/archive_read_disk_posix.c |   4 ++
 4 files changed, 32 insertions(+), 0 deletions(-)

diffs (73 lines):

diff -r 89e9b1d6a956 -r d8f440df8798 archivers/libarchive/files/config.h.in
--- a/archivers/libarchive/files/config.h.in    Thu Jun 23 11:25:48 2016 +0000
+++ b/archivers/libarchive/files/config.h.in    Thu Jun 23 13:39:03 2016 +0000
@@ -784,6 +784,9 @@
 /* Define to 1 if `__tm_gmtoff' is a member of `struct tm'. */
 #undef HAVE_STRUCT_TM___TM_GMTOFF
 
+/* Define to 1 if the system has the type `struct vfsconf'. */
+#undef HAVE_STRUCT_VFSCONF
+
 /* Define to 1 if you have the `symlink' function. */
 #undef HAVE_SYMLINK
 
diff -r 89e9b1d6a956 -r d8f440df8798 archivers/libarchive/files/configure
--- a/archivers/libarchive/files/configure      Thu Jun 23 11:25:48 2016 +0000
+++ b/archivers/libarchive/files/configure      Thu Jun 23 13:39:03 2016 +0000
@@ -17264,6 +17264,23 @@
 done
 
 
+# DragonFly uses vfsconf, FreeBSD xvfsconf.
+ac_fn_c_check_type "$LINENO" "struct vfsconf" "ac_cv_type_struct_vfsconf" "#if HAVE_SYS_TYPES_H
+       #include <sys/types.h>
+       #endif
+       #include <sys/mount.h>
+
+"
+if test "x$ac_cv_type_struct_vfsconf" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_VFSCONF 1
+_ACEOF
+
+
+fi
+
+
 # There are several variants of readdir_r around; we only
 # accept the POSIX-compliant version.
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
diff -r 89e9b1d6a956 -r d8f440df8798 archivers/libarchive/files/configure.ac
--- a/archivers/libarchive/files/configure.ac   Thu Jun 23 11:25:48 2016 +0000
+++ b/archivers/libarchive/files/configure.ac   Thu Jun 23 13:39:03 2016 +0000
@@ -616,6 +616,14 @@
 # detects cygwin-1.7, as opposed to older versions
 AC_CHECK_FUNCS([cygwin_conv_path])
 
+# DragonFly uses vfsconf, FreeBSD xvfsconf.
+AC_CHECK_TYPES(struct vfsconf,,,
+       [#if HAVE_SYS_TYPES_H
+       #include <sys/types.h>
+       #endif
+       #include <sys/mount.h>
+       ])
+
 # There are several variants of readdir_r around; we only
 # accept the POSIX-compliant version.
 AC_COMPILE_IFELSE(
diff -r 89e9b1d6a956 -r d8f440df8798 archivers/libarchive/files/libarchive/archive_read_disk_posix.c
--- a/archivers/libarchive/files/libarchive/archive_read_disk_posix.c   Thu Jun 23 11:25:48 2016 +0000
+++ b/archivers/libarchive/files/libarchive/archive_read_disk_posix.c   Thu Jun 23 13:39:03 2016 +0000
@@ -1504,7 +1504,11 @@
        struct tree *t = a->tree;
        struct statfs sfs;
 #if defined(HAVE_GETVFSBYNAME) && defined(VFCF_SYNTHETIC)
+#  if defined(HAVE_STRUCT_VFSCONF)
+       struct vfsconf vfc;
+#  else
        struct xvfsconf vfc;
+#  endif
 #endif
        int r, xr = 0;
 #if !defined(HAVE_STRUCT_STATFS_F_NAMEMAX)



Home | Main Index | Thread Index | Old Index