includes.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /* $OpenBSD: includes.h,v 1.54 2006/07/22 20:48:23 stevesk Exp $ */
  2. /*
  3. * Author: Tatu Ylonen <ylo@cs.hut.fi>
  4. * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  5. * All rights reserved
  6. * This file includes most of the needed system headers.
  7. *
  8. * As far as I am concerned, the code I have written for this software
  9. * can be used freely for any purpose. Any derived versions of this
  10. * software must be clearly marked as such, and if the derived work is
  11. * incompatible with the protocol description in the RFC file, it must be
  12. * called by a name other than "ssh" or "Secure Shell".
  13. */
  14. #ifndef INCLUDES_H
  15. #define INCLUDES_H
  16. #include "config.h"
  17. #ifndef _GNU_SOURCE
  18. #define _GNU_SOURCE /* activate extra prototypes for glibc */
  19. #endif
  20. #include <sys/types.h>
  21. #include <sys/param.h>
  22. #include <sys/socket.h> /* For CMSG_* */
  23. #ifdef HAVE_LIMITS_H
  24. # include <limits.h> /* For PATH_MAX, _POSIX_HOST_NAME_MAX */
  25. #endif
  26. #ifdef HAVE_BSTRING_H
  27. # include <bstring.h>
  28. #endif
  29. #ifdef HAVE_ENDIAN_H
  30. # include <endian.h>
  31. #endif
  32. #ifdef HAVE_TTYENT_H
  33. # include <ttyent.h>
  34. #endif
  35. #ifdef HAVE_UTIME_H
  36. # include <utime.h>
  37. #endif
  38. #ifdef HAVE_MAILLOCK_H
  39. # include <maillock.h> /* For _PATH_MAILDIR */
  40. #endif
  41. #ifdef HAVE_NEXT
  42. # include <libc.h>
  43. #endif
  44. #ifdef HAVE_PATHS_H
  45. # include <paths.h>
  46. #endif
  47. /*
  48. *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
  49. */
  50. #ifdef HAVE_STRINGS_H
  51. # include <strings.h>
  52. #endif
  53. #ifdef HAVE_LOGIN_H
  54. # include <login.h>
  55. #endif
  56. #ifdef HAVE_UTMP_H
  57. # include <utmp.h>
  58. #endif
  59. #ifdef HAVE_UTMPX_H
  60. # include <utmpx.h>
  61. #endif
  62. #ifdef HAVE_LASTLOG_H
  63. # include <lastlog.h>
  64. #endif
  65. #ifdef HAVE_SYS_SELECT_H
  66. # include <sys/select.h>
  67. #endif
  68. #ifdef HAVE_SYS_BSDTTY_H
  69. # include <sys/bsdtty.h>
  70. #endif
  71. #ifdef HAVE_STDINT_H
  72. # include <stdint.h>
  73. #endif
  74. #include <termios.h>
  75. #ifdef HAVE_SYS_BITYPES_H
  76. # include <sys/bitypes.h> /* For u_intXX_t */
  77. #endif
  78. #ifdef HAVE_SYS_CDEFS_H
  79. # include <sys/cdefs.h> /* For __P() */
  80. #endif
  81. #ifdef HAVE_SYS_STAT_H
  82. # include <sys/stat.h> /* For S_* constants and macros */
  83. #endif
  84. #ifdef HAVE_SYS_SYSMACROS_H
  85. # include <sys/sysmacros.h> /* For MIN, MAX, etc */
  86. #endif
  87. #ifdef HAVE_SYS_TIME_H
  88. # include <sys/time.h> /* for timespeccmp if present */
  89. #endif
  90. #ifdef HAVE_SYS_MMAN_H
  91. #include <sys/mman.h> /* for MAP_ANONYMOUS */
  92. #endif
  93. #ifdef HAVE_SYS_STRTIO_H
  94. #include <sys/strtio.h> /* for TIOCCBRK on HP-UX */
  95. #endif
  96. #if defined(HAVE_SYS_PTMS_H) && defined(HAVE_DEV_PTMX)
  97. # if defined(HAVE_SYS_STREAM_H)
  98. # include <sys/stream.h> /* reqd for queue_t on Solaris 2.5.1 */
  99. # endif
  100. #include <sys/ptms.h> /* for grantpt() and friends */
  101. #endif
  102. #include <netinet/in.h>
  103. #include <netinet/in_systm.h> /* For typedefs */
  104. #ifdef HAVE_RPC_TYPES_H
  105. # include <rpc/types.h> /* For INADDR_LOOPBACK */
  106. #endif
  107. #ifdef USE_PAM
  108. #if defined(HAVE_SECURITY_PAM_APPL_H)
  109. # include <security/pam_appl.h>
  110. #elif defined (HAVE_PAM_PAM_APPL_H)
  111. # include <pam/pam_appl.h>
  112. #endif
  113. #endif
  114. #ifdef HAVE_READPASSPHRASE_H
  115. # include <readpassphrase.h>
  116. #endif
  117. #ifdef HAVE_IA_H
  118. # include <ia.h>
  119. #endif
  120. #ifdef HAVE_IAF_H
  121. # include <iaf.h>
  122. #endif
  123. #ifdef HAVE_TMPDIR_H
  124. # include <tmpdir.h>
  125. #endif
  126. #if defined(HAVE_BSD_LIBUTIL_H)
  127. # include <bsd/libutil.h>
  128. #elif defined(HAVE_LIBUTIL_H)
  129. # include <libutil.h>
  130. #endif
  131. #if defined(KRB5) && defined(USE_AFS)
  132. # include <krb5.h>
  133. # include <kafs.h>
  134. #endif
  135. #if defined(HAVE_SYS_SYSLOG_H)
  136. # include <sys/syslog.h>
  137. #endif
  138. #include <errno.h>
  139. /*
  140. * On HP-UX 11.11, shadow.h and prot.h provide conflicting declarations
  141. * of getspnam when _INCLUDE__STDC__ is defined, so we unset it here.
  142. */
  143. #ifdef GETSPNAM_CONFLICTING_DEFS
  144. # ifdef _INCLUDE__STDC__
  145. # undef _INCLUDE__STDC__
  146. # endif
  147. #endif
  148. #ifdef WITH_OPENSSL
  149. #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
  150. #endif
  151. #include "defines.h"
  152. #include "platform.h"
  153. #include "openbsd-compat/openbsd-compat.h"
  154. #include "openbsd-compat/bsd-nextstep.h"
  155. #include "entropy.h"
  156. #endif /* INCLUDES_H */