Subject: port-i386/4189: pccons doesn't compile if national keyboard map is used
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Scheler <tron@lyssa.owl.de>
List: netbsd-bugs
Date: 09/29/1997 23:55:46
>Number:         4189
>Category:       port-i386
>Synopsis:       pccons doesn't compile if national keyboard map is used
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 29 15:05:02 1997
>Last-Modified:
>Originator:     Matthias Scheler
>Organization:
Mario Kemper Maintenance Project
>Release:        970923
>Environment:
NetBSD colwyn 1.2G NetBSD 1.2G (COLWYN) #1: Mon Sep 29 20:39:20 MET DST 1997     root@:/home/src/sys/arch/i386/compile/COLWYN i386

>Description:
When I tried to compile a kernel using pccons with a german keyboard layout
the compiler failed at "pccons.c" due to an invalid array initializer:

cc  -O2 -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -I. -I../../../../arch -I../../../.. -nostdinc -DEXEC_AOUT -DEXEC_SCRIPT -DI486_CPU -DXSERVER -DUCONSOLE -DDDB -DDIAGNOSTIC -DKTRACE -DSYSVMSG -DSYSVSEM -DSYSVSHM -DCOMPAT_NOMID -DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_11 -DCOMPAT_12 -DCOMPAT_43 -DTCP_COMPAT_42 -DCOMPAT_SVR4 -DCOMPAT_IBCS2 -DCOMPAT_LINUX -DCOMPAT_FREEBSD -DEXEC_ELF32 -DUSER_LDT -DLKM -DFFS -DEXT2FS -DLFS -DNFS -DUNION -DQUOTA -DNFSSERVER -DFIFO -DGATEWAY -DINET -DPFIL_HOOKS -DPPP_BSDCOMP -DMAXSSIZ="0x2000000" -DGERMAN_KBD -DMAXUSERS=32 -D_KERNEL  -Di386  -c ../../../../arch/i386/isa/pccons.c
cc1: warnings being treated as errors
../../../../arch/i386/isa/pccons.c:1661: warning: missing braces around initializer for `scan_codes[0]'
*** Error code 1

Stop.

>How-To-Repeat:
Try to compile a kernel with these options:
pc0     at isa? port 0x60 irq 1         # generic PC console device
options GERMAN_KBD

>Fix:
[The patch has a size of >35KB so I decided to crunch it.]

begin 644 pccons.patch.gz
M'XL(`",=,#0"`^V<:WO4-A:`/Z>_0H1VV0VY6/)M#+W1$"Y;")1`;X2EDTD&
M`B$)F82&!OK;UY+/T9%DV5$@T-"J3^OQU._QV)*OKT[.S,P,F^R-%B:O)PO#
MO='3A<UT4"QL3H8+NZ/1SO9D?C2_L[?Y9&KE8)M=.7C"1,9X>HD/+J4#QJNJ
M_&QN;NZ8%4S=WMEF*QN[3%1,I)=$<4FN1,;.V/^P_=>[&^L;8S;9WSL8[;,C
M"3">BW26%WG!)/,98^<WQQ*Z=F]I>?'&X^^_NUK_O_K?R?YP?W/$5D;#[<?U
M\JF)G!GMK&],'CYB7]4K.\>FEN\L+\U.34_;_RW,L(0=;!],-M;9S(+DKJPL
MWKQ9+UQ-TG2Z]<GPLP[D;&EE<;B[X03^2])\&N>:'Q$U[:P_S14DU,H%5U_^
M;.BTYAU:;7"S(6KV?$-F-6N3%^32;!KGCAHNKTF;^[=<FD_CW,.&*VK2YN;D
MTF(:Y]XT7%F3K?U))%#"_B2RL7YKZ$'-V_1C20V@79N0U8:M:MI=<Z:(JEES
MHK[\KZ%Y4@>T<+4A:H)?O@6<U]UMX_]IUEHH3'UY!*Q@<P[[E5Q\44_>`IC6
MQYBS#;QL=@H_$YX8WV50QM:&H^>3W>'(/8!6]Q&5<PR_[T-@SO:':T[(4!)7
MFE]*U)$T!+I@+QWV#[GX5VAZ(7_@#V!+]KO#;DAL"=:;2W8#V`%S-WM/8O<:
M5JCU[@%;L3V'57MT'UAUL,+>B83M.^QKN?@7V%ZU;Z^!Y>RUPQ[(Q0]@O6I[
M#X`5[,!A-R5V$WI'K7<3V)1M.NR.7'P'V%*N=P?8C.TX[*[$[L(VJ%[?!39G
MN\!V7HQ$P1XZZ_N\.4`S=?)_CA/)ENR1>^BH3H#IMIZ7\(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