GNU libmicrohttpd
0.9.29
|
internal platform abstraction functions More...
#include "platform.h"
Go to the source code of this file.
Macros | |
#define | MHD_str_equal_caseless_(a, b) (0==strcasecmp((a),(b))) |
#define | MHD_str_equal_caseless_n_(a, b, n) (0==strncasecmp((a),(b),(n))) |
#define | MHD_snprintf_ snprintf |
#define | MHD_socket_close_(fd) (((0 != close(fd)) && (EBADF == errno)) ? -1 : 0) |
#define | MHD_socket_errno_ errno |
#define | MHD_socket_last_strerr_() strerror(errno) |
#define | MHD_strerror_(errnum) strerror((errnum)) |
#define | MHD_set_socket_errno_(errnum) errno=(errnum) |
#define | MHD_SYS_select_(n, r, w, e, t) select((n),(r),(w),(e),(t)) |
#define | MHD_pipe_(fdarr) pipe((fdarr)) |
#define | MHD_pipe_errno_ errno |
#define | MHD_pipe_last_strerror_() strerror(errno) |
#define | MHD_pipe_write_(fd, ptr, sz) write((fd), (const void*)(ptr), (sz)) |
#define | MHD_pipe_read_(fd, ptr, sz) read((fd), (void*)(ptr), (sz)) |
#define | MHD_pipe_close_(fd) close((fd)) |
#define | MHD_INVALID_PIPE_ (-1) |
#define | MHD_random_() random() |
Typedefs | |
typedef size_t | _MHD_socket_funcs_size |
internal platform abstraction functions
Definition in file platform_interface.h.
#define MHD_INVALID_PIPE_ (-1) |
Definition at line 210 of file platform_interface.h.
Referenced by close_all_connections(), create_socket(), internal_add_connection(), MHD_handle_connection(), MHD_poll(), MHD_quiesce_daemon(), MHD_resume_connection(), MHD_run_from_select(), MHD_select(), MHD_start_daemon_va(), and MHD_stop_daemon().
#define MHD_pipe_ | ( | fdarr | ) | pipe((fdarr)) |
Definition at line 159 of file platform_interface.h.
Referenced by MHD_start_daemon_va().
Definition at line 203 of file platform_interface.h.
Referenced by MHD_start_daemon_va(), and MHD_stop_daemon().
#define MHD_pipe_errno_ errno |
Definition at line 171 of file platform_interface.h.
#define MHD_pipe_last_strerror_ | ( | ) | strerror(errno) |
Definition at line 179 of file platform_interface.h.
Referenced by MHD_start_daemon_va().
Definition at line 195 of file platform_interface.h.
Referenced by MHD_handle_connection(), MHD_poll(), MHD_run_from_select(), and MHD_select().
Definition at line 187 of file platform_interface.h.
Referenced by close_all_connections(), internal_add_connection(), MHD_resume_connection(), and MHD_stop_daemon().
#define MHD_random_ | ( | ) | random() |
Definition at line 216 of file platform_interface.h.
#define MHD_set_socket_errno_ | ( | errnum | ) | errno=(errnum) |
Definition at line 135 of file platform_interface.h.
Referenced by MHD_ip_limit_del(), recv_param_adapter(), and send_param_adapter().
#define MHD_snprintf_ snprintf |
Definition at line 77 of file platform_interface.h.
Referenced by MHD_get_version(), MHD_queue_auth_fail_response(), MHD_queue_basic_auth_fail_response(), and try_ready_chunked_body().
MHD_socket_close_(fd) close any FDs (non-W32) / close only socket FDs (W32). Note that on HP-UNIX, this function may leak the FD if errno is set to EINTR. Do not use HP-UNIX.
fd | descriptor to close |
Definition at line 103 of file platform_interface.h.
Referenced by internal_add_connection(), MHD_accept_connection(), MHD_cleanup_connections(), MHD_start_daemon_va(), MHD_stop_daemon(), SPDYF_session_accept(), SPDYF_session_destroy(), SPDYF_start_daemon_va(), and SPDYF_stop_daemon().
#define MHD_socket_errno_ errno |
MHD_socket_errno_ is errno of last function (non-W32) / errno of last socket function (W32)
Definition at line 113 of file platform_interface.h.
Referenced by create_socket(), do_read(), do_write(), MHD_accept_connection(), MHD_connection_handle_write(), MHD_handle_connection(), MHD_poll(), MHD_select(), and send_param_adapter().
#define MHD_socket_last_strerr_ | ( | ) | strerror(errno) |
Definition at line 121 of file platform_interface.h.
Referenced by create_socket(), internal_add_connection(), make_nonblocking_noninheritable(), MHD_accept_connection(), MHD_connection_handle_idle(), MHD_connection_handle_write(), MHD_handle_connection(), MHD_poll(), MHD_select(), and MHD_start_daemon_va().
#define MHD_str_equal_caseless_ | ( | a, | |
b | |||
) | (0==strcasecmp((a),(b))) |
Check two strings case-insensitive equality
a | first string to check |
b | second string to check |
Definition at line 44 of file platform_interface.h.
Referenced by build_header_response(), digest_calc_ha1(), keepalive_possible(), MHD_connection_handle_idle(), MHD_lookup_connection_value(), MHD_queue_response(), need_100_continue(), and parse_connection_headers().
#define MHD_str_equal_caseless_n_ | ( | a, | |
b, | |||
n | |||
) | (0==strncasecmp((a),(b),(n))) |
Check not more than n chars in two strings case-insensitive equality
a | first string to check |
b | second string to check |
n | maximum number of chars to check |
Definition at line 63 of file platform_interface.h.
Referenced by lookup_sub_value(), MHD_create_post_processor(), MHD_post_process(), post_process_multipart(), process_multipart_headers(), and try_match_header().
#define MHD_strerror_ | ( | errnum | ) | strerror((errnum)) |
Definition at line 128 of file platform_interface.h.
Referenced by internal_add_connection(), MHD_select(), and MHD_start_daemon_va().
#define MHD_SYS_select_ | ( | n, | |
r, | |||
w, | |||
e, | |||
t | |||
) | select((n),(r),(w),(e),(t)) |
Definition at line 142 of file platform_interface.h.
Referenced by MHD_handle_connection(), and MHD_select().
typedef size_t _MHD_socket_funcs_size |
_MHD_socket_funcs_size is type used to specify size for send and recv functions
Definition at line 88 of file platform_interface.h.