src/os/unix/ngx_freebsd_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_FREEBSD_CONFIG_H_INCLUDED_
  6. #define _NGX_FREEBSD_CONFIG_H_INCLUDED_


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

  25. #include <sys/filio.h>          /* FIONBIO */
  26. #include <sys/uio.h>
  27. #include <sys/stat.h>
  28. #include <fcntl.h>

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

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

  39. #include <libutil.h>            /* setproctitle() before 4.1 */
  40. #include <osreldate.h>
  41. #include <sys/sysctl.h>

  42. #include <dlfcn.h>


  43. #if __FreeBSD_version < 400017

  44. /*
  45. * FreeBSD 3.x has no CMSG_SPACE() and CMSG_LEN() and has the broken CMSG_DATA()
  46. */

  47. #undef  CMSG_SPACE
  48. #define CMSG_SPACE(l)       (ALIGN(sizeof(struct cmsghdr)) + ALIGN(l))

  49. #undef  CMSG_LEN
  50. #define CMSG_LEN(l)         (ALIGN(sizeof(struct cmsghdr)) + (l))

  51. #undef  CMSG_DATA
  52. #define CMSG_DATA(cmsg)     ((u_char *)(cmsg) + ALIGN(sizeof(struct cmsghdr)))

  53. #endif


  54. #include <ngx_auto_config.h>


  55. #if (NGX_HAVE_POSIX_SEM)
  56. #include <semaphore.h>
  57. #endif


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


  61. #if (NGX_HAVE_KQUEUE)
  62. #include <sys/event.h>
  63. #endif


  64. #if (NGX_HAVE_FILE_AIO)

  65. #include <aio.h>
  66. typedef struct aiocb  ngx_aiocb_t;

  67. #if (__FreeBSD_version < 700005 && !defined __DragonFly__)
  68. #define sival_ptr     sigval_ptr
  69. #endif

  70. #endif


  71. #define NGX_LISTEN_BACKLOG        -1


  72. #if (defined __DragonFly__ && __DragonFly_version < 500702)
  73. #define NGX_KEEPALIVE_FACTOR      1000
  74. #endif


  75. #ifndef IOV_MAX
  76. #define IOV_MAX   1024
  77. #endif


  78. #ifndef NGX_HAVE_INHERITED_NONBLOCK
  79. #define NGX_HAVE_INHERITED_NONBLOCK  1
  80. #endif


  81. #define NGX_HAVE_OS_SPECIFIC_INIT    1
  82. #define NGX_HAVE_DEBUG_MALLOC        1


  83. extern char **environ;
  84. extern char  *malloc_options;


  85. #endif /* _NGX_FREEBSD_CONFIG_H_INCLUDED_ */