nginx-quic/src/core/ngx_config.h

112 lines
2.4 KiB
C
Raw Normal View History

#ifndef _NGX_CONFIG_H_INCLUDED_
#define _NGX_CONFIG_H_INCLUDED_
2004-04-21 14:54:33 -04:00
#if defined __DragonFly__ && !defined __FreeBSD__
2004-03-29 13:43:58 -04:00
#define __FreeBSD__ 4
#define __FreeBSD_version 480101
#endif
2004-04-21 14:54:33 -04:00
#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-04-21 14:54:33 -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-04-21 14:54:33 -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
#include <ngx_win32_config.h>
2002-12-19 14:49:51 -03:00
2003-05-21 09:28:21 -04:00
#else /* posix */
2004-06-15 13:47:16 -04:00
#include <ngx_posix_config.h>
2004-02-03 13:43:54 -03:00
2002-12-19 14:49:51 -03:00
#endif
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
2004-07-07 15:48:31 -04:00
#if (NGX_LINUXTHREADS)
#define NGX_REOPEN_SIGNAL INFO
#define NGX_CHANGEBIN_SIGNAL XCPU
#else
2004-01-08 18:02:06 -03:00
#define NGX_REOPEN_SIGNAL USR1
2004-01-05 17:55:48 -03:00
#define NGX_CHANGEBIN_SIGNAL USR2
2004-07-07 15:48:31 -04:00
#endif
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-06-16 11:32:11 -04:00
#if 1
/* STUB: autoconf */
typedef int ngx_int_t;
typedef u_int ngx_uint_t;
typedef int ngx_flag_t;
#define NGX_INT_T_LEN sizeof("-2147483648") - 1
#define NGX_INT_T_FMT "d"
#define NGX_UINT_T_FMT "u"
#else
typedef long ngx_int_t;
typedef u_long ngx_uint_t;
typedef long ngx_flag_t;
#define NGX_INT_T_LEN sizeof("-9223372036854775808") - 1
#define NGX_INT_T_FMT "lld"
#define NGX_UINT_T_FMT "llu"
#endif
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_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
2004-04-21 14:54:33 -04:00
#define NGX_ACCEPT_THRESHOLD 50
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_ */