xref: /titanic_41/usr/src/cmd/ssh/include/includes.h (revision 986fd29a0dc13f7608ef7f508f6e700bd7bc2720)
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 /*
27  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
28  * Use is subject to license terms.
29  */
30 
31 #define RCSID(msg) \
32 static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
33 
34 #include "config.h"
35 
36 #include <stdio.h>
37 #include <ctype.h>
38 #include <errno.h>
39 #include <fcntl.h> /* For O_NONBLOCK */
40 #include <signal.h>
41 #include <stdlib.h>
42 #include <string.h>
43 #include <stdarg.h>
44 #include <pwd.h>
45 #include <grp.h>
46 #include <time.h>
47 #include <dirent.h>
48 #include <libintl.h>
49 #include <locale.h>
50 
51 #ifdef HAVE_LIMITS_H
52 # include <limits.h> /* For PATH_MAX */
53 #endif
54 #ifdef HAVE_GETOPT_H
55 # include <getopt.h>
56 #endif
57 #ifdef HAVE_BSTRING_H
58 # include <bstring.h>
59 #endif
60 #if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
61     defined(GLOB_HAS_GL_MATCHC)
62 # include <glob.h>
63 #endif
64 #ifdef HAVE_NETGROUP_H
65 # include <netgroup.h>
66 #endif
67 #if defined(HAVE_NETDB_H)
68 # include <netdb.h>
69 #endif
70 #ifdef HAVE_ENDIAN_H
71 # include <endian.h>
72 #endif
73 #ifdef HAVE_TTYENT_H
74 # include <ttyent.h>
75 #endif
76 #ifdef HAVE_UTIME_H
77 # include <utime.h>
78 #endif
79 #ifdef HAVE_MAILLOCK_H
80 # include <maillock.h> /* For _PATH_MAILDIR */
81 #endif
82 #include <unistd.h> /* For STDIN_FILENO, etc */
83 #include <termios.h> /* Struct winsize */
84 
85 /*
86  *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
87  */
88 #ifdef HAVE_STRINGS_H
89 # include <strings.h>
90 #endif
91 #ifdef HAVE_LOGIN_H
92 # include <login.h>
93 #endif
94 
95 #ifdef HAVE_UCRED_H
96 #  include <ucred.h>
97 #endif
98 
99 #ifdef HAVE_UTMP_H
100 #  include <utmp.h>
101 #endif
102 #ifdef HAVE_UTMPX_H
103 #  ifdef HAVE_TV_IN_UTMPX
104 #    include <sys/time.h>
105 #  endif
106 #  include <utmpx.h>
107 #endif
108 #ifdef HAVE_LASTLOG_H
109 #  include <lastlog.h>
110 #endif
111 #ifdef HAVE_PATHS_H
112 #  include <paths.h> /* For _PATH_XXX */
113 #endif
114 
115 #include <sys/types.h>
116 #include <sys/socket.h>
117 #include <sys/ioctl.h>
118 #include <sys/wait.h>
119 #ifdef HAVE_SYS_TIME_H
120 # include <sys/time.h> /* For timersub */
121 #endif
122 #include <sys/resource.h>
123 #ifdef HAVE_SYS_SELECT_H
124 # include <sys/select.h>
125 #endif
126 #ifdef HAVE_SYS_BSDTTY_H
127 # include <sys/bsdtty.h>
128 #endif
129 #include <sys/param.h> /* For MAXPATHLEN and roundup() */
130 #ifdef HAVE_SYS_UN_H
131 # include <sys/un.h> /* For sockaddr_un */
132 #endif
133 #ifdef HAVE_STDINT_H
134 # include <stdint.h>
135 #endif
136 #ifdef HAVE_SYS_BITYPES_H
137 # include <sys/bitypes.h> /* For u_intXX_t */
138 #endif
139 #ifdef HAVE_SYS_CDEFS_H
140 # include <sys/cdefs.h> /* For __P() */
141 #endif
142 #ifdef HAVE_SYS_STAT_H
143 # include <sys/stat.h> /* For S_* constants and macros */
144 #endif
145 #ifdef HAVE_SYS_SYSMACROS_H
146 # include <sys/sysmacros.h> /* For MIN, MAX, etc */
147 #endif
148 #ifdef HAVE_SYS_MMAN_H
149 #include <sys/mman.h> /* for MAP_ANONYMOUS */
150 #endif
151 
152 #include <netinet/in_systm.h> /* For typedefs */
153 #include <netinet/in.h> /* For IPv6 macros */
154 #include <netinet/ip.h> /* For IPTOS macros */
155 #include <netinet/tcp.h>
156 #include <arpa/inet.h>
157 #ifdef HAVE_RPC_TYPES_H
158 # include <rpc/types.h> /* For INADDR_LOOPBACK */
159 #endif
160 #ifdef USE_PAM
161 # include <security/pam_appl.h>
162 #endif
163 #ifdef HAVE_READPASSPHRASE_H
164 # include <readpassphrase.h>
165 #endif
166 
167 #ifdef HAVE_IA_H
168 # include <ia.h>
169 #endif
170 
171 #ifdef HAVE_TMPDIR_H
172 # include <tmpdir.h>
173 #endif
174 
175 #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
176 
177 #include "defines.h"
178 
179 #include "version.h"
180 #include "openbsd-compat.h"
181 #include "bsd-cygwin_util.h"
182 
183 #include "entropy.h"
184 #include "g11n.h"
185 
186 #ifdef __cplusplus
187 }
188 #endif
189 
190 #endif /* _INCLUDES_H */
191