Install zoneinfo files.

This commit is contained in:
vak
2015-10-20 00:42:29 -07:00
parent b134c1f84c
commit 7562e8e410
11 changed files with 121 additions and 18 deletions

1
etc/.gitignore vendored
View File

@@ -1,3 +1,4 @@
localtime
phones
remote
termcap

View File

@@ -5,6 +5,9 @@
/*
** Information about time zone files.
*/
/* Time zone object file directory */
#define TZDIR "/usr/share/zoneinfo"
#define TZDEFAULT "/etc/localtime"
/*
** Each file begins with. . .

View File

@@ -422,6 +422,7 @@ file /etc/shadow
file /etc/shells
file /etc/termcap
mode 0444
file /etc/localtime
file /etc/ttys
#
@@ -956,6 +957,11 @@ dir /share
dir /share/calendar
dir /share/dict
dir /share/misc
dir /share/zoneinfo
dir /share/zoneinfo/Australia
dir /share/zoneinfo/Canada
dir /share/zoneinfo/SystemV
dir /share/zoneinfo/US
file /share/calendar/calendar.birthday
file /share/calendar/calendar.christian
file /share/calendar/calendar.computer
@@ -968,6 +974,91 @@ file /share/emg.keys
file /share/re.help
file /share/dict/words
file /share/misc/more.help
file /share/zoneinfo/Australia/North
file /share/zoneinfo/Australia/NSW
file /share/zoneinfo/Australia/Queensland
file /share/zoneinfo/Australia/South
file /share/zoneinfo/Australia/Tasmania
file /share/zoneinfo/Australia/Victoria
file /share/zoneinfo/Australia/West
file /share/zoneinfo/Canada/Atlantic
file /share/zoneinfo/Canada/Central
file /share/zoneinfo/Canada/Eastern
file /share/zoneinfo/Canada/Mountain
file /share/zoneinfo/Canada/Newfoundland
file /share/zoneinfo/Canada/Pacific
file /share/zoneinfo/Canada/Yukon
file /share/zoneinfo/CET
file /share/zoneinfo/CST6CDT
file /share/zoneinfo/EET
file /share/zoneinfo/EST
file /share/zoneinfo/EST5EDT
file /share/zoneinfo/GB-Eire
file /share/zoneinfo/GMT-12
file /share/zoneinfo/GMT-11
file /share/zoneinfo/GMT-10
file /share/zoneinfo/GMT-9
file /share/zoneinfo/GMT-8
file /share/zoneinfo/GMT-7
file /share/zoneinfo/GMT-6
file /share/zoneinfo/GMT-5
file /share/zoneinfo/GMT-4
file /share/zoneinfo/GMT-3
file /share/zoneinfo/GMT-2
file /share/zoneinfo/GMT-1
file /share/zoneinfo/GMT
file /share/zoneinfo/GMT+1
file /share/zoneinfo/GMT+2
file /share/zoneinfo/GMT+3
file /share/zoneinfo/GMT+4
file /share/zoneinfo/GMT+5
file /share/zoneinfo/GMT+6
file /share/zoneinfo/GMT+7
file /share/zoneinfo/GMT+8
file /share/zoneinfo/GMT+9
file /share/zoneinfo/GMT+10
file /share/zoneinfo/GMT+11
file /share/zoneinfo/GMT+12
file /share/zoneinfo/GMT+13
file /share/zoneinfo/Greenwich
file /share/zoneinfo/HST
file /share/zoneinfo/Iceland
file /share/zoneinfo/Japan
file /share/zoneinfo/MET
file /share/zoneinfo/MST
file /share/zoneinfo/MST7MDT
file /share/zoneinfo/NZ
file /share/zoneinfo/Poland
file /share/zoneinfo/PST8PDT
file /share/zoneinfo/Singapore
file /share/zoneinfo/SystemV/AST4
file /share/zoneinfo/SystemV/AST4ADT
file /share/zoneinfo/SystemV/CST6
file /share/zoneinfo/SystemV/CST6CDT
file /share/zoneinfo/SystemV/EST5
file /share/zoneinfo/SystemV/EST5EDT
file /share/zoneinfo/SystemV/HST10
file /share/zoneinfo/SystemV/MST7
file /share/zoneinfo/SystemV/MST7MDT
file /share/zoneinfo/SystemV/PST8
file /share/zoneinfo/SystemV/PST8PDT
file /share/zoneinfo/SystemV/YST9
file /share/zoneinfo/SystemV/YST9YDT
file /share/zoneinfo/Turkey
file /share/zoneinfo/UCT
file /share/zoneinfo/Universal
file /share/zoneinfo/US/Arizona
file /share/zoneinfo/US/Central
file /share/zoneinfo/US/Eastern
file /share/zoneinfo/US/East-Indiana
file /share/zoneinfo/US/Hawaii
file /share/zoneinfo/US/Mountain
file /share/zoneinfo/US/Pacific
file /share/zoneinfo/US/Pacific-New
file /share/zoneinfo/US/Yukon
file /share/zoneinfo/UTC
file /share/zoneinfo/WET
file /share/zoneinfo/W-SU
#
# Files: /share/examples/asm

9
share/.gitignore vendored
View File

@@ -1,5 +1,6 @@
re.help
misc
unixbench
emg.keys
calendar
emg.keys
misc
re.help
unixbench
zoneinfo

View File

@@ -6,7 +6,7 @@
TOPSRC = $(shell cd ../..; pwd)
include $(TOPSRC)/target.mk
SUBDIR = misc
SUBDIR = misc zoneinfo
all: ${SUBDIR}

3
src/share/zoneinfo/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
tzfile.h
zdump
zic

View File

@@ -19,7 +19,6 @@ LOCALTIME= US/Pacific
# (and add solar87 to the DATA= line below).
CFLAGS= -O
SEPFLAG=-i
LINTFLAGS= -phbaxc
CC= cc -g -Wall -Werror
@@ -39,7 +38,7 @@ MANSRC= $(ZICMANSRC) $(ZDUMAN)
SHARDIR= ${DESTDIR}/share/zoneinfo
MANDIR= ${DESTDIR}/man/cat8
all: zdump zic ${ZICMAN} ${ZDUMAN}
all: tzfile.h zdump zic ${ZICMAN} ${ZDUMAN}
install: zic $(DATA) $(MAN)
(umask 22; ./zic -d ${SHARDIR} $(DATA))
@@ -55,14 +54,17 @@ zic.0: $(ZICMANSRC)
nroff -man $(ZICMANSRC) > $(ZICMAN)
zdump: $(TZDOBJS)
$(CC) $(CFLAGS) $(LFLAGS) $(SEPFLAG) $(TZDOBJS) -o $@
$(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) -o $@
zic: $(TZCOBJS)
$(CC) $(CFLAGS) $(LFLAGS) $(SEPFLAG) $(TZCOBJS) -o $@
$(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) -o $@
tzfile.h: ${DESTDIR}/include/tzfile.h
ln -s $< $@
lint: $(TZCSRCS) $(TZDSRCS)
lint $(LINTFLAGS) $(CFLAGS) $(TZCSRCS)
lint $(LINTFLAGS) $(CFLAGS) $(TZDSRCS)
clean:
rm -f *.o zdump zic $(ZICMAN) $(ZDUMAN)
rm -f *.o zdump zic $(ZICMAN) $(ZDUMAN) tzfile.h

Binary file not shown.

View File

@@ -5,9 +5,9 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <tzfile.h>
#include <time.h>
#include <getopt.h>
#include "tzfile.h"
#ifndef TRUE
#define TRUE 1
@@ -15,10 +15,12 @@
#endif
extern char **environ;
extern char *tzname[2];
extern char *imalloc(int);
extern void tzset(void);
static int longest;
static int longest;
static void
show(zone, t, v)
@@ -26,7 +28,6 @@ char * zone;
time_t t;
{
struct tm * tmp;
extern struct tm * localtime();
(void) printf("%-*s ", longest, zone);
if (v)

Binary file not shown.

View File

@@ -3,14 +3,15 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <strings.h>
#include <string.h>
#include <time.h>
#include <tzfile.h>
#include <getopt.h>
#include "tzfile.h"
#ifndef BUFSIZ
#define BUFSIZ 1024
@@ -1049,11 +1050,11 @@ struct zone * zpfirst;
register struct rule * rp;
register int i, j;
register int usestart, useuntil;
register time_t starttime, untiltime;
register time_t starttime = 0, untiltime = 0;
register long gmtoff;
register long stdoff;
register int year;
register long startoff;
register long startoff = 0;
register int startisdst;
register int type;
char startbuf[BUFSIZ];
@@ -1101,7 +1102,7 @@ struct zone * zpfirst;
}
for ( ; ; ) {
register int k;
register time_t jtime, ktime;
register time_t jtime, ktime = 0;
register long offset;
char buf[BUFSIZ];