nginx-quic/src/core/ngx_config.h

114 lines
2.2 KiB
C
Raw Normal View History

#ifndef _NGX_CONFIG_H_INCLUDED_
#define _NGX_CONFIG_H_INCLUDED_
2004-02-09 04:46:43 -03:00
#if 0
2003-12-15 10:57:13 -03:00
/* STUB to allocate a big ngx_connections */
#undef FD_SETSIZE
#define FD_SETSIZE 5000
2004-01-23 06:26:18 -03:00
#endif
2003-12-15 10:57:13 -03:00
2004-03-29 13:43:58 -04:00
#if defined __DragonFly__ && !defined(__FreeBSD__)
#define __FreeBSD__ 4
#define __FreeBSD_version 480101
#endif
#if defined (__FreeBSD__)
2003-05-21 09:28:21 -04:00
#include <ngx_freebsd_config.h>
2003-01-30 04:28:09 -03:00
2004-03-29 13:43:58 -04:00
#elif defined (__linux__)
2003-05-21 09:28:21 -04:00
#include <ngx_linux_config.h>
2003-05-21 09:28:21 -04:00
/* Solaris */
2004-03-29 13:43:58 -04:00
#elif defined (sun) && (defined (__svr4__) || defined (__SVR4))
2003-05-21 09:28:21 -04:00
#include <ngx_solaris_config.h>
2003-05-21 09:28:21 -04:00
#elif defined _WIN32
2002-12-19 14:49:51 -03:00
2003-05-21 09:28:21 -04:00
/* STUB to allocate a big ngx_connections */
#undef FD_SETSIZE
#define FD_SETSIZE 1024
2002-12-19 14:49:51 -03:00
2003-05-21 09:28:21 -04:00
#include <ngx_win32_config.h>
2002-12-19 14:49:51 -03:00
2003-05-21 09:28:21 -04:00
#else /* posix */
2002-12-19 14:49:51 -03:00
2004-02-03 13:43:54 -03:00
#include <ngx_auto_config.h>
2002-12-19 14:49:51 -03:00
#endif
2003-11-25 17:44:56 -03:00
/* STUB: autoconf */
typedef int ngx_int_t;
typedef u_int ngx_uint_t;
2004-01-22 03:47:28 -03:00
typedef int ngx_flag_t;
2003-07-20 17:15:59 -04:00
#ifndef NGX_SERVER_ROOT
#define NGX_SERVER_ROOT "./"
#if 0
#define NGX_SERVER_ROOT "/usr/local/nginx/"
#endif
#endif
2002-12-19 14:49:51 -03:00
2003-07-11 00:50:59 -04:00
#if !(WIN32)
2004-01-05 17:55:48 -03:00
#define ngx_signal_helper(n) SIG##n
#define ngx_signal_value(n) ngx_signal_helper(n)
2003-07-11 00:50:59 -04:00
/* TODO: #ifndef */
2004-01-05 17:55:48 -03:00
#define NGX_SHUTDOWN_SIGNAL QUIT
#define NGX_TERMINATE_SIGNAL TERM
2004-02-23 17:57:12 -03:00
#define NGX_NOACCEPT_SIGNAL WINCH
2004-01-08 18:02:06 -03:00
#define NGX_RECONFIGURE_SIGNAL HUP
#define NGX_REOPEN_SIGNAL USR1
2004-01-05 17:55:48 -03:00
#define NGX_CHANGEBIN_SIGNAL USR2
2003-07-11 00:50:59 -04:00
#endif
2003-05-21 09:28:21 -04:00
/* TODO: platform specific: array[NGX_INVALID_ARRAY_INDEX] must cause SIGSEGV */
#define NGX_INVALID_ARRAY_INDEX 0x80000000
2002-12-19 14:49:51 -03:00
2004-01-05 17:55:48 -03:00
/* TODO: auto */
#define NGX_INT32_LEN sizeof("-2147483648") - 1
2004-04-09 12:03:04 -04:00
#define NGX_INT64_LEN sizeof("-9223372036854775808") - 1
2004-01-05 17:55:48 -03:00
#define NGX_TIME_T_LEN sizeof("-2147483648") - 1
#define NGX_OFF_T_LEN sizeof("-9223372036854775808") - 1
2003-05-21 09:28:21 -04:00
/* TODO: auto_conf */
2003-06-12 01:54:39 -04:00
#define NGX_ALIGN (sizeof(unsigned long) - 1) /* platform word */
#define NGX_ALIGN_CAST (unsigned long) /* size of the pointer */
2003-02-06 14:21:13 -03:00
2003-06-12 01:54:39 -04:00
#define ngx_align(p) (char *) ((NGX_ALIGN_CAST p + NGX_ALIGN) & ~NGX_ALIGN)
2002-12-23 03:29:22 -03:00
2002-12-24 14:30:59 -03:00
2003-05-21 09:28:21 -04:00
/* TODO: auto_conf: ngx_inline inline __inline __inline__ */
#ifndef ngx_inline
#define ngx_inline inline
2002-12-24 14:30:59 -03:00
#endif
2003-06-12 01:54:39 -04:00
#ifndef INADDR_NONE /* Solaris */
#define INADDR_NONE ((unsigned int) -1)
2003-02-06 14:21:13 -03:00
#endif
2003-06-12 01:54:39 -04:00
#ifndef INET_ADDRSTRLEN /* Win32 */
#define INET_ADDRSTRLEN 16
2002-12-15 18:08:04 -03:00
#endif
#endif /* _NGX_CONFIG_H_INCLUDED_ */