From c2e72b506ff5ea2b92f026be2bfaff1851c87432 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Thu, 6 Jul 1995 00:08:24 +0000 Subject: [PATCH] Remove declaration of errno altoghether. "extern int errno;" is always wrong. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6228 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 4 ++++ src/appl/bsd/krcp.c | 1 - src/appl/bsd/krlogin.c | 1 - src/appl/bsd/krlogind.c | 1 - src/appl/bsd/krshd.c | 2 -- src/appl/bsd/login.c | 2 -- 6 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index f7321f555..4b03944c1 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,5 +1,9 @@ Wed Jul 5 20:03:37 1995 Theodore Y. Ts'o (tytso@dcl) + * krcp.c, krlogin.c, krlogind.c, krshd.c, login.c: Remove + declaration of errno altoghether. "extern int errno;" is + always wrong. + * login.c (main): Don't use the TIOCLSET ioctl unless we're not using POSIX_TERMIOS. Don't just blindly set the file status flags to 0. Instead, do a fcntl(0, F_GETFL), and diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c index 57a0f7270..eaf65a2f3 100644 --- a/src/appl/bsd/krcp.c +++ b/src/appl/bsd/krcp.c @@ -108,7 +108,6 @@ int rem; char *colon(); int errs; krb5_sigtype lostconn(); -extern int errno; #ifdef NEED_SYS_ERRLIST extern char *sys_errlist[]; #endif diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c index 846747b8d..35f233910 100644 --- a/src/appl/bsd/krlogin.c +++ b/src/appl/bsd/krlogin.c @@ -196,7 +196,6 @@ char *speeds[] = "600", "1200", "1800", "2400", "4800", "9600", "19200", "38400" }; #endif char term[256] = "network"; -extern int errno; #ifndef POSIX_SIGNALS #ifndef sigmask diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index 0ae1100d3..04fd6190c 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -278,7 +278,6 @@ char term[64]; char rhost_name[128]; krb5_principal client; -extern int errno; int reapchild(); char *progname; diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c index 1749a07ce..d84fe22f7 100644 --- a/src/appl/bsd/krshd.c +++ b/src/appl/bsd/krshd.c @@ -1364,8 +1364,6 @@ krb5_sigtype char *makejtmp(uid, gid, jid) register int uid, gid, jid; { - extern int errno; - register char *endc, *tdp = &tmpdir[strlen(tmpdir)]; register int i; diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c index d32f6fc94..58cdcc5ba 100644 --- a/src/appl/bsd/login.c +++ b/src/appl/bsd/login.c @@ -186,8 +186,6 @@ struct ltchars ltc = { }; #endif -extern int errno; - #ifdef KRB4 #define KRB_ENVIRON "KRBTKFILE" /* Ticket file environment variable */ #define KRB_TK_DIR "/tmp/tkt_" /* Where to put the ticket */ -- 2.26.2