nginx-quic/src/core/ngx_config.h

136 lines
2.5 KiB
C
Raw Normal View History

/*
* Copyright (C) Igor Sysoev
*/
#ifndef _NGX_CONFIG_H_INCLUDED_
#define _NGX_CONFIG_H_INCLUDED_
#include <ngx_auto_headers.h>
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
#if (NGX_FREEBSD)
2003-05-21 09:28:21 -04:00
#include <ngx_freebsd_config.h>
2003-01-30 04:28:09 -03:00
#elif (NGX_LINUX)
2003-05-21 09:28:21 -04:00
#include <ngx_linux_config.h>
#elif (NGX_SOLARIS)
2003-05-21 09:28:21 -04:00
#include <ngx_solaris_config.h>
#elif (NGX_WIN32)
2003-05-21 09:28:21 -04:00
#include <ngx_win32_config.h>
2002-12-19 14:49:51 -03: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
#ifndef NGX_HAVE_SO_SNDLOWAT
#define NGX_HAVE_SO_SNDLOWAT 1
#endif
#if !(NGX_WIN32)
2003-07-11 00:50:59 -04:00
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
#define ngx_cdecl
#define ngx_libc_cdecl
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
#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
#endif
2004-01-05 17:55:48 -03:00
#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
#if (NGX_SOLARIS)
#define NGX_ALIGN (_MAX_ALIGNMENT - 1)
#else
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 */
#endif
#define ngx_align(p) (u_char *) (((uintptr_t) 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-07-26 12:21:18 -04:00
#define NGX_ACCEPT_THRESHOLD 100
2004-04-21 14:54:33 -04:00
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
#define NGX_MAXHOSTNAMELEN 64
/*
#define NGX_MAXHOSTNAMELEN MAXHOSTNAMELEN
*/
#if ((__GNU__ == 2) && (__GNUC_MINOR__ < 8))
#define NGX_MAX_UINT32_VALUE (uint32_t) 0xffffffffLL
#else
#define NGX_MAX_UINT32_VALUE (uint32_t) 0xffffffff
#endif
#endif /* _NGX_CONFIG_H_INCLUDED_ */