Mercurial > hg > nginx-mail
comparison src/core/ngx_config.h @ 0:f0b350454894 NGINX_0_1_0
nginx 0.1.0
*) The first public version.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 04 Oct 2004 00:00:00 +0400 |
parents | |
children | 4b2dafa26fe2 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0b350454894 |
---|---|
1 | |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_CONFIG_H_INCLUDED_ | |
8 #define _NGX_CONFIG_H_INCLUDED_ | |
9 | |
10 | |
11 #if defined __DragonFly__ && !defined __FreeBSD__ | |
12 #define __FreeBSD__ 4 | |
13 #define __FreeBSD_version 480101 | |
14 #endif | |
15 | |
16 | |
17 #if defined __FreeBSD__ | |
18 #include <ngx_freebsd_config.h> | |
19 | |
20 | |
21 #elif defined __linux__ | |
22 #include <ngx_linux_config.h> | |
23 | |
24 | |
25 /* Solaris */ | |
26 #elif defined sun && (defined __svr4__ || defined __SVR4) | |
27 #include <ngx_solaris_config.h> | |
28 | |
29 | |
30 #elif defined _WIN32 | |
31 #include <ngx_win32_config.h> | |
32 | |
33 | |
34 #else /* posix */ | |
35 #include <ngx_posix_config.h> | |
36 | |
37 #endif | |
38 | |
39 | |
40 #if !(WIN32) | |
41 | |
42 #define ngx_signal_helper(n) SIG##n | |
43 #define ngx_signal_value(n) ngx_signal_helper(n) | |
44 | |
45 /* TODO: #ifndef */ | |
46 #define NGX_SHUTDOWN_SIGNAL QUIT | |
47 #define NGX_TERMINATE_SIGNAL TERM | |
48 #define NGX_NOACCEPT_SIGNAL WINCH | |
49 #define NGX_RECONFIGURE_SIGNAL HUP | |
50 | |
51 #if (NGX_LINUXTHREADS) | |
52 #define NGX_REOPEN_SIGNAL INFO | |
53 #define NGX_CHANGEBIN_SIGNAL XCPU | |
54 #else | |
55 #define NGX_REOPEN_SIGNAL USR1 | |
56 #define NGX_CHANGEBIN_SIGNAL USR2 | |
57 #endif | |
58 | |
59 #endif | |
60 | |
61 | |
62 | |
63 /* TODO: platform specific: array[NGX_INVALID_ARRAY_INDEX] must cause SIGSEGV */ | |
64 #define NGX_INVALID_ARRAY_INDEX 0x80000000 | |
65 | |
66 | |
67 #if 1 | |
68 /* STUB: autoconf */ | |
69 typedef int ngx_int_t; | |
70 typedef u_int ngx_uint_t; | |
71 typedef int ngx_flag_t; | |
72 #define NGX_INT_T_LEN sizeof("-2147483648") - 1 | |
73 #define NGX_INT_T_FMT "d" | |
74 #define NGX_UINT_T_FMT "u" | |
75 | |
76 #else | |
77 | |
78 typedef long ngx_int_t; | |
79 typedef u_long ngx_uint_t; | |
80 typedef long ngx_flag_t; | |
81 #define NGX_INT_T_LEN sizeof("-9223372036854775808") - 1 | |
82 #define NGX_INT_T_FMT "lld" | |
83 #define NGX_UINT_T_FMT "llu" | |
84 | |
85 #endif | |
86 | |
87 /* TODO: auto */ | |
88 #define NGX_INT32_LEN sizeof("-2147483648") - 1 | |
89 #define NGX_INT64_LEN sizeof("-9223372036854775808") - 1 | |
90 #define NGX_OFF_T_LEN sizeof("-9223372036854775808") - 1 | |
91 | |
92 | |
93 #if (SOLARIS) | |
94 | |
95 /* TODO: auto_conf */ | |
96 #define NGX_ALIGN (_MAX_ALIGNMENT - 1) /* platform word */ | |
97 #define NGX_ALIGN_CAST (unsigned long) /* size of the pointer */ | |
98 | |
99 #else | |
100 | |
101 /* TODO: auto_conf */ | |
102 #define NGX_ALIGN (sizeof(unsigned long) - 1) /* platform word */ | |
103 #define NGX_ALIGN_CAST (unsigned long) /* size of the pointer */ | |
104 | |
105 #endif | |
106 | |
107 #define ngx_align(p) (char *) ((NGX_ALIGN_CAST p + NGX_ALIGN) & ~NGX_ALIGN) | |
108 | |
109 | |
110 /* TODO: auto_conf: ngx_inline inline __inline __inline__ */ | |
111 #ifndef ngx_inline | |
112 #define ngx_inline inline | |
113 #endif | |
114 | |
115 #define NGX_ACCEPT_THRESHOLD 100 | |
116 | |
117 #ifndef INADDR_NONE /* Solaris */ | |
118 #define INADDR_NONE ((unsigned int) -1) | |
119 #endif | |
120 | |
121 #ifndef INET_ADDRSTRLEN /* Win32 */ | |
122 #define INET_ADDRSTRLEN 16 | |
123 #endif | |
124 | |
125 #define NGX_MAXHOSTNAMELEN 64 | |
126 /* | |
127 #define NGX_MAXHOSTNAMELEN MAXHOSTNAMELEN | |
128 */ | |
129 | |
130 | |
131 #endif /* _NGX_CONFIG_H_INCLUDED_ */ |