/* Copyright (C) 2008 Andreas Baumann This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef WOLF_SYS_INTERNAL_H #define WOLF_SYS_INTERNAL_H /** * @file sys_internal.h * @brief portability file for not publicly visible things * @author Andreas Baumann */ #include "port/sys.h" #if defined LINUX #if OS_MAJOR_VERSION == 2 #if OS_MINOR_VERSION == 6 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define WOLF_LIBRARY_DLERROR_CONST #else #error unknown platform #endif /* defined OS_MINOR_VERSION == 6 */ #else #if OS_MAJOR_VERSION == 3 #if OS_MINOR_VERSION >= 0 && OS_MINOR_VERSION <= 10 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define WOLF_LIBRARY_DLERROR_CONST #else #error unknown platform #endif /* defined OS_MINOR_VERSION == 0 */ #else #error unknown platform #endif /* defined OS_MAJOR_VERSION == 3 */ #endif /* defined OS_MAJOR_VERSION == 2 */ #endif /* defined LINUX */ #if defined FREEBSD #if OS_MAJOR_VERSION == 8 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define WOLF_LIBRARY_DLERROR_CONST const #else #if OS_MAJOR_VERSION == 7 #if OS_MINOR_VERSION >= 0 && OS_MINOR_VERSION <= 2 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define WOLF_LIBRARY_DLERROR_CONST const #else #error unknown platform #endif /* defined OS_MINOR_VERSION >= 0 && OS_MINOR_VERSION <= 2 */ #else #if OS_MAJOR_VERSION == 6 #if OS_MINOR_VERSION == 2 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define WOLF_LIBRARY_DLERROR_CONST const #else #error unknown platform #endif /* defined OS_MINOR_VERSION == 2 */ #else #error unknown platform #endif /* defined OS_MAJOR_VERSION == 6 */ #endif /* defined OS_MAJOR_VERSION == 7 */ #endif /* defined OS_MAJOR_VERSION == 8 */ #endif /* defined FREEBSD */ #if defined OPENBSD #if OS_MAJOR_VERSION == 4 #if OS_MINOR_VERSION >= 2 && OS_MINOR_VERSION <= 7 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define WOLF_LIBRARY_DLERROR_CONST const #else #error unknown platform #endif /* defined OS_MINOR_VERSION >= 2 && OS_MINOR_VERSION <= 7 */ #else #if OS_MAJOR_VERSION == 5 #if OS_MINOR_VERSION == 0 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define WOLF_LIBRARY_DLERROR_CONST const #endif /* OS_MINOR_VERSION == 0 */ #else #error unknown platform #endif /* defined OS_MAJOR_VERSION == 5 */ #endif /* defined OS_MAJOR_VERSION == 4 */ #endif /* defined OPENBSD */ #if defined NETBSD #if OS_MAJOR_VERSION == 5 #if OS_MINOR_VERSION == 0 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define WOLF_LIBRARY_DLERROR_CONST #else #error unknown platform #endif /* defined OS_MINOR_VERSION == 2 */ #else /* define OS_MAJOR_VERSION == 5 */ #if OS_MAJOR_VERSION == 4 #if OS_MINOR_VERSION == 0 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define WOLF_LIBRARY_DLERROR_CONST #else #error unknown platform #endif /* defined OS_MINOR_VERSION == 0 */ #else #error unknown platform #endif /* defined OS_MAJOR_VERSION == 4 */ #endif /* defined OS_MAJOR_VERSION == 5 */ #endif /* defined NETBSD */ #if defined SUNOS #if OS_MAJOR_VERSION == 5 #if OS_MINOR_VERSION == 8 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R /* for *printf substitutes */ #define TEST_SNPRINTF 0 #define HAVE_STDARG_H 1 #define HAVE_STDDEF_H 0 #define HAVE_STDINT_H 0 #define HAVE_STDLIB_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_LOCALE_H 1 #define HAVE_LOCALECONV 1 #define HAVE_LCONV_DECIMAL_POINT 1 #define HAVE_LCONV_THOUSANDS_SEP 1 #define HAVE_LONG_DOUBLE 1 #define HAVE_LONG_LONG_INT 1 #define HAVE_UNSIGNED_LONG_LONG_INT 1 #define HAVE_INTMAX_T 1 #define HAVE_UINTMAX_T 1 #define HAVE_UINTPTR_T 1 #define HAVE_PTRDIFF_T 1 #define HAVE_VA_COPY 0 #define HAVE___VA_COPY 0 #define HAVE_DLFCN #define NEEDS_LINK_H #define WOLF_LIBRARY_DLERROR_CONST #else #if OS_MINOR_VERSION == 10 #define HAVE_LOCK_F #define HAVE_LOCALTIME_R #define HAVE_DLFCN #define NEEDS_LINK_H #define WOLF_LIBRARY_DLERROR_CONST #else #error unknown platform #endif /* OS_MINOR_VERSION == 10 */ #endif /* OS_MINOR_VERSION == 8 */ #else #error unknown platform #endif /* OS_MAJOR_VERSION == 5 */ #endif /* defined SUNOS */ #if defined CYGWIN #if OS_MAJOR_VERSION == 5 #if OS_MINOR_VERSION >= 0 && OS_MINOR_VERSION <= 1 /* for *printf substitutes */ #define TEST_SNPRINTF 0 #define HAVE_STDARG_H 1 #define HAVE_STDDEF_H 0 #define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_INTTYPES_H 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_LOCALE_H 1 #define HAVE_LOCALECONV 1 #define HAVE_LCONV_DECIMAL_POINT 1 #define HAVE_LCONV_THOUSANDS_SEP 1 #define HAVE_LONG_DOUBLE 1 #define HAVE_LONG_LONG_INT 1 #define HAVE_UNSIGNED_LONG_LONG_INT 1 #define HAVE_INTMAX_T 1 #define HAVE_UINTMAX_T 1 #define HAVE_UINTPTR_T 1 #define HAVE_PTRDIFF_T 1 #define HAVE_VA_COPY 0 #define HAVE___VA_COPY 0 #else #error unknown platform #endif /* OS_MINOR_VERSION >= 0 && OS_MINOR_VERSON <= 1 */ #else #error unknown platform #endif /* OS_MAJOR_VERSION == 5 */ #endif /* defined CYGWIN */ #if defined _WIN32 #endif /* defined _WIN32 */ /* FIXME: must be local where the warning happens, check again! */ #if defined __INTEL_COMPILER #if( __INTEL_COMPILER >= 1100 ) /* remark #593: variable "__d0" was set but never used in FD_ZERO, FD_SET in daemon.c */ #pragma warning(disable:593) #endif /* __INTEL_COMPILER >= 1100 */ #endif /* defined __INTEL_COMPILER */ #endif /* ifndef WOLF_SYS_INTERNAL_H */