8ed18b6667
scheme while I'm at it.
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
$OpenBSD: patch-icb_c_log_c,v 1.1 2001/05/14 16:42:53 millert Exp $
|
|
--- icb/c_log.c.orig Fri Feb 24 14:20:18 1995
|
|
+++ icb/c_log.c Mon May 14 10:33:04 2001
|
|
@@ -6,6 +6,7 @@
|
|
#include "icb.h"
|
|
#include "externs.h"
|
|
#include <time.h>
|
|
+#include <errno.h>
|
|
|
|
FILE *logfp = NULL;
|
|
|
|
@@ -45,8 +46,10 @@ char *path;
|
|
time_t time();
|
|
struct tm *t, *localtime();
|
|
time_t clock;
|
|
+#if !(defined(BSD) && BSD >= 199306)
|
|
extern int errno, sys_nerr;
|
|
extern char *sys_errlist[];
|
|
+#endif
|
|
|
|
/* determine pathname to use */
|
|
if (path == NULL || *path == '\0')
|
|
@@ -97,8 +100,8 @@ char *path;
|
|
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 +129,8 @@ closesessionlog()
|
|
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 */
|