3 * Copyright (C) Igor Sysoev
7 #ifndef _NGX_CONFIG_H_INCLUDED_
8 #define _NGX_CONFIG_H_INCLUDED_
11 #include <ngx_auto_headers.h>
14 #if defined __DragonFly__ && !defined __FreeBSD__
16 #define __FreeBSD_version 480101
21 #include <ngx_freebsd_config.h>
25 #include <ngx_linux_config.h>
29 #include <ngx_solaris_config.h>
33 #include <ngx_win32_config.h>
37 #include <ngx_posix_config.h>
42 #ifndef NGX_HAVE_SO_SNDLOWAT
43 #define NGX_HAVE_SO_SNDLOWAT 1
49 #define ngx_signal_helper(n) SIG##n
50 #define ngx_signal_value(n) ngx_signal_helper(n)
53 #define NGX_SHUTDOWN_SIGNAL QUIT
54 #define NGX_TERMINATE_SIGNAL TERM
55 #define NGX_NOACCEPT_SIGNAL WINCH
56 #define NGX_RECONFIGURE_SIGNAL HUP
58 #if (NGX_LINUXTHREADS)
59 #define NGX_REOPEN_SIGNAL INFO
60 #define NGX_CHANGEBIN_SIGNAL XCPU
62 #define NGX_REOPEN_SIGNAL USR1
63 #define NGX_CHANGEBIN_SIGNAL USR2
70 /* TODO: platform specific: array[NGX_INVALID_ARRAY_INDEX] must cause SIGSEGV */
71 #define NGX_INVALID_ARRAY_INDEX 0x80000000
76 typedef int ngx_int_t
;
77 typedef u_int ngx_uint_t
;
78 typedef int ngx_flag_t
;
79 #define NGX_INT_T_LEN sizeof("-2147483648") - 1
83 typedef long ngx_int_t
;
84 typedef u_long ngx_uint_t
;
85 typedef long ngx_flag_t
;
86 #define NGX_INT_T_LEN sizeof("-9223372036854775808") - 1
91 #define NGX_INT32_LEN sizeof("-2147483648") - 1
92 #define NGX_INT64_LEN sizeof("-9223372036854775808") - 1
93 #define NGX_OFF_T_LEN sizeof("-9223372036854775808") - 1
95 #define NGX_MAX_INT_LEN (sizeof("-9223372036854775808") - 1)
100 /* TODO: auto_conf */
101 #define NGX_ALIGN (_MAX_ALIGNMENT - 1) /* platform word */
102 #define NGX_ALIGN_CAST (unsigned long) /* size of the pointer */
106 /* TODO: auto_conf */
107 #define NGX_ALIGN (sizeof(unsigned long) - 1) /* platform word */
108 #define NGX_ALIGN_CAST (unsigned long) /* size of the pointer */
112 #define ngx_align(p) (char *) ((NGX_ALIGN_CAST p + NGX_ALIGN) & ~NGX_ALIGN)
115 /* TODO: auto_conf: ngx_inline inline __inline __inline__ */
117 #define ngx_inline __inline
120 #define NGX_ACCEPT_THRESHOLD 100
122 #ifndef INADDR_NONE /* Solaris */
123 #define INADDR_NONE ((unsigned int) -1)
126 #ifndef INET_ADDRSTRLEN /* Win32 */
127 #define INET_ADDRSTRLEN 16
130 #define NGX_MAXHOSTNAMELEN 64
132 #define NGX_MAXHOSTNAMELEN MAXHOSTNAMELEN
136 #if ((__GNU__ == 2) && (__GNUC_MINOR__ < 8))
137 #define NGX_MAX_UINT32_VALUE 0xffffffffLL
139 #define NGX_MAX_UINT32_VALUE 0xffffffff
143 #endif /* _NGX_CONFIG_H_INCLUDED_ */