3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Nginx, Inc.
8 #ifndef _NGX_LINUX_CONFIG_H_INCLUDED_
9 #define _NGX_LINUX_CONFIG_H_INCLUDED_
13 #define _GNU_SOURCE /* pread(), pwrite(), gethostname() */
16 #define _FILE_OFFSET_BITS 64
18 #include <sys/types.h>
22 #include <stddef.h> /* offsetof() */
32 #include <sys/vfs.h> /* statfs() */
40 #include <sys/resource.h>
43 #include <sys/socket.h>
44 #include <netinet/in.h>
45 #include <netinet/tcp.h> /* TCP_NODELAY, TCP_CORK */
46 #include <arpa/inet.h>
50 #include <time.h> /* tzset() */
51 #include <malloc.h> /* memalign() */
52 #include <limits.h> /* IOV_MAX */
53 #include <sys/ioctl.h>
54 #include <sys/sysctl.h>
56 #include <sys/utsname.h> /* uname() */
59 #include <ngx_auto_config.h>
62 #if (NGX_HAVE_POSIX_SEM)
63 #include <semaphore.h>
67 #if (NGX_HAVE_SYS_PRCTL_H)
68 #include <sys/prctl.h>
72 #if (NGX_HAVE_SENDFILE64)
73 #include <sys/sendfile.h>
75 extern ssize_t
sendfile(int s
, int fd
, int32_t *offset
, size_t size
);
76 #define NGX_SENDFILE_LIMIT 0x80000000
80 #if (NGX_HAVE_POLL || NGX_HAVE_RTSIG)
86 #include <sys/epoll.h>
90 #if (NGX_HAVE_FILE_AIO)
91 #include <sys/syscall.h>
92 #include <linux/aio_abi.h>
93 typedef struct iocb ngx_aiocb_t
;
97 #define NGX_LISTEN_BACKLOG 511
100 #ifndef NGX_HAVE_SO_SNDLOWAT
101 /* setsockopt(SO_SNDLOWAT) returns ENOPROTOOPT */
102 #define NGX_HAVE_SO_SNDLOWAT 0
106 #ifndef NGX_HAVE_INHERITED_NONBLOCK
107 #define NGX_HAVE_INHERITED_NONBLOCK 0
111 #define NGX_HAVE_OS_SPECIFIC_INIT 1
112 #define ngx_debug_init()
115 extern char **environ
;
118 #endif /* _NGX_LINUX_CONFIG_H_INCLUDED_ */