aboutsummaryrefslogtreecommitdiff
path: root/release/picobsd/tinyware/simple_httpd/simple_httpd.c
diff options
context:
space:
mode:
authorDaniel O'Callaghan <danny@FreeBSD.org>1999-01-16 03:50:10 +0000
committerDaniel O'Callaghan <danny@FreeBSD.org>1999-01-16 03:50:10 +0000
commit7621c7c32ab34eeb6028dec1d958d88857ed4487 (patch)
tree9dd5c71900959cffe618972b5a134f1dfbd1324b /release/picobsd/tinyware/simple_httpd/simple_httpd.c
parent5e2697357117c7f4cfcfff051f610c24fdaa8a3d (diff)
downloadsrc-7621c7c32ab34eeb6028dec1d958d88857ed4487.tar.gz
src-7621c7c32ab34eeb6028dec1d958d88857ed4487.zip
Fix Makefile so it works.
Change date format to yyyy/mm/dd hh:mm:ss Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
Notes
Notes: svn path=/head/; revision=42714
Diffstat (limited to 'release/picobsd/tinyware/simple_httpd/simple_httpd.c')
-rw-r--r--release/picobsd/tinyware/simple_httpd/simple_httpd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/release/picobsd/tinyware/simple_httpd/simple_httpd.c b/release/picobsd/tinyware/simple_httpd/simple_httpd.c
index 0a83f6737815..5b02244e4de9 100644
--- a/release/picobsd/tinyware/simple_httpd/simple_httpd.c
+++ b/release/picobsd/tinyware/simple_httpd/simple_httpd.c
@@ -13,7 +13,7 @@
*/
/*
- * $Id: simple_httpd.c,v 1.1 1998/08/19 16:24:06 abial Exp $
+ * $Id: simple_httpd.c,v 1.1.1.1 1998/08/27 17:38:45 abial Exp $
*/
#include <stdio.h>
@@ -31,6 +31,7 @@
#include <string.h>
#include <signal.h>
#include <sys/wait.h>
+#define LOGDIR "/var/log"
int http_sock, con_sock;
int http_port = 80;
@@ -129,7 +130,7 @@ traite_req()
strcat(logfile,"/");
strcat(logfile,"jhttp.log");
}
- else strcpy(logfile,"/usr/adm/jhttpd.log");
+ else strcpy(logfile, LOGDIR "/jhttpd.log");
if ( access(logfile,W_OK))
{
@@ -349,8 +350,9 @@ char *adate()
struct tm *t;
time(&now);
t = localtime(&now);
- sprintf(out, "%02d:%02d:%02d %02d/%02d/%02d",
- t->tm_hour, t->tm_min, t->tm_sec,
- t->tm_mday, t->tm_mon+1, t->tm_year );
+
+ sprintf(out, "%4d/%02d/%02d %02d:%02d:%02d",
+ t->tm_year+1900, t->tm_mon+1, t->tm_mday,
+ t->tm_hour, t->tm_min, t->tm_sec );
return out;
}