Subject: port-hp300/3118: config.old stil wants to use TIMEZONE and DST
To: None <gnats-bugs@gnats.netbsd.org>
From: None <frueauf@ira.uka.de>
List: netbsd-bugs
Date: 01/17/1997 17:38:27
>Number: 3118
>Category: port-hp300
>Synopsis: config.old stil wants to use TIMEZONE and DST
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 17 09:05:01 1997
>Last-Modified:
>Originator: Thorsten Frueauf
>Organization:
private
>Release: <NetBSD-current source date> NetBSD current 16.01.1997
>Environment:
NetBSD cybersil 1.2B NetBSD 1.2B (Milano) #1: Wed Jan 15 00:39:16 MET 1997 milano@cybersil:/usr/src/sys/arch/hp300/compile/Milano hp300
>Description:
/usr/sbin/config.old did not get updated with the recent change that made
TIMEZONE and DST obsolet. So compiling a kernel on NetBSD/hp300 breaks.
>How-To-Repeat:
Try to build a new kernel on the hp300 and watch:
cc -O2 -Werror -msoft-float -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -D
MILANO -DHP380 -DHP375 -DHP370 -DHP360 -DHP350 -DHP340 -DHP330 -DHP320 -DDDB -DC
OMPAT_HPUX -DSE_KEYBOARD -DUK_KEYBOARD -DCOMPAT_NOLABEL -DUSELEDS -DFPSP -DPFIL_
HOOKS -DTCP_COMPAT_42 -DMROUTING -DGATEWAY -DINET -DMFS -DPROCFS -DFDESC -DKERNF
S -DUNION -DNFSCLIENT -DNFSSERVER -DCD9660 -DQUOTA -DFFS -DFIFO -DEXEC_AOUT -DEX
EC_SCRIPT -DNKMEMCLUSTERS=1024 -DKTRACE -DSYSVMSG -DSYSVSEM -DSYSVSHM -DCOMPAT_1
2 -DCOMPAT_11 -DCOMPAT_10 -DCOMPAT_09 -DCOMPAT_44 -DCOMPAT_43 -DDEVPAGER -DVNODE
PAGER -DSWAPPAGER -DTIMEZONE=480 -DDST=1 -DMAXUSERS=32 -D_KERNEL -Dmc68020 -Dhp
300 -DFPCOPROC -c param.c
param.c:79: #error TIMEZONE is an obsolete kernel option.
param.c:82: #error DST is an obsolete kernel option.
*** Error code 1
>Fix:
Apply the following patch to /src/usr.sbin/config.old:
*** config.h-orig Wed Oct 16 05:34:21 1996
--- config.h Fri Jan 17 17:22:09 1997
***************
*** 195,202 ****
struct file_list *ftab, *conf_list, **confp, *comp_list, **compp;
- int zone, hadtz;
- int dst;
int profiling;
int debugging;
--- 195,200 ----
*** config.y-orig Wed Oct 16 05:34:21 1996
--- config.y Fri Jan 17 17:43:12 1997
***************
*** 19,25 ****
%token DISK
%token DRIVE
%token DRQ
- %token DST
%token DUMPS
%token EQUALS
%token FLAGS
--- 19,24 ----
***************
*** 52,58 ****
%token SIZE
%token SLAVE
%token SWAP
- %token TIMEZONE
%token TTY
%token TRACE
%token VECTOR
--- 51,56 ----
***************
*** 176,205 ****
|
HZ NUMBER
= { yyerror("HZ specification obsolete; delete"); } |
- TIMEZONE NUMBER
- = { zone = 60 * $2; check_tz(); } |
- TIMEZONE NUMBER DST NUMBER
- = { zone = 60 * $2; dst = $4; check_tz(); } |
- TIMEZONE NUMBER DST
- = { zone = 60 * $2; dst = 1; check_tz(); } |
- TIMEZONE FPNUMBER
- = { zone = $2; check_tz(); } |
- TIMEZONE FPNUMBER DST NUMBER
- = { zone = $2; dst = $4; check_tz(); } |
- TIMEZONE FPNUMBER DST
- = { zone = $2; dst = 1; check_tz(); } |
- TIMEZONE MINUS NUMBER
- = { zone = -60 * $3; check_tz(); } |
- TIMEZONE MINUS NUMBER DST NUMBER
- = { zone = -60 * $3; dst = $5; check_tz(); } |
- TIMEZONE MINUS NUMBER DST
- = { zone = -60 * $3; dst = 1; check_tz(); } |
- TIMEZONE MINUS FPNUMBER
- = { zone = -$3; check_tz(); } |
- TIMEZONE MINUS FPNUMBER DST NUMBER
- = { zone = -$3; dst = $5; check_tz(); } |
- TIMEZONE MINUS FPNUMBER DST
- = { zone = -$3; dst = 1; check_tz(); } |
MAXUSERS NUMBER
= { maxusers = $2; };
--- 174,179 ----
***************
*** 862,878 ****
dev->d_addr = ((manuf & 0xffff) << 16) | (prod & 0xffff);
}
- /*
- * Check the timezone to make certain it is sensible
- */
-
- check_tz()
- {
- if (abs(zone) > 12 * 60)
- yyerror("timezone is unreasonable");
- else
- hadtz = 1;
- }
/*
* Check system specification and apply defaulting
--- 836,841 ----
*** lang.l-orig Wed Oct 16 05:34:22 1996
--- lang.l Fri Jan 17 17:42:52 1997
***************
*** 60,66 ****
{ "device", DEVICE },
{ "disk", DISK },
{ "drive", DRIVE },
- { "dst", DST },
{ "dumps", DUMPS },
{ "flags", FLAGS },
{ "hz", HZ },
--- 60,65 ----
***************
*** 86,92 ****
{ "slave", SLAVE },
{ "swap", SWAP },
{ "tape", DEVICE },
- { "timezone", TIMEZONE },
{ "trace", TRACE },
{ "vector", VECTOR },
{ 0, 0 },
--- 85,90 ----
*** mkmakefile.c-orig Wed Oct 16 05:34:22 1996
--- mkmakefile.c Fri Jan 17 17:50:56 1997
***************
*** 168,175 ****
else
fprintf(ofp, " -D%s", op->op_name);
fprintf(ofp, "\n");
- if (hadtz == 0)
- printf("timezone not specified; gmt assumed\n");
if ((unsigned)machine > NUSERS) {
printf("maxusers config info isn't present, using vax\n");
up = &users[MACHINE_HP300-1];
--- 168,173 ----
***************
*** 183,190 ****
maxusers = up->u_min;
} else if (maxusers > up->u_max)
printf("warning: maxusers > %d (%d)\n", up->u_max, maxusers);
! fprintf(ofp, "PARAM=-DTIMEZONE=%d -DDST=%d -DMAXUSERS=%d\n",
! zone, dst, maxusers);
if (loadaddress != -1) {
fprintf(ofp, "LOAD_ADDRESS=%X\n", loadaddress);
}
--- 181,187 ----
maxusers = up->u_min;
} else if (maxusers > up->u_max)
printf("warning: maxusers > %d (%d)\n", up->u_max, maxusers);
! fprintf(ofp,"PARAM=-DMAXUSERS=%d\n", maxusers);
if (loadaddress != -1) {
fprintf(ofp, "LOAD_ADDRESS=%X\n", loadaddress);
}
>Audit-Trail:
>Unformatted:
config.old stil wants to use TIMEZONE and DST which breaks compiling a kernel