Install zoneinfo files.
This commit is contained in:
@@ -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
3
src/share/zoneinfo/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
tzfile.h
|
||||
zdump
|
||||
zic
|
||||
@@ -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.
@@ -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.
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user