Permalink
Fetching contributors…
Cannot retrieve contributors at this time
285 lines (258 sloc) 6.61 KB
/*
* Copyright (c) 2005-2009, OmniTI Computer Consulting, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name OmniTI Computer Consulting, Inc. nor the names
* of its contributors may be used to endorse or promote products
* derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __NOIT_CONFIG_H
#define __NOIT_CONFIG_H
/* define inline unless that is what the compiler already calls it. */
#undef inline
#undef DTRACE_ENABLED
#ifndef DTRACE_ENABLED
#define DTRACE_PROBES_DISABLED 1
#endif
#undef MODULEEXT
#undef MODULES_DIR
#undef DEFAULT_EVENTER
#undef ETC_DIR
#undef HAVE_FCNTL_H
#undef HAVE_UNISTD_H
#undef HAVE_SYS_TYPES_H
#undef HAVE_SYS_WAIT_H
#undef HAVE_TERM_H
#undef HAVE_TERMIO_H
#undef HAVE_TERMIOS_H
#undef TPUTS_TAKES_CHAR
#undef TGOTO_TAKES_CHAR
#undef HAVE_SYS_IOCTL_COMPAT_H
#undef HAVE_SYS_IOCTL_H
#undef HAVE_SYS_FILIO_H
#undef HAVE_STROPTS_H
#undef HAVE_SYS_STREAM_H
#undef HAVE_UTIL_H
#undef HAVE_BSD_LIBUTIL_H
#undef HAVE_LIBUTIL_H
#undef HAVE_CURSES_H
#undef HAVE_DIRENT_H
#undef HAVE_PWD_H
#undef HAVE_PTY_H
#undef HAVE_ERRNO_H
#undef HAVE_STRING_H
#undef HAVE_STDLIB_H
#undef HAVE_SYS_PARAM_H
#undef HAVE_SEMAPHORE_H
#undef HAVE_ALLOCA_H
#undef HAVE_TIME_H
#undef HAVE_SYS_STAT_H
#undef HAVE_SYS_RESOURCE_H
#undef HAVE_SYS_CDEFS_H
#undef HAVE_LIBKERN_OSATOMIC_H
#undef HAVE_NETINET_IN_SYSTM_H
#undef HAVE_POSIX_READDIR_R
#undef HAVE_MYSQL_H
#undef HAVE_MYSQL_MYSQL_H
#undef HAVE_INT64_T
#undef HAVE_INTXX_T
#undef HAVE_LONG_LONG_INT
#undef HAVE_UINTXX_T
#undef HAVE_U_INT
#undef HAVE_U_INT64_T
#undef HAVE_U_INTXX_T
#undef HAVE_SIG_T
#undef HAVE_UUID_UNPARSE_LOWER
#define IFS_CH '/'
#undef WORKING_SEM_INIT
#undef HAVE_GETPWNAM_R
#undef HAVE_GETPWNAM_R_POSIX
#undef HAVE_GETGRNAM_R
#undef HAVE_GETGRNAM_R_POSIX
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#undef HAVE_ISSETUGID
#undef HAVE_STRLCPY
#undef HAVE_STRNSTRN
#undef HAVE_OPENPTY
#undef HAVE_DECL_OPENPTY
#undef HAVE_INET_PTON
#undef HAVE_INET_NTOP
#undef HAVE_GETOPT
#undef HAVE_POLL
#undef HAVE_VASPRINTF
/* Kernel kqueue() support */
#undef HAVE_KQUEUE
/* Kernel epoll_create() support */
#undef HAVE_EPOLL
/* Kernel port_create() support */
#undef HAVE_PORTS
/* The number of bytes in a char. */
#undef SIZEOF_CHAR
/* The number of bytes in a int. */
#undef SIZEOF_INT
/* The number of bytes in a size_t. */
#undef SIZEOF_SIZE_T
/* The number of bytes in a long int. */
#undef SIZEOF_LONG_INT
/* The number of bytes in a long long int. */
#undef SIZEOF_LONG_LONG_INT
/* The number of bytes in a short int. */
#undef SIZEOF_SHORT_INT
/* The number of bytes in a void *. */
#undef SIZEOF_VOID_P
/* The number of bytes in a void * (workaround for OpenBSD). */
#undef SIZEOF_VOID__
#if !defined(SIZEOF_VOID_P) && defined(SIZEOF_VOID__)
# define SIZEOF_VOID_P SIZEOF_VOID__
#endif
#ifndef HAVE_U_INT
#define HAVE_U_INT
typedef unsigned int u_int;
#endif
#undef HAVE_INTXX_T
#ifndef HAVE_INTXX_T
#if (SIZEOF_CHAR == 1)
typedef char int8_t;
#else
#error "8 bit int type not found."
#endif
#if (SIZEOF_SHORT_INT == 2)
typedef short int int16_t;
#else
#ifdef _CRAY
typedef long int16_t;
#else
#warning "16 bit int type not found."
#endif /* _CRAY */
#endif
#if (SIZEOF_INT == 4)
typedef int int32_t;
#else
#ifdef _CRAY
typedef long int32_t;
#else
#error "32 bit int type not found."
#endif /* _CRAY */
#endif
#endif
/* If sys/types.h does not supply u_intXX_t, supply them ourselves */
#ifndef HAVE_U_INTXX_T
#ifdef HAVE_UINTXX_T
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
#define HAVE_U_INTXX_T 1
#else
#if (SIZEOF_CHAR == 1)
typedef unsigned char u_int8_t;
#else
#error "8 bit int type not found."
#endif
#if (SIZEOF_SHORT_INT == 2)
typedef unsigned short int u_int16_t;
#else
#ifdef _CRAY
typedef unsigned long u_int16_t;
#else
#warning "16 bit int type not found."
#endif
#endif
#if (SIZEOF_INT == 4)
typedef unsigned int u_int32_t;
#else
#ifdef _CRAY
typedef unsigned long u_int32_t;
#else
#error "32 bit int type not found."
#endif
#endif
#endif
#endif
/* 64-bit types */
#ifndef HAVE_INT64_T
#if (SIZEOF_LONG_INT == 8)
typedef long int int64_t;
#define HAVE_INT64_T 1
#else
#if (SIZEOF_LONG_LONG_INT == 8)
typedef long long int int64_t;
#define HAVE_INT64_T 1
#define HAVE_LONG_LONG_INT
#endif
#endif
#endif
#ifndef HAVE_U_INT64_T
#if (SIZEOF_LONG_INT == 8)
typedef unsigned long int u_int64_t;
#define HAVE_U_INT64_T 1
#else
#if (SIZEOF_LONG_LONG_INT == 8)
typedef unsigned long long int u_int64_t;
#define HAVE_U_INT64_T 1
#endif
#endif
#endif
/* BIND, Kerberos and Berkeley DB use __BIT_TYPES_DEFINED__ to protect
* against multiple redefinitions of these types (u_int{8,16,32,64}_t)
* and so shall we.
*/
#ifndef __BIT_TYPES_DEFINED__
#define __BIT_TYPES_DEFINED__
#endif
#if (SIZEOF_VOID_P == 8)
typedef u_int64_t vpsized_uint;
typedef int64_t vpsized_int;
#elif (SIZEOF_VOID_P == 4)
typedef u_int32_t vpsized_uint;
typedef int32_t vpsized_int;
#else
#error Unsupported size of void ptr
#endif
#ifndef PATH_MAX
#define PATH_MAX MAXPATHLEN
#endif
typedef enum { noit_false = 0, noit_true } noit_boolean;
#endif