GNU libmicrohttpd  0.9.29
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
platform_interface.h File Reference

internal platform abstraction functions More...

#include "platform.h"
Include dependency graph for platform_interface.h:
This graph shows which files directly or indirectly include this file:

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)   close((fd))
 
#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()
 

Detailed Description

internal platform abstraction functions

Author
Karlson2k (Evgeny Grin)

Definition in file platform_interface.h.

Macro Definition Documentation

#define MHD_pipe_ (   fdarr)    pipe((fdarr))

Definition at line 130 of file platform_interface.h.

Referenced by MHD_start_daemon_va().

#define MHD_pipe_close_ (   fd)    close((fd))

Definition at line 174 of file platform_interface.h.

Referenced by MHD_start_daemon_va(), and MHD_stop_daemon().

#define MHD_pipe_errno_   errno

Definition at line 142 of file platform_interface.h.

#define MHD_pipe_last_strerror_ ( )    strerror(errno)

Definition at line 150 of file platform_interface.h.

Referenced by MHD_start_daemon_va().

#define MHD_pipe_read_ (   fd,
  ptr,
  sz 
)    read((fd), (void*)(ptr), (sz))

Definition at line 166 of file platform_interface.h.

Referenced by MHD_run_from_select().

#define MHD_pipe_write_ (   fd,
  ptr,
  sz 
)    write((fd), (const void*)(ptr), (sz))
#define MHD_random_ ( )    random()

Definition at line 187 of file platform_interface.h.

#define MHD_set_socket_errno_ (   errnum)    errno=(errnum)

Definition at line 115 of file platform_interface.h.

Referenced by recv_param_adapter(), and send_param_adapter().

#define MHD_snprintf_   snprintf
#define MHD_socket_close_ (   fd)    close((fd))
#define MHD_str_equal_caseless_ (   a,
 
)    (0==strcasecmp((a),(b)))

Check two strings case-insensitive equality

Parameters
afirst string to check
bsecond string to check
Returns
boolean true if strings are equal, boolean false if strings are unequal

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,
 
)    (0==strncasecmp((a),(b),(n)))

Check not more than n chars in two strings case-insensitive equality

Parameters
afirst string to check
bsecond string to check
nmaximum number of chars to check
Returns
boolean true if strings are equal, boolean false if strings are unequal

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 108 of file platform_interface.h.

Referenced by internal_add_connection(), and MHD_start_daemon_va().

#define MHD_SYS_select_ (   n,
  r,
  w,
  e,
 
)    select((n),(r),(w),(e),(t))

Definition at line 122 of file platform_interface.h.

Referenced by MHD_handle_connection(), and MHD_select().