File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / lighttpd / src / settings.h
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Mon Oct 14 10:32:47 2013 UTC (10 years, 9 months ago) by misho
CVS tags: MAIN, HEAD
Initial revision

    1: #ifndef _LIGHTTPD_SETTINGS_H_
    2: #define _LIGHTTPD_SETTINGS_H_
    3: 
    4: #ifndef _GNU_SOURCE
    5: # define _GNU_SOURCE
    6: #endif
    7: 
    8: #ifndef __USE_GNU
    9: # define __USE_GNU /* a hack in my eyes, <fcntl.h> F_SETSIG should work with _GNU_SOURCE */
   10: #endif
   11: 
   12: #define BV(x) (1 << x)
   13: 
   14: #define INET_NTOP_CACHE_MAX 4
   15: #define FILE_CACHE_MAX      16
   16: 
   17: /**
   18:  * max size of a buffer which will just be reset
   19:  * to ->used = 0 instead of really freeing the buffer
   20:  *
   21:  * 64kB (no real reason, just a guess)
   22:  */
   23: #define BUFFER_MAX_REUSE_SIZE  (4 * 1024)
   24: 
   25: /* both should be way smaller than SSIZE_MAX :) */
   26: #define MAX_READ_LIMIT (256*1024)
   27: #define MAX_WRITE_LIMIT (256*1024)
   28: 
   29: /**
   30:  * max size of the HTTP request header
   31:  *
   32:  * 32k should be enough for everything (just a guess)
   33:  *
   34:  */
   35: #define MAX_HTTP_REQUEST_HEADER  (32 * 1024)
   36: 
   37: typedef enum { HANDLER_UNSET,
   38: 		HANDLER_GO_ON,
   39: 		HANDLER_FINISHED,
   40: 		HANDLER_COMEBACK,
   41: 		HANDLER_WAIT_FOR_EVENT,
   42: 		HANDLER_ERROR,
   43: 		HANDLER_WAIT_FOR_FD
   44: } handler_t;
   45: 
   46: #define HTTP_LINGER_TIMEOUT 5
   47: 
   48: /* we use it in a enum */
   49: #ifdef TRUE
   50: #undef TRUE
   51: #endif
   52: 
   53: #ifdef FALSE
   54: #undef FALSE
   55: #endif
   56: 
   57: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>