2004-09-28 04:34:51 -04:00
|
|
|
|
|
|
|
/*
|
2004-09-29 12:00:49 -04:00
|
|
|
* Copyright (C) Igor Sysoev
|
2004-09-28 04:34:51 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2002-08-06 12:39:45 -04:00
|
|
|
#ifndef _NGX_CONFIG_H_INCLUDED_
|
|
|
|
#define _NGX_CONFIG_H_INCLUDED_
|
|
|
|
|
|
|
|
|
2004-10-21 12:34:38 -03:00
|
|
|
#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
|
|
|
|
|
|
|
|
|
2004-10-21 12:34:38 -03:00
|
|
|
#if (NGX_FREEBSD)
|
2003-05-21 09:28:21 -04:00
|
|
|
#include <ngx_freebsd_config.h>
|
2003-01-30 04:28:09 -03:00
|
|
|
|
2002-08-06 12:39:45 -04:00
|
|
|
|
2004-10-21 12:34:38 -03:00
|
|
|
#elif (NGX_LINUX)
|
2003-05-21 09:28:21 -04:00
|
|
|
#include <ngx_linux_config.h>
|
2002-08-06 12:39:45 -04:00
|
|
|
|
|
|
|
|
2004-10-21 12:34:38 -03:00
|
|
|
#elif (NGX_SOLARIS)
|
2003-05-21 09:28:21 -04:00
|
|
|
#include <ngx_solaris_config.h>
|
2002-08-06 12:39:45 -04:00
|
|
|
|
|
|
|
|
2004-10-21 12:34:38 -03:00
|
|
|
#elif (NGX_WIN32)
|
2003-05-21 09:28:21 -04:00
|
|
|
#include <ngx_win32_config.h>
|
2002-12-19 14:49:51 -03:00
|
|
|
|
|
|
|
|
2004-10-21 12:34:38 -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
|
|
|
|
|
|
|
|
|
2004-12-02 15:40:46 -03:00
|
|
|
#ifndef NGX_HAVE_SO_SNDLOWAT
|
|
|
|
#define NGX_HAVE_SO_SNDLOWAT 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-11-11 11:07:14 -03:00
|
|
|
#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
|
|
|
|
2005-03-22 12:02:46 -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
|
|
|
|
2002-08-06 12:39:45 -04: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-10-21 12:34:38 -03:00
|
|
|
|
2004-01-05 17:55:48 -03:00
|
|
|
|
2004-10-21 12:34:38 -03:00
|
|
|
#if (NGX_SOLARIS)
|
2005-03-04 11:06:57 -03:00
|
|
|
#define NGX_ALIGN (_MAX_ALIGNMENT - 1)
|
2004-09-15 12:00:43 -04:00
|
|
|
#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 */
|
2004-09-15 12:00:43 -04:00
|
|
|
#endif
|
|
|
|
|
2005-03-04 11:06:57 -03:00
|
|
|
#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
|
2005-10-12 10:50:36 -03:00
|
|
|
#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
|
|
|
|
|
2004-09-28 04:34:51 -04:00
|
|
|
#define NGX_MAXHOSTNAMELEN 64
|
|
|
|
/*
|
|
|
|
#define NGX_MAXHOSTNAMELEN MAXHOSTNAMELEN
|
|
|
|
*/
|
|
|
|
|
2002-08-06 12:39:45 -04:00
|
|
|
|
2004-11-26 06:33:59 -03:00
|
|
|
#if ((__GNU__ == 2) && (__GNUC_MINOR__ < 8))
|
2005-05-23 08:07:45 -04:00
|
|
|
#define NGX_MAX_UINT32_VALUE (uint32_t) 0xffffffffLL
|
2004-11-26 06:33:59 -03:00
|
|
|
#else
|
2005-05-23 08:07:45 -04:00
|
|
|
#define NGX_MAX_UINT32_VALUE (uint32_t) 0xffffffff
|
2004-11-26 06:33:59 -03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2002-08-06 12:39:45 -04:00
|
|
|
#endif /* _NGX_CONFIG_H_INCLUDED_ */
|