/*- * Copyright 2005-2007 Guram Dukashvili * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. */ //--------------------------------------------------------------------------- #include "bootconf.h" //--------------------------------------------------------------------------- #ifndef _lconfig_H_ #define _lconfig_H_ //--------------------------------------------------------------------------- #if HAVE_SYSLOG_H #include #endif #if HAVE_EXECINFO_H #include #else #include #endif #if HAVE_STDARG_H #include #elif HAVE_VARARGS_H #include #endif #if HAVE_SYSEXITS_H #include #endif #if HAVE_SYS_IPC_H #include #endif #if HAVE_SYS_SEM_H #include #endif #if HAVE_SYS_STAT_H #include #endif #if HAVE_SYS_UTSNAME_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET_IN_SYSTM_H #include #endif #if HAVE_NETINET_IP_H #include #endif #if HAVE_NETINET_TCP_H #include #endif #if HAVE_NET_IF_H #include #endif #if HAVE_NET_IF_TYPES_H #include #endif #if HAVE_NET_ROUTE_H #include #endif #if HAVE_NET_ETHERNET_H #include #endif #if HAVE_NET_IF_DL_H #include #endif #if HAVE_ARPA_INET_H #include #endif #if HAVE_NETDB_H #include #endif #if HAVE_SYS_UIO_H #include #endif #if HAVE_SYS_MMAN_H #include #endif #if HAVE_SYS_EVENT_H #include #endif #if HAVE_AIO_H #include #endif #if HAVE_SYS_ENDIAN_H #include #endif #if HAVE_SHA256_H #include #endif #if HAVE_PROCESS_H #include #endif #if HAVE_DLFCN_H #include #endif #if HAVE_PTHREAD_H #include #endif #if HAVE_SIGNAL_H #include #endif #if HAVE_FCNTL_H #include #endif #if HAVE_UNISTD_H #include #endif #if HAVE_STDIO_H #include #endif #if HAVE_STDLIB_H #include #endif #if HAVE_SEMAPHORE_H #include #endif #if HAVE_CTYPE_H #include #endif #if HAVE_PWD_H #include #endif #if HAVE_GRP_H #include #endif #if HAVE_IO_H #include #endif #if HAVE_PATHS_H #include #endif #if HAVE_SYS_TIME_H #include #endif #if HAVE_SYS_RESOURCE_H #include #endif #if HAVE_SYS_RTPRIO_H #include #endif #if HAVE_TIME_H #include #endif #if HAVE_SCHED_H #include #endif #if HAVE_UTIME_H #include #endif #if HAVE_SYS_UTIME_H #include #endif #if HAVE_SYS_TIMEB_H #include #endif #if HAVE_SYS_UUID_H #include #endif #if HAVE_UUID_H #include #endif #if HAVE_SYS_EVENT_H #include #endif #if HAVE_SYS_IOCTL_H #include #endif #if HAVE_SYS_SYSCTL_H #include #endif #if HAVE_SYS_EPOLL_H #include #endif #if HAVE_MATH_H #include #endif #if HAVE_UCONTEXT_H #include #endif // C++ headers #ifdef __cplusplus #if HAVE_TYPEINFO #include #endif #if HAVE_TYPEINFO_H #include #endif #if HAVE_STDEXEPT #include #endif #if HAVE_NEW #include #elif HAVE_NEW_H #include #endif #endif // C++ headers #if HAVE_WINSOCK2_H #include #elif HAVE_WINSOCK_H #include #endif #if HAVE_MSWSOCK_H #include #endif #if HAVE_WS2TCPIP_H #include #endif #if HAVE_WINDOWS_H #include #endif #if HAVE_TLHELP32_H #include #endif #if HAVE_IPHLPAPI_H #include #endif #if HAVE_WBEMIDL_H #include #endif #if HAVE_DBGHELP_H #define _NO_CVCONST_H #include #endif #if HAVE_WINTERNL_H #include #endif /*#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__) #if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0502 #undef _WIN32_WINNT #define _WIN32_WINNT 0x0502 #endif #ifndef NOT_INCLUDE_WINDOWS_H #if __BCPLUSPLUS__ #pragma option push -w-8027 #endif #include #include #include #include #include #if __BCPLUSPLUS__ #pragma option pop #endif #define NOT_INCLUDE_WINDOWS_H #endif #include #endif*/ #if HAVE_DIRENT_H #include #endif #ifdef __GNUG__ #define DECLSPEC_NOTHROW #define GNUG_NOTHROW __attribute__((nothrow)) #if __x86_64__ #define GNUG_CDECL #define GNUG_NAKED #else #define GNUG_CDECL __attribute__((cdecl)) #define GNUG_NAKED __attribute__((naked)) #endif #define GNUG_CONSTRUCTOR __attribute__((constructor)) #define GNUG_DESTRUCTOR __attribute__((destructor)) #define DECLSPEC_NORETURN #define GNUG_NORETURN __attribute__((noreturn)) #else #define DECLSPEC_NOTHROW __declspec(nothrow) #define GNUG_NOTHROW #define GNUG_CDECL #define GNUG_CONSTRUCTOR #define GNUG_DESTRUCTOR #define DECLSPEC_NORETURN __declspec(noreturn) #define GNUG_NORETURN #define GNUG_NAKED #endif //--------------------------------------------------------------------------- #ifdef __cplusplus extern "C" { #endif //--------------------------------------------------------------------------- #if !HAVE__MALLOC_OPTIONS extern const char * _malloc_options; #endif //--------------------------------------------------------------------------- #if !HAVE_GETPAGESIZE //--------------------------------------------------------------------------- #if defined(__WIN32__) || defined(__WIN64__) //--------------------------------------------------------------------------- static __inline uintptr_t getpagesize() { SYSTEM_INFO si; GetSystemInfo(&si); return si.dwPageSize; } //--------------------------------------------------------------------------- #elif HAVE_SYSCONF && defined(_SC_PAGESIZE) //--------------------------------------------------------------------------- static inline uintptr_t getpagesize() { return sysconf(_SC_PAGESIZE); } //--------------------------------------------------------------------------- #elif HAVE_SYSCONF && defined(_SC_PAGE_SIZE) //--------------------------------------------------------------------------- static inline uintptr_t getpagesize() { return sysconf(_SC_PAGE_SIZE); } //--------------------------------------------------------------------------- #elif __i386__ //--------------------------------------------------------------------------- static inline uintptr_t getpagesize() { return 4096; } //--------------------------------------------------------------------------- #else //--------------------------------------------------------------------------- static inline uintptr_t getpagesize() { return 8192; } //--------------------------------------------------------------------------- #endif //--------------------------------------------------------------------------- #endif //--------------------------------------------------------------------------- #ifdef __cplusplus }; #endif //--------------------------------------------------------------------------- #endif /* _lconfig_H_ */ //---------------------------------------------------------------------------