Mercurial > hg > nginx-vendor-current
comparison src/os/unix/ngx_freebsd_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 | cc9f381affaa |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0b350454894 |
---|---|
1 | |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_FREEBSD_CONFIG_H_INCLUDED_ | |
8 #define _NGX_FREEBSD_CONFIG_H_INCLUDED_ | |
9 | |
10 | |
11 #include <sys/types.h> | |
12 #include <sys/time.h> | |
13 #include <unistd.h> | |
14 #include <stdarg.h> | |
15 #include <stddef.h> /* offsetof() */ | |
16 #include <stdio.h> | |
17 #include <stdlib.h> | |
18 #include <errno.h> | |
19 #include <string.h> | |
20 #include <signal.h> | |
21 #include <pwd.h> | |
22 #include <grp.h> | |
23 #include <dirent.h> | |
24 | |
25 #include <sys/uio.h> | |
26 #include <sys/filio.h> /* FIONBIO */ | |
27 #include <sys/stat.h> | |
28 #include <fcntl.h> | |
29 | |
30 #include <sys/wait.h> | |
31 #include <sys/mman.h> | |
32 #include <sys/resource.h> | |
33 #include <sched.h> | |
34 | |
35 #include <sys/socket.h> | |
36 #include <netinet/in.h> | |
37 #include <arpa/inet.h> | |
38 #include <netdb.h> | |
39 | |
40 #include <libutil.h> /* setproctitle() before 4.1 */ | |
41 #include <osreldate.h> | |
42 #include <sys/sysctl.h> | |
43 #include <netinet/tcp.h> /* TCP_NOPUSH */ | |
44 | |
45 | |
46 #if __FreeBSD_version < 400017 | |
47 | |
48 #include <sys/param.h> /* ALIGN() */ | |
49 | |
50 /* FreeBSD 3.x has no CMSG_SPACE() at all and has the broken CMSG_DATA() */ | |
51 | |
52 #undef CMSG_SPACE | |
53 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l)) | |
54 | |
55 #undef CMSG_DATA | |
56 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr))) | |
57 | |
58 #endif | |
59 | |
60 | |
61 #include <ngx_auto_config.h> | |
62 | |
63 | |
64 #ifndef HAVE_SELECT | |
65 #define HAVE_SELECT 1 | |
66 #endif | |
67 | |
68 | |
69 #ifndef HAVE_POLL | |
70 #define HAVE_POLL 1 | |
71 #endif | |
72 #if (HAVE_POLL) | |
73 #include <poll.h> | |
74 #endif | |
75 | |
76 /* FreeBSD aio supported via kqueue */ | |
77 | |
78 #if (__FreeBSD__ == 4 && __FreeBSD_version >= 430000) \ | |
79 || __FreeBSD_version >= 500014 | |
80 | |
81 #ifndef HAVE_AIO | |
82 #define HAVE_AIO 1 | |
83 #endif | |
84 | |
85 #endif | |
86 | |
87 #if (HAVE_AIO) | |
88 #include <aio.h> | |
89 #endif | |
90 | |
91 | |
92 #if defined SO_ACCEPTFILTER && !defined HAVE_DEFERRED_ACCEPT | |
93 #define HAVE_DEFERRED_ACCEPT 1 | |
94 #endif | |
95 | |
96 | |
97 #if (HAVE_KQUEUE) | |
98 #include <sys/event.h> | |
99 #endif | |
100 | |
101 | |
102 #if (__FreeBSD_version < 430000 || __FreeBSD_version < 500012) | |
103 | |
104 pid_t rfork_thread(int flags, void *stack, int (*func)(void *arg), void *arg); | |
105 | |
106 #endif | |
107 | |
108 #ifndef IOV_MAX | |
109 #define IOV_MAX 1024 | |
110 #endif | |
111 | |
112 | |
113 #ifndef HAVE_INHERITED_NONBLOCK | |
114 #define HAVE_INHERITED_NONBLOCK 1 | |
115 #endif | |
116 | |
117 | |
118 #define ngx_setproctitle setproctitle | |
119 | |
120 | |
121 extern char *malloc_options; | |
122 | |
123 | |
124 #endif /* _NGX_FREEBSD_CONFIG_H_INCLUDED_ */ |