From df507197af6d79582d1093e780005e6ff6ab1717 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Tue, 20 May 1997 20:37:48 +0000 Subject: [PATCH] clean-up git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1753 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/login/utmpx_login.c | 3 +- appl/telnet/telnetd/defs.h | 11 ----- appl/telnet/telnetd/telnetd.h | 75 +++++++++++++++++++++++++---------- 3 files changed, 55 insertions(+), 34 deletions(-) diff --git a/appl/login/utmpx_login.c b/appl/login/utmpx_login.c index 9d3721675..d977775ff 100644 --- a/appl/login/utmpx_login.c +++ b/appl/login/utmpx_login.c @@ -10,8 +10,7 @@ RCSID("$Id$"); int utmpx_login(char *line, char *user, char *host) { return 0; } #else -static -void +static void utmpx_update(struct utmpx *ut, char *line, char *user, char *host) { struct timeval tmp; diff --git a/appl/telnet/telnetd/defs.h b/appl/telnet/telnetd/defs.h index 3f4fc15a9..dc3f84252 100644 --- a/appl/telnet/telnetd/defs.h +++ b/appl/telnet/telnetd/defs.h @@ -66,17 +66,6 @@ #define TIOCPKT_DOSTOP 0x20 #endif -#ifndef FD_SET -#ifndef HAVE_fd_set -typedef struct fd_set { int fds_bits[1]; } fd_set; -#endif - -#define FD_SET(n, p) ((p)->fds_bits[0] |= (1<<(n))) -#define FD_CLR(n, p) ((p)->fds_bits[0] &= ~(1<<(n))) -#define FD_ISSET(n, p) ((p)->fds_bits[0] & (1<<(n))) -#define FD_ZERO(p) ((p)->fds_bits[0] = 0) -#endif /* FD_SET */ - /* * I/O data buffers defines */ diff --git a/appl/telnet/telnetd/telnetd.h b/appl/telnet/telnetd/telnetd.h index e086f773f..1bab277b7 100644 --- a/appl/telnet/telnetd/telnetd.h +++ b/appl/telnet/telnetd/telnetd.h @@ -41,10 +41,16 @@ #include #include +#ifdef HAVE_SYS_TYPES_H #include +#endif +#ifdef HAVE_SYS_PARAM_H #include +#endif +#ifdef HAVE_SYS_SOCKET_H #include +#endif #ifdef TIME_WITH_SYS_TIME #include #include @@ -53,15 +59,24 @@ #else #include #endif + #ifdef HAVE_SYS_RESOURCE_H #include #endif /* HAVE_SYS_RESOURCE_H */ -#ifndef _CRAY + +#ifdef HAVE_SYS_WAIT_H #include -#endif /* CRAY */ +#endif + +#ifdef HAVE_FCNTL_H #include +#endif +#ifdef HAVE_SYS_FILE_H #include +#endif +#ifdef HAVE_SYS_STAT_H #include +#endif /* including both and in SunOS 4 generates a lot of warnings */ @@ -73,18 +88,20 @@ #include #endif +#ifdef HAVE_NETINET_IN_H #include +#endif +#ifdef HAVE_ARPA_INET_H #include +#endif #include #include +#ifdef HAVE_NETDB_H #include -#include -#ifndef LOG_DAEMON -#define LOG_DAEMON 0 #endif -#ifndef LOG_ODELAY -#define LOG_ODELAY 0 +#ifdef HAVE_SYSLOG_H +#include #endif #include @@ -100,7 +117,9 @@ #include "defs.h" +#ifdef HAVE_ARPA_TELNET_H #include +#endif #ifndef _POSIX_VDISABLE # ifdef VDISABLE @@ -111,27 +130,42 @@ #endif -#ifdef _CRAY -# ifdef CRAY1 -# include -# ifndef FD_ZERO -# include -# endif /* FD_ZERO */ -# endif /* CRAY1 */ +#ifdef HAVE_SYS_PTY_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif -#include -#endif /* _CRAY */ - -#ifdef __hpux +#ifdef HAVE_SYS_PTYIO_H #include #endif -#ifdef HAVE_UNAME +#ifdef HAVE_SYS_UTSNAME_H #include #endif #include "ext.h" -#include "pathnames.h" + +#ifdef HAVE_PATHS_H +#include +#endif + +/* Don't use the system login, use our version instead */ + +#undef _PATH_LOGIN +#define _PATH_LOGIN BINDIR "/login" + +/* fallbacks */ + +#ifndef _PATH_DEV +#define _PATH_DEV "/dev/" +#endif + +#ifndef _PATH_TTY +#define _PATH_TTY "/dev/tty" +#endif /* _PATH_TTY */ + #include #ifdef SOCKS @@ -161,7 +195,6 @@ /* other external variables */ extern char **environ; -extern int errno; /* prototypes */