have.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. /*
  2. have.h -- include headers which are known to exist
  3. Copyright (C) 1998-2005 Ivo Timmermans
  4. 2003-2009 Guus Sliepen <guus@tinc-vpn.org>
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License along
  14. with this program; if not, write to the Free Software Foundation, Inc.,
  15. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  16. */
  17. #ifndef __TINC_HAVE_H__
  18. #define __TINC_HAVE_H__
  19. #ifdef HAVE_MINGW
  20. #ifdef WITH_WINDOWS2000
  21. #define WINVER Windows2000
  22. #else
  23. #define WINVER WindowsXP
  24. #endif
  25. #define WIN32_LEAN_AND_MEAN
  26. #endif
  27. #include <stdio.h>
  28. #include <stdlib.h>
  29. #include <stdarg.h>
  30. #include <string.h>
  31. #include <ctype.h>
  32. #include <signal.h>
  33. #include <errno.h>
  34. #include <fcntl.h>
  35. #include <unistd.h>
  36. #ifdef HAVE_MINGW
  37. #include <w32api.h>
  38. #include <windows.h>
  39. #include <ws2tcpip.h>
  40. #endif
  41. #ifdef HAVE_STDBOOL_H
  42. #include <stdbool.h>
  43. #endif
  44. #ifdef HAVE_TERMIOS_H
  45. #include <termios.h>
  46. #endif
  47. #ifdef HAVE_INTTYPES_H
  48. #include <inttypes.h>
  49. #endif
  50. #ifdef HAVE_ALLOCA_H
  51. #include <alloca.h>
  52. #endif
  53. /* Include system specific headers */
  54. #ifdef HAVE_SYSLOG_H
  55. #include <syslog.h>
  56. #endif
  57. #ifdef HAVE_SYS_TIME_H
  58. #include <sys/time.h>
  59. #endif
  60. #ifdef HAVE_TIME_H
  61. #include <time.h>
  62. #endif
  63. #ifdef HAVE_SYS_TYPES_H
  64. #include <sys/types.h>
  65. #endif
  66. #ifdef HAVE_SYS_STAT_H
  67. #include <sys/stat.h>
  68. #endif
  69. #ifdef HAVE_SYS_FILE_H
  70. #include <sys/file.h>
  71. #endif
  72. #ifdef HAVE_SYS_WAIT_H
  73. #include <sys/wait.h>
  74. #endif
  75. #ifdef HAVE_SYS_IOCTL_H
  76. #include <sys/ioctl.h>
  77. #endif
  78. #ifdef HAVE_SYS_PARAM_H
  79. #include <sys/param.h>
  80. #endif
  81. #ifdef HAVE_SYS_UIO_H
  82. #include <sys/uio.h>
  83. #endif
  84. #ifdef HAVE_SYS_UN_H
  85. #include <sys/un.h>
  86. #endif
  87. #ifdef HAVE_DIRENT_H
  88. #include <dirent.h>
  89. #endif
  90. /* SunOS really wants sys/socket.h BEFORE net/if.h,
  91. and FreeBSD wants these lines below the rest. */
  92. #ifdef HAVE_NETDB_H
  93. #include <netdb.h>
  94. #endif
  95. #ifdef HAVE_SYS_SOCKET_H
  96. #include <sys/socket.h>
  97. #endif
  98. #ifdef HAVE_NET_IF_H
  99. #include <net/if.h>
  100. #endif
  101. #ifdef HAVE_NET_IF_TYPES_H
  102. #include <net/if_types.h>
  103. #endif
  104. #ifdef HAVE_NET_IF_TUN_H
  105. #include <net/if_tun.h>
  106. #endif
  107. #ifdef HAVE_NET_IF_TAP_H
  108. #include <net/if_tap.h>
  109. #endif
  110. #ifdef HAVE_NETINET_IN_SYSTM_H
  111. #include <netinet/in_systm.h>
  112. #endif
  113. #ifdef HAVE_NETINET_IN_H
  114. #include <netinet/in.h>
  115. #endif
  116. #ifdef HAVE_ARPA_INET_H
  117. #include <arpa/inet.h>
  118. #endif
  119. #ifdef HAVE_NETINET_IP_H
  120. #include <netinet/ip.h>
  121. #endif
  122. #ifdef HAVE_NETINET_TCP_H
  123. #include <netinet/tcp.h>
  124. #endif
  125. #ifdef HAVE_NETINET_IN6_H
  126. #include <netinet/in6.h>
  127. #endif
  128. #ifdef HAVE_NETINET_IP6_H
  129. #include <netinet/ip6.h>
  130. #endif
  131. #ifdef HAVE_NET_ETHERNET_H
  132. #include <net/ethernet.h>
  133. #endif
  134. #ifdef HAVE_NET_IF_ARP_H
  135. #include <net/if_arp.h>
  136. #endif
  137. #ifdef HAVE_NETINET_IP_ICMP_H
  138. #include <netinet/ip_icmp.h>
  139. #endif
  140. #ifdef HAVE_NETINET_ICMP6_H
  141. #include <netinet/icmp6.h>
  142. #endif
  143. #ifdef HAVE_NETINET_IF_ETHER_H
  144. #include <netinet/if_ether.h>
  145. #endif
  146. #endif /* __TINC_SYSTEM_H__ */