blob: 27569e18f30762fb730dc831d563fb3cf6693480 [file] [log] [blame]
Damien Millerd4a8b7e1999-10-27 13:42:43 +10001/*
Damien Miller4af51302000-04-16 11:18:38 +10002 *
Damien Miller95def091999-11-25 00:26:21 +11003 * includes.h
Damien Miller4af51302000-04-16 11:18:38 +10004 *
Damien Miller95def091999-11-25 00:26:21 +11005 * Author: Tatu Ylonen <ylo@cs.hut.fi>
Damien Miller4af51302000-04-16 11:18:38 +10006 *
Damien Miller95def091999-11-25 00:26:21 +11007 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved
Damien Miller4af51302000-04-16 11:18:38 +10009 *
Damien Miller95def091999-11-25 00:26:21 +110010 * Created: Thu Mar 23 16:29:37 1995 ylo
Damien Miller4af51302000-04-16 11:18:38 +100011 *
Damien Miller95def091999-11-25 00:26:21 +110012 * This file includes most of the needed system headers.
Damien Miller4af51302000-04-16 11:18:38 +100013 *
Damien Miller95def091999-11-25 00:26:21 +110014 */
Damien Millerd4a8b7e1999-10-27 13:42:43 +100015
16#ifndef INCLUDES_H
17#define INCLUDES_H
18
19#define RCSID(msg) \
20static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
21
Damien Miller4874c791999-11-16 13:29:26 +110022#include "config.h"
23
Damien Miller0f91b4e2000-06-18 15:43:25 +100024#include "next-posix.h"
25
Damien Millerd4a8b7e1999-10-27 13:42:43 +100026#include <sys/types.h>
27#include <sys/socket.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100028#include <sys/ioctl.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100029#include <sys/wait.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100030#include <sys/resource.h>
31
Damien Millerbac2d8a2000-09-05 16:13:06 +110032#ifndef HAVE_CYGWIN
Damien Millerd4a8b7e1999-10-27 13:42:43 +100033#include <netinet/tcp.h>
Damien Millerbac2d8a2000-09-05 16:13:06 +110034#endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +100035#include <arpa/inet.h>
36#include <netdb.h>
37
Damien Millerd4a8b7e1999-10-27 13:42:43 +100038#include <stdio.h>
39#include <ctype.h>
40#include <errno.h>
41#include <fcntl.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100042#include <signal.h>
43#include <termios.h>
44#include <stdlib.h>
45#include <string.h>
46#include <stdarg.h>
47#include <pwd.h>
48#include <grp.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100049#include <time.h>
Damien Millerd4a8b7e1999-10-27 13:42:43 +100050#include <dirent.h>
Damien Millerbac2d8a2000-09-05 16:13:06 +110051#ifdef HAVE_CYGWIN
52#include <getopt.h>
53#endif
Damien Millerd4a8b7e1999-10-27 13:42:43 +100054
Damien Millerbeb4ba51999-12-28 15:09:35 +110055#ifdef HAVE_BSTRING_H
56# include <bstring.h>
57#endif
Damien Miller3bd49ec1999-11-15 15:40:55 +110058#ifdef HAVE_NETGROUP_H
59# include <netgroup.h>
60#endif
Damien Millerbc33bd42000-07-11 14:59:08 +100061#if defined(HAVE_NETDB_H) && !defined(HAVE_NEXT)
62/* Next includes this as part of another header */
Damien Millerbeb4ba51999-12-28 15:09:35 +110063# include <netdb.h>
64#endif
Damien Millerab18c411999-11-11 10:40:23 +110065#ifdef HAVE_ENDIAN_H
66# include <endian.h>
67#endif
Damien Miller4874c791999-11-16 13:29:26 +110068#ifdef HAVE_SYS_SELECT_H
69# include <sys/select.h>
70#endif
Damien Millerb3ca3aa1999-11-22 13:57:07 +110071#ifdef HAVE_SYS_TIME_H
72# include <sys/time.h>
73#endif
Damien Miller76112de1999-12-21 11:18:08 +110074#ifdef HAVE_SYS_BSDTTY_H
75# include <sys/bsdtty.h>
76#endif
Damien Miller348c9b72000-08-15 10:01:22 +100077#ifdef HAVE_TTYENT_H
78# include <ttyent.h>
79#endif
Damien Millerbeb4ba51999-12-28 15:09:35 +110080#ifdef USE_PAM
Damien Miller4874c791999-11-16 13:29:26 +110081# include <security/pam_appl.h>
Damien Miller04f80141999-11-19 15:32:34 +110082#endif
Damien Millere72b7af1999-12-30 15:08:44 +110083#ifdef HAVE_POLL_H
84# include <poll.h>
85#else
86# ifdef HAVE_SYS_POLL_H
87# include <sys/poll.h>
88# endif
89#endif
Damien Millereaf99942000-01-19 13:45:07 +110090#ifdef HAVE_SYS_SYSMACROS_H
91# include <sys/sysmacros.h>
92#endif
Damien Millerab18c411999-11-11 10:40:23 +110093
94#include "version.h"
Damien Miller34132e52000-01-14 15:45:46 +110095
Damien Miller16e519c2000-05-09 14:28:55 +100096/* OpenBSD function replacements */
97#include "openbsd-compat.h"
Damien Miller34132e52000-01-14 15:45:46 +110098
Damien Miller5f056372000-04-16 12:31:48 +100099/* Entropy collection */
100#include "entropy.h"
101
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000102/* Define this to be the path of the xauth program. */
103#ifndef XAUTH_PATH
104#define XAUTH_PATH "/usr/X11R6/bin/xauth"
105#endif /* XAUTH_PATH */
106
107/* Define this to be the path of the rsh program. */
108#ifndef _PATH_RSH
109#define _PATH_RSH "/usr/bin/rsh"
110#endif /* _PATH_RSH */
111
Damien Miller5428f641999-11-25 11:54:57 +1100112/*
113 * Define this to use pipes instead of socketpairs for communicating with the
114 * client program. Socketpairs do not seem to work on all systems.
115 */
Damien Miller9e53f352000-02-01 23:05:30 +1100116/* #define USE_PIPES 1 */
Damien Millerd4a8b7e1999-10-27 13:42:43 +1000117
Damien Millerbac2d8a2000-09-05 16:13:06 +1100118#ifdef HAVE_CYGWIN
119#define open binary_open
120#define pipe binary_pipe
121extern int binary_open();
122extern int binary_pipe();
123#endif
124
Damien Miller95def091999-11-25 00:26:21 +1100125#endif /* INCLUDES_H */