/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0.  If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
 */

/* Manual config.h. needed for win32 .  */

/* We use the value of _MSC_VER to distinguish the various versions of
 * Microsoft Visual Studio:
 * _MSC_VER = 1200: Visual Studio 6
 * _MSC_VER = 1310: Visual Studio .NET 2003 (a.k.a. Visual Studio 7)
 * _MSC_VER = 1400: Visual Studio 8
 * _MSC_VER = 1500: Visual Studio 9.0
 * _MSC_VER = 1600: Visual Studio 10.0
 * _MSC_VER = 1800: Visual Studio 12.0
 * _MSC_VER = 1900: Visual Studio 14.0
 */

#ifndef _SEEN_MONETDB_CONFIG_H
#define _SEEN_MONETDB_CONFIG_H 1

/* Prevent pollution through excessive inclusion of include files by
 * Windows.h. */
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif

/* Visual Studio 8 has deprecated lots of stuff: suppress warnings */
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE 1
#endif

#include <malloc.h>

#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
/* In this case, malloc and friends are redefined in crtdbg.h to debug
   versions.  We need to include stdlib.h and malloc.h first or else
   we get conflicting declarations.
*/
#include <stdlib.h>
#include <crtdbg.h>
#endif

#include <process.h>
#include <windows.h>
#include <stddef.h>
#include <ws2tcpip.h>

#include <sys/types.h>
#include <stdio.h>		/* NULL, printf etc. */
#include <stdlib.h>
#include <errno.h>
#include <stdarg.h>		/* va_alist.. */

#include <assert.h>

#define __func__ __FUNCTION__

/* indicate to sqltypes.h that windows.h has already been included and
   that it doesn't have to define Windows constants */
#define ALREADY_HAVE_WINDOWS_TYPE 1

#define NATIVE_WIN32 1

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

/* location where binaries are installed */
/* #undef BINDIR */

/* read-only architecture-independent data */
#define DATA_DIR PREFIX "\\share"

/* Directory separator */
#define DIR_SEP '\\'

/* Directory separator */
#define DIR_SEP_STR "\\"

/* architecture-dependent files */
#define EXEC_PREFIX PREFIX

/* Define to 1 if you have the `asctime_r' function. */
#define HAVE_ASCTIME_R 1

/* Define if you have asctime_r(struct tm*,char *buf,size_t s) */
#define HAVE_ASCTIME_R3 1
/* there is something very similar to asctime_r on Windows: */
#define asctime_r(t,b,s)	asctime_s(b,s,t)

/* Define to nothing if C supports flexible array members, and to 1 if it does
   not. That way, with a declaration like `struct s { int n; double
   d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
   compilers. When computing the size of such an object, don't use 'sizeof
   (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
   instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
   MSVC and with C++ compilers. */
#define FLEXIBLE_ARRAY_MEMBER

/* If the console should be used */
#define HAVE_CONSOLE 1

/* crypt */
/* #undef HAVE_CRYPT */

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

/* Define to 1 if you have the `ctime_r' function. */
#define HAVE_CTIME_R 1

#ifdef _MSC_VER
/* Define if you have ctime_r(time_t*,char *buf,size_t s) */
#define HAVE_CTIME_R3 1
/* there is something very similar to ctime_r on Windows: */
#define ctime_r(t,b,s)	(ctime_s(b,s,t) ? NULL : (b))
#endif

/* Define if you have the cURL library */
/* #undef HAVE_CURL */

/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
   */
/* #undef HAVE_DIRENT_H */

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

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

/* Define to 1 if you have the `fabsf' function. */
#define HAVE_FABSF 1

/* Define to 1 if you have the `fallocate' function. */
/* #undef HAVE_FALLOCATE */

/* Define to 1 if you have the `fcntl' function. */
/* #undef HAVE_FCNTL */

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

/* If the system has a working fdatasync */
/* #undef HAVE_FDATASYNC */

/* Define to 1 if you have the <fenv.h> header file. */
#if !defined(_MSC_VER) || _MSC_VER >= 1800
#define HAVE_FENV_H 1
#endif

/* Define if the fits module is to be enabled */
/* #undef HAVE_FITS */

/* Define to 1 if you have the `fpclass' function. */
#define HAVE_FPCLASS 1		/* uses _fpclass, see mmath.c */

/* Define to 1 if you have the `fpclassify' function. */
#if defined(_MSC_VER) && _MSC_VER > 1600
#define HAVE_FPCLASSIFY 1
#endif

/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
/* #undef HAVE_FSEEKO */

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

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

/* Define to 1 if you have the `ftruncate' function. */
#define HAVE_FTRUNCATE 1
#ifdef _MSC_VER
#define ftruncate(fd, sz)	(-(_chsize_s((fd), (__int64) (sz)) != 0))
#endif

/* Define if you use garbage collection */
/* #undef HAVE_GC */

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

/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1

/* Define to 1 if you have the `GetDynamicTimeZoneInformation' function. */
#ifdef _MSC_VER
#define HAVE_GETDYNAMICTIMEZONEINFORMATION 1
#endif

/* Define to 1 if you have the `getexecname' function. */
/* #undef HAVE_GETEXECNAME */

/* Define to 1 if you have the `getlogin' function. */
/* #undef HAVE_GETLOGIN */

/* Define to 1 if you have the `getopt' function. */
/* #undef HAVE_GETOPT */

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

/* Define to 1 if you have the `getopt_long' function. */
/* #undef HAVE_GETOPT_LONG */

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

/* Define to 1 if you have the `getuid' function. */
/* #undef HAVE_GETUID */

/* Define if you have the iconv() function and it works. */
/* #undef HAVE_ICONV */		/* optionally defined in rules.msc */

/* Define to 1 if you have the <iconv.h> header file. */
#ifdef HAVE_ICONV
#define HAVE_ICONV_H 1
#endif

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

/* Define to 1 if you have the <inttypes.h> header file. */
#if !defined(_MSC_VER) || _MSC_VER >= 1800
#define HAVE_INTTYPES_H 1
#endif

/* Define to 1 if you have the <io.h> header file. */
#define HAVE_IO_H 1

/* Define to 1 if you have the `isinf' function. */
#if !defined(_MSC_VER) || _MSC_VER > 1600
#define HAVE_ISINF 1
#endif

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

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

/* Define if you have the atomic_ops library */
/* #undef HAVE_LIBATOMIC_OPS */

/* Define if you have the bz2 library */
/* #undef HAVE_LIBBZ2 */

/* Define if you have the cpc library */
/* #undef HAVE_LIBCPC */

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

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

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

/* Define if you have the pcl library */
/* #undef HAVE_LIBPCL */

/* Define if you have the pcre library */
/* #undef HAVE_LIBPCRE */

/* Define if you have the perfctr library */
/* #undef HAVE_LIBPERFCTR */

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

/* Define if you have the perfmon library */
/* #undef HAVE_LIBPERFMON */

/* Define if you have the pfm library */
/* #undef HAVE_LIBPFM */

/* Define if you have the pperf library */
/* #undef HAVE_LIBPPERF */

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

/* Define if you have the pthread library */
/* #undef HAVE_LIBPTHREAD */

/* Define if you have the readline library */
/* #undef HAVE_LIBREADLINE */

/* Define if you have the z library */
/* #undef HAVE_LIBZ */

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

/* Define to 1 if you have the `llabs' function. */
#define HAVE_LLABS 1
#if defined(_MSC_VER) && _MSC_VER <= 1500
#define llabs _abs64
#endif

/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
#ifdef _MSC_VER
/* Define to 1 if you have the `localtime_r' function. */
#define HAVE_LOCALTIME_R 1
/* there is something very similar to localtime_r on Windows: */
#define localtime_r(tp,tm)	localtime_s(tm,tp)
#endif

/* Define to 1 if you have the `lockf' function. */
/* #undef HAVE_LOCKF */

/* Define to 1 if the system has the type `long long'. */
#if (defined(_MSC_VER) && _MSC_VER > 1600) || (defined(__ICL) && __ICL >= 1010) || defined(__MINGW32__)
#define HAVE_LONG_LONG 1
#else
#if defined(_MSC_VER) && _MSC_VER >= 1300
/* Visual Studio .NET 2003 does have long long, but the printf %lld
 * format is interpreted the same as %ld, i.e. useless
 */
/* #define HAVE_LONG_LONG 1 */
#endif
#endif

/* Define to 1 if you have the <mach/mach_init.h> header file. */
/* #undef HAVE_MACH_MACH_INIT_H */

/* Define to 1 if you have the <mach-o/dyld.h> header file. */
/* #undef HAVE_MACH_O_DYLD_H */

/* Define to 1 if you have the <mach/task.h> header file. */
/* #undef HAVE_MACH_TASK_H */

/* Define to 1 if you have the `madvise' function. */
/* #undef HAVE_MADVISE */

/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1

/* Define to 1 if you have the `mallopt' function. */
/* #undef HAVE_MALLOPT */

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the `mremap' function. */
/* #undef HAVE_MREMAP */

/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */

/* Define if you have netcdf installed */
/* #undef HAVE_NETCDF */

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

/* Define to 1 if you have the <netinet/in.h> header file. */
/* #undef HAVE_NETINET_IN_H */

/* Define to 1 if you have the `nl_langinfo' function. */
/* #undef HAVE_NL_LANGINFO */

/* Define to 1 if you have the `nextafterf' function. */
#if !defined(_MSC_VER) || _MSC_VER > 1600
#define HAVE_NEXTAFTERF 1
#endif

/* Define to 1 if you have the `_NSGetExecutablePath' function. */
/* #undef HAVE__NSGETEXECUTABLEPATH */

/* Define to 1 if you have the <odbcinst.h> header file. */
#define HAVE_ODBCINST_H 1

/* Define if you have the OpenSSL library */
/* #undef HAVE_OPENSSL */

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

/* Define to 1 if you have the <perfmon/pfmlib.h> header file. */
/* #undef HAVE_PERFMON_PFMLIB_H */

#ifdef pipe
#undef pipe
#endif
#define pipe(p) _pipe(p, 8192, O_BINARY)

/* Define to 1 if you have the `popen' function. */
/* #undef HAVE_POPEN */

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

/* Define to 1 if you have the `posix_madvise' function. */
/* #undef HAVE_POSIX_MADVISE */

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

/* Define if you have the proj library */
/* #undef HAVE_PROJ */

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

/* Define if you have the pthread_kill function */
/* #undef HAVE_PTHREAD_KILL */

/* Define if you have the pthread_sigmask function */
/* #undef HAVE_PTHREAD_SIGMASK */

/* Define to 1 if the system has the type `ptrdiff_t'. */
#define HAVE_PTRDIFF_T 1

/* Define to 1 if you have the `putenv' function. */
#define HAVE_PUTENV 1

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

/* Define if the compiler supports the restrict keyword */
/* #undef HAVE_RESTRICT */

/* Define to 1 if you have the `round' function. */
#if !defined(_MSC_VER) || _MSC_VER > 1600
#define HAVE_ROUND 1
#endif

/* Define if you have the samtools (providing the bam library) */
/* #undef HAVE_SAMTOOLS */

/* Define to 1 if you have the <samtools/kstring.h> header file. */
/* #undef HAVE_SAMTOOLS_KSTRING_H */

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

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

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

/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1

/* Define to 1 if you have the `setsid' function. */
/* #undef HAVE_SETSID */

#ifdef HAVE_OPENSSL
/* Define to 1 if you have the `MD5_Update' function. */
#define HAVE_MD5_UPDATE 1

/* Define to 1 if you have the `RIPEMD160_Update' function. */
#define HAVE_RIPEMD160_UPDATE 1

/* Define to 1 if you have the `SHA1_Update' function. */
#define HAVE_SHA1_UPDATE 1

/* Define to 1 if you have the `SHA224_Update' function. */
#define HAVE_SHA224_UPDATE 1

/* Define to 1 if you have the `SHA256_Update' function. */
#define HAVE_SHA256_UPDATE 1

/* Define to 1 if you have the `SHA384_Update' function. */
#define HAVE_SHA384_UPDATE 1

/* Define to 1 if you have the `SHA512_Update' function. */
#define HAVE_SHA512_UPDATE 1
#endif

/* Define to 1 if you have the `shutdown' function. */
#define HAVE_SHUTDOWN 1

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

/* Define to 1 if you have the <signal.h> header file. */
#define HAVE_SIGNAL_H 1

/* Define to 1 if the system has the type `socklen_t'. */
#define HAVE_SOCKLEN_T 1

/* Define if you have the sphinxclient library */
/* #undef HAVE_SPHINXCLIENT */

/* Define if you have the SQLGetPrivateProfileString function */
#define HAVE_SQLGETPRIVATEPROFILESTRING 1

/* Define to 1 if stdbool.h conforms to C99. */
#if !defined(_MSC_VER) || _MSC_VER >= 1800
#define HAVE_STDBOOL_H 1
#endif

/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1

/* Define to 1 if you have the <stdint.h> header file. */
#if !defined(_MSC_VER) || _MSC_VER >= 1600
#define HAVE_STDINT_H 1
#endif

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

#define strdup(s)	_strdup(s)

#ifndef strcasecmp
#define strcasecmp(x,y) _stricmp(x,y)
#endif

/* Define to 1 if you have the `strcasestr' function. */
/* #undef HAVE_STRCASESTR */

/* Define to 1 if you have the `strcpy_s' function. */
#define HAVE_STRCPY_S 1

/* Define to 1 if you have the `strftime' function. */
#if !defined(_MSC_VER) || _MSC_VER >= 1500
#define HAVE_STRFTIME 1
#endif

/* 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. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strncasecmp' function. */
#define HAVE_STRNCASECMP 1
#ifndef strncasecmp
#define strncasecmp(x,y,z) _strnicmp(x,y,z)
#endif

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

/* Define to 1 if you have the `strptime' function. */
/* #undef HAVE_STRPTIME */

/* Define to 1 if you have the `strsignal' function. */
/* #undef HAVE_STRSIGNAL */

/* Define to 1 if you have the `strtod' function. */
#define HAVE_STRTOD 1

/* Define to 1 if you have the `strtof' function. */
#if !defined(_MSC_VER) || _MSC_VER > 1600
#define HAVE_STRTOF 1
#endif

#define strtok_r(t,d,c) strtok_s(t,d,c)

/* Define to 1 if you have the `strtoll' function. */
#if !defined(_MSC_VER) || _MSC_VER >= 1300
#define HAVE_STRTOLL 1
#if defined(_MSC_VER) && _MSC_VER <= 1600 && !defined(strtoll)
#define strtoll _strtoi64
#endif
#endif

/* Define to 1 if you have the `strtoull' function. */
#if !defined(_MSC_VER) || _MSC_VER >= 1300
#define HAVE_STRTOULL 1
#if defined(_MSC_VER) && _MSC_VER <= 1600 && !defined(strtoull)
#define strtoull _strtoui64
#endif
#endif

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

/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
   */
/* #undef HAVE_SYS_DIR_H */

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

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

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

/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
   */
/* #undef HAVE_SYS_NDIR_H */

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

/* 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/socket.h> header file. */
/* #undef HAVE_SYS_SOCKET_H */

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

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

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

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

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

/* 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/un.h> header file. */
/* #undef HAVE_SYS_UN_H */

/* Define to 1 if you have the <sys/utime.h> header file. */
#define HAVE_SYS_UTIME_H 1

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

/* Define to 1 if you have the `task_info' function. */
/* #undef HAVE_TASK_INFO */

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

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

/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1

/* Define to 1 if you have the `trunc' function. */
#if !defined(_MSC_VER) || _MSC_VER > 1600
#define HAVE_TRUNC 1
#endif

/* Define to 1 if you have the `uname' function. */
/* #undef HAVE_UNAME */

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1		/* generate by the Makefile */

/* Define if you have mallinfo */
/* #undef HAVE_USEFUL_MALLINFO */

/* Define if you have the LibUriParser library */
/* #undef HAVE_URIPARSER */

/* uuid */
/* #undef HAVE_UUID */

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

/* Define if you have valgrind installed and want to use it */
/* #undef HAVE_VALGRIND */

#ifdef _MSC_VER
/* Define to 1 if you have the `_wfopen' function. */
#define HAVE__WFOPEN 1
#endif

/* Define to 1 if you have the <winsock.h> header file. */
#define HAVE_WINSOCK_H 1

/* Define to 1 if the system has the type `_Bool'. */
/* #undef HAVE__BOOL */

#ifdef _WIN64
/* Define to 1 if you have the `_mul128' function. */
#define HAVE__MUL128 1
#endif

/* Define if you have _sys_siglist */
/* #undef HAVE__SYS_SIGLIST */

/* Define to 1 if the system has the type `__int128'. */
/* #undef HAVE___INT128 */

/* Define to 1 if the system has the type `__int128_t'. */
/* #undef HAVE___INT128_T */

/* Define to 1 if the system has the type `__uint128_t'. */
/* #undef HAVE___UINT128_T */

/* Define to 1 if the system has the type `__int64'. */
#define HAVE___INT64 1

/* Define if the compiler supports the __restrict__ keyword */
/* #undef HAVE___RESTRICT__ */

/* Host identifier */
#ifdef _WIN64
#define HOST "x86_64-pc-winnt"
#else
#define HOST "i686-pc-winnt"
#endif

/* Define as const if the declaration of iconv() needs const. */
#define ICONV_CONST const

/* Define as SQLLEN * or SQLPOINTER depending on the include file */
#ifdef _WIN64
#define LENP_OR_POINTER_T SQLLEN *
#else
#define LENP_OR_POINTER_T SQLPOINTER
#endif

/* object code libraries */
#define LIBDIR EXEC_PREFIX "\\lib"

/* modifiable single-machine data */
#define LOCALSTATEDIR PREFIX "\\var"

#include <sys/stat.h>
#define lstat _stat64
#ifdef stat
#undef stat
#endif
#define stat _stat64
#ifdef fstat
#undef fstat
#endif
#define fstat _fstat64
#ifndef S_ISREG
#define S_ISREG(mode)	(((mode) & _S_IFMT) == _S_IFREG)
#endif
#ifndef S_ISDIR
#define S_ISDIR(mode)	(((mode) & _S_IFMT) == _S_IFDIR)
#endif

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

/* where Merovingian will store its logs by default */
/* #undef MERO_LOG */

/* The used password hash algorithm */
#define MONETDB5_PASSWDHASH "SHA512"
#define MONETDB5_PASSWDHASH_TOKEN SHA512

/* Release name or "unreleased" */
#define MONETDB_RELEASE "unreleased"

/* Suffix for C++ files */
#define MX_CXX_SUFFIX "cxx"

/* Define if you do not want assertions */
#undef NDEBUG

/* Name of package */
#define PACKAGE "MonetDB"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "info@monetdb.org"

/* Define to the full name of this package. */
#define PACKAGE_NAME "MonetDB"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "MonetDB 11.25.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "MonetDB"

/* Define to the version of this package. */
#define PACKAGE_VERSION "11.25.0"

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

/* Path separator */
#define PATH_SEP ';'

/* Path separator */
#define PATH_SEP_STR ";"

/* architecture-independent files */
#define PREFIX "@QXprefix@"

/* Compiler flag */
/* #undef PROFILE */

/* The size of `char', as computed by sizeof. */
#define SIZEOF_CHAR 1

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

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

/* The size of `long long', as computed by sizeof. */
#ifdef HAVE_LONG_LONG
#define SIZEOF_LONG_LONG 8
#endif

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

/* The size of `size_t', as computed by sizeof. */
#ifdef _WIN64
#define SIZEOF_SIZE_T 8
#else
#define SIZEOF_SIZE_T 4
#endif

/* The size of `ssize_t', as computed by sizeof. */
#define SIZEOF_SSIZE_T SIZEOF_SIZE_T

/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P SIZEOF_SIZE_T

/* The size of `__int64', as computed by sizeof. */
#define SIZEOF___INT64 8

/* type used for sockets */
/* #undef SOCKET */

/* Shared Object extension */
#define SO_EXT ".dll"

/* Shared Object prefix */
#define SO_PREFIX "lib"

/* If using the C implementation of alloca, define if you know the
   direction of stack growth for your system; otherwise it will be
   automatically deduced at runtime.
	STACK_DIRECTION > 0 => grows toward higher addresses
	STACK_DIRECTION < 0 => grows toward lower addresses
	STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* read-only single-machine data */
#define SYSCONFDIR PREFIX "\\etc"

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #undef TIME_WITH_SYS_TIME */

/* Enable extensions on AIX 3, Interix.  */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Enable GNU extensions on systems that have them.  */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
/* Enable threading extensions on Solaris.  */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
/* Enable extensions on HP NonStop.  */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
/* Enable general extensions on Solaris.  */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif


/* Version number of package */
#define VERSION "@VERSION@"

/* Define on Microsoft Windows (also under Cygwin) */
#ifndef WIN32
#define WIN32 1
#endif

/* 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

/* Needed to compile bison-generated code. */
/* #undef YYENABLE_NLS */

/* Needed to compile bison-generated code. */
/* #undef YYLTYPE_IS_TRIVIAL */

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

/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
/* #undef _LARGEFILE_SOURCE */

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

/* Define to 1 if on MINIX. */
/* #undef _MINIX */

/* Define to 2 if the system does not provide POSIX.1 features except with
   this defined. */
/* #undef _POSIX_1_SOURCE */

/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */

/* Define to 1 if type `char' is unsigned and you are not using gcc.  */
#ifndef __CHAR_UNSIGNED__
# undef __CHAR_UNSIGNED__
#endif

/* libxml2 enable threading compiler flag */
/* #undef __MT__ */

/* If the compiler does not support function attributes via __attribute__,
   we just define __attribute__(a) to nothing. */
#define __attribute__(a)

/* Does your compiler support the `__hidden' specifier? */
#define __hidden

/* function to close a socket */
/* #undef closesocket */

/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */

/* Define to `__inline__' or `__inline' if that's what the C compiler
   calls it, or to nothing if 'inline' is not supported under any name.  */
#ifndef __cplusplus
#ifndef inline
#define inline __inline
#endif
#endif

/* Define to `__restrict__' or `__restrict' if that's what the C compiler
   calls it, or to nothing if 'restrict' is not supported under any name.  */
#ifndef __cplusplus
#ifndef restrict
#define restrict __restrict
#endif
#endif

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

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

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

#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf c99_snprintf
#define vsnprintf c99_vsnprintf

/* Microsoft _snprintf returns -1 and does not null-terminate when the
 * buffer is too small, so work around that */

static inline int
c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
{
    int count = -1;

    if (size != 0)
        count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);
    if (count == -1)
        count = _vscprintf(format, ap);

    return count;
}

static inline int
c99_snprintf(char *outBuf, size_t size, const char *format, ...)
{
    int count;
    va_list ap;

    va_start(ap, format);
    count = c99_vsnprintf(outBuf, size, format, ap);
    va_end(ap);

    return count;
}
#endif

/* type used by connect */
#define socklen_t int

/* Define to `int' if <sys/types.h> does not define. */
#ifdef _WIN64
#define ssize_t __int64
#else
#define ssize_t int
#endif

#if defined(_MSC_VER) && _MSC_VER <= 1600
/* no va_copy in win32 */
#define va_copy(x,y) ((x) = (y))
#endif

typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned __int64 uint64_t;

/* normally defined in stdbool.h, but that doesn't exist on Windows */
#define true 1
#define false 0
#define __bool_true_false_are_defined 1


#ifdef HAVE_LONG_LONG
typedef long long lng;
typedef unsigned long long ulng;
# define SIZEOF_LNG SIZEOF_LONG_LONG
#else
typedef __int64 lng;
typedef unsigned __int64 ulng;
# define SIZEOF_LNG SIZEOF___INT64
#endif

#ifdef HAVE___INT128
typedef __int128 hge;
typedef unsigned __int128 uhge;
# define HAVE_HGE 1
# define SIZEOF_HGE SIZEOF___INT128
#else
# if defined(HAVE___INT128_T) && defined(HAVE___UINT128_T)
typedef __int128_t hge;
typedef __uint128_t uhge;
#  define HAVE_HGE 1
#  define SIZEOF_HGE SIZEOF___INT128_T
# endif
#endif

/* Format to print 64 bit signed integers. */
#define LLFMT "%I64d"

/* Format to print 64 bit unsigned integers. */
#define ULLFMT "%I64u"

/* define printf formats for printing size_t and ssize_t variables */
#if SIZEOF_SIZE_T == SIZEOF_INT
# define SZFMT "%u"
# define SSZFMT "%d"
#elif SIZEOF_SIZE_T == SIZEOF_LONG
# define SZFMT "%lu"
# define SSZFMT "%ld"
#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG || SIZEOF_SIZE_T == SIZEOF___INT64
# define SZFMT ULLFMT
# define SSZFMT LLFMT
#else
# error no definition for SZFMT/SSZFMT
#endif

#define PDFMT SSZFMT

#define PTRFMT		"%p"
#define PTRFMTCAST

#ifdef HAVE_EMBEDDED
#define _MSC_EXTENSIONS 1
#undef HAVE_CTIME_R
#include "embedded/undef.h"
#else
#define HAVE_MAPI 1
#endif

#define PROMPT1		"\001\001\n"	/* prompt: ready for new query */
#define PROMPT2		"\001\002\n"	/* prompt: more data needed */

#endif /* _SEEN_MONETDB_CONFIG_H */
