nginx-quic/src/core/ngx_config.h

96 lines
1.7 KiB
C
Raw Normal View History

#ifndef _NGX_CONFIG_H_INCLUDED_
#define _NGX_CONFIG_H_INCLUDED_
2003-05-21 09:28:21 -04:00
#if defined __FreeBSD__
#include <ngx_freebsd_config.h>
2003-01-30 04:28:09 -03:00
2003-05-21 09:28:21 -04:00
#elif defined __linux__
#include <ngx_linux_config.h>
2003-05-21 09:28:21 -04:00
/* Solaris */
#elif defined(sun) && (defined(__svr4__) || defined(__SVR4))
#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
#endif
2003-11-28 05:40:40 -03:00
/* STUB: ngx_mutex.h */
#define ngx_mutex_lock(m)
#define ngx_mutex_unlock(m)
2003-11-25 17:44:56 -03:00
/* STUB: autoconf */
typedef int ngx_int_t;
typedef u_int ngx_uint_t;
#include <ngx_auto_config.h>
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)
#define ngx_signal_helper(n) SIG##n
#define ngx_signal_value(n) ngx_signal_helper(n)
/* TODO: #ifndef */
#define NGX_RESTART_SIGNAL HUP
#define NGX_ROTATE_SIGNAL USR1
#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
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 INFTIM /* Linux */
#define INFTIM -1
2003-05-22 11:23:47 -04: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_ */