2001-05-14 12:42:49 -04:00
|
|
|
$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
|
2000-01-16 06:27:12 -05:00
|
|
|
@@ -6,6 +6,7 @@
|
|
|
|
#include "icb.h"
|
|
|
|
#include "externs.h"
|
|
|
|
#include <time.h>
|
|
|
|
+#include <errno.h>
|
|
|
|
|
|
|
|
FILE *logfp = NULL;
|
|
|
|
|
2001-05-14 12:42:49 -04:00
|
|
|
@@ -45,8 +46,10 @@ char *path;
|
2000-01-16 06:27:12 -05:00
|
|
|
time_t time();
|
|
|
|
struct tm *t, *localtime();
|
|
|
|
time_t clock;
|
2000-08-26 22:57:32 -04:00
|
|
|
+#if !(defined(BSD) && BSD >= 199306)
|
|
|
|
extern int errno, sys_nerr;
|
|
|
|
extern char *sys_errlist[];
|
|
|
|
+#endif
|
2000-01-16 06:27:12 -05:00
|
|
|
|
|
|
|
/* determine pathname to use */
|
|
|
|
if (path == NULL || *path == '\0')
|
2001-05-14 12:42:49 -04:00
|
|
|
@@ -97,8 +100,8 @@ char *path;
|
2000-08-26 22:57:32 -04:00
|
|
|
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);
|
2001-05-14 12:42:49 -04:00
|
|
|
@@ -126,8 +129,8 @@ closesessionlog()
|
2000-08-26 22:57:32 -04:00
|
|
|
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 */
|