]> git.ipfire.org Git - thirdparty/openssh-portable.git/blame - includes.h
upstream: Factor out PuTTY setup.
[thirdparty/openssh-portable.git] / includes.h
CommitLineData
e3476ed0 1/* $OpenBSD: includes.h,v 1.54 2006/07/22 20:48:23 stevesk Exp $ */
36579d3d 2
d4a8b7e3 3/*
95def098 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
95def098
DM
5 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
6 * All rights reserved
95def098 7 * This file includes most of the needed system headers.
4af51306 8 *
e4340be5
DM
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
95def098 14 */
d4a8b7e3
DM
15
16#ifndef INCLUDES_H
17#define INCLUDES_H
18
4874c79a
DM
19#include "config.h"
20
221b4b24 21#ifndef _GNU_SOURCE
ac0c8a53 22#define _GNU_SOURCE /* activate extra prototypes for glibc */
221b4b24 23#endif
ac0c8a53 24
9aec9194 25#include <sys/types.h>
607aede2 26#include <sys/socket.h> /* For CMSG_* */
72c9a7e9 27
603bdfd6 28#ifdef HAVE_LIMITS_H
38806bda 29# include <limits.h> /* For PATH_MAX, _POSIX_HOST_NAME_MAX */
603bdfd6 30#endif
beb4ba5a
DM
31#ifdef HAVE_BSTRING_H
32# include <bstring.h>
ef4eea9b 33#endif
ab18c412
DM
34#ifdef HAVE_ENDIAN_H
35# include <endian.h>
36#endif
813f0452
TR
37#ifdef HAVE_TTYENT_H
38# include <ttyent.h>
39#endif
40#ifdef HAVE_UTIME_H
41# include <utime.h>
42#endif
43#ifdef HAVE_MAILLOCK_H
44# include <maillock.h> /* For _PATH_MAILDIR */
45#endif
46#ifdef HAVE_NEXT
b0024914
DM
47# include <libc.h>
48#endif
725286e2 49#ifdef HAVE_PATHS_H
b0024914 50# include <paths.h>
813f0452 51#endif
813f0452
TR
52
53/*
54 *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively
55 */
56#ifdef HAVE_STRINGS_H
57# include <strings.h>
58#endif
59#ifdef HAVE_LOGIN_H
60# include <login.h>
61#endif
62
63#ifdef HAVE_UTMP_H
64# include <utmp.h>
65#endif
66#ifdef HAVE_UTMPX_H
813f0452
TR
67# include <utmpx.h>
68#endif
69#ifdef HAVE_LASTLOG_H
70# include <lastlog.h>
71#endif
813f0452 72
813f0452
TR
73#ifdef HAVE_SYS_SELECT_H
74# include <sys/select.h>
b3ca3aa1 75#endif
76112de7
DM
76#ifdef HAVE_SYS_BSDTTY_H
77# include <sys/bsdtty.h>
78#endif
eae876e8
TR
79#ifdef HAVE_STDINT_H
80# include <stdint.h>
81#endif
6645e7a7 82#include <termios.h>
813f0452
TR
83#ifdef HAVE_SYS_BITYPES_H
84# include <sys/bitypes.h> /* For u_intXX_t */
85#endif
86#ifdef HAVE_SYS_CDEFS_H
87# include <sys/cdefs.h> /* For __P() */
88#endif
7a4cf232
TR
89#ifdef HAVE_SYS_STAT_H
90# include <sys/stat.h> /* For S_* constants and macros */
91#endif
eaf9994f 92#ifdef HAVE_SYS_SYSMACROS_H
813f0452 93# include <sys/sysmacros.h> /* For MIN, MAX, etc */
eaf9994f 94#endif
bcd14850
DM
95#ifdef HAVE_SYS_TIME_H
96# include <sys/time.h> /* for timespeccmp if present */
97#endif
813f0452
TR
98#ifdef HAVE_SYS_MMAN_H
99#include <sys/mman.h> /* for MAP_ANONYMOUS */
100#endif
5d0ccf3b
DT
101#ifdef HAVE_SYS_STRTIO_H
102#include <sys/strtio.h> /* for TIOCCBRK on HP-UX */
103#endif
2597bfd1 104#if defined(HAVE_SYS_PTMS_H) && defined(HAVE_DEV_PTMX)
07459353
DT
105# if defined(HAVE_SYS_STREAM_H)
106# include <sys/stream.h> /* reqd for queue_t on Solaris 2.5.1 */
107# endif
2597bfd1
TR
108#include <sys/ptms.h> /* for grantpt() and friends */
109#endif
813f0452 110
607aede2 111#include <netinet/in.h>
813f0452 112#include <netinet/in_systm.h> /* For typedefs */
813f0452
TR
113#ifdef HAVE_RPC_TYPES_H
114# include <rpc/types.h> /* For INADDR_LOOPBACK */
115#endif
116#ifdef USE_PAM
0f47c537 117#if defined(HAVE_SECURITY_PAM_APPL_H)
813f0452 118# include <security/pam_appl.h>
0f47c537
DM
119#elif defined (HAVE_PAM_PAM_APPL_H)
120# include <pam/pam_appl.h>
121#endif
42202bc8 122#endif
f71d2a5d
DM
123#ifdef HAVE_READPASSPHRASE_H
124# include <readpassphrase.h>
125#endif
813f0452 126
81ed518b
TR
127#ifdef HAVE_IA_H
128# include <ia.h>
129#endif
130
2291c00a
TR
131#ifdef HAVE_IAF_H
132# include <iaf.h>
133#endif
134
81ed518b
TR
135#ifdef HAVE_TMPDIR_H
136# include <tmpdir.h>
137#endif
138
b87f6b70
DM
139#if defined(HAVE_BSD_LIBUTIL_H)
140# include <bsd/libutil.h>
141#elif defined(HAVE_LIBUTIL_H)
142# include <libutil.h>
7b3f58cb
DM
143#endif
144
3c78c5ed 145#if defined(KRB5) && defined(USE_AFS)
409cb328
DT
146# include <krb5.h>
147# include <kafs.h>
148#endif
149
2be1cbb7
DT
150#if defined(HAVE_SYS_SYSLOG_H)
151# include <sys/syslog.h>
152#endif
153
d8968adb
DM
154#include <errno.h>
155
3d50c9bd
DT
156/*
157 * On HP-UX 11.11, shadow.h and prot.h provide conflicting declarations
158 * of getspnam when _INCLUDE__STDC__ is defined, so we unset it here.
159 */
a56f191e 160#ifdef GETSPNAM_CONFLICTING_DEFS
3d50c9bd
DT
161# ifdef _INCLUDE__STDC__
162# undef _INCLUDE__STDC__
163# endif
164#endif
165
72ef7c14 166#ifdef WITH_OPENSSL
813f0452 167#include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */
72ef7c14 168#endif
813f0452
TR
169
170#include "defines.h"
171
1b06dc30 172#include "platform.h"
3c027689 173#include "openbsd-compat/openbsd-compat.h"
813f0452 174#include "openbsd-compat/bsd-nextstep.h"
5f05637b 175
813f0452 176#include "entropy.h"
dc0594cc 177
72c9a7e9 178#endif /* INCLUDES_H */