Go to the documentation of this file. 32 #define MHD_OPTIONS_H 1 34 #include "MHD_config.h" 42 #define _(String) (String) 44 #if defined(_MHD_EXTERN) && ! defined(BUILDING_MHD_LIB) 49 #if defined(BUILDING_MHD_LIB) && defined(_WIN32) && \ 50 (defined(DLL_EXPORT) || defined(MHD_W32DLL)) 51 #define _MHD_EXTERN __declspec(dllexport) extern 53 #define _MHD_EXTERN extern 62 #elif defined(_WIN32) || defined(__CYGWIN__) 64 #define FD_SETSIZE 2048 67 #define _MHD_FD_SETSIZE_IS_DEFAULT 1 70 #if defined(HAVE_LINUX_SENDFILE) || defined(HAVE_FREEBSD_SENDFILE) || \ 71 defined(HAVE_DARWIN_SENDFILE) || defined(HAVE_SOLARIS_SENDFILE) 73 #define _MHD_HAVE_SENDFILE 76 #if defined(HAVE_LINUX_SENDFILE) || defined(HAVE_SOLARIS_SENDFILE) 77 #define MHD_LINUX_SOLARIS_SENDFILE 1 80 #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) 81 # ifndef MHD_USE_THREADS 82 # define MHD_USE_THREADS 1 88 #define _OPEN_SYS_SOCK_IPV6 89 #define _OPEN_MSGQ_EXT 93 #if defined(_WIN32) && ! defined(__CYGWIN__) 95 #define _CRT_DECLARE_NONSTDC_NAMES 1 97 #define _CRT_NONSTDC_NO_WARNINGS 1 99 #define _WIN32_WINNT 0x0600 101 #if _WIN32_WINNT < 0x0501 102 #error "Headers for Windows XP or later are required" 105 #ifndef WIN32_LEAN_AND_MEAN 107 #define WIN32_LEAN_AND_MEAN 1 111 #if defined(__VXWORKS__) || defined(__vxworks) || defined(OS_VXWORKS) 112 #define RESTRICT __restrict__ 115 #if defined(LINUX) && (defined(HAVE_SENDFILE64) || defined(HAVE_LSEEK64)) && \ 116 ! defined(_LARGEFILE64_SOURCE) 118 #define _LARGEFILE64_SOURCE 1 121 #ifdef HAVE_C11_GMTIME_S 123 #define __STDC_WANT_LIB_EXT1__ 1 126 #if defined(MHD_FAVOR_FAST_CODE) && defined(MHD_FAVOR_SMALL_CODE) 128 MHD_FAVOR_FAST_CODE and MHD_FAVOR_SMALL_CODE are both defined. Cannot favor speed and size at the same time. 133 #if ! defined(MHD_FAVOR_FAST_CODE) && ! defined(MHD_FAVOR_SMALL_CODE) 136 #if defined(__OPTIMIZE_SIZE__) 137 #define MHD_FAVOR_SMALL_CODE 1 138 #elif defined(__OPTIMIZE__) 139 #define MHD_FAVOR_FAST_CODE 1 143 #if ! defined(MHD_FAVOR_FAST_CODE) && ! defined(MHD_FAVOR_SMALL_CODE) 145 #define MHD_FAVOR_FAST_CODE 1 148 #ifndef MHD_ASAN_ACTIVE 149 #if (defined(__GNUC__) || defined(_MSC_VER)) && defined(__SANITIZE_ADDRESS__) 150 #define MHD_ASAN_ACTIVE 1 151 #elif defined(__has_feature) 152 #if __has_feature (address_sanitizer) 153 #define MHD_ASAN_ACTIVE 1 158 #if defined(MHD_ASAN_ACTIVE) && defined(HAVE_SANITIZER_ASAN_INTERFACE_H) && \ 159 (defined(FUNC_PTRCOMPARE_CAST_WORKAROUND_WORKS) || \ 160 (defined(FUNC_ATTR_PTRCOMPARE_WORKS) && \ 161 defined(FUNC_ATTR_PTRSUBTRACT_WORKS)) || \ 162 defined(FUNC_ATTR_NOSANITIZE_WORKS)) 163 #ifndef MHD_ASAN_POISON_ACTIVE 165 #warning User memory poisoning is not active 169 #ifdef MHD_ASAN_POISON_ACTIVE 170 #error User memory poisoning is active, but conditions are not suitable 175 #ifndef _MSC_FULL_VER 176 # define MHD_DATA_TRUNCATION_RUNTIME_CHECK_DISABLE_ 177 # define MHD_DATA_TRUNCATION_RUNTIME_CHECK_RESTORE_ 179 # define MHD_DATA_TRUNCATION_RUNTIME_CHECK_DISABLE_ \ 180 __pragma(runtime_checks("c", off)) 181 # define MHD_DATA_TRUNCATION_RUNTIME_CHECK_RESTORE_ \ 182 __pragma(runtime_checks("c", restore)) 188 #if defined(HAVE___FUNC__) 189 #define MHD_FUNC_ __func__ 190 #define MHD_HAVE_MHD_FUNC_ 1 191 #elif defined(HAVE___FUNCTION__) 192 #define MHD_FUNC_ __FUNCTION__ 193 #define MHD_HAVE_MHD_FUNC_ 1 194 #elif defined(HAVE___PRETTY_FUNCTION__) 195 #define MHD_FUNC_ __PRETTY_FUNCTION__ 196 #define MHD_HAVE_MHD_FUNC_ 1 198 #define MHD_FUNC_ "**name unavailable**" 199 #ifdef MHD_HAVE_MHD_FUNC_ 200 #undef MHD_HAVE_MHD_FUNC_ 209 #ifdef HAVE_DECL__SC_NPROCESSORS_ONLN 210 # if 0 == HAVE_DECL__SC_NPROCESSORS_ONLN 211 # undef HAVE_DECL__SC_NPROCESSORS_ONLN 213 # define HAS_DECL__SC_NPROCESSORS_ONLN 1 217 #ifdef HAVE_DECL__SC_NPROCESSORS_CONF 218 # if 0 == HAVE_DECL__SC_NPROCESSORS_CONF 219 # undef HAVE_DECL__SC_NPROCESSORS_CONF 221 # define HAS_DECL__SC_NPROCESSORS_CONF 1 225 #ifdef HAVE_DECL__SC_NPROC_ONLN 226 # if 0 == HAVE_DECL__SC_NPROC_ONLN 227 # undef HAVE_DECL__SC_NPROC_ONLN 229 # define HAS_DECL__SC_NPROC_ONLN 1 233 #ifdef HAVE_DECL__SC_CRAY_NCPU 234 # if 0 == HAVE_DECL__SC_CRAY_NCPU 235 # undef HAVE_DECL__SC_CRAY_NCPU 237 # define HAS_DECL__SC_CRAY_NCPU 1 241 #ifdef HAVE_DECL_CTL_HW 242 # if 0 == HAVE_DECL_CTL_HW 243 # undef HAVE_DECL_CTL_HW 245 # define HAS_DECL_CTL_HW 1 249 #ifdef HAVE_DECL_HW_NCPUONLINE 250 # if 0 == HAVE_DECL_HW_NCPUONLINE 251 # undef HAVE_DECL_HW_NCPUONLINE 253 # define HAS_DECL_HW_NCPUONLINE 1 257 #ifdef HAVE_DECL_HW_AVAILCPU 258 # if 0 == HAVE_DECL_HW_AVAILCPU 259 # undef HAVE_DECL_HW_AVAILCPU 261 # define HAS_DECL_HW_AVAILCPU 1 265 #ifdef HAVE_DECL_HW_NCPU 266 # if 0 == HAVE_DECL_HW_NCPU 267 # undef HAVE_DECL_HW_NCPU 269 # define HAS_DECL_HW_NCPU 1 273 #ifdef HAVE_DECL_CPU_SETSIZE 274 # if 0 == HAVE_DECL_CPU_SETSIZE 275 # undef HAVE_DECL_CPU_SETSIZE 277 # define HAS_DECL_CPU_SETSIZE 1 281 #ifndef MHD_DAUTH_DEF_TIMEOUT_ 282 # define MHD_DAUTH_DEF_TIMEOUT_ 90 284 #ifndef MHD_DAUTH_DEF_MAX_NC_ 285 # define MHD_DAUTH_DEF_MAX_NC_ 1000