X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-NeXT.c;h=76928f2a25c4e256e4ab775cec1dc13681ed0237;hb=8821c36a7798fd1c16d85ce63bcf519618975800;hp=d498c4bfe7909e068cd3f87a19014e58b88a7db3;hpb=5ba9d88b943e9d5a3ababdadf1d2e246581dfdc6;p=ppp.git diff --git a/pppd/sys-NeXT.c b/pppd/sys-NeXT.c index d498c4b..76928f2 100644 --- a/pppd/sys-NeXT.c +++ b/pppd/sys-NeXT.c @@ -20,7 +20,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-NeXT.c,v 1.17 1999/03/22 05:55:36 paulus Exp $"; +static char rcsid[] = "$Id: sys-NeXT.c,v 1.18 1999/04/12 06:24:48 paulus Exp $"; #endif #include @@ -73,8 +73,6 @@ extern int errno; static int restore_term; /* 1 => we've munged the terminal */ static struct termios inittermios; /* Initial TTY termios */ -static char *lock_file; - static int sockfd; /* socket for doing interface ioctls */ static int pppdev; /* +++ */ @@ -1178,7 +1176,7 @@ int have_route_to(u_int32_t addr) return -1; } - +#if 0 /* * daemon - Detach us from the terminal session. */ @@ -1202,7 +1200,7 @@ daemon(nochdir, noclose) } return 0; } - +#endif char * strdup(s) @@ -1246,9 +1244,9 @@ logwtmp(line, name, host) if ((fd = open(WTMPFILE, O_WRONLY|O_APPEND, 0)) < 0) return; if (!fstat(fd, &buf)) { - strlcpy(ut.ut_line, line, sizeof(ut.ut_line)); - strlcpy(ut.ut_name, name, sizeof(ut.ut_name)); - strlcpy(ut.ut_host, host, sizeof(ut.ut_host)); + strncpy(ut.ut_line, line, sizeof(ut.ut_line)); + strncpy(ut.ut_name, name, sizeof(ut.ut_name)); + strncpy(ut.ut_host, host, sizeof(ut.ut_host)); (void)time(&ut.ut_time); if (write(fd, (char *)&ut, sizeof(struct utmp)) != sizeof(struct utmp)) (void)ftruncate(fd, buf.st_size); @@ -1256,6 +1254,7 @@ logwtmp(line, name, host) close(fd); } +#if 0 /* * Routines for locking and unlocking the serial device, moved here * from chat.c. @@ -1263,6 +1262,8 @@ logwtmp(line, name, host) #define LOCK_PREFIX "/usr/spool/uucp/LCK/LCK.." +static char *lock_file; + /* * lock - create a lock file for the named device */ @@ -1331,6 +1332,7 @@ unlock() lock_file = NULL; } } +#endif #if defined(i386) && defined(HAS_BROKEN_IOCTL) int