blob: 95cf54a3438fddbaaae6bf6242fcd5fcb238f03d [file] [log] [blame]
Igor Sysoevfa73aac2003-05-21 13:28:21 +00001#ifndef _NGX_LINUX_CONFIG_H_INCLUDED_
2#define _NGX_LINUX_CONFIG_H_INCLUDED_
3
4
Igor Sysoeva8fa0a62003-11-25 20:44:56 +00005#define _GNU_SOURCE /* pread(), pwrite(), gethostname() */
Igor Sysoeve4a25262003-06-06 14:59:20 +00006
Igor Sysoev9cf78302003-06-04 17:28:33 +00007#define _FILE_OFFSET_BITS 64
8#define _LARGEFILE_SOURCE
Igor Sysoev6a1cc902003-05-22 15:23:47 +00009
10
Igor Sysoevfa73aac2003-05-21 13:28:21 +000011#include <unistd.h>
Igor Sysoeva8fa0a62003-11-25 20:44:56 +000012#include <stddef.h> /* offsetof() */
Igor Sysoevfa73aac2003-05-21 13:28:21 +000013#include <stdlib.h>
Igor Sysoevb8c367c2003-07-10 16:26:57 +000014#include <stdarg.h>
Igor Sysoevfa73aac2003-05-21 13:28:21 +000015#include <stdio.h>
Igor Sysoevc7a2f682004-02-10 16:23:38 +000016#include <errno.h>
Igor Sysoevfa73aac2003-05-21 13:28:21 +000017#include <fcntl.h>
Igor Sysoevc7a2f682004-02-10 16:23:38 +000018#include <string.h>
Igor Sysoevfa73aac2003-05-21 13:28:21 +000019#include <signal.h>
Igor Sysoev8ae18a12004-02-18 15:45:21 +000020#include <limits.h>
Igor Sysoevfa73aac2003-05-21 13:28:21 +000021#include <time.h>
22#include <sys/types.h>
Igor Sysoev6a1cc902003-05-22 15:23:47 +000023#include <sys/time.h>
24#include <sys/select.h>
Igor Sysoevfa73aac2003-05-21 13:28:21 +000025#include <sys/uio.h>
Igor Sysoev6a1cc902003-05-22 15:23:47 +000026#include <sys/ioctl.h>
Igor Sysoevfa73aac2003-05-21 13:28:21 +000027#include <sys/resource.h>
Igor Sysoev9cf78302003-06-04 17:28:33 +000028#include <sys/sysctl.h>
Igor Sysoevc0f8d912003-11-26 15:42:18 +000029#include <sys/wait.h>
Igor Sysoevc972a3f2004-04-02 15:13:20 +000030#include <sys/mman.h>
Igor Sysoev6a1cc902003-05-22 15:23:47 +000031#include <sys/socket.h>
Igor Sysoevfa73aac2003-05-21 13:28:21 +000032#include <netinet/in.h>
Igor Sysoevc0f8d912003-11-26 15:42:18 +000033#include <netinet/tcp.h> /* TCP_CORK */
Igor Sysoevfa73aac2003-05-21 13:28:21 +000034#include <arpa/inet.h>
Igor Sysoevcada4ee2004-01-28 15:22:37 +000035#include <pwd.h>
36#include <grp.h>
Igor Sysoev13933252003-05-29 13:02:09 +000037#include <netdb.h>
Igor Sysoevcada4ee2004-01-28 15:22:37 +000038#include <dirent.h>
Igor Sysoev6a1cc902003-05-22 15:23:47 +000039
Igor Sysoev7af6b162004-02-09 07:46:43 +000040
Igor Sysoev25b36fe2004-02-03 16:43:54 +000041#include <ngx_auto_config.h>
42
Igor Sysoev7af6b162004-02-09 07:46:43 +000043
44#if (HAVE_PRCTL)
45#include <sys/prctl.h>
46#endif
47
Igor Sysoev25b36fe2004-02-03 16:43:54 +000048#if (HAVE_SENDFILE64)
49#include <sys/sendfile.h>
50#else
51extern ssize_t sendfile(int s, int fd, int32_t *offset, size_t size);
52#endif
53
Igor Sysoev6a1cc902003-05-22 15:23:47 +000054
Igor Sysoevfa73aac2003-05-21 13:28:21 +000055
Igor Sysoevfa73aac2003-05-21 13:28:21 +000056#ifndef HAVE_SELECT
57#define HAVE_SELECT 1
58#endif
59
60
61#ifndef HAVE_POLL
62#define HAVE_POLL 1
63#endif
64#if (HAVE_POLL)
65#include <poll.h>
66#endif
67
Igor Sysoeva4b16df2004-02-02 21:19:52 +000068#if (HAVE_EPOLL)
69#include <sys/epoll.h>
70#endif /* HAVE_EPOLL */
71
Igor Sysoevfa73aac2003-05-21 13:28:21 +000072
73#if defined TCP_DEFER_ACCEPT && !defined HAVE_DEFERRED_ACCEPT
74#define HAVE_DEFERRED_ACCEPT 1
75#endif
76
77
78#ifndef HAVE_INHERITED_NONBLOCK
Igor Sysoev7af6b162004-02-09 07:46:43 +000079#define HAVE_INHERITED_NONBLOCK 0
Igor Sysoevfa73aac2003-05-21 13:28:21 +000080#endif
81
82
Igor Sysoev9cf78302003-06-04 17:28:33 +000083#ifndef HAVE_FIONBIO
Igor Sysoev239baac2003-06-11 15:28:34 +000084#define HAVE_FIONBIO 1
Igor Sysoev9cf78302003-06-04 17:28:33 +000085#endif
86
87
Igor Sysoev890fc962003-07-20 21:15:59 +000088#ifndef HAVE_SELECT_CHANGE_TIMEOUT
89#define HAVE_SELECT_CHANGE_TIMEOUT 1
90#endif
91
92
Igor Sysoevcada4ee2004-01-28 15:22:37 +000093#define ngx_setproctitle(title)
94
95
Igor Sysoevcccc5522004-04-14 20:34:05 +000096/* STUB */
97#define HAVE_LITTLE_ENDIAN 1
98
99
Igor Sysoevfa73aac2003-05-21 13:28:21 +0000100#endif /* _NGX_LINUX_CONFIG_H_INCLUDED_ */