2002-08-06 12:39:45 -04:00
|
|
|
#ifndef _NGX_CONFIG_H_INCLUDED_
|
|
|
|
#define _NGX_CONFIG_H_INCLUDED_
|
|
|
|
|
|
|
|
|
|
|
|
#include <ngx_auto_config.h>
|
|
|
|
|
2003-01-30 04:28:09 -03:00
|
|
|
|
2003-05-21 09:28:21 -04:00
|
|
|
#if defined __FreeBSD__
|
|
|
|
#include <ngx_freebsd_config.h>
|
2003-01-30 04:28:09 -03:00
|
|
|
|
2002-08-06 12:39:45 -04:00
|
|
|
|
2003-05-21 09:28:21 -04:00
|
|
|
#elif defined __linux__
|
|
|
|
#include <ngx_linux_config.h>
|
2002-08-06 12:39:45 -04:00
|
|
|
|
|
|
|
|
2003-05-21 09:28:21 -04:00
|
|
|
/* Solaris */
|
|
|
|
#elif defined(sun) && (defined(__svr4__) || defined(__SVR4))
|
|
|
|
#include <ngx_solaris_config.h>
|
2002-08-06 12:39:45 -04:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
#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
|
|
|
|
2003-05-21 09:28:21 -04:00
|
|
|
/* TODO: auto_conf */
|
|
|
|
#define NGX_ALIGN (4 - 1)
|
|
|
|
#define NGX_ALIGN_TYPE (unsigned int)
|
2003-02-06 14:21:13 -03:00
|
|
|
|
2003-05-21 09:28:21 -04:00
|
|
|
#define ngx_align(p) (char *) ((NGX_ALIGN_TYPE 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-05-22 11:23:47 -04:00
|
|
|
#ifndef INFTIM /* Linux */
|
|
|
|
#define INFTIM -1
|
|
|
|
#endif
|
|
|
|
|
2003-05-21 09:28:21 -04:00
|
|
|
#ifndef INADDR_NONE /* Solaris */
|
|
|
|
#define INADDR_NONE ((unsigned long) -1)
|
2003-02-06 14:21:13 -03:00
|
|
|
#endif
|
|
|
|
|
2002-12-15 18:08:04 -03:00
|
|
|
#ifndef INET_ADDRSTRLEN
|
|
|
|
#define INET_ADDRSTRLEN 16
|
|
|
|
#endif
|
|
|
|
|
2002-08-06 12:39:45 -04:00
|
|
|
|
|
|
|
#endif /* _NGX_CONFIG_H_INCLUDED_ */
|