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