config_freebsd.h revision 316338
1258945Sroberto/*- 2280849Scy * Copyright (c) 2003-2007 Tim Kientzle 3258945Sroberto * All rights reserved. 4258945Sroberto * 5258945Sroberto * Redistribution and use in source and binary forms, with or without 6258945Sroberto * modification, are permitted provided that the following conditions 7258945Sroberto * are met: 8258945Sroberto * 1. Redistributions of source code must retain the above copyright 9258945Sroberto * notice, this list of conditions and the following disclaimer. 10258945Sroberto * 2. Redistributions in binary form must reproduce the above copyright 11258945Sroberto * notice, this list of conditions and the following disclaimer in the 12258945Sroberto * documentation and/or other materials provided with the distribution. 13258945Sroberto * 14258945Sroberto * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR 15258945Sroberto * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16258945Sroberto * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17258945Sroberto * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, 18280849Scy * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19258945Sroberto * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20258945Sroberto * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21258945Sroberto * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22258945Sroberto * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23258945Sroberto * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24258945Sroberto * 25258945Sroberto * $FreeBSD: stable/10/lib/libarchive/config_freebsd.h 316338 2017-03-31 20:17:30Z mm $ 26258945Sroberto */ 27258945Sroberto 28258945Sroberto/* FreeBSD 5.0 and later has ACL and extattr support. */ 29258945Sroberto#if __FreeBSD__ > 4 30258945Sroberto#define ARCHIVE_ACL_FREEBSD 1 31258945Sroberto#define ARCHIVE_XATTR_FREEBSD 1 32258945Sroberto#define HAVE_ACL_GET_PERM_NP 1 33258945Sroberto#define HAVE_ARC4RANDOM_BUF 1 34258945Sroberto#define HAVE_STRUCT_XVFSCONF 1 35258945Sroberto#define HAVE_SYS_ACL_H 1 36258945Sroberto#define HAVE_SYS_EXTATTR_H 1 37258945Sroberto#if __FreeBSD__ > 7 38258945Sroberto/* FreeBSD 8.0 and later has NFSv4 ACL support */ 39258945Sroberto#define ARCHIVE_ACL_FREEBSD_NFS4 1 40258945Sroberto#define HAVE_ACL_GET_LINK_NP 1 41258945Sroberto#define HAVE_ACL_IS_TRIVIAL_NP 1 42258945Sroberto#define HAVE_ACL_SET_LINK_NP 1 43258945Sroberto#endif /* __FreeBSD__ > 7 */ 44258945Sroberto#endif /* __FreeBSD__ > 4 */ 45258945Sroberto 46258945Sroberto#ifdef WITH_OPENSSL 47258945Sroberto#define HAVE_LIBCRYPTO 1 48258945Sroberto#define HAVE_OPENSSL_EVP_H 1 49258945Sroberto#define HAVE_OPENSSL_MD5_H 1 50258945Sroberto#define HAVE_OPENSSL_RIPEMD_H 1 51258945Sroberto#define HAVE_OPENSSL_SHA_H 1 52258945Sroberto#define HAVE_OPENSSL_SHA256_INIT 1 53258945Sroberto#define HAVE_OPENSSL_SHA384_INIT 1 54258945Sroberto#define HAVE_OPENSSL_SHA512_INIT 1 55258945Sroberto#define HAVE_PKCS5_PBKDF2_HMAC_SHA1 1 56258945Sroberto#define HAVE_SHA256 1 57258945Sroberto#define HAVE_SHA384 1 58258945Sroberto#define HAVE_SHA512 1 59258945Sroberto#else 60258945Sroberto#define HAVE_LIBMD 1 61258945Sroberto#define HAVE_MD5_H 1 62258945Sroberto#define HAVE_MD5INIT 1 63258945Sroberto#define HAVE_RIPEMD_H 1 64258945Sroberto#define HAVE_SHA_H 1 65258945Sroberto#define HAVE_SHA1 1 66258945Sroberto#define HAVE_SHA1_INIT 1 67258945Sroberto#define HAVE_SHA256 1 68258945Sroberto#define HAVE_SHA256_H 1 69258945Sroberto#define HAVE_SHA256_INIT 1 70258945Sroberto#define HAVE_SHA512 1 71258945Sroberto#define HAVE_SHA512_H 1 72258945Sroberto#define HAVE_SHA512_INIT 1 73258945Sroberto#endif 74258945Sroberto 75258945Sroberto#define HAVE_BSDXML_H 1 76258945Sroberto#define HAVE_BZLIB_H 1 77258945Sroberto#define HAVE_CHFLAGS 1 78258945Sroberto#define HAVE_CHOWN 1 79258945Sroberto#define HAVE_CHROOT 1 80258945Sroberto#define HAVE_CTIME_R 1 81258945Sroberto#define HAVE_CTYPE_H 1 82258945Sroberto#define HAVE_DECL_EXTATTR_NAMESPACE_USER 1 83258945Sroberto#define HAVE_DECL_INT32_MAX 1 84258945Sroberto#define HAVE_DECL_INT32_MIN 1 85258945Sroberto#define HAVE_DECL_INT64_MAX 1 86258945Sroberto#define HAVE_DECL_INT64_MIN 1 87258945Sroberto#define HAVE_DECL_INTMAX_MAX 1 88258945Sroberto#define HAVE_DECL_INTMAX_MIN 1 89258945Sroberto#define HAVE_DECL_SIZE_MAX 1 90258945Sroberto#define HAVE_DECL_SSIZE_MAX 1 91258945Sroberto#define HAVE_DECL_STRERROR_R 1 92258945Sroberto#define HAVE_DECL_UINT32_MAX 1 93258945Sroberto#define HAVE_DECL_UINT64_MAX 1 94258945Sroberto#define HAVE_DECL_UINTMAX_MAX 1 95258945Sroberto#define HAVE_DIRENT_H 1 96258945Sroberto#define HAVE_DLFCN_H 1 97258945Sroberto#define HAVE_D_MD_ORDER 1 98258945Sroberto#define HAVE_EFTYPE 1 99258945Sroberto#define HAVE_EILSEQ 1 100258945Sroberto#define HAVE_ERRNO_H 1 101258945Sroberto#define HAVE_FCHDIR 1 102258945Sroberto#define HAVE_FCHFLAGS 1 103258945Sroberto#define HAVE_FCHMOD 1 104258945Sroberto#define HAVE_FCHOWN 1 105280849Scy#define HAVE_FCNTL 1 106258945Sroberto#define HAVE_FCNTL_H 1 107258945Sroberto#define HAVE_FDOPENDIR 1 108258945Sroberto#define HAVE_FORK 1 109258945Sroberto#define HAVE_FSEEKO 1 110258945Sroberto#define HAVE_FSTAT 1 111258945Sroberto#define HAVE_FSTATAT 1 112258945Sroberto#define HAVE_FSTATFS 1 113258945Sroberto#define HAVE_FSTATVFS 1 114258945Sroberto#define HAVE_FTRUNCATE 1 115258945Sroberto#define HAVE_FUTIMES 1 116280849Scy#define HAVE_FUTIMESAT 1 117258945Sroberto#define HAVE_GETEUID 1 118258945Sroberto#define HAVE_GETGRGID_R 1 119258945Sroberto#define HAVE_GETGRNAM_R 1 120258945Sroberto#define HAVE_GETPID 1 121258945Sroberto#define HAVE_GETPWNAM_R 1 122258945Sroberto#define HAVE_GETPWUID_R 1 123280849Scy#define HAVE_GETVFSBYNAME 1 124258945Sroberto#define HAVE_GMTIME_R 1 125258945Sroberto#define HAVE_GRP_H 1 126258945Sroberto#define HAVE_INTMAX_T 1 127258945Sroberto#define HAVE_INTTYPES_H 1 128258945Sroberto#define HAVE_LANGINFO_H 1 129258945Sroberto#define HAVE_LCHFLAGS 1 130258945Sroberto#define HAVE_LCHMOD 1 131258945Sroberto#define HAVE_LCHOWN 1 132258945Sroberto#define HAVE_LIBZ 1 133258945Sroberto#define HAVE_LIMITS_H 1 134280849Scy#define HAVE_LINK 1 135258945Sroberto#define HAVE_LOCALE_H 1 136258945Sroberto#define HAVE_LOCALTIME_R 1 137258945Sroberto#define HAVE_LONG_LONG_INT 1 138258945Sroberto#define HAVE_LSTAT 1 139258945Sroberto#define HAVE_LUTIMES 1 140258945Sroberto#define HAVE_MBRTOWC 1 141258945Sroberto#define HAVE_MEMMOVE 1 142258945Sroberto#define HAVE_MEMORY_H 1 143258945Sroberto#define HAVE_MEMSET 1 144258945Sroberto#define HAVE_MKDIR 1 145258945Sroberto#define HAVE_MKFIFO 1 146258945Sroberto#define HAVE_MKNOD 1 147258945Sroberto#define HAVE_MKSTEMP 1 148258945Sroberto#define HAVE_NL_LANGINFO 1 149258945Sroberto#define HAVE_OPENAT 1 150258945Sroberto#define HAVE_PATHS_H 1 151258945Sroberto#define HAVE_PIPE 1 152258945Sroberto#define HAVE_POLL 1 153258945Sroberto#define HAVE_POLL_H 1 154258945Sroberto#define HAVE_POSIX_SPAWNP 1 155258945Sroberto#define HAVE_PTHREAD_H 1 156258945Sroberto#define HAVE_PWD_H 1 157258945Sroberto#define HAVE_READDIR_R 1 158258945Sroberto#define HAVE_READLINK 1 159258945Sroberto#define HAVE_READLINKAT 1 160258945Sroberto#define HAVE_READPASSPHRASE 1 161258945Sroberto#define HAVE_READPASSPHRASE_H 1 162258945Sroberto#define HAVE_REGEX_H 1 163258945Sroberto#define HAVE_SELECT 1 164258945Sroberto#define HAVE_SETENV 1 165258945Sroberto#define HAVE_SETLOCALE 1 166258945Sroberto#define HAVE_SIGACTION 1 167258945Sroberto#define HAVE_SIGNAL_H 1 168258945Sroberto#define HAVE_SPAWN_H 1 169258945Sroberto#define HAVE_STATFS 1 170258945Sroberto#define HAVE_STATVFS 1 171258945Sroberto#define HAVE_STDARG_H 1 172258945Sroberto#define HAVE_STDINT_H 1 173258945Sroberto#define HAVE_STDLIB_H 1 174280849Scy#define HAVE_STRCHR 1 175290000Sglebius#define HAVE_STRDUP 1 176258945Sroberto#define HAVE_STRERROR 1 177258945Sroberto#define HAVE_STRERROR_R 1 178258945Sroberto#define HAVE_STRFTIME 1 179258945Sroberto#define HAVE_STRINGS_H 1 180258945Sroberto#define HAVE_STRING_H 1 181280849Scy#define HAVE_STRRCHR 1 182258945Sroberto#define HAVE_STRUCT_STATFS_F_NAMEMAX 1 183258945Sroberto#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 184258945Sroberto#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 185258945Sroberto#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 186290000Sglebius#define HAVE_STRUCT_STAT_ST_FLAGS 1 187290000Sglebius#define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 188258945Sroberto#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1 189290000Sglebius#define HAVE_STRUCT_TM_TM_GMTOFF 1 190290000Sglebius#define HAVE_SYMLINK 1 191258945Sroberto#define HAVE_SYS_CDEFS_H 1 192258945Sroberto#define HAVE_SYS_IOCTL_H 1 193280849Scy#define HAVE_SYS_MOUNT_H 1 194290000Sglebius#define HAVE_SYS_PARAM_H 1 195258945Sroberto#define HAVE_SYS_POLL_H 1 196258945Sroberto#define HAVE_SYS_SELECT_H 1 197258945Sroberto#define HAVE_SYS_STATVFS_H 1 198280849Scy#define HAVE_SYS_STAT_H 1 199280849Scy#define HAVE_SYS_TIME_H 1 200280849Scy#define HAVE_SYS_TYPES_H 1 201258945Sroberto#define HAVE_SYS_UTSNAME_H 1 202258945Sroberto#define HAVE_SYS_WAIT_H 1 203258945Sroberto#define HAVE_TIMEGM 1 204280849Scy#define HAVE_TIME_H 1 205258945Sroberto#define HAVE_TZSET 1 206258945Sroberto#define HAVE_UINTMAX_T 1 207258945Sroberto#define HAVE_UNISTD_H 1 208258945Sroberto#define HAVE_UNSETENV 1 209280849Scy#define HAVE_UNSIGNED_LONG_LONG 1 210258945Sroberto#define HAVE_UNSIGNED_LONG_LONG_INT 1 211258945Sroberto#define HAVE_UTIME 1 212258945Sroberto#define HAVE_UTIMES 1 213280849Scy#define HAVE_UTIME_H 1 214258945Sroberto#define HAVE_VFORK 1 215#define HAVE_VPRINTF 1 216#define HAVE_WCHAR_H 1 217#define HAVE_WCHAR_T 1 218#define HAVE_WCRTOMB 1 219#define HAVE_WCSCMP 1 220#define HAVE_WCSCPY 1 221#define HAVE_WCSLEN 1 222#define HAVE_WCTOMB 1 223#define HAVE_WCTYPE_H 1 224#define HAVE_WMEMCMP 1 225#define HAVE_WMEMCPY 1 226#define HAVE_WMEMMOVE 1 227#define HAVE_ZLIB_H 1 228#define TIME_WITH_SYS_TIME 1 229 230/* FreeBSD 4 and earlier lack intmax_t/uintmax_t */ 231#if __FreeBSD__ < 5 232#define intmax_t int64_t 233#define uintmax_t uint64_t 234#endif 235 236/* FreeBSD defines for archive_hash.h */ 237#ifdef WITH_OPENSSL 238#define ARCHIVE_CRYPTO_MD5_OPENSSL 1 239#define ARCHIVE_CRYPTO_RMD160_OPENSSL 1 240#define ARCHIVE_CRYPTO_SHA1_OPENSSL 241#define ARCHIVE_CRYPTO_SHA256_OPENSSL 1 242#define ARCHIVE_CRYPTO_SHA384_OPENSSL 1 243#define ARCHIVE_CRYPTO_SHA512_OPENSSL 1 244#else 245#define ARCHIVE_CRYPTO_MD5_LIBMD 1 246#define ARCHIVE_CRYPTO_SHA1_LIBMD 1 247#define ARCHIVE_CRYPTO_SHA256_LIBMD 1 248#define ARCHIVE_CRYPTO_SHA512_LIBMD 1 249#endif 250