Move getlogin() declaration to do_write() where it's needed.
authorCraig Leres <leres@ucbvax.Berkeley.EDU>
Sun, 26 Nov 1989 12:39:50 +0000 (04:39 -0800)
committerCraig Leres <leres@ucbvax.Berkeley.EDU>
Sun, 26 Nov 1989 12:39:50 +0000 (04:39 -0800)
SCCS-vsn: usr.bin/write/write.c 4.20

usr/src/usr.bin/write/write.c

index f130d66..781dd6e 100644 (file)
@@ -25,7 +25,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)write.c    4.19 (Berkeley) %G%";
+static char sccsid[] = "@(#)write.c    4.20 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -49,7 +49,7 @@ main(argc, argv)
        time_t atime;
        uid_t myuid;
        int msgsok, myttyfd;
        time_t atime;
        uid_t myuid;
        int msgsok, myttyfd;
-       char tty[MAXPATHLEN], *mytty, *getlogin(), *ttyname();
+       char tty[MAXPATHLEN], *mytty, *ttyname();
        void done();
 
        /* check that sender has write enabled */
        void done();
 
        /* check that sender has write enabled */
@@ -238,7 +238,7 @@ do_write(tty, mytty, myuid)
        register char *login, *nows;
        register struct passwd *pwd;
        time_t now, time();
        register char *login, *nows;
        register struct passwd *pwd;
        time_t now, time();
-       char path[MAXPATHLEN], host[MAXHOSTNAMELEN], line[512];
+       char *getlogin(), path[MAXPATHLEN], host[MAXHOSTNAMELEN], line[512];
        void done();
 
        /* Determine our login name before the we reopen() stdout */
        void done();
 
        /* Determine our login name before the we reopen() stdout */