Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/telnetd add some more ifdefs, so that we don't defin...
details: https://anonhg.NetBSD.org/src/rev/3dc0b7b1e1df
branches: trunk
changeset: 535490:3dc0b7b1e1df
user: christos <christos%NetBSD.org@localhost>
date: Tue Aug 20 13:58:22 2002 +0000
description:
add some more ifdefs, so that we don't define variables we don't use.
diffstat:
libexec/telnetd/sys_term.c | 6 ++++--
libexec/telnetd/telnetd.c | 12 ++++++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diffs (86 lines):
diff -r 83660211decc -r 3dc0b7b1e1df libexec/telnetd/sys_term.c
--- a/libexec/telnetd/sys_term.c Tue Aug 20 13:56:50 2002 +0000
+++ b/libexec/telnetd/sys_term.c Tue Aug 20 13:58:22 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_term.c,v 1.32 2002/08/20 13:12:00 christos Exp $ */
+/* $NetBSD: sys_term.c,v 1.33 2002/08/20 13:58:22 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95";
#else
-__RCSID("$NetBSD: sys_term.c,v 1.32 2002/08/20 13:12:00 christos Exp $");
+__RCSID("$NetBSD: sys_term.c,v 1.33 2002/08/20 13:58:22 christos Exp $");
#endif
#endif /* not lint */
@@ -62,6 +62,7 @@
struct utmp wtmp;
#endif /* UTMPX */
+#if !defined(UTMPX) && !(defined(CRAY) || defined(__hpux)) && BSD <= 43
int utmp_len = sizeof(wtmp.ut_host);
#ifndef PARENT_DOES_UTMP
char wtmpf[] = "/usr/adm/wtmp";
@@ -69,6 +70,7 @@
#else /* PARENT_DOES_UTMP */
char wtmpf[] = "/etc/wtmp";
#endif /* PARENT_DOES_UTMP */
+#endif
#ifdef CRAY
#include <tmpdir.h>
diff -r 83660211decc -r 3dc0b7b1e1df libexec/telnetd/telnetd.c
--- a/libexec/telnetd/telnetd.c Tue Aug 20 13:56:50 2002 +0000
+++ b/libexec/telnetd/telnetd.c Tue Aug 20 13:58:22 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: telnetd.c,v 1.32 2002/01/31 07:54:50 itojun Exp $ */
+/* $NetBSD: telnetd.c,v 1.33 2002/08/20 13:58:22 christos Exp $ */
/*
* Copyright (C) 1997 and 1998 WIDE Project.
@@ -69,7 +69,7 @@
#if 0
static char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95";
#else
-__RCSID("$NetBSD: telnetd.c,v 1.32 2002/01/31 07:54:50 itojun Exp $");
+__RCSID("$NetBSD: telnetd.c,v 1.33 2002/08/20 13:58:22 christos Exp $");
#endif
#endif /* not lint */
@@ -131,7 +131,9 @@
int require_secure_login = 0;
#endif
+#if !defined(UTMPX) && !(defined(CRAY) || defined(__hpux)) && BSD <= 43
extern int utmp_len;
+#endif
extern int require_hwpreauth;
#ifdef KRB5
extern krb5_context telnet_context;
@@ -435,7 +437,11 @@
break;
case 'u':
+#if !defined(UTMPX) && !(defined(CRAY) || defined(__hpux)) && BSD <= 43
utmp_len = atoi(optarg);
+#else
+ fprintf(stderr, "telnetd: -u option unneeded\n");
+#endif
break;
case 'U':
@@ -928,9 +934,11 @@
error = getnameinfo(who, who->sa_len, remote_host_name,
sizeof(remote_host_name), NULL, 0, 0);
+#if !defined(UTMPX) && !(defined(CRAY) || defined(__hpux)) && BSD <= 43
if (!error && strlen(remote_host_name) > utmp_len)
error = getnameinfo(who, who->sa_len, remote_host_name,
sizeof(remote_host_name), NULL, 0, NI_NUMERICHOST);
+#endif
if (error) {
fatal(net, "Couldn't resolve your address into a host name.\r\n\
Home |
Main Index |
Thread Index |
Old Index