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