src/os/unix/ngx_linux_config.h - nginx-1.7.10

Data types defined

Macros defined

Source code


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


  5. #ifndef _NGX_LINUX_CONFIG_H_INCLUDED_
  6. #define _NGX_LINUX_CONFIG_H_INCLUDED_


  7. #ifndef _GNU_SOURCE
  8. #define _GNU_SOURCE             /* pread(), pwrite(), gethostname() */
  9. #endif

  10. #define _FILE_OFFSET_BITS  64

  11. #include <sys/types.h>
  12. #include <sys/time.h>
  13. #include <unistd.h>
  14. #include <stdarg.h>
  15. #include <stddef.h>             /* offsetof() */
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18. #include <ctype.h>
  19. #include <errno.h>
  20. #include <string.h>
  21. #include <signal.h>
  22. #include <pwd.h>
  23. #include <grp.h>
  24. #include <dirent.h>
  25. #include <glob.h>
  26. #include <sys/vfs.h>            /* statfs() */

  27. #include <sys/uio.h>
  28. #include <sys/stat.h>
  29. #include <fcntl.h>

  30. #include <sys/wait.h>
  31. #include <sys/mman.h>
  32. #include <sys/resource.h>
  33. #include <sched.h>

  34. #include <sys/socket.h>
  35. #include <netinet/in.h>
  36. #include <netinet/tcp.h>        /* TCP_NODELAY, TCP_CORK */
  37. #include <arpa/inet.h>
  38. #include <netdb.h>
  39. #include <sys/un.h>

  40. #include <time.h>               /* tzset() */
  41. #include <malloc.h>             /* memalign() */
  42. #include <limits.h>             /* IOV_MAX */
  43. #include <sys/ioctl.h>
  44. #include <crypt.h>
  45. #include <sys/utsname.h>        /* uname() */


  46. #include <ngx_auto_config.h>


  47. #if (NGX_HAVE_POSIX_SEM)
  48. #include <semaphore.h>
  49. #endif


  50. #if (NGX_HAVE_SYS_PRCTL_H)
  51. #include <sys/prctl.h>
  52. #endif


  53. #if (NGX_HAVE_SENDFILE64)
  54. #include <sys/sendfile.h>
  55. #else
  56. extern ssize_t sendfile(int s, int fd, int32_t *offset, size_t size);
  57. #define NGX_SENDFILE_LIMIT  0x80000000
  58. #endif


  59. #if (NGX_HAVE_POLL)
  60. #include <poll.h>
  61. #endif


  62. #if (NGX_HAVE_RTSIG)
  63. #include <poll.h>
  64. #include <sys/sysctl.h>
  65. #endif


  66. #if (NGX_HAVE_EPOLL)
  67. #include <sys/epoll.h>
  68. #endif


  69. #if (NGX_HAVE_FILE_AIO)
  70. #if (NGX_HAVE_SYS_EVENTFD_H)
  71. #include <sys/eventfd.h>
  72. #endif
  73. #include <sys/syscall.h>
  74. #include <linux/aio_abi.h>
  75. typedef struct iocb  ngx_aiocb_t;
  76. #endif


  77. #define NGX_LISTEN_BACKLOG        511


  78. #ifndef NGX_HAVE_SO_SNDLOWAT
  79. /* setsockopt(SO_SNDLOWAT) returns ENOPROTOOPT */
  80. #define NGX_HAVE_SO_SNDLOWAT         0
  81. #endif


  82. #ifndef NGX_HAVE_INHERITED_NONBLOCK
  83. #define NGX_HAVE_INHERITED_NONBLOCK  0
  84. #endif


  85. #define NGX_HAVE_OS_SPECIFIC_INIT    1
  86. #define ngx_debug_init()


  87. extern char **environ;


  88. #endif /* _NGX_LINUX_CONFIG_H_INCLUDED_ */