nginx 0.1.38
[nginx-catap.git] / src / os / unix / ngx_linux_config.h
blob7bd262a19cbd3fd6368b319b79083817ebd8e5c6
2 /*
3 * Copyright (C) Igor Sysoev
4 */
7 #ifndef _NGX_LINUX_CONFIG_H_INCLUDED_
8 #define _NGX_LINUX_CONFIG_H_INCLUDED_
11 #ifndef _GNU_SOURCE
12 #define _GNU_SOURCE /* pread(), pwrite(), gethostname() */
13 #endif
15 #define _FILE_OFFSET_BITS 64
17 #include <sys/types.h>
18 #include <sys/time.h>
19 #include <unistd.h>
20 #include <stdarg.h>
21 #include <stddef.h> /* offsetof() */
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <errno.h>
25 #include <string.h>
26 #include <signal.h>
27 #include <pwd.h>
28 #include <grp.h>
29 #include <dirent.h>
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_CORK */
43 #include <arpa/inet.h>
44 #include <netdb.h>
45 #include <sys/un.h>
47 #include <time.h> /* tzset() */
48 #include <malloc.h> /* memalign() */
49 #include <sys/ioctl.h>
50 #include <sys/sysctl.h>
51 #include <crypt.h>
54 #include <ngx_auto_config.h>
57 #if (NGX_HAVE_SYS_PRCTL_H)
58 #include <sys/prctl.h>
59 #endif
62 #if (NGX_HAVE_SENDFILE64)
63 #include <sys/sendfile.h>
64 #else
65 extern ssize_t sendfile(int s, int fd, int32_t *offset, size_t size);
66 #define NGX_SENDFILE_LIMIT 0x80000000
67 #endif
70 #if (NGX_HAVE_POLL)
71 #include <poll.h>
72 #endif
75 #if (NGX_HAVE_EPOLL)
76 #include <sys/epoll.h>
77 #endif
80 #if defined TCP_DEFER_ACCEPT && !defined NGX_HAVE_DEFERRED_ACCEPT
81 #define NGX_HAVE_DEFERRED_ACCEPT 1
82 #endif
85 #ifndef NGX_HAVE_SO_SNDLOWAT
86 /* setsockopt(SO_SNDLOWAT) returns ENOPROTOOPT */
87 #define NGX_HAVE_SO_SNDLOWAT 0
88 #endif
91 #ifndef NGX_HAVE_GNU_CRYPT_R
92 #define NGX_HAVE_GNU_CRYPT_R 1
93 #endif
96 #ifndef NGX_HAVE_INHERITED_NONBLOCK
97 #define NGX_HAVE_INHERITED_NONBLOCK 0
98 #endif
101 #ifndef NGX_HAVE_SELECT_CHANGE_TIMEOUT
102 #define NGX_HAVE_SELECT_CHANGE_TIMEOUT 1
103 #endif
106 #endif /* _NGX_LINUX_CONFIG_H_INCLUDED_ */