pkgsrc/chat/icb/patches/patch-ac
christos 460bd4190f make this work on 64 bit platforms:
- fix warnings for missing prototypes
- use termios instead of sgtty (why doesn't this work on amd64?)
2008-12-17 02:19:59 +00:00

43 lines
1.1 KiB
Text

$NetBSD: patch-ac,v 1.2 2008/12/17 02:19:59 christos Exp $
--- icb/c_log.c.orig 1995-02-24 16:20:18.000000000 -0500
+++ icb/c_log.c 2008-12-16 20:17:59.000000000 -0500
@@ -6,6 +6,7 @@
#include "icb.h"
#include "externs.h"
#include <time.h>
+#include <errno.h>
FILE *logfp = NULL;
@@ -45,8 +46,6 @@
time_t time();
struct tm *t, *localtime();
time_t clock;
- extern int errno, sys_nerr;
- extern char *sys_errlist[];
/* determine pathname to use */
if (path == NULL || *path == '\0')
@@ -97,8 +96,8 @@
aptr++;
/* timestamp it */
- sprintf(mbuf, "Session log \"%s\" started at %d/%02d/%-2d %s.",
- path, t->tm_mon+1, t->tm_mday, t->tm_year, aptr);
+ sprintf(mbuf, "Session log \"%s\" started at %d/%02d/%-4d %s.",
+ path, t->tm_mon+1, t->tm_mday, 1900+t->tm_year, aptr);
putl(mbuf, PL_SCR | PL_LOG);
return(0);
@@ -126,8 +125,8 @@
aptr++;
/* timestamp it */
- sprintf(mbuf, "Session log closed at %d/%02d/%-2d %s.",
- t->tm_mon+1, t->tm_mday, t->tm_year, aptr);
+ sprintf(mbuf, "Session log closed at %d/%02d/%-4d %s.",
+ t->tm_mon+1, t->tm_mday, 1900+t->tm_year, aptr);
putl(mbuf, PL_SCR | PL_LOG);
/* close it */