includes.h revision 126277
1/*	$OpenBSD: includes.h,v 1.17 2002/01/26 16:44:22 stevesk Exp $	*/
2/*	$FreeBSD: head/crypto/openssh/includes.h 126277 2004-02-26 10:52:33Z des $	*/
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#ifdef HAVE_ENDIAN_H
55# include <endian.h>
56#endif
57#ifdef HAVE_TTYENT_H
58# include <ttyent.h>
59#endif
60#ifdef HAVE_UTIME_H
61# include <utime.h>
62#endif
63#ifdef HAVE_MAILLOCK_H
64# include <maillock.h> /* For _PATH_MAILDIR */
65#endif
66#ifdef HAVE_NEXT
67#  include <libc.h>
68#endif
69#define __USE_GNU /* before unistd.h, activate extra prototypes for glibc */
70#include <unistd.h> /* For STDIN_FILENO, etc */
71#include <termios.h> /* Struct winsize */
72
73/*
74 *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
75 */
76#ifdef HAVE_STRINGS_H
77# include <strings.h>
78#endif
79#ifdef HAVE_LOGIN_H
80# include <login.h>
81#endif
82
83#ifdef HAVE_UTMP_H
84#  include <utmp.h>
85#endif
86#ifdef HAVE_UTMPX_H
87#  ifdef HAVE_TV_IN_UTMPX
88#    include <sys/time.h>
89#  endif
90#  include <utmpx.h>
91#endif
92#ifdef HAVE_LASTLOG_H
93#  include <lastlog.h>
94#endif
95#ifdef HAVE_PATHS_H
96#  include <paths.h> /* For _PATH_XXX */
97#endif
98
99#include <sys/types.h>
100#include <sys/socket.h>
101#include <sys/ioctl.h>
102#include <sys/wait.h>
103#ifdef HAVE_SYS_TIME_H
104# include <sys/time.h> /* For timersub */
105#endif
106#include <sys/resource.h>
107#ifdef HAVE_SYS_SELECT_H
108# include <sys/select.h>
109#endif
110#ifdef HAVE_SYS_BSDTTY_H
111# include <sys/bsdtty.h>
112#endif
113#include <sys/param.h> /* For MAXPATHLEN and roundup() */
114#ifdef HAVE_SYS_UN_H
115# include <sys/un.h> /* For sockaddr_un */
116#endif
117#ifdef HAVE_STDINT_H
118# include <stdint.h>
119#endif
120#ifdef HAVE_SYS_BITYPES_H
121# include <sys/bitypes.h> /* For u_intXX_t */
122#endif
123#ifdef HAVE_SYS_CDEFS_H
124# include <sys/cdefs.h> /* For __P() */
125#endif
126#ifdef HAVE_SYS_STAT_H
127# include <sys/stat.h> /* For S_* constants and macros */
128#endif
129#ifdef HAVE_SYS_SYSMACROS_H
130# include <sys/sysmacros.h> /* For MIN, MAX, etc */
131#endif
132#ifdef HAVE_SYS_MMAN_H
133#include <sys/mman.h> /* for MAP_ANONYMOUS */
134#endif
135#ifdef HAVE_SYS_STRTIO_H
136#include <sys/strtio.h>	/* for TIOCCBRK on HP-UX */
137#endif
138#if defined(HAVE_SYS_PTMS_H) && defined(HAVE_DEV_PTMX)
139# if defined(HAVE_SYS_STREAM_H)
140#  include <sys/stream.h>	/* reqd for queue_t on Solaris 2.5.1 */
141# endif
142#include <sys/ptms.h>	/* for grantpt() and friends */
143#endif
144
145#include <netinet/in_systm.h> /* For typedefs */
146#include <netinet/in.h> /* For IPv6 macros */
147#include <netinet/ip.h> /* For IPTOS macros */
148#include <netinet/tcp.h>
149#include <arpa/inet.h>
150#if defined(HAVE_NETDB_H)
151# include <netdb.h>
152#endif
153#ifdef HAVE_RPC_TYPES_H
154# include <rpc/types.h> /* For INADDR_LOOPBACK */
155#endif
156#ifdef USE_PAM
157#if defined(HAVE_SECURITY_PAM_APPL_H)
158# include <security/pam_appl.h>
159#elif defined (HAVE_PAM_PAM_APPL_H)
160# include <pam/pam_appl.h>
161#endif
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#ifdef HAVE_LIBUTIL_H
176# include <libutil.h> /* Openpty on FreeBSD at least */
177#endif
178
179#if defined(KRB5) && defined(USE_AFS)
180# include <krb5.h>
181# include <kafs.h>
182#endif
183
184#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
185
186#include "defines.h"
187
188#include "version.h"
189#include "openbsd-compat/openbsd-compat.h"
190#include "openbsd-compat/bsd-nextstep.h"
191
192#include "entropy.h"
193
194#endif /* INCLUDES_H */
195