10a4794d3STim Kientzle /*- 24d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 35e53a4f9SPedro F. Giffuni * 463165a38STim Kientzle * Copyright (c) 2003-2007 Tim Kientzle 50a4794d3STim Kientzle * All rights reserved. 60a4794d3STim Kientzle * 70a4794d3STim Kientzle * Redistribution and use in source and binary forms, with or without 80a4794d3STim Kientzle * modification, are permitted provided that the following conditions 90a4794d3STim Kientzle * are met: 100a4794d3STim Kientzle * 1. Redistributions of source code must retain the above copyright 1163165a38STim Kientzle * notice, this list of conditions and the following disclaimer. 120a4794d3STim Kientzle * 2. Redistributions in binary form must reproduce the above copyright 130a4794d3STim Kientzle * notice, this list of conditions and the following disclaimer in the 140a4794d3STim Kientzle * documentation and/or other materials provided with the distribution. 150a4794d3STim Kientzle * 160a4794d3STim Kientzle * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR 170a4794d3STim Kientzle * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 180a4794d3STim Kientzle * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 190a4794d3STim Kientzle * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, 200a4794d3STim Kientzle * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 210a4794d3STim Kientzle * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 220a4794d3STim Kientzle * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 230a4794d3STim Kientzle * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 240a4794d3STim Kientzle * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 250a4794d3STim Kientzle * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 260a4794d3STim Kientzle */ 27c3afd20fSMartin Matuska #define __LIBARCHIVE_CONFIG_H_INCLUDED 1 280a4794d3STim Kientzle 2997792364SJilles Tjoelker #include <osreldate.h> 3097792364SJilles Tjoelker 314657548dSMartin Matuska /* FreeBSD 5.0 and later has ACL and extattr support. */ 320a4794d3STim Kientzle #if __FreeBSD__ > 4 334657548dSMartin Matuska #define ARCHIVE_ACL_FREEBSD 1 34e46d4714SMartin Matuska #define ARCHIVE_XATTR_FREEBSD 1 35c6b23562STim Kientzle #define HAVE_ACL_GET_PERM_NP 1 36cdf63a70SMartin Matuska #define HAVE_ARC4RANDOM_BUF 1 3747af42f8SMartin Matuska #define HAVE_STRUCT_XVFSCONF 1 3843a8e5f0STim Kientzle #define HAVE_SYS_ACL_H 1 3943a8e5f0STim Kientzle #define HAVE_SYS_EXTATTR_H 1 404657548dSMartin Matuska #if __FreeBSD__ > 7 414657548dSMartin Matuska /* FreeBSD 8.0 and later has NFSv4 ACL support */ 424657548dSMartin Matuska #define ARCHIVE_ACL_FREEBSD_NFS4 1 434657548dSMartin Matuska #define HAVE_ACL_GET_LINK_NP 1 444657548dSMartin Matuska #define HAVE_ACL_IS_TRIVIAL_NP 1 454657548dSMartin Matuska #define HAVE_ACL_SET_LINK_NP 1 464657548dSMartin Matuska #endif /* __FreeBSD__ > 7 */ 474657548dSMartin Matuska #endif /* __FreeBSD__ > 4 */ 480a4794d3STim Kientzle 49f4f5e3f5STim Kientzle #ifdef WITH_OPENSSL 50acc60b03SMartin Matuska #define HAVE_LIBCRYPTO 1 51acc60b03SMartin Matuska #define HAVE_OPENSSL_EVP_H 1 52f4f5e3f5STim Kientzle #define HAVE_OPENSSL_MD5_H 1 53f4f5e3f5STim Kientzle #define HAVE_OPENSSL_RIPEMD_H 1 54f4f5e3f5STim Kientzle #define HAVE_OPENSSL_SHA_H 1 559980697aSDavid E. O'Brien #define HAVE_OPENSSL_SHA256_INIT 1 569980697aSDavid E. O'Brien #define HAVE_OPENSSL_SHA384_INIT 1 579980697aSDavid E. O'Brien #define HAVE_OPENSSL_SHA512_INIT 1 58cdf63a70SMartin Matuska #define HAVE_PKCS5_PBKDF2_HMAC_SHA1 1 599980697aSDavid E. O'Brien #define HAVE_SHA256 1 60f4f5e3f5STim Kientzle #define HAVE_SHA384 1 61f4f5e3f5STim Kientzle #define HAVE_SHA512 1 629980697aSDavid E. O'Brien #else 63acc60b03SMartin Matuska #define HAVE_LIBMD 1 649980697aSDavid E. O'Brien #define HAVE_MD5_H 1 659980697aSDavid E. O'Brien #define HAVE_MD5INIT 1 66acc60b03SMartin Matuska #define HAVE_RIPEMD_H 1 679980697aSDavid E. O'Brien #define HAVE_SHA_H 1 689980697aSDavid E. O'Brien #define HAVE_SHA1 1 699980697aSDavid E. O'Brien #define HAVE_SHA1_INIT 1 709980697aSDavid E. O'Brien #define HAVE_SHA256 1 719980697aSDavid E. O'Brien #define HAVE_SHA256_H 1 729980697aSDavid E. O'Brien #define HAVE_SHA256_INIT 1 739980697aSDavid E. O'Brien #define HAVE_SHA512 1 749980697aSDavid E. O'Brien #define HAVE_SHA512_H 1 759980697aSDavid E. O'Brien #define HAVE_SHA512_INIT 1 76f4f5e3f5STim Kientzle #endif 77f4f5e3f5STim Kientzle 7823e37d63STim Kientzle #define HAVE_BSDXML_H 1 79f6ccfb42SMartin Matuska #define HAVE_BZLIB_H 1 800a4794d3STim Kientzle #define HAVE_CHFLAGS 1 81ee10f0feSTim Kientzle #define HAVE_CHOWN 1 826c95142eSMartin Matuska #define HAVE_CHROOT 1 836c95142eSMartin Matuska #define HAVE_CTIME_R 1 846c95142eSMartin Matuska #define HAVE_CTYPE_H 1 8538abb26bSMartin Matuska #define HAVE_DECL_EXTATTR_NAMESPACE_USER 1 86cdf63a70SMartin Matuska #define HAVE_DECL_INT32_MAX 1 87cdf63a70SMartin Matuska #define HAVE_DECL_INT32_MIN 1 88f912fb11STim Kientzle #define HAVE_DECL_INT64_MAX 1 89f912fb11STim Kientzle #define HAVE_DECL_INT64_MIN 1 90cdf63a70SMartin Matuska #define HAVE_DECL_INTMAX_MAX 1 91cdf63a70SMartin Matuska #define HAVE_DECL_INTMAX_MIN 1 92f912fb11STim Kientzle #define HAVE_DECL_SIZE_MAX 1 9322026522STim Kientzle #define HAVE_DECL_SSIZE_MAX 1 940a4794d3STim Kientzle #define HAVE_DECL_STRERROR_R 1 95f912fb11STim Kientzle #define HAVE_DECL_UINT32_MAX 1 96f912fb11STim Kientzle #define HAVE_DECL_UINT64_MAX 1 97cdf63a70SMartin Matuska #define HAVE_DECL_UINTMAX_MAX 1 9823e37d63STim Kientzle #define HAVE_DIRENT_H 1 990c9c2eb3SMartin Matuska #define HAVE_DIRFD 1 1006c95142eSMartin Matuska #define HAVE_DLFCN_H 1 101976ba7f0SSimon J. Gerraty #ifndef __linux__ 1026c95142eSMartin Matuska #define HAVE_D_MD_ORDER 1 103976ba7f0SSimon J. Gerraty #endif 1040a4794d3STim Kientzle #define HAVE_EFTYPE 1 1050a4794d3STim Kientzle #define HAVE_EILSEQ 1 1060a4794d3STim Kientzle #define HAVE_ERRNO_H 1 1070a4794d3STim Kientzle #define HAVE_FCHDIR 1 1080a4794d3STim Kientzle #define HAVE_FCHFLAGS 1 1090a4794d3STim Kientzle #define HAVE_FCHMOD 1 1100a4794d3STim Kientzle #define HAVE_FCHOWN 1 111fa07de5eSTim Kientzle #define HAVE_FCNTL 1 1120a4794d3STim Kientzle #define HAVE_FCNTL_H 1 1136c95142eSMartin Matuska #define HAVE_FDOPENDIR 1 114*b5a3a89cSMartin Matuska #define HAVE_FNMATCH 1 115*b5a3a89cSMartin Matuska #define HAVE_FNMATCH_H 1 1166c95142eSMartin Matuska #define HAVE_FORK 1 1170a4794d3STim Kientzle #define HAVE_FSEEKO 1 118d7740aeaSTim Kientzle #define HAVE_FSTAT 1 1196c95142eSMartin Matuska #define HAVE_FSTATAT 1 1206c95142eSMartin Matuska #define HAVE_FSTATFS 1 1216c95142eSMartin Matuska #define HAVE_FSTATVFS 1 122a2854491STim Kientzle #define HAVE_FTRUNCATE 1 1230a4794d3STim Kientzle #define HAVE_FUTIMES 1 1246c95142eSMartin Matuska #define HAVE_FUTIMESAT 1 125ee10f0feSTim Kientzle #define HAVE_GETEUID 1 12638abb26bSMartin Matuska #define HAVE_GETGRGID_R 1 1276c95142eSMartin Matuska #define HAVE_GETGRNAM_R 1 128*b5a3a89cSMartin Matuska #define HAVE_GETLINE 1 129*b5a3a89cSMartin Matuska #define HAVE_GETOPT_OPTRESET 1 13080334b7dSTim Kientzle #define HAVE_GETPID 1 1316c95142eSMartin Matuska #define HAVE_GETPWNAM_R 1 13238abb26bSMartin Matuska #define HAVE_GETPWUID_R 1 1336c95142eSMartin Matuska #define HAVE_GETVFSBYNAME 1 1346c95142eSMartin Matuska #define HAVE_GMTIME_R 1 1350a4794d3STim Kientzle #define HAVE_GRP_H 1 1366c95142eSMartin Matuska #define HAVE_INTMAX_T 1 1370a4794d3STim Kientzle #define HAVE_INTTYPES_H 1 1386c95142eSMartin Matuska #define HAVE_LANGINFO_H 1 1390a4794d3STim Kientzle #define HAVE_LCHFLAGS 1 1400a4794d3STim Kientzle #define HAVE_LCHMOD 1 1410a4794d3STim Kientzle #define HAVE_LCHOWN 1 1426c95142eSMartin Matuska #define HAVE_LIBZ 1 1430a4794d3STim Kientzle #define HAVE_LIMITS_H 1 14423e37d63STim Kientzle #define HAVE_LINK 1 145ddce862aSMartin Matuska #define HAVE_LINKAT 1 1466c95142eSMartin Matuska #define HAVE_LOCALE_H 1 1476c95142eSMartin Matuska #define HAVE_LOCALTIME_R 1 1486c95142eSMartin Matuska #define HAVE_LONG_LONG_INT 1 14923e37d63STim Kientzle #define HAVE_LSTAT 1 1500a4794d3STim Kientzle #define HAVE_LUTIMES 1 1516c95142eSMartin Matuska #define HAVE_MBRTOWC 1 1520a4794d3STim Kientzle #define HAVE_MEMMOVE 1 1536c95142eSMartin Matuska #define HAVE_MEMORY_H 1 1546c95142eSMartin Matuska #define HAVE_MEMSET 1 1550a4794d3STim Kientzle #define HAVE_MKDIR 1 1560a4794d3STim Kientzle #define HAVE_MKFIFO 1 157ee10f0feSTim Kientzle #define HAVE_MKNOD 1 1586c95142eSMartin Matuska #define HAVE_MKSTEMP 1 1596c95142eSMartin Matuska #define HAVE_NL_LANGINFO 1 1606c95142eSMartin Matuska #define HAVE_OPENAT 1 1616c95142eSMartin Matuska #define HAVE_PATHS_H 1 162fa07de5eSTim Kientzle #define HAVE_PIPE 1 163b48b40f1STim Kientzle #define HAVE_POLL 1 164b48b40f1STim Kientzle #define HAVE_POLL_H 1 165acc60b03SMartin Matuska #define HAVE_POSIX_SPAWNP 1 166cdf63a70SMartin Matuska #define HAVE_PTHREAD_H 1 1670a4794d3STim Kientzle #define HAVE_PWD_H 1 1686c95142eSMartin Matuska #define HAVE_READDIR_R 1 16943a8e5f0STim Kientzle #define HAVE_READLINK 1 1706c95142eSMartin Matuska #define HAVE_READLINKAT 1 171644d346dSSimon J. Gerraty #ifndef __linux__ 172cdf63a70SMartin Matuska #define HAVE_READPASSPHRASE 1 173cdf63a70SMartin Matuska #define HAVE_READPASSPHRASE_H 1 174644d346dSSimon J. Gerraty #endif 1756c95142eSMartin Matuska #define HAVE_REGEX_H 1 176b48b40f1STim Kientzle #define HAVE_SELECT 1 177ee10f0feSTim Kientzle #define HAVE_SETENV 1 1786c95142eSMartin Matuska #define HAVE_SETLOCALE 1 1796c95142eSMartin Matuska #define HAVE_SIGACTION 1 1807523935aSTim Kientzle #define HAVE_SIGNAL_H 1 181acc60b03SMartin Matuska #define HAVE_SPAWN_H 1 1826c95142eSMartin Matuska #define HAVE_STATFS 1 1836c95142eSMartin Matuska #define HAVE_STATVFS 1 1846c95142eSMartin Matuska #define HAVE_STDARG_H 1 1850a4794d3STim Kientzle #define HAVE_STDINT_H 1 1860a4794d3STim Kientzle #define HAVE_STDLIB_H 1 1870a4794d3STim Kientzle #define HAVE_STRCHR 1 1880a4794d3STim Kientzle #define HAVE_STRDUP 1 1890a4794d3STim Kientzle #define HAVE_STRERROR 1 1900a4794d3STim Kientzle #define HAVE_STRERROR_R 1 1916c95142eSMartin Matuska #define HAVE_STRFTIME 1 1920a4794d3STim Kientzle #define HAVE_STRINGS_H 1 1930a4794d3STim Kientzle #define HAVE_STRING_H 1 19487c1ec0aSMartin Matuska #define HAVE_STRNLEN 1 1950a4794d3STim Kientzle #define HAVE_STRRCHR 1 1966c95142eSMartin Matuska #define HAVE_STRUCT_STATFS_F_NAMEMAX 1 1978b18fa96STim Kientzle #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 1988b18fa96STim Kientzle #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 1996c95142eSMartin Matuska #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 20029a23c77STim Kientzle #define HAVE_STRUCT_STAT_ST_FLAGS 1 2010a4794d3STim Kientzle #define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 2026c95142eSMartin Matuska #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 2036c95142eSMartin Matuska #define HAVE_STRUCT_TM_TM_GMTOFF 1 20423e37d63STim Kientzle #define HAVE_SYMLINK 1 20523e37d63STim Kientzle #define HAVE_SYS_CDEFS_H 1 2060a4794d3STim Kientzle #define HAVE_SYS_IOCTL_H 1 2076c95142eSMartin Matuska #define HAVE_SYS_MOUNT_H 1 2086c95142eSMartin Matuska #define HAVE_SYS_PARAM_H 1 2096c95142eSMartin Matuska #define HAVE_SYS_POLL_H 1 210*b5a3a89cSMartin Matuska #define HAVE_SYS_QUEUE_H 1 211b48b40f1STim Kientzle #define HAVE_SYS_SELECT_H 1 2126c95142eSMartin Matuska #define HAVE_SYS_STATVFS_H 1 2130a4794d3STim Kientzle #define HAVE_SYS_STAT_H 1 2140a4794d3STim Kientzle #define HAVE_SYS_TIME_H 1 2150a4794d3STim Kientzle #define HAVE_SYS_TYPES_H 1 2166c95142eSMartin Matuska #define HAVE_SYS_UTSNAME_H 1 2170a4794d3STim Kientzle #define HAVE_SYS_WAIT_H 1 2180a4794d3STim Kientzle #define HAVE_TIMEGM 1 2196c95142eSMartin Matuska #define HAVE_TIME_H 1 220ee10f0feSTim Kientzle #define HAVE_TZSET 1 2216c95142eSMartin Matuska #define HAVE_UINTMAX_T 1 2220a4794d3STim Kientzle #define HAVE_UNISTD_H 1 223fae5c36eSMartin Matuska #define HAVE_UNLINKAT 1 224ee10f0feSTim Kientzle #define HAVE_UNSETENV 1 2256c95142eSMartin Matuska #define HAVE_UNSIGNED_LONG_LONG 1 2266c95142eSMartin Matuska #define HAVE_UNSIGNED_LONG_LONG_INT 1 2271df7aefcSTim Kientzle #define HAVE_UTIME 1 2281df7aefcSTim Kientzle #define HAVE_UTIMES 1 2291df7aefcSTim Kientzle #define HAVE_UTIME_H 1 230fa07de5eSTim Kientzle #define HAVE_VFORK 1 2316c95142eSMartin Matuska #define HAVE_VPRINTF 1 2320a4794d3STim Kientzle #define HAVE_WCHAR_H 1 2336c95142eSMartin Matuska #define HAVE_WCHAR_T 1 2346c95142eSMartin Matuska #define HAVE_WCRTOMB 1 23538abb26bSMartin Matuska #define HAVE_WCSCMP 1 2361df7aefcSTim Kientzle #define HAVE_WCSCPY 1 2371df7aefcSTim Kientzle #define HAVE_WCSLEN 1 238a64ca54aSTim Kientzle #define HAVE_WCTOMB 1 2396c95142eSMartin Matuska #define HAVE_WCTYPE_H 1 2401df7aefcSTim Kientzle #define HAVE_WMEMCMP 1 2411df7aefcSTim Kientzle #define HAVE_WMEMCPY 1 242cdf63a70SMartin Matuska #define HAVE_WMEMMOVE 1 2430a4794d3STim Kientzle #define HAVE_ZLIB_H 1 2440a4794d3STim Kientzle #define TIME_WITH_SYS_TIME 1 2450a4794d3STim Kientzle 24697792364SJilles Tjoelker #if __FreeBSD_version >= 1100056 24797792364SJilles Tjoelker #define HAVE_FUTIMENS 1 24897792364SJilles Tjoelker #define HAVE_UTIMENSAT 1 24997792364SJilles Tjoelker #endif 25097792364SJilles Tjoelker 2510a4794d3STim Kientzle /* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ 2520a4794d3STim Kientzle #if __FreeBSD__ < 5 2530a4794d3STim Kientzle #define intmax_t int64_t 2540a4794d3STim Kientzle #define uintmax_t uint64_t 2550a4794d3STim Kientzle #endif 25638abb26bSMartin Matuska 25738abb26bSMartin Matuska /* FreeBSD defines for archive_hash.h */ 25838abb26bSMartin Matuska #ifdef WITH_OPENSSL 25902b6306fSDimitry Andric #define ARCHIVE_CRYPTO_MD5_OPENSSL 1 26002b6306fSDimitry Andric #define ARCHIVE_CRYPTO_RMD160_OPENSSL 1 26102b6306fSDimitry Andric #define ARCHIVE_CRYPTO_SHA1_OPENSSL 26202b6306fSDimitry Andric #define ARCHIVE_CRYPTO_SHA256_OPENSSL 1 26302b6306fSDimitry Andric #define ARCHIVE_CRYPTO_SHA384_OPENSSL 1 26402b6306fSDimitry Andric #define ARCHIVE_CRYPTO_SHA512_OPENSSL 1 26538abb26bSMartin Matuska #else 26602b6306fSDimitry Andric #define ARCHIVE_CRYPTO_MD5_LIBMD 1 26702b6306fSDimitry Andric #define ARCHIVE_CRYPTO_SHA1_LIBMD 1 26802b6306fSDimitry Andric #define ARCHIVE_CRYPTO_SHA256_LIBMD 1 26902b6306fSDimitry Andric #define ARCHIVE_CRYPTO_SHA512_LIBMD 1 27038abb26bSMartin Matuska #endif 271