Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / src / os / unix / ngx_freebsd_config.h
blob5b3ff278c01906e114e4a51e7ad78979a3f2c0b4
2 /*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Nginx, Inc.
5 */
8 #ifndef _NGX_FREEBSD_CONFIG_H_INCLUDED_
9 #define _NGX_FREEBSD_CONFIG_H_INCLUDED_
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>
25 #include <glob.h>
26 #include <time.h>
27 #include <sys/param.h> /* ALIGN() */
28 #include <sys/mount.h> /* statfs() */
30 #include <sys/filio.h> /* FIONBIO */
31 #include <sys/uio.h>
32 #include <sys/stat.h>
33 #include <fcntl.h>
35 #include <sys/wait.h>
36 #include <sys/mman.h>
37 #include <sys/resource.h>
38 #include <sched.h>
40 #include <sys/socket.h>
41 #include <netinet/in.h>
42 #include <netinet/tcp.h> /* TCP_NODELAY, TCP_NOPUSH */
43 #include <arpa/inet.h>
44 #include <netdb.h>
45 #include <sys/un.h>
47 #include <libutil.h> /* setproctitle() before 4.1 */
48 #include <osreldate.h>
49 #include <sys/sysctl.h>
52 #if __FreeBSD_version < 400017
55 * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA()
58 #undef CMSG_SPACE
59 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))
61 #undef CMSG_LEN
62 #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l))
64 #undef CMSG_DATA
65 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))
67 #endif
70 #include <ngx_auto_config.h>
73 #if (NGX_HAVE_POSIX_SEM)
74 #include <semaphore.h>
75 #endif
78 #if (NGX_HAVE_POLL)
79 #include <poll.h>
80 #endif
83 #if (NGX_HAVE_KQUEUE)
84 #include <sys/event.h>
85 #endif
88 #if (NGX_HAVE_FILE_AIO || NGX_HAVE_AIO)
89 #include <aio.h>
90 typedef struct aiocb ngx_aiocb_t;
91 #endif
94 #define NGX_LISTEN_BACKLOG -1
97 #if (__FreeBSD_version < 430000 || __FreeBSD_version < 500012)
99 pid_t rfork_thread(int flags, void *stack, int (*func)(void *arg), void *arg);
101 #endif
103 #ifndef IOV_MAX
104 #define IOV_MAX 1024
105 #endif
108 #ifndef NGX_HAVE_INHERITED_NONBLOCK
109 #define NGX_HAVE_INHERITED_NONBLOCK 1
110 #endif
113 #define NGX_HAVE_OS_SPECIFIC_INIT 1
114 #define NGX_HAVE_DEBUG_MALLOC 1
117 extern char **environ;
118 extern char *malloc_options;
121 #endif /* _NGX_FREEBSD_CONFIG_H_INCLUDED_ */