3 * Copyright (C) Igor Sysoev
7 #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_
8 #define _NGX_POSIX_CONFIG_H_INCLUDED_
13 #define _XOPEN_SOURCE_EXTENDED 1
23 #define timezonevar /* timezone is variable */
24 #define NGX_BROKEN_SCM_RIGHTS 1
28 #include <sys/types.h>
30 #if (NGX_HAVE_UNISTD_H)
33 #if (NGX_HAVE_INTTYPES_H)
37 #include <stddef.h> /* offsetof() */
48 #if (NGX_HAVE_SYS_FILIO_H)
49 #include <sys/filio.h> /* FIONBIO */
51 #include <sys/ioctl.h> /* FIONBIO */
59 #include <sys/resource.h>
62 #include <sys/socket.h>
63 #include <netinet/in.h>
64 #include <netinet/tcp.h> /* TCP_NODELAY */
65 #include <arpa/inet.h>
69 #if (NGX_HAVE_LIMITS_H)
70 #include <limits.h> /* IOV_MAX */
74 #include <malloc.h> /* memalign() */
77 #if (NGX_HAVE_CRYPT_H)
87 #include <ngx_auto_config.h>
96 #include <sys/event.h>
100 #if (NGX_HAVE_DEVPOLL)
101 #include <sys/ioctl.h>
102 #include <sys/devpoll.h>
106 #define NGX_LISTEN_BACKLOG 511
109 #if (__FreeBSD__) && (__FreeBSD_version < 400017)
111 #include <sys/param.h> /* ALIGN() */
114 * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA()
118 #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))
121 #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l))
124 #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))
129 extern char **environ;
132 #endif /* _NGX_POSIX_CONFIG_H_INCLUDED_ */