Mercurial > hg > nginx
comparison src/core/ngx_config.h @ 0:4eff17414a43
nginx-0.0.1-2002-08-06-20:39:45 import
The first code that uses "ngx_" prefix, the previous one used "gx_" prefix.
At that point the code is not yet usable. The first draft ideas are dated
back to 23.10.2001.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 06 Aug 2002 16:39:45 +0000 |
parents | |
children | d220029ac7f3 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4eff17414a43 |
---|---|
1 #ifndef _NGX_CONFIG_H_INCLUDED_ | |
2 #define _NGX_CONFIG_H_INCLUDED_ | |
3 | |
4 | |
5 #include <ngx_auto_config.h> | |
6 | |
7 /* | |
8 auto_conf | |
9 ngx_inline inline __inline __inline__ | |
10 */ | |
11 | |
12 #define FD_SETSIZE 1024 | |
13 | |
14 | |
15 #ifdef _WIN32 | |
16 | |
17 #define WIN32 1 | |
18 | |
19 #include <winsock2.h> | |
20 #include <mswsock.h> | |
21 #include <stdio.h> | |
22 #include <stdarg.h> | |
23 | |
24 | |
25 #define ngx_inline __inline | |
26 | |
27 #define ngx_memzero ZeroMemory | |
28 | |
29 #define ngx_close_socket closesocket | |
30 | |
31 #ifndef HAVE_WIN32_TRANSMITPACKETS | |
32 #define HAVE_WIN32_TRANSMITPACKETS 1 | |
33 #define HAVE_WIN32_TRANSMITFILE 0 | |
34 #endif | |
35 | |
36 #ifndef HAVE_WIN32_TRANSMITFILE | |
37 #define HAVE_WIN32_TRANSMITFILE 1 | |
38 #endif | |
39 | |
40 #if (HAVE_WIN32_TRANSMITPACKETS) || (HAVE_WIN32_TRANSMITFILE) | |
41 #define HAVE_SENDFILE 1 | |
42 #endif | |
43 | |
44 #else /* POSIX */ | |
45 | |
46 #include <unistd.h> | |
47 #include <stdlib.h> | |
48 #include <stdio.h> | |
49 #include <stdarg.h> | |
50 #include <fcntl.h> | |
51 #include <string.h> | |
52 #include <sys/types.h> | |
53 #include <sys/time.h> | |
54 #include <sys/socket.h> | |
55 #include <sys/uio.h> | |
56 #include <netinet/in.h> | |
57 #include <arpa/inet.h> | |
58 | |
59 #define ngx_inline inline | |
60 | |
61 #define ngx_memzero bzero | |
62 | |
63 #define ngx_close_socket close | |
64 | |
65 #endif /* POSIX */ | |
66 | |
67 | |
68 | |
69 #define LF 10 | |
70 #define CR 13 | |
71 #define CRLF "\x0d\x0a" | |
72 | |
73 | |
74 | |
75 #if defined SO_ACCEPTFILTER || defined TCP_DEFER_ACCEPT | |
76 | |
77 #ifndef HAVE_DEFERRED_ACCEPT | |
78 #define HAVE_DEFERRED_ACCEPT 1 | |
79 #endif | |
80 | |
81 #endif | |
82 | |
83 | |
84 | |
85 #ifdef __FreeBSD__ | |
86 | |
87 #include <osreldate.h> | |
88 | |
89 #if __FreeBSD_version >= 300007 | |
90 | |
91 #ifndef HAVE_FREEBSD_SENDFILE | |
92 #define HAVE_FREEBSD_SENDFILE 1 | |
93 #endif | |
94 | |
95 #ifndef HAVE_FREEBSD_SENDFILE_NBYTES_BUG | |
96 #define HAVE_FREEBSD_SENDFILE_NBYTES_BUG 2 | |
97 #endif | |
98 | |
99 #endif | |
100 | |
101 #if (__FreeBSD__ == 4 && __FreeBSD_version >= 460100) \ | |
102 || __FreeBSD_version == 460001 | |
103 || __FreeBSD_version >= 500029 | |
104 | |
105 #if (HAVE_FREEBSD_SENDFILE_NBYTES_BUG == 2) | |
106 #define HAVE_FREEBSD_SENDFILE_NBYTES_BUG 0 | |
107 #endif | |
108 | |
109 #endif | |
110 | |
111 #if (HAVE_FREEBSD_SENDFILE) | |
112 #define HAVE_SENDFILE 1 | |
113 #endif | |
114 | |
115 | |
116 #if (__FreeBSD__ == 4 && __FreeBSD_version >= 410000) \ | |
117 || __FreeBSD_version >= 500011 | |
118 | |
119 #ifndef HAVE_KQUEUE | |
120 #define HAVE_KQUEUE 1 | |
121 #include <sys/event.h> | |
122 #endif | |
123 | |
124 #endif | |
125 | |
126 | |
127 #endif /* __FreeBSD__ */ | |
128 | |
129 | |
130 #endif /* _NGX_CONFIG_H_INCLUDED_ */ |