Annotation of embedaddon/nginx/src/os/unix/ngx_posix_config.h, revision 1.1
1.1 ! misho 1:
! 2: /*
! 3: * Copyright (C) Igor Sysoev
! 4: * Copyright (C) Nginx, Inc.
! 5: */
! 6:
! 7:
! 8: #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_
! 9: #define _NGX_POSIX_CONFIG_H_INCLUDED_
! 10:
! 11:
! 12: #if (NGX_HPUX)
! 13: #define _XOPEN_SOURCE
! 14: #define _XOPEN_SOURCE_EXTENDED 1
! 15: #define _HPUX_ALT_XOPEN_SOCKET_API
! 16: #endif
! 17:
! 18:
! 19: #if (NGX_TRU64)
! 20: #define _REENTRANT
! 21: #endif
! 22:
! 23:
! 24: #ifdef __CYGWIN__
! 25: #define timezonevar /* timezone is variable */
! 26: #define NGX_BROKEN_SCM_RIGHTS 1
! 27: #endif
! 28:
! 29:
! 30: #include <sys/types.h>
! 31: #include <sys/time.h>
! 32: #if (NGX_HAVE_UNISTD_H)
! 33: #include <unistd.h>
! 34: #endif
! 35: #if (NGX_HAVE_INTTYPES_H)
! 36: #include <inttypes.h>
! 37: #endif
! 38: #include <stdarg.h>
! 39: #include <stddef.h> /* offsetof() */
! 40: #include <stdio.h>
! 41: #include <stdlib.h>
! 42: #include <errno.h>
! 43: #include <string.h>
! 44: #include <signal.h>
! 45: #include <pwd.h>
! 46: #include <grp.h>
! 47: #include <dirent.h>
! 48: #include <glob.h>
! 49: #include <time.h>
! 50: #if (NGX_HAVE_SYS_PARAM_H)
! 51: #include <sys/param.h> /* statfs() */
! 52: #endif
! 53: #if (NGX_HAVE_SYS_MOUNT_H)
! 54: #include <sys/mount.h> /* statfs() */
! 55: #endif
! 56: #if (NGX_HAVE_SYS_STATVFS_H)
! 57: #include <sys/statvfs.h> /* statvfs() */
! 58: #endif
! 59:
! 60: #if (NGX_HAVE_SYS_FILIO_H)
! 61: #include <sys/filio.h> /* FIONBIO */
! 62: #endif
! 63: #include <sys/ioctl.h> /* FIONBIO */
! 64:
! 65: #include <sys/uio.h>
! 66: #include <sys/stat.h>
! 67: #include <fcntl.h>
! 68:
! 69: #include <sys/wait.h>
! 70: #include <sys/mman.h>
! 71: #include <sys/resource.h>
! 72: #include <sched.h>
! 73:
! 74: #include <sys/socket.h>
! 75: #include <netinet/in.h>
! 76: #include <netinet/tcp.h> /* TCP_NODELAY */
! 77: #include <arpa/inet.h>
! 78: #include <netdb.h>
! 79: #include <sys/un.h>
! 80:
! 81: #if (NGX_HAVE_LIMITS_H)
! 82: #include <limits.h> /* IOV_MAX */
! 83: #endif
! 84:
! 85: #ifdef __CYGWIN__
! 86: #include <malloc.h> /* memalign() */
! 87: #endif
! 88:
! 89: #if (NGX_HAVE_CRYPT_H)
! 90: #include <crypt.h>
! 91: #endif
! 92:
! 93:
! 94: #ifndef IOV_MAX
! 95: #define IOV_MAX 16
! 96: #endif
! 97:
! 98:
! 99: #include <ngx_auto_config.h>
! 100:
! 101:
! 102: #if (NGX_HAVE_POSIX_SEM)
! 103: #include <semaphore.h>
! 104: #endif
! 105:
! 106:
! 107: #if (NGX_HAVE_POLL)
! 108: #include <poll.h>
! 109: #endif
! 110:
! 111:
! 112: #if (NGX_HAVE_KQUEUE)
! 113: #include <sys/event.h>
! 114: #endif
! 115:
! 116:
! 117: #if (NGX_HAVE_DEVPOLL)
! 118: #include <sys/ioctl.h>
! 119: #include <sys/devpoll.h>
! 120: #endif
! 121:
! 122:
! 123: #if (NGX_HAVE_FILE_AIO)
! 124: #include <aio.h>
! 125: typedef struct aiocb ngx_aiocb_t;
! 126: #endif
! 127:
! 128:
! 129: #define NGX_LISTEN_BACKLOG 511
! 130:
! 131: #define ngx_debug_init()
! 132:
! 133:
! 134: #if (__FreeBSD__) && (__FreeBSD_version < 400017)
! 135:
! 136: #include <sys/param.h> /* ALIGN() */
! 137:
! 138: /*
! 139: * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA()
! 140: */
! 141:
! 142: #undef CMSG_SPACE
! 143: #define CMSG_SPACE(l) (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))
! 144:
! 145: #undef CMSG_LEN
! 146: #define CMSG_LEN(l) (ALIGN(sizeof(struct cmsghdr)) + (l))
! 147:
! 148: #undef CMSG_DATA
! 149: #define CMSG_DATA(cmsg) ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))
! 150:
! 151: #endif
! 152:
! 153:
! 154: extern char **environ;
! 155:
! 156:
! 157: #endif /* _NGX_POSIX_CONFIG_H_INCLUDED_ */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>