/* config.h.in.  Generated from configure.ac by autoheader.  */

/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD

/* directory separator(s) as a character or string literal */
#undef DIR_SEPS

/* directory separator(s) as an initialiser list */
#undef DIR_SEPS_LIST

/* Define to error out if we try to include GPL code in libxapian */
#undef DISABLE_GPL_LIBXAPIAN

/* Define to use flock() for flint-compatible locking */
#undef FLINTLOCK_USE_FLOCK

/* Defined if system uses ieee format to store floating point numbers */
#undef FOLLOWS_IEEE

/* Define to 1 if '-D_FORTIFY_SOURCE=2' link test passes */
#undef FORTIFY_SOURCE_OK

/* Define if ftime returns void */
#undef FTIME_RETURNS_VOID

/* Define to 1 if you have the `arc4random' function. */
#undef HAVE_ARC4RANDOM

/* Define to 1 if you have the `arc4random_buf' function. */
#undef HAVE_ARC4RANDOM_BUF

/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME

/* Define to 1 if you have the `closefrom' function. */
#undef HAVE_CLOSEFROM

/* Define to 1 if you have the `close_range' function. */
#undef HAVE_CLOSE_RANGE

/* define if the compiler supports basic C++17 syntax */
#undef HAVE_CXX17

/* define if the compiler supports basic C++20 syntax */
#undef HAVE_CXX20

/* define if the compiler supports basic C++23 syntax */
#undef HAVE_CXX23

/* Define to 1 if you have the <cxxabi.h> header file. */
#undef HAVE_CXXABI_H

/* Define to 1 if you have the declaration of `exp10(double)', and to 0 if you
   don't. */
#undef HAVE_DECL_EXP10

/* Define to 1 if you have the declaration of `siglongjmp', and to 0 if you
   don't. */
#undef HAVE_DECL_SIGLONGJMP

/* Define to 1 if you have the declaration of `sigsetjmp', and to 0 if you
   don't. */
#undef HAVE_DECL_SIGSETJMP

/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
   don't. */
#undef HAVE_DECL_STRERROR_R

/* Define to 1 if you have the declaration of `_addcarry_u32(unsigned char,
   unsigned, unsigned, unsigned*)', and to 0 if you don't. */
#undef HAVE_DECL__ADDCARRY_U32

/* Define to 1 if you have the declaration of `_addcarry_u64(unsigned char,
   unsigned __int64, unsigned __int64, unsigned __int64*)', and to 0 if you
   don't. */
#undef HAVE_DECL__ADDCARRY_U64

/* Define to 1 if you have the declaration of `_byteswap_uint64', and to 0 if
   you don't. */
#undef HAVE_DECL__BYTESWAP_UINT64

/* Define to 1 if you have the declaration of `_byteswap_ulong', and to 0 if
   you don't. */
#undef HAVE_DECL__BYTESWAP_ULONG

/* Define to 1 if you have the declaration of `_byteswap_ushort', and to 0 if
   you don't. */
#undef HAVE_DECL__BYTESWAP_USHORT

/* Define to 1 if you have the declaration of `_putenv_s(const char*, const
   char*)', and to 0 if you don't. */
#undef HAVE_DECL__PUTENV_S

/* Define to 1 if you have the declaration of `_subborrow_u32(unsigned char,
   unsigned, unsigned, unsigned*)', and to 0 if you don't. */
#undef HAVE_DECL__SUBBORROW_U32

/* Define to 1 if you have the declaration of `_subborrow_u64(unsigned char,
   unsigned __int64, unsigned __int64, unsigned __int64*)', and to 0 if you
   don't. */
#undef HAVE_DECL__SUBBORROW_U64

/* Define to 1 if you have the declaration of `__builtin_add_overflow(int,
   int, int*)', and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_ADD_OVERFLOW

/* Define to 1 if you have the declaration of `__builtin_bswap16(uint16_t)',
   and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_BSWAP16

/* Define to 1 if you have the declaration of `__builtin_bswap32(uint32_t)',
   and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_BSWAP32

/* Define to 1 if you have the declaration of `__builtin_bswap64(uint64_t)',
   and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_BSWAP64

/* Define to 1 if you have the declaration of `__builtin_clz(unsigned)', and
   to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_CLZ

/* Define to 1 if you have the declaration of `__builtin_clzl(unsigned long)',
   and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_CLZL

/* Define to 1 if you have the declaration of `__builtin_clzll(unsigned long
   long)', and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_CLZLL

/* Define to 1 if you have the declaration of `__builtin_ctz(unsigned)', and
   to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_CTZ

/* Define to 1 if you have the declaration of `__builtin_ctzl(unsigned long)',
   and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_CTZL

/* Define to 1 if you have the declaration of `__builtin_ctzll(unsigned long
   long)', and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_CTZLL

/* Define to 1 if you have the declaration of `__builtin_expect(long, long)',
   and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_EXPECT

/* Define to 1 if you have the declaration of `__builtin_ffs(int)', and to 0
   if you don't. */
#undef HAVE_DECL___BUILTIN_FFS

/* Define to 1 if you have the declaration of `__builtin_mul_overflow(int,
   int, int*)', and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_MUL_OVERFLOW

/* Define to 1 if you have the declaration of `__builtin_popcount(unsigned)',
   and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_POPCOUNT

/* Define to 1 if you have the declaration of `__builtin_popcountl(unsigned
   long)', and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_POPCOUNTL

/* Define to 1 if you have the declaration of `__builtin_popcountll(unsigned
   long long)', and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_POPCOUNTLL

/* Define to 1 if you have the declaration of `__builtin_sub_overflow(int,
   int, int*)', and to 0 if you don't. */
#undef HAVE_DECL___BUILTIN_SUB_OVERFLOW

/* Define to 1 if you have the declaration of `__exp10(double)', and to 0 if
   you don't. */
#undef HAVE_DECL___EXP10

/* Define to 1 if you have the declaration of `__popcnt', and to 0 if you
   don't. */
#undef HAVE_DECL___POPCNT

/* Define to 1 if you have the declaration of `__popcnt64', and to 0 if you
   don't. */
#undef HAVE_DECL___POPCNT64

/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H

/* Define to 1 if you have the `fdatasync' function. */
#undef HAVE_FDATASYNC

/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK

/* Define to 1 if you have the `fsync' function. */
#undef HAVE_FSYNC

/* Define to 1 if you have the `ftime' function. */
#undef HAVE_FTIME

/* Define to 1 if you have the `ftruncate' function. */
#undef HAVE_FTRUNCATE

/* Define to 1 if you have the `getdirentries' function. */
#undef HAVE_GETDIRENTRIES

/* Define to 1 if you have the `getentropy' function. */
#undef HAVE_GETENTROPY

/* Define to 1 if you have the `gethostname' function. */
#undef HAVE_GETHOSTNAME

/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT

/* Define to 1 if you have the `getrusage' function. */
#undef HAVE_GETRUSAGE

/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H

/* Define to 1 if you have the `link' function. */
#undef HAVE_LINK

/* Define to 1 if you have the `nanosleep' function. */
#undef HAVE_NANOSLEEP

/* Define to 1 if you have the `nftw' function. */
#undef HAVE_NFTW

/* Define to 1 if you have the `poll' function. */
#undef HAVE_POLL

/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H

/* Define to 1 if you have the `posix_fadvise' function. */
#undef HAVE_POSIX_FADVISE

/* Define if pread is available on this system */
#undef HAVE_PREAD

/* Define if pwrite is available on this system */
#undef HAVE_PWRITE

/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV

/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION

/* Define to 1 if you have the `sleep' function. */
#undef HAVE_SLEEP

/* Define to 1 if you have the 'socketpair' function. */
#undef HAVE_SOCKETPAIR

/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H

/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H

/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H

/* Define if std::from_chars() works for double */
#undef HAVE_STD_FROM_CHARS_DOUBLE

/* Define to 1 if you have the `strerrordesc_np' function. */
#undef HAVE_STRERRORDESC_NP

/* Define if you have `strerror_r'. */
#undef HAVE_STRERROR_R

/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H

/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H

/* Define to 1 if you have the `sysconf' function. */
#undef HAVE_SYSCONF

/* Define to 1 if you have the <sysexits.h> header file. */
#undef HAVE_SYSEXITS_H

/* Define if you have 'sys_errlist' and 'sys_nerr' */
#undef HAVE_SYS_ERRLIST_AND_SYS_NERR

/* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H

/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H

/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H

/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H

/* Define to 1 if you have the <sys/uio.h> header file. */
#undef HAVE_SYS_UIO_H

/* Define to 1 if you have the <sys/utsname.h> header file. */
#undef HAVE_SYS_UTSNAME_H

/* Define to 1 if you have the 'timer_create' function. */
#undef HAVE_TIMER_CREATE

/* Define to 1 if you have the `times' function. */
#undef HAVE_TIMES

/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

/* Define to 1 if you have the <uuid.h> header file. */
#undef HAVE_UUID_H

/* Define to 1 if you have the <uuid/uuid.h> header file. */
#undef HAVE_UUID_UUID_H

/* Define if a suitable valgrind is installed */
#undef HAVE_VALGRIND

/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
#undef HAVE_VALGRIND_MEMCHECK_H

/* Define to 1 if you have the `writev' function. */
#undef HAVE_WRITEV

/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H

/* Define to 1 if you have the `_putenv_s' function. */
#undef HAVE__PUTENV_S

/* Define if you have '_sys_errlist' and '_sys_nerr' */
#undef HAVE__SYS_ERRLIST_AND__SYS_NERR

/* Define to 1 if you have the '__builtin_exp10' function. */
#undef HAVE___BUILTIN_EXP10

/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR

/* Define on mingw to get _s suffixed "secure" functions declared in headers
   */
#undef MINGW_HAS_SECURE_API

/* Name of package */
#undef PACKAGE

/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT

/* Define to the full name of this package. */
#undef PACKAGE_NAME

/* Define to the full name and version of this package. */
#undef PACKAGE_STRING

/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME

/* Define to the home page for this package. */
#undef PACKAGE_URL

/* Define to the version of this package. */
#undef PACKAGE_VERSION

/* explicit prototype needed for pread (if any) */
#undef PREAD_PROTOTYPE

/* explicit prototype needed for pwrite (if any) */
#undef PWRITE_PROTOTYPE

/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT

/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG

/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG

/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT

/* type to use for 5th parameter to getsockopt */
#undef SOCKLEN_T

/* Define to 1 if all of the C90 standard headers exist (not just the ones
   required in a freestanding environment). This macro is provided for
   backward compatibility; new code need not use it. */
#undef STDC_HEADERS

/* Define to 1 if strerror_r returns char *. */
#undef STRERROR_R_CHAR_P

/* Define to use ICU to find word breaks */
#undef USE_ICU

/* Define to 1 to read UUID from '/proc/sys/kernel/random/uuid' */
#undef USE_PROC_FOR_UUID

/* Define if the testsuite can use RTTI */
#undef USE_RTTI

/* Define to 1 to use UuidCreate(), etc */
#undef USE_WIN32_UUID_API

/* Version number of package */
#undef VERSION

/* Version of Windows to assume (0x600 => Vista). */
#undef WINVER

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
   significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
#  define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
#  undef WORDS_BIGENDIAN
# endif
#endif

/* Define if you want assertions (causes some slow-down) */
#undef XAPIAN_ASSERTIONS

/* Define if you want paranoid assertions (causes significant slow-down) */
#undef XAPIAN_ASSERTIONS_PARANOID

/* Define if you want a log of methods called and other debug messages */
#undef XAPIAN_DEBUG_LOG

/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS

/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES

/* Version of Windows to assume. */
#undef _WIN32_WINNT

/* Define to `int' if <sys/types.h> does not define. */
#undef mode_t

/* Define as a signed integer type capable of holding a process identifier. */
#undef pid_t

/* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t

/* Disable stupid MSVC warnings. */
#ifdef _MSC_VER
/* Passing an empty parameter to a single parameter macro. */
# pragma warning(disable:4003)
/* Assignment in conditional expression; other compilers suppress with extra parentheses but not MSVC. */
# pragma warning(disable:4706)
/* A "performance" warning for converting int to bool. */
# pragma warning(disable:4800)
/* Character in string literal can't be represented in current code page. */
# pragma warning(disable:4566)

/* POSIX get to deprecate POSIX things, not Microsoft. */
# ifndef _CRT_NONSTDC_NO_WARNINGS
#  define _CRT_NONSTDC_NO_WARNINGS
# endif
# ifndef _CRT_SECURE_NO_WARNINGS
#  define _CRT_SECURE_NO_WARNINGS
# endif

/* WSAAddressToStringA() is deprecated and we should apparently use
 * WSAAddressToStringW(), but we don't want wide character output so
 * that would mean we'd have to convert the result back to ASCII
 * which is a really stupid idea.
 */
# ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
#  define _WINSOCK_DEPRECATED_NO_WARNINGS
# endif

/* Tell MSVC we want M_PI, etc defined. */
# ifndef _USE_MATH_DEFINES
#  define _USE_MATH_DEFINES
# endif

/* Tell MSVC we don't want max() and min() macros defined. */
# ifndef NOMINMAX
#  define NOMINMAX
# endif
#endif

/* Tell zlib to include const in method signatures.  Define this in config.h
 * to ensure it always gets defined before zlib.h is included.
 */
#define ZLIB_CONST

/* Make the POSIX-like functions support large files.  MSVC needs this;
 * current mingw32 does too; mingw64 supports _FILE_OFFSET_BITS, which
 * AC_SYS_LARGEFILE should discover and enable automatically.
 */
#if defined _MSC_VER || \
    (defined __MINGW32__ && !defined _FILE_OFFSET_BITS)

# include <sys/stat.h>
# include <sys/types.h>
# include <io.h>
/* zlib.h uses off_t so we need to include it before we redefine off_t. */
# include <zlib.h>

// The default stat() and fstat() use 32-bit filesizes and time_t, so we need
// to arrange to use 64-bit variants instead.

# ifdef stat
// Break #undef lines to stop config.status from commenting them out.
#  undef \
        stat
# endif

// This hack is a problem is we ever want a method called "stat".
# ifdef _MSC_VER
// MSVC needs to call _stat64() instead of stat() and the struct which holds
// the information is `struct _stat64` instead of `struct stat` so we just
// use #define to replace both in one go.
#  define stat _stat64
# else
// Mingw32 has _stat64() but unhelpfully for our purposes, the struct is
// called __stat64 (with an extra underscore).  We hack around this by
// defining stat to __stat64 which sorts out the struct, and then using
// a second macro to forward function-like uses of __stat64() to
// _stat64().
#  define stat __stat64
#  define __stat64(PATH, STATBUF) _stat64((PATH), (STATBUF))
# endif

// We also want to use _fstat64() instead of fstat() but in this case we can
// use a function-like macro, so we could have a method called fstat so long
// as it didn't take two parameters.

# ifdef fstat
// Break #undef lines to stop config.status from commenting them out.
#  undef \
        fstat
# endif

# define fstat(FD, BUF) _fstat64(FD, BUF)

# ifdef lseek
// Break #undef lines to stop config.status from commenting them out.
#  undef \
        lseek
# endif

# ifdef off_t
// Break #undef lines to stop config.status from commenting them out.
#  undef \
        off_t
# endif

# define lseek(FD, OFF, WHENCE) _lseeki64(FD, OFF, WHENCE)
/* Redefine via a typedef so C++ code off_t(-1) works - it wouldn't if we did:
 * #define off_t long long
 */
typedef long long off_t_redefinition_typedef;
# define off_t off_t_redefinition_typedef

#endif

/* MSVC defines _WIN32 but not __WIN32__. */
#if !defined __WIN32__ && defined _WIN32
# define __WIN32__
#endif

/* MSVC defines _WIN64 but not __WIN64__. */
#if !defined __WIN64__ && defined _WIN64
# define __WIN64__
#endif

/* Default to enabling _FORTIFY_SOURCE at level 2 for GCC-like compilers.  It
 * shouldn't cause a problem to define it where it's not supported.
 *
 * The FORTIFY_SOURCE_OK check avoids auto-enabling on some mingw-w64 versions
 * which required linking with -lssp too.  This was addressed in v11.0.0
 * (released 2023-04-28).
 *
 * Check if _FORTIFY_SOURCE is already defined to allow the user to override
 * our choice with "./configure CPPFLAGS=-D_FORTIFY_SOURCE=0" or "...=1" or
 * "...=3".
 */
#if defined FORTIFY_SOURCE_OK && !defined _FORTIFY_SOURCE
# define _FORTIFY_SOURCE 2
#endif

/* For compilers which support it (such as GCC, clang, Intel's C++ compiler)
 * we can use __builtin_expect to give the compiler hints about branch
 * prediction.  See HACKING for how to use these.
 */
#if HAVE_DECL___BUILTIN_EXPECT
/* The arguments of __builtin_expect() are both long, so use !! to ensure that
 * the first argument is always an integer expression, and always 0 or 1, but
 * still has the same truth value for the if or while it is used in.
 */
# define rare(COND) __builtin_expect(!!(COND), 0)
# define usual(COND) __builtin_expect(!!(COND), 1)
#else
# define rare(COND) (COND)
# define usual(COND) (COND)
#endif

/* This macro can be used around expressions which intentionally make use of
 * unsigned integer overflow (which is defined behaviour, unlike signed integer
 * overflow) so that we can use UBSan's optional unsigned-integer-overflow
 * check to find potential bugs where we unintentionally overflow an unsigned
 * integer.
 */
#ifdef __clang__
#define UNSIGNED_OVERFLOW_OK(X) \
    ([&]() __attribute__((no_sanitize("unsigned-integer-overflow"))) {\
        return (X);\
    }())
#else
# define UNSIGNED_OVERFLOW_OK(X) (X)
#endif

/* Signal we're building the library so it's OK to include headers such as
 * xapian/query.h directly.
 */
#define XAPIAN_LIB_BUILD 1

