GNU libmicrohttpd 0.9.5

plibc.h File Reference

#include <stddef.h>
Include dependency graph for plibc.h:

Go to the source code of this file.

Data Structures

struct  PLIBC_SEARCH_QELEM
struct  PLIBC_SEARCH_entry
struct  _PLIBC_SEARCH_ENTRY
struct  PLIBC_SEARCH_hsearch_data

Defines

#define SIGALRM   14
#define HAVE_PLIBC_FD   0
#define DIR_SEPARATOR   '/'
#define DIR_SEPARATOR_STR   "/"
#define PATH_SEPARATOR   ':'
#define PATH_SEPARATOR_STR   ":"
#define NEWLINE   "\n"
#define CREAT(p, m)   creat(p, m)
#define PLIBC_CTIME(c)   ctime(c)
#define CTIME_R(c, b)   ctime_r(c, b)
#define FOPEN(f, m)   fopen(f, m)
#define FTRUNCATE(f, l)   ftruncate(f, l)
#define OPENDIR(d)   opendir(d)
#define OPEN   open
#define CHDIR(d)   chdir(d)
#define CLOSE(f)   close(f)
#define LSEEK(f, o, w)   lseek(f, o, w)
#define RMDIR(f)   rmdir(f)
#define ACCESS(p, m)   access(p, m)
#define CHMOD(f, p)   chmod(f, p)
#define FSTAT(h, b)   fstat(h, b)
#define PLIBC_KILL(p, s)   kill(p, s)
#define PIPE(h)   pipe(h)
#define REMOVE(p)   remove(p)
#define RENAME(o, n)   rename(o, n)
#define STAT(p, b)   stat(p, b)
#define STAT64(p, b)   stat64(p, b)
#define SYSCONF(n)   sysconf(n)
#define UNLINK(f)   unlink(f)
#define WRITE(f, b, n)   write(f, b, n)
#define READ(f, b, n)   read(f, b, n)
#define GN_FREAD(b, s, c, f)   fread(b, s, c, f)
#define GN_FWRITE(b, s, c, f)   fwrite(b, s, c, f)
#define SYMLINK(a, b)   symlink(a, b)
#define MMAP(s, l, p, f, d, o)   mmap(s, l, p, f, d, o)
#define MUNMAP(s, l)   munmap(s, l)
#define STRERROR(i)   strerror(i)
#define RANDOM()   random()
#define SRANDOM(s)   srandom(s)
#define READLINK(p, b, s)   readlink(p, b, s)
#define LSTAT(p, b)   lstat(p, b)
#define LSTAT64(p, b)   lstat64(p, b)
#define PRINTF   printf
#define FPRINTF   fprintf
#define VPRINTF(f, a)   vprintf(f, a)
#define VFPRINTF(s, f, a)   vfprintf(s, f, a)
#define VSPRINTF(d, f, a)   vsprintf(d, f, a)
#define VSNPRINTF(str, size, fmt, a)   vsnprintf(str, size, fmt, a)
#define _REAL_SNPRINTF   snprintf
#define SPRINTF   sprintf
#define VSSCANF(s, f, a)   vsscanf(s, f, a)
#define SSCANF   sscanf
#define VFSCANF(s, f, a)   vfscanf(s, f, a)
#define VSCANF(f, a)   vscanf(f, a)
#define SCANF   scanf
#define FSCANF   fscanf
#define WAITPID(p, s, o)   waitpid(p, s, o)
#define ACCEPT(s, a, l)   accept(s, a, l)
#define BIND(s, n, l)   bind(s, n, l)
#define CONNECT(s, n, l)   connect(s, n, l)
#define GETPEERNAME(s, n, l)   getpeername(s, n, l)
#define GETSOCKNAME(s, n, l)   getsockname(s, n, l)
#define GETSOCKOPT(s, l, o, v, p)   getsockopt(s, l, o, v, p)
#define LISTEN(s, b)   listen(s, b)
#define RECV(s, b, l, f)   recv(s, b, l, f)
#define RECVFROM(s, b, l, f, r, o)   recvfrom(s, b, l, f, r, o)
#define SELECT(n, r, w, e, t)   select(n, r, w, e, t)
#define SEND(s, b, l, f)   send(s, b, l, f)
#define SENDTO(s, b, l, f, o, n)   sendto(s, b, l, f, o, n)
#define SETSOCKOPT(s, l, o, v, n)   setsockopt(s, l, o, v, n)
#define SHUTDOWN(s, h)   shutdown(s, h)
#define SOCKET(a, t, p)   socket(a, t, p)
#define GETHOSTBYADDR(a, l, t)   gethostbyname(a, l, t)
#define GETHOSTBYNAME(n)   gethostbyname(n)
#define GETTIMEOFDAY(t, n)   gettimeofday(t, n)
#define INSQUE(e, p)   insque(e, p)
#define REMQUE(e)   remque(e)
#define HSEARCH(i, a)   hsearch(i, a)
#define HCREATE(n)   hcreate(n)
#define HDESTROY()   hdestroy()
#define HSEARCH_R(i, a, r, h)   hsearch_r(i, a, r, h)
#define HCREATE_R(n, h)   hcreate_r(n, h)
#define HDESTROY_R(h)   hdestroy_r(h)
#define TSEARCH(k, r, c)   tsearch(k, r, c)
#define TFIND(k, r, c)   tfind(k, r, c)
#define TDELETE(k, r, c)   tdelete(k, r, c)
#define TWALK(r, a)   twalk(r, a)
#define TDESTROY(r, f)   tdestroy(r, f)
#define LFIND(k, b, n, s, c)   lfind(k, b, n, s, c)
#define LSEARCH(k, b, n, s, c)   lsearch(k, b, n, s, c)

Typedefs

typedef int(* PLIBC_SEARCH__compar_fn_t )(__const void *, __const void *)
typedef PLIBC_SEARCH__compar_fn_t _win_comparison_fn_t
typedef struct PLIBC_SEARCH_entry PLIBC_SEARCH_ENTRY
typedef struct _PLIBC_SEARCH_ENTRY _PLIBC_SEARCH_ENTRY
typedef void(* PLIBC_SEARCH__action_fn_t )(__const void *__nodep, PLIBC_SEARCH_VISIT __value, int __level)
typedef void(* PLIBC_SEARCH__free_fn_t )(void *__nodep)

Enumerations

enum  PLIBC_SEARCH_ACTION { PLIBC_SEARCH_FIND, PLIBC_SEARCH_ENTER }
enum  PLIBC_SEARCH_VISIT { PLIBC_SEARCH_preorder, PLIBC_SEARCH_postorder, PLIBC_SEARCH_endorder, PLIBC_SEARCH_leaf }

Functions

void _win_insque (void *__elem, void *__prev)
void _win_remque (void *__elem)
PLIBC_SEARCH_ENTRY_win_hsearch (PLIBC_SEARCH_ENTRY __item, PLIBC_SEARCH_ACTION __action)
int _win_hcreate (size_t __nel)
void _win_hdestroy (void)
int _win_hsearch_r (PLIBC_SEARCH_ENTRY __item, PLIBC_SEARCH_ACTION __action, PLIBC_SEARCH_ENTRY **__retval, struct PLIBC_SEARCH_hsearch_data *__htab)
int _win_hcreate_r (size_t __nel, struct PLIBC_SEARCH_hsearch_data *__htab)
void _win_hdestroy_r (struct PLIBC_SEARCH_hsearch_data *__htab)
void * _win_tsearch (__const void *__key, void **__rootp, PLIBC_SEARCH__compar_fn_t __compar)
void * _win_tfind (__const void *__key, void *__const *__rootp, PLIBC_SEARCH__compar_fn_t __compar)
void * _win_tdelete (__const void *__restrict __key, void **__restrict __rootp, PLIBC_SEARCH__compar_fn_t __compar)
void _win_twalk (__const void *__root, PLIBC_SEARCH__action_fn_t __action)
void _win_tdestroy (void *__root, PLIBC_SEARCH__free_fn_t __freefct)
void * _win_lfind (__const void *__key, __const void *__base, size_t *__nmemb, size_t __size, PLIBC_SEARCH__compar_fn_t __compar)
void * _win_lsearch (__const void *__key, void *__base, size_t *__nmemb, size_t __size, PLIBC_SEARCH__compar_fn_t __compar)

Define Documentation

#define _REAL_SNPRINTF   snprintf

Definition at line 522 of file plibc.h.

#define ACCEPT (   s,
  a,
 
)    accept(s, a, l)

Definition at line 531 of file plibc.h.

Referenced by MHD_accept_connection().

#define ACCESS (   p,
 
)    access(p, m)

Definition at line 492 of file plibc.h.

#define BIND (   s,
  n,
 
)    bind(s, n, l)

Definition at line 532 of file plibc.h.

Referenced by MHD_start_daemon_va().

#define CHDIR (   d)    chdir(d)

Definition at line 488 of file plibc.h.

#define CHMOD (   f,
 
)    chmod(f, p)

Definition at line 493 of file plibc.h.

#define CLOSE (   f)    close(f)
#define CONNECT (   s,
  n,
 
)    connect(s, n, l)

Definition at line 533 of file plibc.h.

#define CREAT (   p,
 
)    creat(p, m)

Definition at line 480 of file plibc.h.

#define CTIME_R (   c,
 
)    ctime_r(c, b)

Definition at line 482 of file plibc.h.

#define DIR_SEPARATOR   '/'

Definition at line 471 of file plibc.h.

#define DIR_SEPARATOR_STR   "/"

Definition at line 472 of file plibc.h.

#define FOPEN (   f,
 
)    fopen(f, m)

Definition at line 484 of file plibc.h.

#define FPRINTF   fprintf

Definition at line 517 of file plibc.h.

Referenced by do_write(), MHD_connection_handle_write(), and parse_options_va().

#define FSCANF   fscanf

Definition at line 529 of file plibc.h.

#define FSTAT (   h,
 
)    fstat(h, b)

Definition at line 494 of file plibc.h.

#define FTRUNCATE (   f,
 
)    ftruncate(f, l)

Definition at line 485 of file plibc.h.

#define GETHOSTBYADDR (   a,
  l,
 
)    gethostbyname(a, l, t)

Definition at line 546 of file plibc.h.

#define GETHOSTBYNAME (   n)    gethostbyname(n)

Definition at line 547 of file plibc.h.

#define GETPEERNAME (   s,
  n,
 
)    getpeername(s, n, l)

Definition at line 534 of file plibc.h.

#define GETSOCKNAME (   s,
  n,
 
)    getsockname(s, n, l)

Definition at line 535 of file plibc.h.

#define GETSOCKOPT (   s,
  l,
  o,
  v,
 
)    getsockopt(s, l, o, v, p)

Definition at line 536 of file plibc.h.

#define GETTIMEOFDAY (   t,
 
)    gettimeofday(t, n)

Definition at line 548 of file plibc.h.

#define GN_FREAD (   b,
  s,
  c,
 
)    fread(b, s, c, f)

Definition at line 505 of file plibc.h.

#define GN_FWRITE (   b,
  s,
  c,
 
)    fwrite(b, s, c, f)

Definition at line 506 of file plibc.h.

#define HAVE_PLIBC_FD   0

Definition at line 45 of file plibc.h.

#define HCREATE (   n)    hcreate(n)

Definition at line 552 of file plibc.h.

#define HCREATE_R (   n,
 
)    hcreate_r(n, h)

Definition at line 555 of file plibc.h.

#define HDESTROY ( )    hdestroy()

Definition at line 553 of file plibc.h.

#define HDESTROY_R (   h)    hdestroy_r(h)

Definition at line 556 of file plibc.h.

#define HSEARCH (   i,
 
)    hsearch(i, a)

Definition at line 551 of file plibc.h.

#define HSEARCH_R (   i,
  a,
  r,
 
)    hsearch_r(i, a, r, h)

Definition at line 554 of file plibc.h.

#define INSQUE (   e,
 
)    insque(e, p)

Definition at line 549 of file plibc.h.

#define LFIND (   k,
  b,
  n,
  s,
 
)    lfind(k, b, n, s, c)

Definition at line 562 of file plibc.h.

#define LISTEN (   s,
 
)    listen(s, b)

Definition at line 537 of file plibc.h.

Referenced by MHD_start_daemon_va().

#define LSEARCH (   k,
  b,
  n,
  s,
 
)    lsearch(k, b, n, s, c)

Definition at line 563 of file plibc.h.

#define LSEEK (   f,
  o,
 
)    lseek(f, o, w)

Definition at line 490 of file plibc.h.

#define LSTAT (   p,
 
)    lstat(p, b)

Definition at line 514 of file plibc.h.

#define LSTAT64 (   p,
 
)    lstat64(p, b)

Definition at line 515 of file plibc.h.

#define MMAP (   s,
  l,
  p,
  f,
  d,
 
)    mmap(s, l, p, f, d, o)

Definition at line 508 of file plibc.h.

Referenced by MHD_pool_create().

#define MUNMAP (   s,
 
)    munmap(s, l)

Definition at line 509 of file plibc.h.

Referenced by MHD_pool_destroy().

#define NEWLINE   "\n"

Definition at line 475 of file plibc.h.

#define OPEN   open

Definition at line 487 of file plibc.h.

#define OPENDIR (   d)    opendir(d)

Definition at line 486 of file plibc.h.

#define PATH_SEPARATOR   ':'

Definition at line 473 of file plibc.h.

#define PATH_SEPARATOR_STR   ":"

Definition at line 474 of file plibc.h.

#define PIPE (   h)    pipe(h)

Definition at line 496 of file plibc.h.

#define PLIBC_CTIME (   c)    ctime(c)

Definition at line 481 of file plibc.h.

#define PLIBC_KILL (   p,
 
)    kill(p, s)

Definition at line 495 of file plibc.h.

#define PRINTF   printf

Definition at line 516 of file plibc.h.

#define RANDOM ( )    random()

Definition at line 511 of file plibc.h.

Referenced by test_simple_large().

#define READ (   f,
  b,
 
)    read(f, b, n)

Definition at line 504 of file plibc.h.

#define READLINK (   p,
  b,
 
)    readlink(p, b, s)

Definition at line 513 of file plibc.h.

#define RECV (   s,
  b,
  l,
 
)    recv(s, b, l, f)

Definition at line 538 of file plibc.h.

Referenced by recv_param_adapter().

#define RECVFROM (   s,
  b,
  l,
  f,
  r,
 
)    recvfrom(s, b, l, f, r, o)

Definition at line 539 of file plibc.h.

#define REMOVE (   p)    remove(p)

Definition at line 497 of file plibc.h.

#define REMQUE (   e)    remque(e)

Definition at line 550 of file plibc.h.

#define RENAME (   o,
 
)    rename(o, n)

Definition at line 498 of file plibc.h.

#define RMDIR (   f)    rmdir(f)

Definition at line 491 of file plibc.h.

#define SCANF   scanf

Definition at line 528 of file plibc.h.

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

Definition at line 540 of file plibc.h.

Referenced by MHD_handle_connection(), and MHD_select().

#define SEND (   s,
  b,
  l,
 
)    send(s, b, l, f)

Definition at line 541 of file plibc.h.

Referenced by send_param_adapter().

#define SENDTO (   s,
  b,
  l,
  f,
  o,
 
)    sendto(s, b, l, f, o, n)

Definition at line 542 of file plibc.h.

#define SETSOCKOPT (   s,
  l,
  o,
  v,
 
)    setsockopt(s, l, o, v, n)

Definition at line 543 of file plibc.h.

Referenced by MHD_start_daemon_va().

#define SHUTDOWN (   s,
 
)    shutdown(s, h)
#define SIGALRM   14

Definition at line 32 of file plibc.h.

Referenced by MHD_cleanup_connections(), MHD_fini(), MHD_init(), and MHD_stop_daemon().

#define SOCKET (   a,
  t,
 
)    socket(a, t, p)

Definition at line 545 of file plibc.h.

Referenced by MHD_start_daemon_va().

#define SPRINTF   sprintf

Definition at line 523 of file plibc.h.

Referenced by add_extra_headers(), build_header_response(), and get_date_string().

#define SRANDOM (   s)    srandom(s)

Definition at line 512 of file plibc.h.

#define SSCANF   sscanf

Definition at line 525 of file plibc.h.

Referenced by MHD_http_unescape(), parse_connection_headers(), and process_request_body().

#define STAT (   p,
 
)    stat(p, b)

Definition at line 499 of file plibc.h.

#define STAT64 (   p,
 
)    stat64(p, b)

Definition at line 500 of file plibc.h.

#define SYMLINK (   a,
 
)    symlink(a, b)

Definition at line 507 of file plibc.h.

#define SYSCONF (   n)    sysconf(n)

Definition at line 501 of file plibc.h.

#define TDELETE (   k,
  r,
 
)    tdelete(k, r, c)

Definition at line 559 of file plibc.h.

Referenced by MHD_ip_limit_del().

#define TDESTROY (   r,
 
)    tdestroy(r, f)

Definition at line 561 of file plibc.h.

#define TFIND (   k,
  r,
 
)    tfind(k, r, c)

Definition at line 558 of file plibc.h.

Referenced by MHD_ip_limit_del().

#define TSEARCH (   k,
  r,
 
)    tsearch(k, r, c)

Definition at line 557 of file plibc.h.

Referenced by MHD_ip_limit_add().

#define TWALK (   r,
 
)    twalk(r, a)

Definition at line 560 of file plibc.h.

#define UNLINK (   f)    unlink(f)

Definition at line 502 of file plibc.h.

#define VFPRINTF (   s,
  f,
 
)    vfprintf(s, f, a)

Definition at line 519 of file plibc.h.

#define VFSCANF (   s,
  f,
 
)    vfscanf(s, f, a)

Definition at line 526 of file plibc.h.

#define VPRINTF (   f,
 
)    vprintf(f, a)

Definition at line 518 of file plibc.h.

#define VSCANF (   f,
 
)    vscanf(f, a)

Definition at line 527 of file plibc.h.

#define VSNPRINTF (   str,
  size,
  fmt,
 
)    vsnprintf(str, size, fmt, a)

Definition at line 521 of file plibc.h.

#define VSPRINTF (   d,
  f,
 
)    vsprintf(d, f, a)

Definition at line 520 of file plibc.h.

#define VSSCANF (   s,
  f,
 
)    vsscanf(s, f, a)

Definition at line 524 of file plibc.h.

#define WAITPID (   p,
  s,
 
)    waitpid(p, s, o)

Definition at line 530 of file plibc.h.

#define WRITE (   f,
  b,
 
)    write(f, b, n)

Definition at line 503 of file plibc.h.


Typedef Documentation

Definition at line 682 of file plibc.h.

typedef void(* PLIBC_SEARCH__action_fn_t)(__const void *__nodep, PLIBC_SEARCH_VISIT __value, int __level)

Definition at line 771 of file plibc.h.

typedef int(* PLIBC_SEARCH__compar_fn_t)(__const void *, __const void *)

Definition at line 680 of file plibc.h.

typedef void(* PLIBC_SEARCH__free_fn_t)(void *__nodep)

Definition at line 780 of file plibc.h.


Enumeration Type Documentation

Enumerator:
PLIBC_SEARCH_FIND 
PLIBC_SEARCH_ENTER 

Definition at line 685 of file plibc.h.

Enumerator:
PLIBC_SEARCH_preorder 
PLIBC_SEARCH_postorder 
PLIBC_SEARCH_endorder 
PLIBC_SEARCH_leaf 

Definition at line 747 of file plibc.h.


Function Documentation

int _win_hcreate ( size_t  __nel)
int _win_hcreate_r ( size_t  __nel,
struct PLIBC_SEARCH_hsearch_data __htab 
)
void _win_hdestroy ( void  )
void _win_hdestroy_r ( struct PLIBC_SEARCH_hsearch_data __htab)
PLIBC_SEARCH_ENTRY* _win_hsearch ( PLIBC_SEARCH_ENTRY  __item,
PLIBC_SEARCH_ACTION  __action 
)
int _win_hsearch_r ( PLIBC_SEARCH_ENTRY  __item,
PLIBC_SEARCH_ACTION  __action,
PLIBC_SEARCH_ENTRY **  __retval,
struct PLIBC_SEARCH_hsearch_data __htab 
)
void _win_insque ( void *  __elem,
void *  __prev 
)
void* _win_lfind ( __const void *  __key,
__const void *  __base,
size_t *  __nmemb,
size_t  __size,
PLIBC_SEARCH__compar_fn_t  __compar 
)
void* _win_lsearch ( __const void *  __key,
void *  __base,
size_t *  __nmemb,
size_t  __size,
PLIBC_SEARCH__compar_fn_t  __compar 
)
void _win_remque ( void *  __elem)
void* _win_tdelete ( __const void *__restrict  __key,
void **__restrict  __rootp,
PLIBC_SEARCH__compar_fn_t  __compar 
)
void _win_tdestroy ( void *  __root,
PLIBC_SEARCH__free_fn_t  __freefct 
)
void* _win_tfind ( __const void *  __key,
void *__const *  __rootp,
PLIBC_SEARCH__compar_fn_t  __compar 
)
void* _win_tsearch ( __const void *  __key,
void **  __rootp,
PLIBC_SEARCH__compar_fn_t  __compar 
)
void _win_twalk ( __const void *  __root,
PLIBC_SEARCH__action_fn_t  __action 
)