comparison src/os/unix/ngx_freebsd_config.h @ 195:8dee38ea9117

nginx-0.0.1-2003-11-25-23:44:56 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 25 Nov 2003 20:44:56 +0000
parents 2357fa41738a
children 11fbd0fc041d
comparison
equal deleted inserted replaced
194:2357fa41738a 195:8dee38ea9117
1 #ifndef _NGX_FREEBSD_CONFIG_H_INCLUDED_ 1 #ifndef _NGX_FREEBSD_CONFIG_H_INCLUDED_
2 #define _NGX_FREEBSD_CONFIG_H_INCLUDED_ 2 #define _NGX_FREEBSD_CONFIG_H_INCLUDED_
3 3
4 4
5 #include <unistd.h> 5 #include <unistd.h>
6 #include <stddef.h> /* offsetof */ 6 #include <stddef.h> /* offsetof() */
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <fcntl.h> 10 #include <fcntl.h>
11 #include <signal.h> 11 #include <signal.h>
23 #include <netinet/tcp.h> /* TCP_NOPUSH */ 23 #include <netinet/tcp.h> /* TCP_NOPUSH */
24 #include <dirent.h> 24 #include <dirent.h>
25 #include <arpa/inet.h> 25 #include <arpa/inet.h>
26 #include <netdb.h> 26 #include <netdb.h>
27 #include <osreldate.h> 27 #include <osreldate.h>
28
29
30
31 /* TODO: autoconf */
32 #if (i386)
33
34 #if 0
35 #define OFF_FMT "%lld"
36 #endif
37
38 #define SIZE_FMT "%d"
39 #define SIZEX_FMT "%x"
40
41 #else /* amd64, alpha, sparc64, ia64 */
42
43 #if 0
44 #define OFF_FMT "%ld"
45 #endif
46
47 #define SIZE_FMT "%ld"
48 #define SIZEX_FMT "%lx"
49
50 #endif
51
52 #if 0
53 #define TIME_FMT "%ld"
54 #endif
55 #define PID_FMT "%d"
56 #define RLIM_FMT "%lld"
57 28
58 29
59 #ifndef HAVE_SELECT 30 #ifndef HAVE_SELECT
60 #define HAVE_SELECT 1 31 #define HAVE_SELECT 1
61 #endif 32 #endif
87 #if defined SO_ACCEPTFILTER && !defined HAVE_DEFERRED_ACCEPT 58 #if defined SO_ACCEPTFILTER && !defined HAVE_DEFERRED_ACCEPT
88 #define HAVE_DEFERRED_ACCEPT 1 59 #define HAVE_DEFERRED_ACCEPT 1
89 #endif 60 #endif
90 61
91 62
92 /* STUB */
93 #define HAVE_PREAD 1
94 #define HAVE_PWRITE 1
95 #define HAVE_LOCALTIME_R 1
96
97
98 /* FreeBSD sendfile */
99
100 #if __FreeBSD_version >= 300007
101
102 #ifndef HAVE_FREEBSD_SENDFILE
103 #define HAVE_FREEBSD_SENDFILE 1
104 #endif
105
106 #endif
107
108
109 #if (HAVE_FREEBSD_SENDFILE)
110 #define HAVE_SENDFILE 1
111 #endif
112
113
114 /* FreeBSD kqueue */
115
116 #if (__FreeBSD__ == 4 && __FreeBSD_version >= 410000) \
117 || __FreeBSD_version >= 500011
118
119 #ifndef HAVE_KQUEUE
120 #define HAVE_KQUEUE 1
121 #endif
122
123 #endif
124
125 #if (HAVE_KQUEUE) 63 #if (HAVE_KQUEUE)
126 #include <sys/event.h> 64 #include <sys/event.h>
127 #endif 65 #endif
128
129
130 /* kqueue's NOTE_LOWAT */
131
132 #if (__FreeBSD__ == 4 && __FreeBSD_version >= 430000) \
133 || __FreeBSD_version >= 500018
134
135 #ifndef HAVE_LOWAT_EVENT
136 #define HAVE_LOWAT_EVENT 1
137 #endif
138
139 #endif
140
141
142 66
143 67
144 #ifndef HAVE_INHERITED_NONBLOCK 68 #ifndef HAVE_INHERITED_NONBLOCK
145 #define HAVE_INHERITED_NONBLOCK 1 69 #define HAVE_INHERITED_NONBLOCK 1
146 #endif 70 #endif