mhd_debug_funcs.h (1722B)
1 /* 2 This file is part of GNU libmicrohttpd 3 Copyright (C) 2022 Evgeny Grin (Karlson2k) 4 5 GNU libmicrohttpd is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License as published by the Free Software Foundation; either 8 version 2.1 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with GNU libmicrohttpd. 17 If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 /** 21 * @file testzzuf/mhd_debug_funcs.h 22 * @brief Declarations of MHD private debug functions 23 * @author Karlson2k (Evgeny Grin) 24 */ 25 26 #ifndef MHD_DEBUG_FUNCS_H 27 #define MHD_DEBUG_FUNCS_H 1 28 29 struct MHD_Daemon; 30 31 /** 32 * Checks whether MHD can use accept() syscall and 33 * avoid accept4() syscall. 34 * @return non-zero if accept() is possible, 35 * zero if accept4() is always used by MHD 36 */ 37 int 38 MHD_is_avoid_accept4_possible_ (void); 39 40 /** 41 * Switch MHD daemon to use accept() syscalls for new connections. 42 * @param daemon the daemon to operate 43 */ 44 void 45 MHD_avoid_accept4_ (struct MHD_Daemon *daemon); 46 47 /** 48 * Checks whether any know sanitizer is enabled for this build. 49 * zzuf does not work together with sanitizers as both are intercepting 50 * standard library calls. 51 * @return non-zero if any sanitizer is enabled, 52 * zero otherwise 53 */ 54 int 55 MHD_are_sanitizers_enabled_ (void); 56 57 #endif /* MHD_DEBUG_FUNCS_H */