Eliminate obsolete TIMEZONE and DST options.

Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
This commit is contained in:
perry 1997-01-15 01:28:28 +00:00
parent 11a7f97c20
commit b89a3425b7
61 changed files with 155 additions and 283 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: ALPHA,v 1.32 1997/01/14 23:20:37 cgd Exp $
# $NetBSD: ALPHA,v 1.33 1997/01/15 01:28:28 perry Exp $
#
# Alpha kernel with all the options you'd want, and more.
@ -15,10 +15,6 @@ options DEC_AXPPCI_33 # NoName: AXPpci33, etc.
options DEC_EB164 # EB164: AlphaPC 164
#options DEC_2000_300 # "Jensen": 2000/300 (DECpc AXP 150)
# needs to be set per system
options TIMEZONE="5*60" # Minutes west of GMT (for param.c)
options DST=1 # Daylight savings rules (for param.c)
# Standard system options
options DEBUG, DIAGNOSTIC # Extra kernel debugging
options KTRACE # System call tracing support

View File

@ -1,4 +1,4 @@
# $NetBSD: BUNNY,v 1.12 1996/11/25 04:16:15 cgd Exp $
# $NetBSD: BUNNY,v 1.13 1997/01/15 01:28:29 perry Exp $
#
# Kernel for bunnahabhain.pdl.cs.cmu.edu.
#
@ -15,10 +15,6 @@ options BUFPAGES=2048 # 16M of buffer cache
# CPU Support
options DEC_2100_A50 # Avanti etc: AlphaStation 400, 200, etc.
# needs to be set per system
options TIMEZONE="5*60" # Minutes west of GMT (for param.c)
options DST=1 # Daylight savings rules (for param.c)
# Standard system options
options DEBUG, DIAGNOSTIC # Extra kernel debugging
options KTRACE # System call tracing support

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.34 1997/01/14 23:18:17 cgd Exp $
# $NetBSD: GENERIC,v 1.35 1997/01/15 01:28:30 perry Exp $
#
# Generic Alpha kernel. Enough to get booted, etc., but not much more.
@ -15,10 +15,6 @@ options DEC_AXPPCI_33 # NoName: AXPpci33, etc.
options DEC_EB164 # EB164: AlphaPC 164
#options DEC_2000_300 # "Jensen": 2000/300 (DECpc AXP 150)
# needs to be set per system
options TIMEZONE="5*60" # Minutes west of GMT (for param.c)
options DST=1 # Daylight savings rules (for param.c)
# Standard system options
options DEBUG, DIAGNOSTIC # Extra kernel debugging
options KTRACE # System call tracing support

View File

@ -1,4 +1,4 @@
# $NetBSD: JURA,v 1.11 1996/11/25 04:16:18 cgd Exp $
# $NetBSD: JURA,v 1.12 1997/01/15 01:28:31 perry Exp $
#
# Kernel for jura.pdl.cs.cmu.edu.
#
@ -13,10 +13,6 @@ options DEC_2000_300 # "Jensen": 2000/300 (DECpc AXP 150)
options BOOTKEY # ask for keyhit before halt/reboot
# needs to be set per system
options TIMEZONE="5*60" # Minutes west of GMT (for param.c)
options DST=1 # Daylight savings rules (for param.c)
# Standard system options
options DEBUG, DIAGNOSTIC # Extra kernel debugging
options KTRACE # System call tracing support

View File

@ -1,4 +1,4 @@
# $NetBSD: NOSY,v 1.10 1996/11/15 19:37:31 cgd Exp $
# $NetBSD: NOSY,v 1.11 1997/01/15 01:28:32 perry Exp $
#
# Jason's DEC 3000/400 in the lab...
#
@ -10,10 +10,6 @@ maxusers 8
# CPU Support
options DEC_3000_500 # Flamingo etc: 3000/[4-9]00*
# needs to be set per system
options TIMEZONE="8*60" # Minutes west of GMT (for param.c)
options DST=1 # Daylight savings rules (for param.c)
# Standard system options
options DEBUG, DIAGNOSTIC # Extra kernel debugging
options KTRACE # System call tracing support

View File

@ -1,4 +1,4 @@
# $NetBSD: DRACO,v 1.7 1996/12/20 19:18:16 veego Exp $
# $NetBSD: DRACO,v 1.8 1997/01/15 01:28:33 perry Exp $
#
# Macro System GmbH "DraCo", currently 68060-only until FPE is integrated.
@ -8,7 +8,7 @@
include "arch/amiga/conf/std.draco"
maxusers 8
options TIMEZONE=300, DST=1
options RTC_OFFSET=300
#
# mainboards to support (in addition to Amiga)

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.67 1997/01/07 11:35:04 mrg Exp $
# $NetBSD: GENERIC,v 1.68 1997/01/15 01:28:34 perry Exp $
#
# GENERIC AMIGA
@ -9,7 +9,7 @@
include "arch/amiga/conf/std.amiga"
maxusers 8
options TIMEZONE=300, DST=1
options RTC_OFFSET=300
#
# mainboards to support (in addition to Amiga)

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.11 1997/01/06 04:47:53 mark Exp $ */
/* $NetBSD: clock.c,v 1.12 1997/01/15 01:28:35 perry Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -290,6 +290,7 @@ resettodr()
return;
sec = time.tv_sec;
sec -= rtc_offset * 60;
year = (sec / SECPER4YEARS) * 4;
sec %= SECPER4YEARS;
@ -383,9 +384,7 @@ inittodr(base)
n += days * 3600 * 24;
n += tz.tz_minuteswest * 60;
if (tz.tz_dsttime)
n -= 3600;
n += rtc_offset * 60;
time.tv_sec = n;
time.tv_usec = 0;

View File

@ -10,8 +10,7 @@ maxusers 32
# Standard system options
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options SWAPPAGER # paging; REQUIRED
options VNODEPAGER # mmap() of files
options DEVPAGER # mmap() of devices

View File

@ -10,8 +10,7 @@ maxusers 32
# Standard system options
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options SWAPPAGER # paging; REQUIRED
options VNODEPAGER # mmap() of files
options DEVPAGER # mmap() of devices

View File

@ -10,8 +10,7 @@ maxusers 32
# Standard system options
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options SWAPPAGER # paging; REQUIRED
options VNODEPAGER # mmap() of files
options DEVPAGER # mmap() of devices

View File

@ -10,8 +10,7 @@ maxusers 32
# Standard system options
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options SWAPPAGER # paging; REQUIRED
options VNODEPAGER # mmap() of files
options DEVPAGER # mmap() of devices

View File

@ -10,8 +10,7 @@ maxusers 8
# Standard system options
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options SWAPPAGER # paging; REQUIRED
options VNODEPAGER # mmap() of files
options DEVPAGER # mmap() of devices

View File

@ -10,8 +10,7 @@ maxusers 32
# Standard system options
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options SWAPPAGER # paging; REQUIRED
options VNODEPAGER # mmap() of files
options DEVPAGER # mmap() of devices

View File

@ -10,8 +10,7 @@ maxusers 32
# Standard system options
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options SWAPPAGER # paging; REQUIRED
options VNODEPAGER # mmap() of files
options DEVPAGER # mmap() of devices

View File

@ -1,4 +1,4 @@
/* $NetBSD: iomd_clock.c,v 1.11 1997/01/06 04:47:53 mark Exp $ */
/* $NetBSD: iomd_clock.c,v 1.12 1997/01/15 01:28:35 perry Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@ -290,6 +290,7 @@ resettodr()
return;
sec = time.tv_sec;
sec -= rtc_offset * 60;
year = (sec / SECPER4YEARS) * 4;
sec %= SECPER4YEARS;
@ -383,9 +384,7 @@ inittodr(base)
n += days * 3600 * 24;
n += tz.tz_minuteswest * 60;
if (tz.tz_dsttime)
n -= 3600;
n += rtc_offset * 60;
time.tv_sec = n;
time.tv_usec = 0;

View File

@ -1,4 +1,4 @@
# $NetBSD: BOAT_ANCHOR,v 1.70 1996/11/16 01:16:38 fvdl Exp $
# $NetBSD: BOAT_ANCHOR,v 1.71 1997/01/15 01:28:43 perry Exp $
#
# BOAT_ANCHOR -- kernel for the 386-20 the gang uses for testing
#
@ -11,8 +11,7 @@ options DUMMY_NOPS # speed hack; recommended
options XSERVER,UCONSOLE
maxusers 10 # estimated number of users
options TIMEZONE=480 # time zone to adjust RTC time by
options DST=1 # daylight savings time used by RTC
options RTC_OFFSET=480 # hardware clock is this many mins. west of GMT
options DIAGNOSTIC # internal consistency checks
options KTRACE # system call tracing, a la ktrace(1)

View File

@ -1,4 +1,4 @@
# $NetBSD: DISKLESS,v 1.36 1996/12/07 00:25:58 thorpej Exp $
# $NetBSD: DISKLESS,v 1.37 1997/01/15 01:28:44 perry Exp $
#
# DISKLESS -- Generic machine setup for diskless boot.
# This kernel can be loaded from a bootable floppy (i.e. kernel-copy)
@ -23,8 +23,7 @@ options XSERVER,UCONSOLE
options INSECURE # insecure; allow /dev/mem writing for X
maxusers 32 # estimated number of users
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
#options NTP # NTP phase/frequency locked loop
options DDB # in-kernel debugger

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.66 1997/01/07 11:35:14 mrg Exp $
# $NetBSD: GENERIC,v 1.67 1997/01/15 01:28:45 perry Exp $
#
# GENERIC -- everything that's currently supported
#
@ -21,8 +21,7 @@ options XSERVER,UCONSOLE
options INSECURE # insecure; allow /dev/mem writing for X
maxusers 32 # estimated number of users
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
#options NTP # NTP phase/frequency locked loop
options DDB # in-kernel debugger

View File

@ -1,4 +1,4 @@
# $NetBSD: HOMEWORLD,v 1.8 1996/12/07 00:26:08 thorpej Exp $
# $NetBSD: HOMEWORLD,v 1.9 1997/01/15 01:28:46 perry Exp $
#
# HOMEWORLD - Mail, CVS, and GNATS server
#
@ -21,8 +21,7 @@ options XSERVER,UCONSOLE
#options INSECURE # insecure; allow /dev/mem writing for X
maxusers 32 # estimated number of users
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
#options NTP # NTP phase/frequency locked loop
#options DDB # in-kernel debugger

View File

@ -1,4 +1,4 @@
# $NetBSD: INSTALL,v 1.29 1996/12/20 06:45:15 jonathan Exp $
# $NetBSD: INSTALL,v 1.30 1997/01/15 01:28:47 perry Exp $
#
# INSTALL -- an installation kernel config.
# adapters. This kernel should be GENERICOTHER with lines
@ -27,8 +27,7 @@ options MATH_EMULATE # floating point emulation
#options INSECURE # insecure; allow /dev/mem writing for X
maxusers 32 # estimated number of users
options TIMEZONE=0 # time zone to adjust RTC time by
options DST=0 # daylight savings time used by RTC
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
#options NTP # NTP phase/frequency locked loop
#options DDB # in-kernel debugger

View File

@ -1,4 +1,4 @@
# $NetBSD: KICKME,v 1.37 1996/12/07 00:26:14 thorpej Exp $
# $NetBSD: KICKME,v 1.38 1997/01/15 01:28:48 perry Exp $
#
# KICKME -- 486Cx-33 development machine
#
@ -20,8 +20,7 @@ options I486_CPU
#options XSERVER,UCONSOLE
maxusers 10 # estimated number of users
options TIMEZONE=480 # time zone to adjust RTC time by
options DST=1 # daylight savings time used by RTC
options RTC_OFFSET=480 # hardware clock is this many mins. west of GMT
options DDB # in-kernel debugger
options KTRACE # system call tracing, a la ktrace(1)

View File

@ -1,4 +1,4 @@
# $NetBSD: SUN_LAMP,v 1.80 1996/12/07 00:26:16 thorpej Exp $
# $NetBSD: SUN_LAMP,v 1.81 1997/01/15 01:28:49 perry Exp $
#
# SUN_LAMP -- kernel for one of cgd's 486/50 EISA boxes...
#
@ -19,8 +19,7 @@ options DUMMY_NOPS # speed hack; recommended
options XSERVER,UCONSOLE
maxusers 24 # estimated number of users
options TIMEZONE=480 # time zone to adjust RTC time by
options DST=1 # daylight savings time used by RTC
options RTC_OFFSET=480 # hardware clock is this many mins. west of GMT
#options DDB # in-kernel debugger
options DIAGNOSTIC # internal consistency checks

View File

@ -1,4 +1,4 @@
# $NetBSD: WARPED,v 1.14 1996/12/07 00:26:19 thorpej Exp $
# $NetBSD: WARPED,v 1.15 1997/01/15 01:28:49 perry Exp $
#
# WARPED - ftp/sup.netbsd.org server machine
#
@ -25,8 +25,7 @@ options XSERVER,UCONSOLE
#options INSECURE # insecure; allow /dev/mem writing for X
maxusers 64 # estimated number of users
options TIMEZONE=480 # time zone to adjust RTC time by
options DST=1 # daylight savings time used by RTC
options RTC_OFFSET=480 # hardware clock is this many mins. west of GMT
#options NTP # NTP phase/frequency locked loop
#options DDB # in-kernel debugger

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.42 1996/11/13 07:00:30 thorpej Exp $ */
/* $NetBSD: clock.c,v 1.43 1997/01/15 01:28:51 perry Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles Hannum.
@ -454,9 +454,7 @@ inittodr(base)
days += yeartoday(i);
n += days * 3600 * 24;
n += tz.tz_minuteswest * 60;
if (tz.tz_dsttime)
n -= 3600;
n += rtc_offset * 60;
if (base < n - 5*SECYR)
printf("WARNING: file system time much less than clock time\n");
@ -501,9 +499,7 @@ resettodr()
bzero(&rtclk, sizeof(rtclk));
splx(s);
diff = tz.tz_minuteswest * 60;
if (tz.tz_dsttime)
diff -= 3600;
diff = rtc_offset * 60;
n = (time.tv_sec - diff) % (3600 * 24); /* hrs+mins+secs */
rtclk[MC_SEC] = dectohexdec(n % 60);
n /= 60;

View File

@ -1,4 +1,4 @@
# $NetBSD: SPOT,v 1.20 1996/12/17 07:33:01 scottr Exp $
# $NetBSD: SPOT,v 1.21 1997/01/15 01:28:52 perry Exp $
#
# SPOT
@ -49,8 +49,7 @@ options COMPAT_11
options COMPAT_12
# SPOT-specific options
options TIMEZONE=360
options DST=1
options RTC_OFFSET=360 # hardware clock is this many mins. west of GMT
config netbsd swap generic

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.31 1996/10/13 03:21:35 christos Exp $ */
/* $NetBSD: clock.c,v 1.32 1997/01/15 01:28:53 perry Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -285,7 +285,7 @@ static u_long ugmt_2_pramt __P((u_long));
static u_long pramt_2_ugmt __P((u_long));
/*
* Convert GMT to Mac PRAM time, using global timezone
* Convert GMT to Mac PRAM time, using rtc_offset
* GMT bias adjustment is done elsewhere.
*/
static u_long
@ -295,18 +295,18 @@ ugmt_2_pramt(t)
/* don't know how to open a file properly. */
/* assume compiled timezone is correct. */
return (t = t + DIFF19041970 - 60 * tz.tz_minuteswest);
return (t = t + DIFF19041970 - 60 * rtc_offset);
}
/*
* Convert a Mac PRAM time value to GMT, using compiled-in timezone
* Convert a Mac PRAM time value to GMT, using rtc_offset
* GMT bias adjustment is done elsewhere.
*/
static u_long
pramt_2_ugmt(t)
u_long t;
{
return (t = t - DIFF19041970 + 60 * tz.tz_minuteswest);
return (t = t - DIFF19041970 + 60 * rtc_offset);
}
/*
@ -338,12 +338,12 @@ inittodr(base)
u_long timbuf;
timbuf = pramt_2_ugmt(pram_readtime());
if ((timbuf - (macos_boottime + 60 * tz.tz_minuteswest)) > 10 * 60) {
if ((timbuf - (macos_boottime + 60 * rtc_offset)) > 10 * 60) {
#if DIAGNOSTIC
printf(
"PRAM time does not appear to have been read correctly.\n");
printf("PRAM: 0x%lx, macos_boottime: 0x%lx.\n",
timbuf, macos_boottime + 60 * tz.tz_minuteswest);
timbuf, macos_boottime + 60 * rtc_offset);
#endif
timbuf = macos_boottime;
mac68k_trust_pram = 0;

View File

@ -1,4 +1,4 @@
# $NetBSD: VME147,v 1.11 1996/12/28 23:23:19 pk Exp $
# $NetBSD: VME147,v 1.12 1997/01/15 01:28:55 perry Exp $
machine mvme68k m68k
@ -9,9 +9,6 @@ options FPCOPROC # Support for MC6888[12] (Required)
maxusers 2
# obsolete timezone spec
options TIMEZONE=0, DST=0
options DIAGNOSTIC, DEBUG
options FFS
options NFSCLIENT

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.17 1996/12/23 08:36:00 matthias Exp $ */
/* $NetBSD: clock.c,v 1.18 1997/01/15 01:28:56 perry Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -207,9 +207,7 @@ inittodr(base)
days += yeartoday(i);
n += days * 3600 * 24;
n += tz.tz_minuteswest * 60;
if (tz.tz_dsttime)
n -= 3600;
n += rtc_offset * 60;
s = splclock();
time.tv_sec = n;
time.tv_usec = csec * 10000;
@ -234,9 +232,7 @@ resettodr()
if (!timeset)
return;
diff = tz.tz_minuteswest * 60;
if (tz.tz_dsttime)
diff -= 3600;
diff = rtc_offset * 60;
s = splclock();
n = (time.tv_sec - diff) % (3600 * 24); /* hrs+mins+secs */

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.4 1997/01/11 09:11:43 mikel Exp $
# $NetBSD: GENERIC,v 1.5 1997/01/15 01:28:57 perry Exp $
#
# Generic configuration file for MIPS R4400 PICA system
#
@ -10,10 +10,6 @@ maxusers 8
# does not really do anything anymore, but this replaces "ident GENERIC"
options GENERIC
# Need to set locally
options TIMEZONE="8*60" # minutes west of GMT (for)
options DST=1 # use daylight savings rules
# Standard system options
options SWAPPAGER # swap pager (anonymous and swap space)
options VNODEPAGER # vnode pager (mapped files)

View File

@ -1,14 +1,10 @@
# $NetBSD: PICA,v 1.5 1996/11/21 03:23:42 jonathan Exp $
# $NetBSD: PICA,v 1.6 1997/01/15 01:28:58 perry Exp $
#
#
include "arch/pica/conf/std.pica"
maxusers 8
# Need to set locally
options TIMEZONE="8*60" # minutes west of GMT (for)
options DST=1 # use daylight savings rules
# Standard system options
options DIAGNOSTIC # extra kernel debugging checks
options DEBUG # extra kernel debugging support

View File

@ -1,7 +1,7 @@
#
# DECstation (3100 or 2100) config file
#
# $NetBSD: DS3100,v 1.3 1996/11/16 23:10:54 jonathan Exp $
# $NetBSD: DS3100,v 1.4 1997/01/15 01:28:59 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -19,13 +19,6 @@ options DS3100 # PMAX (kn01) DECstation 2100, 3100
#options DS5000_240 # 3MAXPLUS (kn03) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0
options DST=0 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
#options DEBUG # extra kernel debugging support

View File

@ -1,7 +1,7 @@
#
# DECstation 5000/240 kernel config
#
# $NetBSD: DS5000_100,v 1.2 1996/11/16 23:10:56 jonathan Exp $
# $NetBSD: DS5000_100,v 1.3 1997/01/15 01:29:00 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -20,13 +20,6 @@ options DS5000_100 # 3MIN (kn02ba/kmin) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0
options DST=0 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
#options DEBUG # extra kernel debugging support

View File

@ -1,7 +1,7 @@
#
# DECstation 5000/200 (KN02 motherboard, codname 3MAX) kernel config
#
# $NetBSD: DS5000_200,v 1.3 1996/11/16 23:10:57 jonathan Exp $
# $NetBSD: DS5000_200,v 1.4 1997/01/15 01:29:01 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -19,13 +19,6 @@ options DS5000_200 # 3MAX (kn02) support
#options DS5000_240 # 3MAXPLUS (kn03) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0
options DST=0 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
#options DEBUG # extra kernel debugging support

View File

@ -1,7 +1,7 @@
#
# DECstation 5000/240 kernel config
#
# $NetBSD: DS5000_240,v 1.3 1996/11/16 23:10:56 jonathan Exp $
# $NetBSD: DS5000_240,v 1.4 1997/01/15 01:29:03 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -20,13 +20,6 @@ options DS5000_240 # 3MAXPLUS (kn03) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0
options DST=0 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
#options DEBUG # extra kernel debugging support

View File

@ -2,7 +2,7 @@
# Sample Config file for DECstation 5000/20 or 5000/25
# (UNTESTED!)
#
# $NetBSD: DS5000_25,v 1.3 1996/11/16 23:10:55 jonathan Exp $
# $NetBSD: DS5000_25,v 1.4 1997/01/15 01:29:04 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -20,14 +20,6 @@ options DS5000_25 # MAXINE (kn02ca/xine) support
#options DS5000_240 # 3MAXPLUS (kn03) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0
options DST=0 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
#options DEBUG # extra kernel debugging support

View File

@ -1,7 +1,7 @@
#
# Stanford DSG Decstation (any model) kernel config file
#
# $NetBSD: DSG,v 1.5 1996/11/16 23:10:58 jonathan Exp $
# $NetBSD: DSG,v 1.6 1997/01/15 01:29:05 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -19,14 +19,6 @@ options DS5000_200 # 3MAX (kn02) support
options DS5000_240 # 3MAXPLUS (kn03) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0
options DST=0 # use daylight savings rules
#options DDB # in-kernel debugger (not mips)
#options DIAGNOSTIC # extra kernel debugging checks
options DEBUG # extra kernel debugging support

View File

@ -2,7 +2,7 @@
# Distribition miniroot kernel (any model) kernel config file
#
# $NetBSD: GENERIC,v 1.8 1996/11/16 23:10:53 jonathan Exp $
# $NetBSD: GENERIC,v 1.9 1997/01/15 01:29:07 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -20,14 +20,6 @@ options DS5000_200 # 3MAX (kn02) support
options DS5000_240 # 3MAXPLUS (kn03) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0
options DST=0 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
#options DEBUG # extra kernel debugging support

View File

@ -3,7 +3,7 @@
# root on NFS to boot diskless for installation,
# disk drivers for labelling disks and installation on local disk.
#
# $NetBSD: INSTALL,v 1.2 1996/11/16 23:10:51 jonathan Exp $
# $NetBSD: INSTALL,v 1.3 1997/01/15 01:29:10 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -21,14 +21,6 @@ options DS5000_200 # 3MAX (kn02) support
options DS5000_240 # 3MAXPLUS (kn03) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0 # minutes west of GMT (for)
options DST=0 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
#options DEBUG # extra kernel debugging support

View File

@ -2,7 +2,7 @@
# DECstation (3100 or 5000/xxx)
#
# Generic config.new configuration for NetBSD/pmax
# $NetBSD: MINIROOT,v 1.4 1996/12/03 01:18:17 cgd Exp $
# $NetBSD: MINIROOT,v 1.5 1997/01/15 01:29:08 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -25,12 +25,6 @@ options DS5000_200 # 3MAX (kn02) support, one day
options DS3100 # PMAX (kn01) DECstation 2100, 3100
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE="0" # minutes west of GMT (for)
options DST=0 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
options DEBUG # extra kernel debugging support

View File

@ -2,7 +2,7 @@
# DECstation (3100 or 5000/xxx)
#
# Generic config.new configuration for NetBSD/pmax
# $NetBSD: NEWCONF,v 1.10 1996/12/03 01:18:19 cgd Exp $
# $NetBSD: NEWCONF,v 1.11 1997/01/15 01:29:09 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -27,12 +27,6 @@ options DS5000_200 # 3MAX (kn02) support, one day
options DS3100 # PMAX (kn01) DECstation 2100, 3100
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE="8*60" # minutes west of GMT (for)
options DST=1 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
options DEBUG # extra kernel debugging support

View File

@ -3,7 +3,7 @@
# root on NFS to boot diskless for installation,
# disk drivers for labelling disks and installation on local disk.
#
# $NetBSD: NFSINSTALL,v 1.2 1996/11/16 23:10:51 jonathan Exp $
# $NetBSD: NFSINSTALL,v 1.3 1997/01/15 01:29:10 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -21,14 +21,6 @@ options DS5000_200 # 3MAX (kn02) support
options DS5000_240 # 3MAXPLUS (kn03) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0 # minutes west of GMT (for)
options DST=0 # use daylight savings rules
# Standard system options
#options DIAGNOSTIC # extra kernel debugging checks
#options DEBUG # extra kernel debugging support

View File

@ -3,7 +3,7 @@
# via NFS booting: root and swap on NFS, but disk drivers included too.
# Prune out other optiosn to stay small and avoid PROM tftp bugs.
#
# $NetBSD: NFSROOT,v 1.3 1996/12/03 01:18:20 cgd Exp $
# $NetBSD: NFSROOT,v 1.4 1997/01/15 01:29:13 perry Exp $
#
include "arch/pmax/conf/std.pmax"
@ -19,14 +19,6 @@ options DS5000_200 # 3MAX (kn02) support
options DS5000_240 # 3MAXPLUS (kn03) support
# You need to set this locally, but it doesn't do much outside the kernel.
# Set up /etc/localtime instead.
options TIMEZONE=0
options DST=0 # use daylight savings rules
# Standard system options
#options DDB # in-kernel debugger (not mips)

View File

@ -1,4 +1,4 @@
# $NetBSD: ALL,v 1.8 1997/01/13 14:04:42 oki Exp $
# $NetBSD: ALL,v 1.9 1997/01/15 01:29:15 perry Exp $
#
# ALL -- everything that's currently supported
@ -15,9 +15,8 @@ options M68030
options M68040
options M68060
# time zone RTC is expected to be set in; REQUIRED
options TIMEZONE=-540 # Set the timezone that the kernel will use
options DST=0 # Set the timezone that the kernel will use
# set to indicate RTC is offset from GMT
options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
# estimated number of users
maxusers 32

View File

@ -1,11 +1,11 @@
# $NetBSD: EMPTY,v 1.2 1996/08/26 23:41:24 mrg Exp $
# $NetBSD: EMPTY,v 1.3 1997/01/15 01:29:16 perry Exp $
#
# EMPTY
#
#--- from std.x68k
# $NetBSD: EMPTY,v 1.2 1996/08/26 23:41:24 mrg Exp $
# $NetBSD: EMPTY,v 1.3 1997/01/15 01:29:16 perry Exp $
#
# standard x68k information
#
@ -45,9 +45,8 @@ maxusers 8
# different CPU types; you must have at least the correct one; REQUIRED
options "M68040"
# time zone RTC is expected to be set in; REQUIRED
options TIMEZONE=-540 # Set the timezone that the kernel will use
options DST=0 # Set the timezone that the kernel will use
# set to indicate RTC is offset from GMT
options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
# standard options
options GENERIC # historical

View File

@ -1,4 +1,4 @@
# $NetBSD: GENERIC,v 1.6 1996/10/27 08:52:05 oki Exp $
# $NetBSD: GENERIC,v 1.7 1997/01/15 01:29:17 perry Exp $
#
# GENERIC
@ -14,9 +14,8 @@ options EXEC_AOUT # a.out format executables
options M68030
options M68040
# time zone RTC is expected to be set in; REQUIRED
options TIMEZONE=-540 # Set the timezone that the kernel will use
options DST=0 # Set the timezone that the kernel will use
# set to indicate RTC is offset from GMT
options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
# estimated number of users
maxusers 8

View File

@ -1,4 +1,4 @@
# $NetBSD: JUPITER,v 1.3 1996/10/27 08:52:06 oki Exp $
# $NetBSD: JUPITER,v 1.4 1997/01/15 01:29:18 perry Exp $
#
# JUPITER
@ -15,9 +15,8 @@ options M68030
options M68040
options M68060
# time zone RTC is expected to be set in; REQUIRED
options TIMEZONE=-540 # Set the timezone that the kernel will use
options DST=0 # Set the timezone that the kernel will use
# set to indicate RTC is offset from GMT
options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
# estimated number of users
maxusers 32

View File

@ -1,4 +1,4 @@
# $NetBSD: MARINE,v 1.3 1996/10/27 09:07:50 oki Exp $
# $NetBSD: MARINE,v 1.4 1997/01/15 01:29:19 perry Exp $
#
# MARINE
@ -15,9 +15,8 @@ options EXEC_AOUT # a.out format executables
#cpu M68030
cpu M68040
# time zone RTC is expected to be set in; REQUIRED
options TIMEZONE=-540 # Set the timezone that the kernel will use
options DST=0 # Set the timezone that the kernel will use
# set to indicate RTC is offset from GMT
options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
# estimated number of users
maxusers 8

View File

@ -1,4 +1,4 @@
# $NetBSD: NBTY,v 1.3 1997/01/08 16:17:29 oki Exp $
# $NetBSD: NBTY,v 1.4 1997/01/15 01:29:20 perry Exp $
#
# ALL -- everything that's currently supported
@ -14,9 +14,8 @@ options EXEC_AOUT # a.out format executables
options M68030
options M68040
# time zone RTC is expected to be set in; REQUIRED
options TIMEZONE=-540 # Set the timezone that the kernel will use
options DST=0 # Set the timezone that the kernel will use
# set to indicate RTC is offset from GMT
options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
# estimated number of users
maxusers 16

View File

@ -1,4 +1,4 @@
# $NetBSD: SMALL,v 1.2 1996/08/26 23:41:38 mrg Exp $
# $NetBSD: SMALL,v 1.3 1997/01/15 01:29:22 perry Exp $
#
# SMALL
@ -13,9 +13,8 @@ maxusers 8
#options "M68030"
options "M68040"
# time zone RTC is expected to be set in; REQUIRED
options TIMEZONE=-540 # Set the timezone that the kernel will use
options DST=0 # Set the timezone that the kernel will use
# set to indicate RTC is offset from GMT
options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
# standard options
options GENERIC # historical

View File

@ -1,7 +1,7 @@
#
# ALL -- everything that's currently supported
#
# $Id: SMALL030,v 1.1.1.1 1996/05/05 12:17:03 oki Exp $
# $Id: SMALL030,v 1.2 1997/01/15 01:29:23 perry Exp $
#
# architecture type and name of kernel; REQUIRED
@ -12,8 +12,8 @@ ident SMALL
cpu "M68030"
#cpu "M68040"
# time zone RTC is expected to be set in; REQUIRED
timezone -9
# set to indicate RTC is offset from GMT
options RTC_OFFSET=-540 # hardware clock is this many mins. west of GMT
# estimated number of users
maxusers 8

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtclock.c,v 1.1.1.1 1996/05/05 12:17:03 oki Exp $ */
/* $NetBSD: rtclock.c,v 1.2 1997/01/15 01:29:25 perry Exp $ */
/*
* Copyright 1993, 1994 Masaru Oki
@ -42,6 +42,7 @@
#include <sys/proc.h>
#include <sys/reboot.h>
#include <sys/file.h>
#include <sys/kernel.h>
#include <x68k/dev/rtclock_var.h>
#include <x68k/x68k/iodevice.h>
@ -114,7 +115,7 @@ rtgettod()
tmp += (day - 1);
tmp = ((tmp * 24 + hour) * 60 + min + TIMEZONE) * 60 + sec;
tmp = ((tmp * 24 + hour) * 60 + min + rtc_offset) * 60 + sec;
return tmp;
}
@ -144,7 +145,7 @@ rtsettod (tim)
if (!rtc_addr)
return 0;
tim -= (TIMEZONE * 60);
tim -= (rtc_offset * 60);
/* prepare values to be written to clock */
day = tim / SECDAY;

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux_compat.c,v 1.27 1996/10/14 06:53:23 thorpej Exp $ */
/* $NetBSD: hpux_compat.c,v 1.28 1997/01/15 01:37:47 perry Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1277,8 +1277,9 @@ hpux_sys_ftime_6x(p, v, retval)
tb.time = time.tv_sec;
tb.millitm = time.tv_usec / 1000;
splx(s);
tb.timezone = tz.tz_minuteswest;
tb.dstflag = tz.tz_dsttime;
/* NetBSD has no kernel notion of timezone -- fake it. */
tb.timezone = 0;
tb.dstflag = 0;
return (copyout((caddr_t)&tb, (caddr_t)SCARG(uap, tp), sizeof (tb)));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ibcs2_misc.c,v 1.22 1996/12/22 23:01:12 fvdl Exp $ */
/* $NetBSD: ibcs2_misc.c,v 1.23 1997/01/15 01:37:49 perry Exp $ */
/*
* Copyright (c) 1994, 1995 Scott Bartram
@ -697,14 +697,14 @@ xenix_sys_ftime(p, v, retval)
syscallarg(struct xenix_timeb *) tp;
} */ *uap = v;
struct timeval tv;
extern struct timezone tz;
struct xenix_timeb itb;
microtime(&tv);
itb.time = tv.tv_sec;
itb.millitm = (tv.tv_usec / 1000);
itb.timezone = tz.tz_minuteswest;
itb.dstflag = tz.tz_dsttime;
/* NetBSD has no kernel notion of timezone -- fake it. */
itb.timezone = 0;
itb.dstflag = 0;
return copyout((caddr_t)&itb, (caddr_t)SCARG(uap, tp), xenix_timeb_len);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.c,v 1.18 1996/10/02 18:05:02 ws Exp $ */
/* $NetBSD: param.c,v 1.19 1997/01/15 01:37:50 perry Exp $ */
/*
* Copyright (c) 1980, 1986, 1989 Regents of the University of California.
@ -72,14 +72,17 @@
* the kernel; it should be modified there to suit local taste
* if necessary.
*
* Compiled with -DHZ=xx -DTIMEZONE=x -DDST=x -DMAXUSERS=xx
* Compiled with -DHZ=xx -DRTC_OFFSET=x -DMAXUSERS=xx
*/
#ifndef TIMEZONE
# define TIMEZONE 0
#ifdef TIMEZONE
#error TIMEZONE is an obsolete kernel option.
#endif
#ifndef DST
# define DST 0
#ifdef DST
#error DST is an obsolete kernel option.
#endif
#ifndef RTC_OFFSET
#define RTC_OFFSET 0
#endif
#ifndef HZ
#define HZ 100
@ -87,7 +90,7 @@
int hz = HZ;
int tick = 1000000 / HZ;
int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */
struct timezone tz = { TIMEZONE, DST };
int rtc_offset = RTC_OFFSET;
#define NPROC (20 + 16 * MAXUSERS)
int maxproc = NPROC;
#define NTEXT (80 + NPROC / 8) /* actually the object cache */

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_sysctl.c,v 1.20 1997/01/09 05:37:41 thorpej Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.21 1997/01/15 01:37:52 perry Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@ -299,6 +299,8 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
if (autoniceval > PRIO_MAX)
autoniceval = PRIO_MAX;
return (error);
case KERN_RTC_OFFSET:
return (sysctl_rdint(oldp, oldlenp, newp, rtc_offset));
default:
return (EOPNOTSUPP);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_time.c,v 1.24 1996/12/22 10:21:11 cgd Exp $ */
/* $NetBSD: kern_time.c,v 1.25 1997/01/15 01:37:53 perry Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -42,6 +42,7 @@
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/signalvar.h>
#include <sys/syslog.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
@ -188,6 +189,7 @@ sys_gettimeofday(p, v, retval)
} */ *uap = v;
struct timeval atv;
int error = 0;
struct timezone tzfake;
if (SCARG(uap, tp)) {
microtime(&atv);
@ -195,8 +197,15 @@ sys_gettimeofday(p, v, retval)
if (error)
return (error);
}
if (SCARG(uap, tzp))
error = copyout(&tz, SCARG(uap, tzp), sizeof (tz));
if (SCARG(uap, tzp)) {
/*
* NetBSD has no kernel notion of timezone, so we just
* fake up a timezone struct and return it if demanded.
*/
tzfake.tz_minuteswest = 0;
tzfake.tz_dsttime = 0;
error = copyout(&tzfake, SCARG(uap, tzp), sizeof (tzfake));
}
return (error);
}
@ -221,13 +230,19 @@ sys_settimeofday(p, v, retval)
if (SCARG(uap, tv) && (error = copyin(SCARG(uap, tv),
&atv, sizeof(atv))))
return (error);
/* XXX since we don't use tz, probably no point in doing copyin. */
if (SCARG(uap, tzp) && (error = copyin(SCARG(uap, tzp),
&atz, sizeof(atz))))
return (error);
if (SCARG(uap, tv))
settime(&atv);
/*
* NetBSD has no kernel notion of timezone, and only an
* obsolete program would try to set it, so we log a warning.
*/
if (SCARG(uap, tzp))
tz = atz;
log(LOG_WARNING, "pid %d attempted to set the "
"(obsolete) kernel timezone.", p->p_pid);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: msdosfs_conv.c,v 1.22 1996/10/25 23:14:07 cgd Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.23 1997/01/15 01:37:54 perry Exp $ */
/*-
* Copyright (C) 1995 Wolfgang Solfrank.
@ -53,7 +53,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/kernel.h> /* defines tz */
#include <sys/kernel.h> /* defines tz XXX */
#include <sys/dirent.h>
#include <sys/vnode.h>
@ -109,7 +109,8 @@ unix2dostime(tsp, ddp, dtp)
* If the time from the last conversion is the same as now, then
* skip the computations and use the saved result.
*/
t = tsp->tv_sec - (tz.tz_minuteswest * 60)
/* XXX NOTE: Removed tz, which is obsolete. Must replace!!! */
t = tsp->tv_sec /* - (tz.tz_minuteswest * 60) */
/* +- daylight savings time correction */ ;
if (lasttime != t) {
lasttime = t;
@ -216,7 +217,8 @@ dos2unixtime(dd, dt, tsp)
days += ((dd & DD_DAY_MASK) >> DD_DAY_SHIFT) - 1;
lastseconds = (days * 24 * 60 * 60) + SECONDSTO1980;
}
tsp->tv_sec = seconds + lastseconds + (tz.tz_minuteswest * 60)
/* XXX NOTE: Removed tz, which is obsolete. Must replace!!! */
tsp->tv_sec = seconds + lastseconds /* + (tz.tz_minuteswest * 60) */
/* -+ daylight savings time correction */ ;
tsp->tv_nsec = 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: kernel.h,v 1.11 1995/03/03 01:24:16 cgd Exp $ */
/* $NetBSD: kernel.h,v 1.12 1997/01/15 01:37:55 perry Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -54,7 +54,8 @@ extern volatile struct timeval mono_time;
extern struct timeval boottime;
extern struct timeval runtime;
extern volatile struct timeval time;
extern struct timezone tz; /* XXX */
extern int rtc_offset; /* offset of rtc from UTC in minutes */
extern int tick; /* usec per tick (1000000 / hz) */
extern int tickfix; /* periodic tick adj. tick not integral */

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysctl.h,v 1.18 1997/01/09 05:33:42 thorpej Exp $ */
/* $NetBSD: sysctl.h,v 1.19 1997/01/15 01:37:56 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@ -138,7 +138,8 @@ struct ctlname {
#define KERN_TIMEX 26 /* struct: ntp timekeeping state */
#define KERN_AUTONICETIME 27 /* int: proc time before autonice */
#define KERN_AUTONICEVAL 28 /* int: auto nice value */
#define KERN_MAXID 29 /* number of valid kern ids */
#define KERN_RTC_OFFSET 29 /* int: offset of rtc from gmt */
#define KERN_MAXID 30 /* number of valid kern ids */
#define CTL_KERN_NAMES { \
{ 0, 0 }, \
@ -170,6 +171,7 @@ struct ctlname {
{ "timex", CTLTYPE_STRUCT }, \
{ "autonicetime", CTLTYPE_INT }, \
{ "autoniceval", CTLTYPE_INT }, \
{ "rtc_offset", CTLTYPE_INT }, \
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: time.h,v 1.20 1996/11/20 00:30:51 jtc Exp $ */
/* $NetBSD: time.h,v 1.21 1997/01/15 01:37:57 perry Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -66,17 +66,14 @@ struct timespec {
(tv)->tv_usec = (ts)->tv_nsec / 1000; \
}
/*
* Note: timezone is obsolete. All timezone handling is now in
* userland. Its just here for back compatibility.
*/
struct timezone {
int tz_minuteswest; /* minutes west of Greenwich */
int tz_dsttime; /* type of dst correction */
};
#define DST_NONE 0 /* not on dst */
#define DST_USA 1 /* USA style dst */
#define DST_AUST 2 /* Australian style dst */
#define DST_WET 3 /* Western European dst */
#define DST_MET 4 /* Middle European dst */
#define DST_EET 5 /* Eastern European dst */
#define DST_CAN 6 /* Canada */
/* Operations on timevals. */
#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0