0
|
1
|
|
2 /*
|
|
3 * Copyright (C) Igor Sysoev
|
644
|
4 * Copyright (C) Nginx, Inc.
|
0
|
5 */
|
|
6
|
|
7
|
|
8 #ifndef _NGX_FREEBSD_CONFIG_H_INCLUDED_
|
|
9 #define _NGX_FREEBSD_CONFIG_H_INCLUDED_
|
|
10
|
|
11
|
|
12 #include <sys/types.h>
|
|
13 #include <sys/time.h>
|
|
14 #include <unistd.h>
|
|
15 #include <stdarg.h>
|
|
16 #include <stddef.h> /* offsetof() */
|
|
17 #include <stdio.h>
|
|
18 #include <stdlib.h>
|
|
19 #include <errno.h>
|
|
20 #include <string.h>
|
|
21 #include <signal.h>
|
|
22 #include <pwd.h>
|
|
23 #include <grp.h>
|
|
24 #include <dirent.h>
|
238
|
25 #include <glob.h>
|
470
|
26 #include <sys/param.h> /* ALIGN() */
|
468
|
27 #include <sys/mount.h> /* statfs() */
|
0
|
28
|
4
|
29 #include <sys/filio.h> /* FIONBIO */
|
0
|
30 #include <sys/uio.h>
|
|
31 #include <sys/stat.h>
|
|
32 #include <fcntl.h>
|
|
33
|
|
34 #include <sys/wait.h>
|
|
35 #include <sys/mman.h>
|
|
36 #include <sys/resource.h>
|
|
37 #include <sched.h>
|
|
38
|
|
39 #include <sys/socket.h>
|
|
40 #include <netinet/in.h>
|
2
|
41 #include <netinet/tcp.h> /* TCP_NODELAY, TCP_NOPUSH */
|
0
|
42 #include <arpa/inet.h>
|
|
43 #include <netdb.h>
|
28
|
44 #include <sys/un.h>
|
0
|
45
|
|
46 #include <libutil.h> /* setproctitle() before 4.1 */
|
|
47 #include <osreldate.h>
|
|
48 #include <sys/sysctl.h>
|
|
49
|
|
50
|
|
51 #if __FreeBSD_version < 400017
|
|
52
|
366
|
53 /*
|
|
54 * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA()
|
|
55 */
|
0
|
56
|
|
57 #undef CMSG_SPACE
|
|
58 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))
|
|
59
|
366
|
60 #undef CMSG_LEN
|
|
61 #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l))
|
|
62
|
0
|
63 #undef CMSG_DATA
|
|
64 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))
|
|
65
|
|
66 #endif
|
|
67
|
|
68
|
|
69 #include <ngx_auto_config.h>
|
|
70
|
|
71
|
624
|
72 #if (NGX_HAVE_POSIX_SEM)
|
|
73 #include <semaphore.h>
|
|
74 #endif
|
|
75
|
|
76
|
18
|
77 #if (NGX_HAVE_POLL)
|
0
|
78 #include <poll.h>
|
|
79 #endif
|
|
80
|
|
81
|
518
|
82 #if (NGX_HAVE_KQUEUE)
|
|
83 #include <sys/event.h>
|
0
|
84 #endif
|
|
85
|
|
86
|
518
|
87 #if (NGX_HAVE_FILE_AIO || NGX_HAVE_AIO)
|
|
88 #include <aio.h>
|
|
89 typedef struct aiocb ngx_aiocb_t;
|
0
|
90 #endif
|
|
91
|
|
92
|
326
|
93 #define NGX_LISTEN_BACKLOG -1
|
|
94
|
|
95
|
0
|
96 #if (__FreeBSD_version < 430000 || __FreeBSD_version < 500012)
|
|
97
|
|
98 pid_t rfork_thread(int flags, void *stack, int (*func)(void *arg), void *arg);
|
|
99
|
|
100 #endif
|
|
101
|
|
102 #ifndef IOV_MAX
|
|
103 #define IOV_MAX 1024
|
|
104 #endif
|
|
105
|
|
106
|
18
|
107 #ifndef NGX_HAVE_INHERITED_NONBLOCK
|
|
108 #define NGX_HAVE_INHERITED_NONBLOCK 1
|
0
|
109 #endif
|
|
110
|
|
111
|
88
|
112 #define NGX_HAVE_OS_SPECIFIC_INIT 1
|
|
113
|
0
|
114
|
150
|
115 extern char **environ;
|
324
|
116 extern char *malloc_options;
|
150
|
117
|
|
118
|
0
|
119 #endif /* _NGX_FREEBSD_CONFIG_H_INCLUDED_ */
|