summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdtime
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-09-13 03:50:58 +0000
committerwollman <wollman@FreeBSD.org>1994-09-13 03:50:58 +0000
commitb80021e668d8d41657df74b210c9af6c4a0a6e7e (patch)
treefdb81c62f9b44b6579a2bddad996822fa4de81f9 /lib/libc/stdtime
parent91bd59b78ccdebb3e1fc3fc31f3b81232ab04436 (diff)
downloadFreeBSD-src-b80021e668d8d41657df74b210c9af6c4a0a6e7e.zip
FreeBSD-src-b80021e668d8d41657df74b210c9af6c4a0a6e7e.tar.gz
Port to FreeBSD. Not ready for inclusion in libc just yet, but here
so we can compile zic.
Diffstat (limited to 'lib/libc/stdtime')
-rw-r--r--lib/libc/stdtime/Makefile.inc9
-rw-r--r--lib/libc/stdtime/localtime.c2
-rw-r--r--lib/libc/stdtime/tzfile.h4
3 files changed, 12 insertions, 3 deletions
diff --git a/lib/libc/stdtime/Makefile.inc b/lib/libc/stdtime/Makefile.inc
new file mode 100644
index 0000000..a47379e
--- /dev/null
+++ b/lib/libc/stdtime/Makefile.inc
@@ -0,0 +1,9 @@
+# $Id$
+
+SRCS+= stdtime/asctime.c stdtime/localtime.c stdtime/strftime.c \
+ stdtime/difftime.c
+MAN5+= tzfile.5
+
+CFLAGS+= -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS
+CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"/usr/share/zoneinfo\"
+
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c
index 5403147..aafb751 100644
--- a/lib/libc/stdtime/localtime.c
+++ b/lib/libc/stdtime/localtime.c
@@ -940,7 +940,7 @@ struct tm * const tmp;
tmp->tm_isdst = ttisp->tt_isdst;
tzname[tmp->tm_isdst] = (char *) &sp->chars[ttisp->tt_abbrind];
#ifdef TM_ZONE
- tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind];
+ tmp->TM_ZONE = (char *)&sp->chars[ttisp->tt_abbrind];
#endif /* defined TM_ZONE */
}
diff --git a/lib/libc/stdtime/tzfile.h b/lib/libc/stdtime/tzfile.h
index 45b4d7d..9b98306 100644
--- a/lib/libc/stdtime/tzfile.h
+++ b/lib/libc/stdtime/tzfile.h
@@ -25,11 +25,11 @@ static char tzfilehid[] = "@(#)tzfile.h 7.4";
*/
#ifndef TZDIR
-#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */
+#define TZDIR "/usr/share/zoneinfo" /* Time zone object file directory */
#endif /* !defined TZDIR */
#ifndef TZDEFAULT
-#define TZDEFAULT "localtime"
+#define TZDEFAULT "/etc/localtime"
#endif /* !defined TZDEFAULT */
#ifndef TZDEFRULES
OpenPOWER on IntegriCloud