src/os/unix/ngx_posix_config.h - nginx source code

Data types defined

Macros defined

Source code


  1. /*
  2. * Copyright (C) Igor Sysoev
  3. * Copyright (C) Nginx, Inc.
  4. */


  5. #ifndef _NGX_POSIX_CONFIG_H_INCLUDED_
  6. #define _NGX_POSIX_CONFIG_H_INCLUDED_


  7. #if (NGX_HPUX)
  8. #define _XOPEN_SOURCE
  9. #define _XOPEN_SOURCE_EXTENDED  1
  10. #define _HPUX_ALT_XOPEN_SOCKET_API
  11. #endif


  12. #if (NGX_TRU64)
  13. #define _REENTRANT
  14. #endif


  15. #if (NGX_GNU_HURD)
  16. #ifndef _GNU_SOURCE
  17. #define _GNU_SOURCE             /* accept4() */
  18. #endif
  19. #define _FILE_OFFSET_BITS       64
  20. #endif


  21. #ifdef __CYGWIN__
  22. #define timezonevar             /* timezone is variable */
  23. #define NGX_BROKEN_SCM_RIGHTS   1
  24. #endif


  25. #include <sys/types.h>
  26. #include <sys/time.h>
  27. #if (NGX_HAVE_UNISTD_H)
  28. #include <unistd.h>
  29. #endif
  30. #if (NGX_HAVE_INTTYPES_H)
  31. #include <inttypes.h>
  32. #endif
  33. #include <stdarg.h>
  34. #include <stddef.h>             /* offsetof() */
  35. #include <stdio.h>
  36. #include <stdlib.h>
  37. #include <ctype.h>
  38. #include <errno.h>
  39. #include <string.h>
  40. #include <signal.h>
  41. #include <pwd.h>
  42. #include <grp.h>
  43. #include <dirent.h>
  44. #include <glob.h>
  45. #include <time.h>
  46. #if (NGX_HAVE_SYS_PARAM_H)
  47. #include <sys/param.h>          /* statfs() */
  48. #endif
  49. #if (NGX_HAVE_SYS_MOUNT_H)
  50. #include <sys/mount.h>          /* statfs() */
  51. #endif
  52. #if (NGX_HAVE_SYS_STATVFS_H)
  53. #include <sys/statvfs.h>        /* statvfs() */
  54. #endif

  55. #if (NGX_HAVE_SYS_FILIO_H)
  56. #include <sys/filio.h>          /* FIONBIO */
  57. #endif
  58. #include <sys/ioctl.h>          /* FIONBIO */

  59. #include <sys/uio.h>
  60. #include <sys/stat.h>
  61. #include <fcntl.h>

  62. #include <sys/wait.h>
  63. #include <sys/mman.h>
  64. #include <sys/resource.h>
  65. #include <sched.h>

  66. #include <sys/socket.h>
  67. #include <netinet/in.h>
  68. #include <netinet/tcp.h>        /* TCP_NODELAY */
  69. #include <arpa/inet.h>
  70. #include <netdb.h>
  71. #include <sys/un.h>

  72. #if (NGX_HAVE_LIMITS_H)
  73. #include <limits.h>             /* IOV_MAX */
  74. #endif

  75. #ifdef __CYGWIN__
  76. #include <malloc.h>             /* memalign() */
  77. #endif

  78. #if (NGX_HAVE_CRYPT_H)
  79. #include <crypt.h>
  80. #endif


  81. #ifndef IOV_MAX
  82. #define IOV_MAX   16
  83. #endif


  84. #include <ngx_auto_config.h>


  85. #if (NGX_HAVE_DLOPEN)
  86. #include <dlfcn.h>
  87. #endif


  88. #if (NGX_HAVE_POSIX_SEM)
  89. #include <semaphore.h>
  90. #endif


  91. #if (NGX_HAVE_POLL)
  92. #include <poll.h>
  93. #endif


  94. #if (NGX_HAVE_KQUEUE)
  95. #include <sys/event.h>
  96. #endif


  97. #if (NGX_HAVE_DEVPOLL) && !(NGX_TEST_BUILD_DEVPOLL)
  98. #include <sys/ioctl.h>
  99. #include <sys/devpoll.h>
  100. #endif


  101. #if (NGX_HAVE_FILE_AIO)
  102. #include <aio.h>
  103. typedef struct aiocb  ngx_aiocb_t;
  104. #endif


  105. #define NGX_LISTEN_BACKLOG  511

  106. #define ngx_debug_init()


  107. extern char **environ;


  108. #endif /* _NGX_POSIX_CONFIG_H_INCLUDED_ */