Initial import from FreeBSD RELENG_4:
[dragonfly.git] / crypto / openssh / includes.h
1 /*      $OpenBSD: includes.h,v 1.17 2002/01/26 16:44:22 stevesk Exp $   */
2 /*      $FreeBSD: src/crypto/openssh/includes.h,v 1.2.2.7 2003/02/03 17:31:06 des Exp $ */
3
4 /*
5  * Author: Tatu Ylonen <ylo@cs.hut.fi>
6  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
7  *                    All rights reserved
8  * This file includes most of the needed system headers.
9  *
10  * As far as I am concerned, the code I have written for this software
11  * can be used freely for any purpose.  Any derived versions of this
12  * software must be clearly marked as such, and if the derived work is
13  * incompatible with the protocol description in the RFC file, it must be
14  * called by a name other than "ssh" or "Secure Shell".
15  */
16
17 #ifndef INCLUDES_H
18 #define INCLUDES_H
19
20 #define RCSID(msg) \
21 __RCSID(msg)
22
23 #include "config.h"
24
25 #include <stdio.h>
26 #include <ctype.h>
27 #include <errno.h>
28 #include <fcntl.h> /* For O_NONBLOCK */
29 #include <signal.h>
30 #include <stdlib.h>
31 #include <string.h>
32 #include <stdarg.h>
33 #include <pwd.h>
34 #include <grp.h>
35 #include <time.h>
36 #include <dirent.h>
37
38 #ifdef HAVE_LIMITS_H
39 # include <limits.h> /* For PATH_MAX */
40 #endif
41 #ifdef HAVE_GETOPT_H
42 # include <getopt.h>
43 #endif
44 #ifdef HAVE_BSTRING_H
45 # include <bstring.h>
46 #endif
47 #if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
48     defined(GLOB_HAS_GL_MATCHC)
49 # include <glob.h>
50 #endif
51 #ifdef HAVE_NETGROUP_H
52 # include <netgroup.h>
53 #endif
54 #if defined(HAVE_NETDB_H)
55 # include <netdb.h>
56 #endif
57 #ifdef HAVE_ENDIAN_H
58 # include <endian.h>
59 #endif
60 #ifdef HAVE_TTYENT_H
61 # include <ttyent.h>
62 #endif
63 #ifdef HAVE_UTIME_H
64 # include <utime.h>
65 #endif
66 #ifdef HAVE_MAILLOCK_H
67 # include <maillock.h> /* For _PATH_MAILDIR */
68 #endif
69 #ifdef HAVE_NEXT
70 #  include <libc.h>
71 #endif
72 #include <unistd.h> /* For STDIN_FILENO, etc */
73 #include <termios.h> /* Struct winsize */
74
75 /*
76  *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
77  */
78 #ifdef HAVE_STRINGS_H
79 # include <strings.h>
80 #endif
81 #ifdef HAVE_LOGIN_H
82 # include <login.h>
83 #endif
84
85 #ifdef HAVE_UTMP_H
86 #  include <utmp.h>
87 #endif
88 #ifdef HAVE_UTMPX_H
89 #  ifdef HAVE_TV_IN_UTMPX
90 #    include <sys/time.h>
91 #  endif
92 #  include <utmpx.h>
93 #endif
94 #ifdef HAVE_LASTLOG_H
95 #  include <lastlog.h>
96 #endif
97 #ifdef HAVE_PATHS_H
98 #  include <paths.h> /* For _PATH_XXX */
99 #endif
100
101 #include <sys/types.h>
102 #include <sys/socket.h>
103 #include <sys/ioctl.h>
104 #include <sys/wait.h>
105 #ifdef HAVE_SYS_TIME_H
106 # include <sys/time.h> /* For timersub */
107 #endif
108 #include <sys/resource.h>
109 #ifdef HAVE_SYS_SELECT_H
110 # include <sys/select.h>
111 #endif
112 #ifdef HAVE_SYS_BSDTTY_H
113 # include <sys/bsdtty.h>
114 #endif
115 #include <sys/param.h> /* For MAXPATHLEN and roundup() */
116 #ifdef HAVE_SYS_UN_H
117 # include <sys/un.h> /* For sockaddr_un */
118 #endif
119 #ifdef HAVE_STDINT_H
120 # include <stdint.h>
121 #endif
122 #ifdef HAVE_SYS_BITYPES_H
123 # include <sys/bitypes.h> /* For u_intXX_t */
124 #endif
125 #ifdef HAVE_SYS_CDEFS_H
126 # include <sys/cdefs.h> /* For __P() */
127 #endif
128 #ifdef HAVE_SYS_STAT_H
129 # include <sys/stat.h> /* For S_* constants and macros */
130 #endif
131 #ifdef HAVE_SYS_SYSMACROS_H
132 # include <sys/sysmacros.h> /* For MIN, MAX, etc */
133 #endif
134 #ifdef HAVE_SYS_MMAN_H
135 #include <sys/mman.h> /* for MAP_ANONYMOUS */
136 #endif
137
138 #include <netinet/in_systm.h> /* For typedefs */
139 #include <netinet/in.h> /* For IPv6 macros */
140 #include <netinet/ip.h> /* For IPTOS macros */
141 #include <netinet/tcp.h>
142 #include <arpa/inet.h>
143 #ifdef HAVE_RPC_TYPES_H
144 # include <rpc/types.h> /* For INADDR_LOOPBACK */
145 #endif
146 #ifdef USE_PAM
147 # include <security/pam_appl.h>
148 #endif
149 #ifdef HAVE_READPASSPHRASE_H
150 # include <readpassphrase.h>
151 #endif
152
153 #ifdef HAVE_IA_H
154 # include <ia.h>
155 #endif
156
157 #ifdef HAVE_TMPDIR_H
158 # include <tmpdir.h>
159 #endif
160
161 #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
162
163 #include "defines.h"
164
165 #include "version.h"
166 #include "openbsd-compat/openbsd-compat.h"
167 #include "openbsd-compat/bsd-cygwin_util.h"
168 #include "openbsd-compat/bsd-nextstep.h"
169
170 #include "entropy.h"
171
172 #endif /* INCLUDES_H */