config_freebsd.h revision 349525
182498Sroberto/*- 282498Sroberto * Copyright (c) 2003-2007 Tim Kientzle 354359Sroberto * All rights reserved. 454359Sroberto * 554359Sroberto * Redistribution and use in source and binary forms, with or without 654359Sroberto * modification, are permitted provided that the following conditions 754359Sroberto * are met: 854359Sroberto * 1. Redistributions of source code must retain the above copyright 954359Sroberto * notice, this list of conditions and the following disclaimer. 1054359Sroberto * 2. Redistributions in binary form must reproduce the above copyright 1154359Sroberto * notice, this list of conditions and the following disclaimer in the 1254359Sroberto * documentation and/or other materials provided with the distribution. 1354359Sroberto * 1454359Sroberto * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR 1554359Sroberto * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1654359Sroberto * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1754359Sroberto * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, 1854359Sroberto * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 1954359Sroberto * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2054359Sroberto * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2154359Sroberto * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2254359Sroberto * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2354359Sroberto * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2454359Sroberto * 2554359Sroberto * $FreeBSD: stable/10/lib/libarchive/config_freebsd.h 349525 2019-06-28 22:36:27Z mm $ 2682498Sroberto */ 2754359Sroberto 2854359Sroberto/* FreeBSD 5.0 and later has ACL and extattr support. */ 2954359Sroberto#if __FreeBSD__ > 4 3054359Sroberto#define ARCHIVE_ACL_FREEBSD 1 3154359Sroberto#define ARCHIVE_XATTR_FREEBSD 1 3254359Sroberto#define HAVE_ACL_GET_PERM_NP 1 3354359Sroberto#define HAVE_ARC4RANDOM_BUF 1 3454359Sroberto#define HAVE_STRUCT_XVFSCONF 1 3554359Sroberto#define HAVE_SYS_ACL_H 1 3654359Sroberto#define HAVE_SYS_EXTATTR_H 1 3754359Sroberto#if __FreeBSD__ > 7 3854359Sroberto/* FreeBSD 8.0 and later has NFSv4 ACL support */ 3954359Sroberto#define ARCHIVE_ACL_FREEBSD_NFS4 1 4054359Sroberto#define HAVE_ACL_GET_LINK_NP 1 4154359Sroberto#define HAVE_ACL_IS_TRIVIAL_NP 1 4254359Sroberto#define HAVE_ACL_SET_LINK_NP 1 4354359Sroberto#endif /* __FreeBSD__ > 7 */ 4454359Sroberto#endif /* __FreeBSD__ > 4 */ 4554359Sroberto 4654359Sroberto#ifdef WITH_OPENSSL 4754359Sroberto#define HAVE_LIBCRYPTO 1 4854359Sroberto#define HAVE_OPENSSL_EVP_H 1 4954359Sroberto#define HAVE_OPENSSL_MD5_H 1 5054359Sroberto#define HAVE_OPENSSL_RIPEMD_H 1 5154359Sroberto#define HAVE_OPENSSL_SHA_H 1 5254359Sroberto#define HAVE_OPENSSL_SHA256_INIT 1 5354359Sroberto#define HAVE_OPENSSL_SHA384_INIT 1 5454359Sroberto#define HAVE_OPENSSL_SHA512_INIT 1 5554359Sroberto#define HAVE_PKCS5_PBKDF2_HMAC_SHA1 1 5654359Sroberto#define HAVE_SHA256 1 5754359Sroberto#define HAVE_SHA384 1 5854359Sroberto#define HAVE_SHA512 1 5954359Sroberto#else 6054359Sroberto#define HAVE_LIBMD 1 6154359Sroberto#define HAVE_MD5_H 1 6254359Sroberto#define HAVE_MD5INIT 1 6354359Sroberto#define HAVE_RIPEMD_H 1 6454359Sroberto#define HAVE_SHA_H 1 6554359Sroberto#define HAVE_SHA1 1 6654359Sroberto#define HAVE_SHA1_INIT 1 6754359Sroberto#define HAVE_SHA256 1 6854359Sroberto#define HAVE_SHA256_H 1 6954359Sroberto#define HAVE_SHA256_INIT 1 7054359Sroberto#define HAVE_SHA512 1 7154359Sroberto#define HAVE_SHA512_H 1 7254359Sroberto#define HAVE_SHA512_INIT 1 7354359Sroberto#endif 7454359Sroberto 7554359Sroberto#define HAVE_BSDXML_H 1 7654359Sroberto#define HAVE_BZLIB_H 1 7754359Sroberto#define HAVE_CHFLAGS 1 7854359Sroberto#define HAVE_CHOWN 1 7954359Sroberto#define HAVE_CHROOT 1 8054359Sroberto#define HAVE_CTIME_R 1 8154359Sroberto#define HAVE_CTYPE_H 1 8254359Sroberto#define HAVE_DECL_EXTATTR_NAMESPACE_USER 1 8354359Sroberto#define HAVE_DECL_INT32_MAX 1 8454359Sroberto#define HAVE_DECL_INT32_MIN 1 8554359Sroberto#define HAVE_DECL_INT64_MAX 1 8654359Sroberto#define HAVE_DECL_INT64_MIN 1 8754359Sroberto#define HAVE_DECL_INTMAX_MAX 1 8854359Sroberto#define HAVE_DECL_INTMAX_MIN 1 8954359Sroberto#define HAVE_DECL_SIZE_MAX 1 9054359Sroberto#define HAVE_DECL_SSIZE_MAX 1 9154359Sroberto#define HAVE_DECL_STRERROR_R 1 9254359Sroberto#define HAVE_DECL_UINT32_MAX 1 9354359Sroberto#define HAVE_DECL_UINT64_MAX 1 9454359Sroberto#define HAVE_DECL_UINTMAX_MAX 1 9554359Sroberto#define HAVE_DIRENT_H 1 9654359Sroberto#define HAVE_DLFCN_H 1 9754359Sroberto#define HAVE_D_MD_ORDER 1 9854359Sroberto#define HAVE_EFTYPE 1 9954359Sroberto#define HAVE_EILSEQ 1 10054359Sroberto#define HAVE_ERRNO_H 1 10154359Sroberto#define HAVE_FCHDIR 1 10254359Sroberto#define HAVE_FCHFLAGS 1 10354359Sroberto#define HAVE_FCHMOD 1 10454359Sroberto#define HAVE_FCHOWN 1 10554359Sroberto#define HAVE_FCNTL 1 10654359Sroberto#define HAVE_FCNTL_H 1 10754359Sroberto#define HAVE_FDOPENDIR 1 10854359Sroberto#define HAVE_FORK 1 10954359Sroberto#define HAVE_FSEEKO 1 11054359Sroberto#define HAVE_FSTAT 1 11154359Sroberto#define HAVE_FSTATAT 1 11254359Sroberto#define HAVE_FSTATFS 1 11354359Sroberto#define HAVE_FSTATVFS 1 11454359Sroberto#define HAVE_FTRUNCATE 1 11554359Sroberto#define HAVE_FUTIMES 1 11654359Sroberto#define HAVE_FUTIMESAT 1 11754359Sroberto#define HAVE_GETEUID 1 11854359Sroberto#define HAVE_GETGRGID_R 1 11954359Sroberto#define HAVE_GETGRNAM_R 1 12054359Sroberto#define HAVE_GETPID 1 12154359Sroberto#define HAVE_GETPWNAM_R 1 12254359Sroberto#define HAVE_GETPWUID_R 1 12354359Sroberto#define HAVE_GETVFSBYNAME 1 12454359Sroberto#define HAVE_GMTIME_R 1 12554359Sroberto#define HAVE_GRP_H 1 12654359Sroberto#define HAVE_INTMAX_T 1 12754359Sroberto#define HAVE_INTTYPES_H 1 12854359Sroberto#define HAVE_LANGINFO_H 1 12954359Sroberto#define HAVE_LCHFLAGS 1 13054359Sroberto#define HAVE_LCHMOD 1 13154359Sroberto#define HAVE_LCHOWN 1 13254359Sroberto#define HAVE_LIBZ 1 13354359Sroberto#define HAVE_LIMITS_H 1 13454359Sroberto#define HAVE_LINK 1 13554359Sroberto#define HAVE_LOCALE_H 1 13654359Sroberto#define HAVE_LOCALTIME_R 1 13754359Sroberto#define HAVE_LONG_LONG_INT 1 13854359Sroberto#define HAVE_LSTAT 1 13954359Sroberto#define HAVE_LUTIMES 1 14054359Sroberto#define HAVE_MBRTOWC 1 14154359Sroberto#define HAVE_MEMMOVE 1 14254359Sroberto#define HAVE_MEMORY_H 1 14354359Sroberto#define HAVE_MEMSET 1 14454359Sroberto#define HAVE_MKDIR 1 14554359Sroberto#define HAVE_MKFIFO 1 14654359Sroberto#define HAVE_MKNOD 1 14754359Sroberto#define HAVE_MKSTEMP 1 14854359Sroberto#define HAVE_NL_LANGINFO 1 14954359Sroberto#define HAVE_OPENAT 1 15054359Sroberto#define HAVE_PATHS_H 1 15154359Sroberto#define HAVE_PIPE 1 15254359Sroberto#define HAVE_POLL 1 15354359Sroberto#define HAVE_POLL_H 1 15454359Sroberto#define HAVE_POSIX_SPAWNP 1 15554359Sroberto#define HAVE_PTHREAD_H 1 15654359Sroberto#define HAVE_PWD_H 1 15754359Sroberto#define HAVE_READDIR_R 1 15854359Sroberto#define HAVE_READLINK 1 15954359Sroberto#define HAVE_READLINKAT 1 16054359Sroberto#define HAVE_READPASSPHRASE 1 16154359Sroberto#define HAVE_READPASSPHRASE_H 1 16254359Sroberto#define HAVE_REGEX_H 1 16354359Sroberto#define HAVE_SELECT 1 16454359Sroberto#define HAVE_SETENV 1 16554359Sroberto#define HAVE_SETLOCALE 1 16654359Sroberto#define HAVE_SIGACTION 1 16754359Sroberto#define HAVE_SIGNAL_H 1 16854359Sroberto#define HAVE_SPAWN_H 1 16954359Sroberto#define HAVE_STATFS 1 17054359Sroberto#define HAVE_STATVFS 1 17154359Sroberto#define HAVE_STDARG_H 1 17254359Sroberto#define HAVE_STDINT_H 1 17354359Sroberto#define HAVE_STDLIB_H 1 17454359Sroberto#define HAVE_STRCHR 1 17554359Sroberto#define HAVE_STRDUP 1 17654359Sroberto#define HAVE_STRERROR 1 17754359Sroberto#define HAVE_STRERROR_R 1 17854359Sroberto#define HAVE_STRFTIME 1 17954359Sroberto#define HAVE_STRINGS_H 1 18054359Sroberto#define HAVE_STRING_H 1 18154359Sroberto#define HAVE_STRRCHR 1 18254359Sroberto#define HAVE_STRUCT_STATFS_F_NAMEMAX 1 18354359Sroberto#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 18454359Sroberto#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 18554359Sroberto#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 18654359Sroberto#define HAVE_STRUCT_STAT_ST_FLAGS 1 18754359Sroberto#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 18854359Sroberto#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 18954359Sroberto#define HAVE_STRUCT_TM_TM_GMTOFF 1 19054359Sroberto#define HAVE_SYMLINK 1 19154359Sroberto#define HAVE_SYS_CDEFS_H 1 19254359Sroberto#define HAVE_SYS_IOCTL_H 1 19354359Sroberto#define HAVE_SYS_MOUNT_H 1 19454359Sroberto#define HAVE_SYS_PARAM_H 1 19554359Sroberto#define HAVE_SYS_POLL_H 1 19654359Sroberto#define HAVE_SYS_SELECT_H 1 19754359Sroberto#define HAVE_SYS_STATVFS_H 1 19854359Sroberto#define HAVE_SYS_STAT_H 1 19954359Sroberto#define HAVE_SYS_TIME_H 1 20054359Sroberto#define HAVE_SYS_TYPES_H 1 20154359Sroberto#define HAVE_SYS_UTSNAME_H 1 20254359Sroberto#define HAVE_SYS_WAIT_H 1 20354359Sroberto#define HAVE_TIMEGM 1 20454359Sroberto#define HAVE_TIME_H 1 20554359Sroberto#define HAVE_TZSET 1 20654359Sroberto#define HAVE_UINTMAX_T 1 20754359Sroberto#define HAVE_UNISTD_H 1 20854359Sroberto#define HAVE_UNLINKAT 1 20954359Sroberto#define HAVE_UNSETENV 1 21054359Sroberto#define HAVE_UNSIGNED_LONG_LONG 1 21154359Sroberto#define HAVE_UNSIGNED_LONG_LONG_INT 1 21254359Sroberto#define HAVE_UTIME 1 21354359Sroberto#define HAVE_UTIMES 1 21454359Sroberto#define HAVE_UTIME_H 1 21554359Sroberto#define HAVE_VFORK 1 21654359Sroberto#define HAVE_VPRINTF 1 21754359Sroberto#define HAVE_WCHAR_H 1 21854359Sroberto#define HAVE_WCHAR_T 1 21954359Sroberto#define HAVE_WCRTOMB 1 22054359Sroberto#define HAVE_WCSCMP 1 22154359Sroberto#define HAVE_WCSCPY 1 22254359Sroberto#define HAVE_WCSLEN 1 22354359Sroberto#define HAVE_WCTOMB 1 22454359Sroberto#define HAVE_WCTYPE_H 1 22554359Sroberto#define HAVE_WMEMCMP 1 22654359Sroberto#define HAVE_WMEMCPY 1 22754359Sroberto#define HAVE_WMEMMOVE 1 22854359Sroberto#define HAVE_ZLIB_H 1 22954359Sroberto#define TIME_WITH_SYS_TIME 1 23054359Sroberto 23154359Sroberto/* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ 23254359Sroberto#if __FreeBSD__ < 5 23354359Sroberto#define intmax_t int64_t 23454359Sroberto#define uintmax_t uint64_t 23554359Sroberto#endif 23654359Sroberto 23754359Sroberto/* FreeBSD defines for archive_hash.h */ 23854359Sroberto#ifdef WITH_OPENSSL 23954359Sroberto#define ARCHIVE_CRYPTO_MD5_OPENSSL 1 24054359Sroberto#define ARCHIVE_CRYPTO_RMD160_OPENSSL 1 24154359Sroberto#define ARCHIVE_CRYPTO_SHA1_OPENSSL 24254359Sroberto#define ARCHIVE_CRYPTO_SHA256_OPENSSL 1 24354359Sroberto#define ARCHIVE_CRYPTO_SHA384_OPENSSL 1 24454359Sroberto#define ARCHIVE_CRYPTO_SHA512_OPENSSL 1 24554359Sroberto#else 24654359Sroberto#define ARCHIVE_CRYPTO_MD5_LIBMD 1 24754359Sroberto#define ARCHIVE_CRYPTO_SHA1_LIBMD 1 24854359Sroberto#define ARCHIVE_CRYPTO_SHA256_LIBMD 1 24954359Sroberto#define ARCHIVE_CRYPTO_SHA512_LIBMD 1 25054359Sroberto#endif 25154359Sroberto