10Sstevel@tonic-gate /* $OpenBSD: includes.h,v 1.17 2002/01/26 16:44:22 stevesk Exp $ */ 20Sstevel@tonic-gate 30Sstevel@tonic-gate #ifndef _INCLUDES_H 40Sstevel@tonic-gate #define _INCLUDES_H 50Sstevel@tonic-gate 60Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 70Sstevel@tonic-gate 80Sstevel@tonic-gate #ifdef __cplusplus 90Sstevel@tonic-gate extern "C" { 100Sstevel@tonic-gate #endif 110Sstevel@tonic-gate 120Sstevel@tonic-gate 130Sstevel@tonic-gate /* 140Sstevel@tonic-gate * Author: Tatu Ylonen <ylo@cs.hut.fi> 150Sstevel@tonic-gate * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 160Sstevel@tonic-gate * All rights reserved 170Sstevel@tonic-gate * This file includes most of the needed system headers. 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * As far as I am concerned, the code I have written for this software 200Sstevel@tonic-gate * can be used freely for any purpose. Any derived versions of this 210Sstevel@tonic-gate * software must be clearly marked as such, and if the derived work is 220Sstevel@tonic-gate * incompatible with the protocol description in the RFC file, it must be 230Sstevel@tonic-gate * called by a name other than "ssh" or "Secure Shell". 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 262757Sjp161948 /* 27*5600Sjp161948 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 282757Sjp161948 * Use is subject to license terms. 292757Sjp161948 */ 302757Sjp161948 310Sstevel@tonic-gate #define RCSID(msg) \ 320Sstevel@tonic-gate static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } 330Sstevel@tonic-gate 340Sstevel@tonic-gate #include "config.h" 350Sstevel@tonic-gate 360Sstevel@tonic-gate #include <stdio.h> 370Sstevel@tonic-gate #include <ctype.h> 380Sstevel@tonic-gate #include <errno.h> 390Sstevel@tonic-gate #include <fcntl.h> /* For O_NONBLOCK */ 400Sstevel@tonic-gate #include <signal.h> 410Sstevel@tonic-gate #include <stdlib.h> 420Sstevel@tonic-gate #include <string.h> 430Sstevel@tonic-gate #include <stdarg.h> 440Sstevel@tonic-gate #include <pwd.h> 450Sstevel@tonic-gate #include <grp.h> 460Sstevel@tonic-gate #include <time.h> 470Sstevel@tonic-gate #include <dirent.h> 480Sstevel@tonic-gate #include <libintl.h> 490Sstevel@tonic-gate #include <locale.h> 500Sstevel@tonic-gate 510Sstevel@tonic-gate #ifdef HAVE_LIMITS_H 520Sstevel@tonic-gate # include <limits.h> /* For PATH_MAX */ 530Sstevel@tonic-gate #endif 540Sstevel@tonic-gate #ifdef HAVE_GETOPT_H 550Sstevel@tonic-gate # include <getopt.h> 560Sstevel@tonic-gate #endif 570Sstevel@tonic-gate #ifdef HAVE_BSTRING_H 580Sstevel@tonic-gate # include <bstring.h> 590Sstevel@tonic-gate #endif 600Sstevel@tonic-gate #if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \ 610Sstevel@tonic-gate defined(GLOB_HAS_GL_MATCHC) 620Sstevel@tonic-gate # include <glob.h> 630Sstevel@tonic-gate #endif 640Sstevel@tonic-gate #ifdef HAVE_NETGROUP_H 650Sstevel@tonic-gate # include <netgroup.h> 660Sstevel@tonic-gate #endif 670Sstevel@tonic-gate #if defined(HAVE_NETDB_H) 680Sstevel@tonic-gate # include <netdb.h> 690Sstevel@tonic-gate #endif 700Sstevel@tonic-gate #ifdef HAVE_ENDIAN_H 710Sstevel@tonic-gate # include <endian.h> 720Sstevel@tonic-gate #endif 730Sstevel@tonic-gate #ifdef HAVE_TTYENT_H 740Sstevel@tonic-gate # include <ttyent.h> 750Sstevel@tonic-gate #endif 760Sstevel@tonic-gate #ifdef HAVE_UTIME_H 770Sstevel@tonic-gate # include <utime.h> 780Sstevel@tonic-gate #endif 790Sstevel@tonic-gate #ifdef HAVE_MAILLOCK_H 800Sstevel@tonic-gate # include <maillock.h> /* For _PATH_MAILDIR */ 810Sstevel@tonic-gate #endif 820Sstevel@tonic-gate #include <unistd.h> /* For STDIN_FILENO, etc */ 830Sstevel@tonic-gate #include <termios.h> /* Struct winsize */ 840Sstevel@tonic-gate 850Sstevel@tonic-gate /* 860Sstevel@tonic-gate *-*-nto-qnx needs these headers for strcasecmp and LASTLOG_FILE respectively 870Sstevel@tonic-gate */ 880Sstevel@tonic-gate #ifdef HAVE_STRINGS_H 890Sstevel@tonic-gate # include <strings.h> 900Sstevel@tonic-gate #endif 910Sstevel@tonic-gate #ifdef HAVE_LOGIN_H 920Sstevel@tonic-gate # include <login.h> 930Sstevel@tonic-gate #endif 940Sstevel@tonic-gate 952757Sjp161948 #ifdef HAVE_UCRED_H 962757Sjp161948 # include <ucred.h> 972757Sjp161948 #endif 982757Sjp161948 990Sstevel@tonic-gate #ifdef HAVE_UTMP_H 1000Sstevel@tonic-gate # include <utmp.h> 1010Sstevel@tonic-gate #endif 1020Sstevel@tonic-gate #ifdef HAVE_UTMPX_H 1030Sstevel@tonic-gate # ifdef HAVE_TV_IN_UTMPX 1040Sstevel@tonic-gate # include <sys/time.h> 1050Sstevel@tonic-gate # endif 1060Sstevel@tonic-gate # include <utmpx.h> 1070Sstevel@tonic-gate #endif 1080Sstevel@tonic-gate #ifdef HAVE_LASTLOG_H 1090Sstevel@tonic-gate # include <lastlog.h> 1100Sstevel@tonic-gate #endif 1110Sstevel@tonic-gate #ifdef HAVE_PATHS_H 1120Sstevel@tonic-gate # include <paths.h> /* For _PATH_XXX */ 1130Sstevel@tonic-gate #endif 1140Sstevel@tonic-gate 1150Sstevel@tonic-gate #include <sys/types.h> 1160Sstevel@tonic-gate #include <sys/socket.h> 1170Sstevel@tonic-gate #include <sys/ioctl.h> 1180Sstevel@tonic-gate #include <sys/wait.h> 1190Sstevel@tonic-gate #ifdef HAVE_SYS_TIME_H 1200Sstevel@tonic-gate # include <sys/time.h> /* For timersub */ 1210Sstevel@tonic-gate #endif 1220Sstevel@tonic-gate #include <sys/resource.h> 1230Sstevel@tonic-gate #ifdef HAVE_SYS_SELECT_H 1240Sstevel@tonic-gate # include <sys/select.h> 1250Sstevel@tonic-gate #endif 1260Sstevel@tonic-gate #ifdef HAVE_SYS_BSDTTY_H 1270Sstevel@tonic-gate # include <sys/bsdtty.h> 1280Sstevel@tonic-gate #endif 1290Sstevel@tonic-gate #include <sys/param.h> /* For MAXPATHLEN and roundup() */ 1300Sstevel@tonic-gate #ifdef HAVE_SYS_UN_H 1310Sstevel@tonic-gate # include <sys/un.h> /* For sockaddr_un */ 1320Sstevel@tonic-gate #endif 1330Sstevel@tonic-gate #ifdef HAVE_STDINT_H 1340Sstevel@tonic-gate # include <stdint.h> 1350Sstevel@tonic-gate #endif 1360Sstevel@tonic-gate #ifdef HAVE_SYS_BITYPES_H 1370Sstevel@tonic-gate # include <sys/bitypes.h> /* For u_intXX_t */ 1380Sstevel@tonic-gate #endif 1390Sstevel@tonic-gate #ifdef HAVE_SYS_CDEFS_H 1400Sstevel@tonic-gate # include <sys/cdefs.h> /* For __P() */ 1410Sstevel@tonic-gate #endif 1420Sstevel@tonic-gate #ifdef HAVE_SYS_STAT_H 1430Sstevel@tonic-gate # include <sys/stat.h> /* For S_* constants and macros */ 1440Sstevel@tonic-gate #endif 1450Sstevel@tonic-gate #ifdef HAVE_SYS_SYSMACROS_H 1460Sstevel@tonic-gate # include <sys/sysmacros.h> /* For MIN, MAX, etc */ 1470Sstevel@tonic-gate #endif 1480Sstevel@tonic-gate #ifdef HAVE_SYS_MMAN_H 1490Sstevel@tonic-gate #include <sys/mman.h> /* for MAP_ANONYMOUS */ 1500Sstevel@tonic-gate #endif 1510Sstevel@tonic-gate 1520Sstevel@tonic-gate #include <netinet/in_systm.h> /* For typedefs */ 1530Sstevel@tonic-gate #include <netinet/in.h> /* For IPv6 macros */ 1540Sstevel@tonic-gate #include <netinet/ip.h> /* For IPTOS macros */ 1550Sstevel@tonic-gate #include <netinet/tcp.h> 1560Sstevel@tonic-gate #include <arpa/inet.h> 1570Sstevel@tonic-gate #ifdef HAVE_RPC_TYPES_H 1580Sstevel@tonic-gate # include <rpc/types.h> /* For INADDR_LOOPBACK */ 1590Sstevel@tonic-gate #endif 1600Sstevel@tonic-gate #ifdef USE_PAM 1610Sstevel@tonic-gate # include <security/pam_appl.h> 1620Sstevel@tonic-gate #endif 1630Sstevel@tonic-gate #ifdef HAVE_READPASSPHRASE_H 1640Sstevel@tonic-gate # include <readpassphrase.h> 1650Sstevel@tonic-gate #endif 1660Sstevel@tonic-gate 1670Sstevel@tonic-gate #ifdef HAVE_IA_H 1680Sstevel@tonic-gate # include <ia.h> 1690Sstevel@tonic-gate #endif 1700Sstevel@tonic-gate 1710Sstevel@tonic-gate #ifdef HAVE_TMPDIR_H 1720Sstevel@tonic-gate # include <tmpdir.h> 1730Sstevel@tonic-gate #endif 1740Sstevel@tonic-gate 1750Sstevel@tonic-gate #include <openssl/opensslv.h> /* For OPENSSL_VERSION_NUMBER */ 1760Sstevel@tonic-gate 1770Sstevel@tonic-gate #include "defines.h" 1780Sstevel@tonic-gate 1790Sstevel@tonic-gate #include "version.h" 1800Sstevel@tonic-gate #include "openbsd-compat.h" 1810Sstevel@tonic-gate #include "bsd-cygwin_util.h" 1820Sstevel@tonic-gate 1830Sstevel@tonic-gate #include "entropy.h" 1840Sstevel@tonic-gate #include "g11n.h" 1850Sstevel@tonic-gate 1860Sstevel@tonic-gate #ifdef __cplusplus 1870Sstevel@tonic-gate } 1880Sstevel@tonic-gate #endif 1890Sstevel@tonic-gate 1900Sstevel@tonic-gate #endif /* _INCLUDES_H */ 191