]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - crypto/openssh/includes.h
Upgrade to 4.2p1.
[FreeBSD/FreeBSD.git] / crypto / openssh / includes.h
1 /*      $OpenBSD: includes.h,v 1.19 2005/05/19 02:42:26 djm Exp $       */
2 /*      $FreeBSD$       */
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 <stdarg.h>
26 #include <stdio.h>
27 #include <ctype.h>
28 #include <errno.h>
29 #include <fcntl.h> /* For O_NONBLOCK */
30 #include <signal.h>
31 #include <stdlib.h>
32 #include <string.h>
33 #include <stdarg.h>
34 #include <pwd.h>
35 #include <grp.h>
36 #include <time.h>
37 #include <dirent.h>
38 #include <stddef.h>
39
40 #ifdef HAVE_LIMITS_H
41 # include <limits.h> /* For PATH_MAX */
42 #endif
43 #ifdef HAVE_GETOPT_H
44 # include <getopt.h>
45 #endif
46 #ifdef HAVE_BSTRING_H
47 # include <bstring.h>
48 #endif
49 #if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
50     defined(GLOB_HAS_GL_MATCHC)
51 # include <glob.h>
52 #endif
53 #ifdef HAVE_NETGROUP_H
54 # include <netgroup.h>
55 #endif
56 #ifdef HAVE_ENDIAN_H
57 # include <endian.h>
58 #endif
59 #ifdef HAVE_TTYENT_H
60 # include <ttyent.h>
61 #endif
62 #ifdef HAVE_UTIME_H
63 # include <utime.h>
64 #endif
65 #ifdef HAVE_MAILLOCK_H
66 # include <maillock.h> /* For _PATH_MAILDIR */
67 #endif
68 #ifdef HAVE_NEXT
69 #  include <libc.h>
70 #endif
71 #define __USE_GNU /* before unistd.h, activate extra prototypes for glibc */
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 #ifdef HAVE_SYS_STRTIO_H
138 #include <sys/strtio.h> /* for TIOCCBRK on HP-UX */
139 #endif
140 #if defined(HAVE_SYS_PTMS_H) && defined(HAVE_DEV_PTMX)
141 # if defined(HAVE_SYS_STREAM_H)
142 #  include <sys/stream.h>       /* reqd for queue_t on Solaris 2.5.1 */
143 # endif
144 #include <sys/ptms.h>   /* for grantpt() and friends */
145 #endif
146
147 #include <netinet/in_systm.h> /* For typedefs */
148 #include <netinet/in.h> /* For IPv6 macros */
149 #include <netinet/ip.h> /* For IPTOS macros */
150 #include <netinet/tcp.h>
151 #include <arpa/inet.h>
152 #if defined(HAVE_NETDB_H)
153 # include <netdb.h>
154 #endif
155 #ifdef HAVE_RPC_TYPES_H
156 # include <rpc/types.h> /* For INADDR_LOOPBACK */
157 #endif
158 #ifdef USE_PAM
159 #if defined(HAVE_SECURITY_PAM_APPL_H)
160 # include <security/pam_appl.h>
161 #elif defined (HAVE_PAM_PAM_APPL_H)
162 # include <pam/pam_appl.h>
163 #endif
164 #endif
165 #ifdef HAVE_READPASSPHRASE_H
166 # include <readpassphrase.h>
167 #endif
168
169 #ifdef HAVE_IA_H
170 # include <ia.h>
171 #endif
172
173 #ifdef HAVE_IAF_H
174 # include <iaf.h>
175 #endif
176
177 #ifdef HAVE_TMPDIR_H
178 # include <tmpdir.h>
179 #endif
180
181 #ifdef HAVE_LIBUTIL_H
182 # include <libutil.h> /* Openpty on FreeBSD at least */
183 #endif
184
185 #if defined(KRB5) && defined(USE_AFS)
186 # include <krb5.h>
187 # include <kafs.h>
188 #endif
189
190 #if defined(HAVE_SYS_SYSLOG_H)
191 # include <sys/syslog.h>
192 #endif
193
194 /*
195  * On HP-UX 11.11, shadow.h and prot.h provide conflicting declarations
196  * of getspnam when _INCLUDE__STDC__ is defined, so we unset it here.
197  */
198 #ifdef GETSPNAM_CONFLICTING_DEFS
199 # ifdef _INCLUDE__STDC__
200 #  undef _INCLUDE__STDC__
201 # endif
202 #endif
203
204 #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
205
206 #include "defines.h"
207
208 #include "version.h"
209 #include "openbsd-compat/openbsd-compat.h"
210 #include "openbsd-compat/bsd-nextstep.h"
211
212 #include "entropy.h"
213
214 #endif /* INCLUDES_H */