From: alane@wozzle.linet.org Subject: Patch to compile 0.99.9 kernel with gcc 2.4.x Date: 29 May 1993 10:53:33 GMT
The file keyboard.c in the 0.99.9 kernel contains some (technically
incorrect) code that happily compiles under gcc 2.3.3. Having ftp'd
gcc 2.4.0 and the patch release 2.4.1, I went to recompile my kernel
(I know, I know, so I like to live dangerously) and keyboard.c no
longer compiles. The following is a context diff showing the changes
that need to be made; I believe it is suitable for use with the 'patch'
utility.
----8<----8<----8<----8<----8<----8<----8<----8<----8<----
diff -r --context linux.99.9/kernel/chr_drv/keyboard.c linux/kernel/chr_drv/keyboard.c
*** linux.99.9/kernel/chr_drv/keyboard.c Sat May 29 00:24:41 1993
--- linux/kernel/chr_drv/keyboard.c Sat May 29 00:29:57 1993
***************
*** 65,72 ****
static int diacr = -1;
static int npadch = 0;
- fptr key_table[];
static void put_queue(int);
static void applkey(int);
static void cur(int);
--- 65,74 ----
static int diacr = -1;
static int npadch = 0;
+ #define KTABSIZE 256
+ static fptr key_table[KTABSIZE];
+
static void put_queue(int);
static void applkey(int);
static void cur(int);
***************
*** 1421,1427 ****
}
}
! static fptr key_table[] = {
none,do_self,do_self,do_self, /* 00-03 s0 esc 1 2 */
do_self,do_self,do_self,do_self, /* 04-07 3 4 5 6 */
do_self,do_self,do_self,do_self, /* 08-0B 7 8 9 0 */
--- 1423,1429 ----
}
}
! static fptr key_table[KTABSIZE] = {
none,do_self,do_self,do_self, /* 00-03 s0 esc 1 2 */
do_self,do_self,do_self,do_self, /* 04-07 3 4 5 6 */
do_self,do_self,do_self,do_self, /* 08-0B 7 8 9 0 */
----8<----8<----8<----8<----8<----8<----8<----8<----8<----
BTW the kernel compiled with gcc 2.4.1 works just fine :-)
-- J. Alan Eldridge (alane@wozzle.linet.org)