From 20d53d3990f162e5722f6aff79df2eae0af087d9 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 4 Feb 2001 22:14:13 +0000 Subject: [PATCH] fix nested extern --- libexec/rlogind/rlogind.c | 11 ++++++----- libexec/rshd/rshd.c | 8 ++++---- libexec/talkd/talkd.c | 9 +++++---- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c index c9692f98a52d..6c2da28fb57c 100644 --- a/libexec/rlogind/rlogind.c +++ b/libexec/rlogind/rlogind.c @@ -1,4 +1,4 @@ -/* $NetBSD: rlogind.c,v 1.23 2001/01/10 01:41:38 lukem Exp $ */ +/* $NetBSD: rlogind.c,v 1.24 2001/02/04 22:14:13 christos Exp $ */ /* * Copyright (C) 1998 WIDE Project. @@ -73,7 +73,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)rlogind.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: rlogind.c,v 1.23 2001/01/10 01:41:38 lukem Exp $"); +__RCSID("$NetBSD: rlogind.c,v 1.24 2001/02/04 22:14:13 christos Exp $"); #endif #endif /* not lint */ @@ -144,12 +144,15 @@ int local_domain __P((char *)); char *topdomain __P((char *)); int main __P((int, char *[])); +extern int __check_rhosts_file; +extern char *__rcmd_errstr; /* syslog hook from libc/net/rcmd.c */ +extern char **environ; + int main(argc, argv) int argc; char *argv[]; { - extern int __check_rhosts_file; struct sockaddr_storage from; int ch, fromlen, on; @@ -653,7 +656,6 @@ do_rlogin(dest, host) struct sockaddr *dest; char *host; { - extern char *__rcmd_errstr; /* syslog hook from libc/net/rcmd.c */ int retval; getstr(rusername, sizeof(rusername), "remuser too long"); @@ -702,7 +704,6 @@ getstr(buf, cnt, errmsg) } while (c != 0); } -extern char **environ; void setup_term(fd) diff --git a/libexec/rshd/rshd.c b/libexec/rshd/rshd.c index 1fc5b006c7ba..bc9061e6791e 100644 --- a/libexec/rshd/rshd.c +++ b/libexec/rshd/rshd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rshd.c,v 1.22 2001/01/11 01:32:34 lukem Exp $ */ +/* $NetBSD: rshd.c,v 1.23 2001/02/04 22:14:57 christos Exp $ */ /* * Copyright (C) 1998 WIDE Project. @@ -73,7 +73,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1992, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; #else -__RCSID("$NetBSD: rshd.c,v 1.22 2001/01/11 01:32:34 lukem Exp $"); +__RCSID("$NetBSD: rshd.c,v 1.23 2001/02/04 22:14:57 christos Exp $"); #endif #endif /* not lint */ @@ -123,13 +123,14 @@ void usage __P((void)); int main __P((int, char *[])); #define OPTIONS "alnL" +extern int __check_rhosts_file; +extern char *__rcmd_errstr; /* syslog hook from libc/net/rcmd.c. */ int main(argc, argv) int argc; char *argv[]; { - extern int __check_rhosts_file; struct linger linger; int ch, on = 1, fromlen; struct sockaddr_storage from; @@ -224,7 +225,6 @@ void doit(fromp) struct sockaddr *fromp; { - extern char *__rcmd_errstr; /* syslog hook from libc/net/rcmd.c. */ struct passwd *pwd; in_port_t port; fd_set ready, readfrom; diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index f9c12b794d70..84510413c229 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -1,4 +1,4 @@ -/* $NetBSD: talkd.c,v 1.10 1998/07/06 06:49:16 mrg Exp $ */ +/* $NetBSD: talkd.c,v 1.11 2001/02/04 22:16:34 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\ #if 0 static char sccsid[] = "@(#)talkd.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: talkd.c,v 1.10 1998/07/06 06:49:16 mrg Exp $"); +__RCSID("$NetBSD: talkd.c,v 1.11 2001/02/04 22:16:34 christos Exp $"); #endif #endif /* not lint */ @@ -87,6 +87,8 @@ char hostname[MAXHOSTNAMELEN + 1]; static void timeout __P((int)); int main __P((int, char *[])); +extern char *__progname; + int main(argc, argv) int argc; @@ -94,7 +96,6 @@ main(argc, argv) { CTL_MSG *mp = &request; int cc, ch; - extern char *__progname; openlog("talkd", LOG_PID, LOG_DAEMON); while ((ch = getopt(argc, argv, "dl")) != -1) @@ -106,7 +107,7 @@ main(argc, argv) logging = 1; break; default: - syslog(LOG_ERR, "usage: %s [-dl]", __progname); + syslog(LOG_ERR, "Usage: %s [-dl]", __progname); exit(1); }