diff -ur --exclude '*.orig' grub-0.96-orig/grub/asmstub.c grub-0.96/grub/asmstub.c --- grub-0.96-orig/grub/asmstub.c 2005-04-05 20:25:52.000000000 -0400 +++ grub-0.96/grub/asmstub.c 2005-04-05 20:26:05.000000000 -0400 @@ -91,7 +91,7 @@ static jmp_buf env_for_exit; /* The current color for console. */ -static int console_current_color = A_NORMAL; +int console_current_color = A_NORMAL; /* The file descriptor for a serial device. */ static int serial_fd = -1; @@ -162,31 +162,33 @@ size_t simstack_size, page_size; int i; + auto void doit (void); + /* We need a nested function so that we get a clean stack frame, regardless of how the code is optimized. */ - static volatile void doit () - { - /* Make sure our stack lives in the simulated memory area. */ - asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n" - : "=&r" (realstack) : "r" (simstack)); - - /* Do a setjmp here for the stop command. */ - if (! setjmp (env_for_exit)) - { - /* Actually enter the generic stage2 code. */ - status = 0; - init_bios_info (); - } - else - { - /* If ERRNUM is non-zero, then set STATUS to non-zero. */ - if (errnum) - status = 1; - } - - /* Replace our stack before we use any local variables. */ - asm volatile ("movl %0, %%esp\n" : : "r" (realstack)); - } + auto void doit (void) + { + /* Make sure our stack lives in the simulated memory area. */ + asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n" + : "=&r" (realstack) : "r" (simstack)); + + /* Do a setjmp here for the stop command. */ + if (! setjmp (env_for_exit)) + { + /* Actually enter the generic stage2 code. */ + status = 0; + init_bios_info (); + } + else + { + /* If ERRNUM is non-zero, then set STATUS to non-zero. */ + if (errnum) + status = 1; + } + + /* Replace our stack before we use any local variables. */ + asm volatile ("movl %0, %%esp\n" : : "r" (realstack)); + } assert (grub_scratch_mem == 0); diff -ur --exclude '*.orig' grub-0.96-orig/lib/device.c grub-0.96/lib/device.c --- grub-0.96-orig/lib/device.c 2005-04-05 20:25:52.000000000 -0400 +++ grub-0.96/lib/device.c 2005-04-05 20:26:05.000000000 -0400 @@ -499,12 +499,15 @@ static int read_device_map (FILE *fp, char **map, const char *map_file) { - static void show_error (int no, const char *msg) + auto void show_error (int no, const char *msg); + auto void show_warning (int no, const char *msg, ...); + + auto void show_error (int no, const char *msg) { fprintf (stderr, "%s:%d: error: %s\n", map_file, no, msg); } - static void show_warning (int no, const char *msg, ...) + auto void show_warning (int no, const char *msg, ...) { va_list ap; diff -ur --exclude '*.orig' grub-0.96-orig/stage2/builtins.c grub-0.96/stage2/builtins.c --- grub-0.96-orig/stage2/builtins.c 2005-04-05 20:25:52.000000000 -0400 +++ grub-0.96/stage2/builtins.c 2005-04-05 20:26:05.000000000 -0400 @@ -626,8 +626,10 @@ "white" }; + auto int color_number (char *str); + /* Convert the color name STR into the magical number. */ - static int color_number (char *str) + auto int color_number (char *str) { char *ptr; int i; @@ -3804,7 +3806,10 @@ int to_code, from_code; int map_in_interrupt = 0; - static int find_key_code (char *key) + auto int find_key_code (char *key); + auto int find_ascii_code (char *key); + + auto int find_key_code (char *key) { int i; @@ -3821,7 +3826,7 @@ return 0; } - static int find_ascii_code (char *key) + auto int find_ascii_code (char *key) { int i; diff -ur --exclude '*.orig' grub-0.96-orig/stage2/char_io.c grub-0.96/stage2/char_io.c --- grub-0.96-orig/stage2/char_io.c 2005-04-05 20:25:52.000000000 -0400 +++ grub-0.96/stage2/char_io.c 2005-04-05 20:26:49.000000000 -0400 @@ -1226,7 +1226,9 @@ return ! errnum; # endif # else /* __PIC__ */ - static int start_addr (void) + auto int start_addr(void); + + auto int start_addr (void) { int ret; # if defined(HAVE_START_SYMBOL) @@ -1239,7 +1241,9 @@ return ret; } - static int end_addr (void) + auto int end_addr(void); + + auto int end_addr (void) { int ret; # if defined(HAVE_END_SYMBOL) diff -ur --exclude '*.orig' grub-0.96-orig/stage2/smp-imps.h grub-0.96/stage2/smp-imps.h --- grub-0.96-orig/stage2/smp-imps.h 2005-04-05 20:25:52.000000000 -0400 +++ grub-0.96/stage2/smp-imps.h 2005-04-05 20:26:05.000000000 -0400 @@ -183,36 +183,6 @@ */ /* - * "imps_any_new_apics" is non-zero if any of the APICS (local or I/O) - * are *not* an 82489DX. This is useful to determine if more than 15 - * CPUs can be supported (true if zero). - */ -extern int imps_any_new_apics; - -/* - * "imps_enabled" is non-zero if the probe sequence found IMPS - * information and was successful. - */ -extern int imps_enabled; - -/* - * This contains the local APIC hardware address. - */ -extern unsigned imps_lapic_addr; - -/* - * This represents the number of CPUs found. - */ -extern int imps_num_cpus; - -/* - * These map from virtual cpu numbers to APIC id's and back. - */ -extern unsigned char imps_cpu_apic_map[IMPS_MAX_CPUS]; -extern unsigned char imps_apic_cpu_map[IMPS_MAX_CPUS]; - - -/* * This is the primary function for probing for Intel MPS 1.1/1.4 * compatible hardware and BIOS information. While probing the CPUs * information returned from the BIOS, this also starts up each CPU