--- grub-0.95/configure.ac.gcc4 2005-03-02 23:17:04.000000000 -0500
+++ grub-0.95/configure.ac 2005-03-02 23:17:30.000000000 -0500
@@ -120,7 +120,7 @@
AC_SUBST(GRUB_CFLAGS)
# Enforce coding standards.
-CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused -Wshadow"
+CPPFLAGS="$CPPFLAGS -Wall -Wunused -Wshadow"
CPPFLAGS="$CPPFLAGS -Wpointer-arith"
AC_CACHE_CHECK([whether -Wundef works], undef_flag, [
--- grub-0.95/stage2/builtins.c.gcc4 2005-03-02 23:19:49.000000000 -0500
+++ grub-0.95/stage2/builtins.c 2005-03-02 23:27:47.000000000 -0500
@@ -614,87 +614,88 @@
/* Set new colors used for the menu interface. Support two methods to
specify a color name: a direct integer representation and a symbolic
color name. An example of the latter is "blink-light-gray/blue". */
-static int
-color_func (char *arg, int flags)
+static const char * const color_list[16] =
{
- char *normal;
- char *highlight;
- int new_normal_color;
- int new_highlight_color;
- static char *color_list[16] =
- {
- "black",
- "blue",
- "green",
- "cyan",
- "red",
- "magenta",
- "brown",
- "light-gray",
- "dark-gray",
- "light-blue",
- "light-green",
- "light-cyan",
- "light-red",
- "light-magenta",
- "yellow",
- "white"
- };
+ "black",
+ "blue",
+ "green",
+ "cyan",
+ "red",
+ "magenta",
+ "brown",
+ "light-gray",
+ "dark-gray",
+ "light-blue",
+ "light-green",
+ "light-cyan",
+ "light-red",
+ "light-magenta",
+ "yellow",
+ "white"
+};
- /* Convert the color name STR into the magical number. */
- static int color_number (char *str)
+/* Convert the color name STR into the magical number. */
+static int color_number (char *str)
+{
+ char *ptr;
+ int i;
+ int color = 0;
+
+ /* Find the separator. */
+ for (ptr = str; *ptr && *ptr != '/'; ptr++)
+ ;
+
+ /* If not found, return -1. */
+ if (! *ptr)
+ return -1;
+
+ /* Terminate the string STR. */
+ *ptr++ = 0;
+
+ /* If STR contains the prefix "blink-", then set the `blink' bit
+ in COLOR. */
+ if (substring ("blink-", str) <= 0)
{
- char *ptr;
- int i;
- int color = 0;
-
- /* Find the separator. */
- for (ptr = str; *ptr && *ptr != '/'; ptr++)
- ;
+ color = 0x80;
+ str += 6;
+ }
+
+ /* Search for the color name. */
+ for (i = 0; i < 16; i++)
+ if (grub_strcmp (color_list[i], str) == 0)
+ {
+ color |= i;
+ break;
+ }
- /* If not found, return -1. */
- if (! *ptr)
- return -1;
-
- /* Terminate the string STR. */
- *ptr++ = 0;
-
- /* If STR contains the prefix "blink-", then set the `blink' bit
- in COLOR. */
- if (substring ("blink-", str) <= 0)
- {
- color = 0x80;
- str += 6;
- }
-
- /* Search for the color name. */
- for (i = 0; i < 16; i++)
- if (grub_strcmp (color_list[i], str) == 0)
- {
- color |= i;
- break;
- }
+ if (i == 16)
+ return -1;
- if (i == 16)
- return -1;
+ str = ptr;
+ nul_terminate (str);
- str = ptr;
- nul_terminate (str);
+ /* Search for the color name. */
+ for (i = 0; i < 8; i++)
+ if (grub_strcmp (color_list[i], str) == 0)
+ {
+ color |= i << 4;
+ break;
+ }
- /* Search for the color name. */
- for (i = 0; i < 8; i++)
- if (grub_strcmp (color_list[i], str) == 0)
- {
- color |= i << 4;
- break;
- }
+ if (i == 8)
+ return -1;
- if (i == 8)
- return -1;
+ return color;
+}
+
+static int
+color_func (char *arg, int flags)
+{
+ char *normal;
+ char *highlight;
+ int new_normal_color;
+ int new_highlight_color;
- return color;
- }
-
normal = arg;
highlight = skip_to (0, arg);
@@ -810,13 +813,15 @@
/* default */
+#if !defined(SUPPORT_DISKLESS) && !defined(GRUB_UTIL)
+static int savedefault_helper(int);
+#endif
static int
default_func (char *arg, int flags)
{
#ifndef SUPPORT_DISKLESS
#ifndef GRUB_UTIL
/* Has a forced once-only default been specified? */
- static int savedefault_helper(int);
if ((saved_entryno & STAGE2_ONCEONLY_ENTRY) != 0)
{
int old_defaults=saved_entryno & ~STAGE2_ONCEONLY_ENTRY;
@@ -3831,47 +3834,47 @@
{"delete", 0, 0x7f, 0, 0x53}
};
-static int
-setkey_func (char *arg, int flags)
+static int find_key_code (char *key)
{
- char *to_key, *from_key;
- int to_code, from_code;
- int map_in_interrupt = 0;
-
- static int find_key_code (char *key)
- {
- int i;
+ int i;
- for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
- {
- if (keysym_table[i].unshifted_name &&
- grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
- return keysym_table[i].keycode;
- else if (keysym_table[i].shifted_name &&
- grub_strcmp (key, keysym_table[i].shifted_name) == 0)
- return keysym_table[i].keycode;
- }
-
- return 0;
+ for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
+ {
+ if (keysym_table[i].unshifted_name &&
+ grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
+ return keysym_table[i].keycode;
+ else if (keysym_table[i].shifted_name &&
+ grub_strcmp (key, keysym_table[i].shifted_name) == 0)
+ return keysym_table[i].keycode;
}
- static int find_ascii_code (char *key)
+ return 0;
+}
+
+static int find_ascii_code (char *key)
+{
+ int i;
+
+ for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
{
- int i;
-
- for (i = 0; i < sizeof (keysym_table) / sizeof (keysym_table[0]); i++)
- {
- if (keysym_table[i].unshifted_name &&
- grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
- return keysym_table[i].unshifted_ascii;
- else if (keysym_table[i].shifted_name &&
- grub_strcmp (key, keysym_table[i].shifted_name) == 0)
- return keysym_table[i].shifted_ascii;
- }
-
- return 0;
+ if (keysym_table[i].unshifted_name &&
+ grub_strcmp (key, keysym_table[i].unshifted_name) == 0)
+ return keysym_table[i].unshifted_ascii;
+ else if (keysym_table[i].shifted_name &&
+ grub_strcmp (key, keysym_table[i].shifted_name) == 0)
+ return keysym_table[i].shifted_ascii;
}
+ return 0;
+}
+
+static int
+setkey_func (char *arg, int flags)
+{
+ char *to_key, *from_key;
+ int to_code, from_code;
+ int map_in_interrupt = 0;
+
to_key = arg;
from_key = skip_to (0, to_key);
--- grub-0.95/stage2/term.h.gcc4 2005-03-02 23:34:30.000000000 -0500
+++ grub-0.95/stage2/term.h 2005-03-02 23:34:32.000000000 -0500
@@ -142,7 +142,7 @@
void graphics_cls(void);
void graphics_setcolorstate (color_state state);
void graphics_setcolor (int normal_color, int highlight_color);
-void graphics_setcursor (int on);
+int graphics_setcursor (int on);
int graphics_init(void);
void graphics_end(void);
--- grub-0.95/stage2/shared.h.gcc4 2005-03-02 23:39:41.000000000 -0500
+++ grub-0.95/stage2/shared.h 2005-03-02 23:40:09.000000000 -0500
@@ -868,7 +868,7 @@
#endif
/* C library replacement functions with identical semantics. */
-void grub_printf (const char *format,...);
+void grub_printf (char *format,...);
int grub_sprintf (char *buffer, const char *format, ...);
int grub_tolower (int c);
int grub_isspace (int c);
--- grub-0.95/stage2/iso9660.h.gcc4 2005-03-02 23:44:39.000000000 -0500
+++ grub-0.95/stage2/iso9660.h 2005-03-02 23:45:14.000000000 -0500
@@ -73,11 +73,11 @@
typedef struct __iso_16bit {
u_int16_t l, b;
-} iso_16bit_t __attribute__ ((packed));
+} iso_16bit_t;
typedef struct __iso_32bit {
u_int32_t l, b;
-} iso_32bit_t __attribute__ ((packed));
+} iso_32bit_t;
typedef u_int8_t iso_date_t[7];
--- grub-0.95/stage2/fsys_vstafs.c.gcc4 2005-03-03 01:53:13.000000000 -0500
+++ grub-0.95/stage2/fsys_vstafs.c 2005-03-03 01:53:41.000000000 -0500
@@ -186,35 +186,35 @@
int
vstafs_read (char *addr, int len)
{
- struct alloc *a;
+ struct alloc *al;
int size, ret = 0, offset, curr_len = 0;
- int curr_ext;
+ int this_ext;
char extent;
int ext_size;
char *curr_pos;
get_file_info (f_sector);
size = FILE_INFO->len-VSTAFS_START_DATA;
- a = FILE_INFO->blocks;
+ al = FILE_INFO->blocks;
if (filepos > 0)
{
- if (filepos < a[0].a_len * 512 - VSTAFS_START_DATA)
+ if (filepos < al[0].a_len * 512 - VSTAFS_START_DATA)
{
offset = filepos + VSTAFS_START_DATA;
extent = 0;
- curr_len = a[0].a_len * 512 - offset - filepos;
+ curr_len = al[0].a_len * 512 - offset - filepos;
}
else
{
- ext_size = a[0].a_len * 512 - VSTAFS_START_DATA;
+ ext_size = al[0].a_len * 512 - VSTAFS_START_DATA;
offset = filepos - ext_size;
extent = 1;
do
{
curr_len -= ext_size;
offset -= ext_size;
- ext_size = a[extent+1].a_len * 512;
+ ext_size = al[extent+1].a_len * 512;
}
while (extent < FILE_INFO->extents && offset>ext_size);
}
@@ -223,16 +223,16 @@
{
offset = VSTAFS_START_DATA;
extent = 0;
- curr_len = a[0].a_len * 512 - offset;
+ curr_len = al[0].a_len * 512 - offset;
}
curr_pos = addr;
if (curr_len > len)
curr_len = len;
- for (curr_ext=extent;
- curr_ext < FILE_INFO->extents;
- curr_len = a[curr_ext].a_len * 512, curr_pos += curr_len, curr_ext++)
+ for (this_ext=extent;
+ this_ext < FILE_INFO->extents;
+ curr_len = al[this_ext].a_len * 512, curr_pos += curr_len, this_ext++)
{
ret += curr_len;
size -= curr_len;
@@ -242,7 +242,7 @@
curr_len += size;
}
- devread (a[curr_ext].a_start,offset, curr_len, curr_pos);
+ devread (al[this_ext].a_start,offset, curr_len, curr_pos);
offset = 0;
}
--- grub-0.95/stage2/fsys_xfs.c.gcc4 2005-03-03 01:54:38.000000000 -0500
+++ grub-0.95/stage2/fsys_xfs.c 2005-03-03 02:12:34.000000000 -0500
@@ -97,8 +97,8 @@
return ino & XFS_INO_MASK(XFS_INO_OFFSET_BITS);
}
-static inline __const__ xfs_uint16_t
-le16 (xfs_uint16_t x)
+static inline xfs_uint16_t __attribute__((__const__))
+le16 (xfs_uint16_t x)
{
__asm__("xchgb %b0,%h0" \
: "=q" (x) \
@@ -106,7 +106,7 @@
return x;
}
-static inline __const__ xfs_uint32_t
+static inline xfs_uint32_t __attribute__((__const__))
le32 (xfs_uint32_t x)
{
#if 0
@@ -122,7 +122,7 @@
return x;
}
-static inline __const__ xfs_uint64_t
+static inline xfs_uint64_t __attribute__((__const__))
le64 (xfs_uint64_t x)
{
xfs_uint32_t h = x >> 32;
--- grub-0.95/stage2/smp-imps.h.gcc4 2005-03-03 02:13:29.000000000 -0500
+++ grub-0.95/stage2/smp-imps.h 2005-03-03 02:17:58.000000000 -0500
@@ -182,6 +182,7 @@
* Exported globals here.
*/
+#if 0
/*
* "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
@@ -211,6 +212,7 @@
extern unsigned char imps_cpu_apic_map[IMPS_MAX_CPUS];
extern unsigned char imps_apic_cpu_map[IMPS_MAX_CPUS];
+#endif
/*
* This is the primary function for probing for Intel MPS 1.1/1.4
--- grub-0.95/stage2/graphics.c.gcc4 2005-03-03 00:20:58.000000000 -0500
+++ grub-0.95/stage2/graphics.c 2005-03-03 02:21:39.000000000 -0500
@@ -253,16 +253,16 @@
graphics_setcolorstate (graphics_color_state);
}
-void graphics_setcursor (int on) {
+int graphics_setcursor (int on) {
/* FIXME: we don't have a cursor in graphics */
- return;
+ return 0;
}
/* Open the file, and search for a valid XPM header. Return 1 if one is found,
* leaving the current position as the start of the next line. Else,
* return 0.
*/
-int xpm_open(const char *s) {
+int xpm_open(char *s) {
char buf, prev, target[]="/* XPM */\n";
int pos=0;
--- grub-0.95/grub/Makefile.am.gcc4 2005-03-03 02:27:14.000000000 -0500
+++ grub-0.95/grub/Makefile.am 2005-03-03 02:27:20.000000000 -0500
@@ -13,7 +13,7 @@
$(SERIAL_FLAGS) -I$(top_srcdir)/stage2 \
-I$(top_srcdir)/stage1 -I$(top_srcdir)/lib
-AM_CFLAGS = $(GRUB_CFLAGS) -fwritable-strings
+AM_CFLAGS = $(GRUB_CFLAGS)
grub_SOURCES = main.c asmstub.c
grub_LDADD = ../stage2/libgrub.a ../lib/libcommon.a $(GRUB_LIBS)
--- grub-0.95/stage2/Makefile.am.gcc4 2005-03-03 02:27:49.000000000 -0500
+++ grub-0.95/stage2/Makefile.am 2005-03-03 02:27:54.000000000 -0500
@@ -24,8 +24,7 @@
-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
-DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \
-DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 \
- -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1 \
- -fwritable-strings
+ -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
# Stage 2 and Stage 1.5's.
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
--- grub-0.95/stage2/char_io.c.gcc4 2005-03-03 02:32:08.000000000 -0500
+++ grub-0.95/stage2/char_io.c 2005-03-03 02:35:37.000000000 -0500
@@ -176,7 +176,7 @@
}
void
-grub_printf (const char *format,...)
+grub_printf (char *format,...)
{
int *dataptr = (int *) &format;
char c, str[16];
@@ -1202,33 +1202,35 @@
}
#endif /* ! STAGE1_5 */
-int
-memcheck (int addr, int len)
-{
#ifdef GRUB_UTIL
- static int start_addr (void)
- {
- int ret;
+static int memcheck_start_addr (void)
+{
+ int ret;
# if defined(HAVE_START_SYMBOL)
- asm volatile ("movl $start, %0" : "=a" (ret));
+ asm volatile ("movl $start, %0" : "=a" (ret));
# elif defined(HAVE_USCORE_START_SYMBOL)
- asm volatile ("movl $_start, %0" : "=a" (ret));
+ asm volatile ("movl $_start, %0" : "=a" (ret));
# endif
- return ret;
- }
+ return ret;
+}
- static int end_addr (void)
- {
- int ret;
+static int memcheck_end_addr (void)
+{
+ int ret;
# if defined(HAVE_END_SYMBOL)
- asm volatile ("movl $end, %0" : "=a" (ret));
+ asm volatile ("movl $end, %0" : "=a" (ret));
# elif defined(HAVE_USCORE_END_SYMBOL)
- asm volatile ("movl $_end, %0" : "=a" (ret));
+ asm volatile ("movl $_end, %0" : "=a" (ret));
# endif
- return ret;
- }
+ return ret;
+}
+#endif /* GRUB_UTIL */
- if (start_addr () <= addr && end_addr () > addr + len)
+int
+memcheck (int addr, int len)
+{
+#ifdef GRUB_UTIL
+ if (memcheck_start_addr () <= addr && memcheck_end_addr () > addr + len)
return ! errnum;
#endif /* GRUB_UTIL */
--- grub-0.95/stage2/disk_io.c.gcc4 2005-03-03 02:40:56.000000000 -0500
+++ grub-0.95/stage2/disk_io.c 2005-03-03 02:40:12.000000000 -0500
@@ -128,7 +128,7 @@
int filemax;
static inline unsigned long
-log2 (unsigned long word)
+grub_log2 (unsigned long word)
{
asm volatile ("bsfl %1,%0"
: "=r" (word)
@@ -140,7 +140,7 @@
rawread (int drive, int sector, int byte_offset, int byte_len, char *buf)
{
int slen, sectors_per_vtrack;
- int sector_size_bits = log2 (buf_geom.sector_size);
+ int sector_size_bits = grub_log2 (buf_geom.sector_size);
if (byte_len <= 0)
return 1;
@@ -163,7 +163,7 @@
}
buf_drive = drive;
buf_track = -1;
- sector_size_bits = log2 (buf_geom.sector_size);
+ sector_size_bits = grub_log2 (buf_geom.sector_size);
}
/* Make sure that SECTOR is valid. */
--- grub-0.95/stage2/fsys_fat.c.gcc4 2005-03-03 02:42:08.000000000 -0500
+++ grub-0.95/stage2/fsys_fat.c 2005-03-03 02:42:31.000000000 -0500
@@ -55,7 +55,7 @@
#define FAT_CACHE_SIZE 2048
static __inline__ unsigned long
-log2 (unsigned long word)
+grub_log2 (unsigned long word)
{
__asm__ ("bsfl %1,%0"
: "=r" (word)
@@ -84,9 +84,9 @@
if (bpb.sects_per_clust == 0)
return 0;
- FAT_SUPER->sectsize_bits = log2 (FAT_CVT_U16 (bpb.bytes_per_sect));
+ FAT_SUPER->sectsize_bits = grub_log2 (FAT_CVT_U16 (bpb.bytes_per_sect));
FAT_SUPER->clustsize_bits
- = FAT_SUPER->sectsize_bits + log2 (bpb.sects_per_clust);
+ = FAT_SUPER->sectsize_bits + grub_log2 (bpb.sects_per_clust);
/* Fill in info about super block */
FAT_SUPER->num_sectors = FAT_CVT_U16 (bpb.short_sectors)
--- grub-0.95/stage2/fsys_iso9660.c.gcc4 2005-03-03 02:44:09.000000000 -0500
+++ grub-0.95/stage2/fsys_iso9660.c 2005-03-03 02:44:20.000000000 -0500
@@ -57,7 +57,7 @@
static inline unsigned long
-log2 (unsigned long word)
+grub_log2 (unsigned long word)
{
asm volatile ("bsfl %1,%0"
: "=r" (word)
@@ -68,7 +68,7 @@
static int
iso9660_devread (int sector, int byte_offset, int byte_len, char *buf)
{
- unsigned short sector_size_lg2 = log2(buf_geom.sector_size);
+ unsigned short sector_size_lg2 = grub_log2(buf_geom.sector_size);
/*
* We have to use own devread() function since BIOS return wrong geometry
--- grub-0.95/stage2/fsys_reiserfs.c.gcc4 2005-03-03 02:44:30.000000000 -0500
+++ grub-0.95/stage2/fsys_reiserfs.c 2005-03-03 02:44:40.000000000 -0500
@@ -367,7 +367,7 @@
static __inline__ unsigned long
-log2 (unsigned long word)
+grub_log2 (unsigned long word)
{
__asm__ ("bsfl %1,%0"
: "=r" (word)
@@ -609,7 +609,7 @@
INFO->version = super.s_version;
INFO->blocksize = super.s_blocksize;
- INFO->fullblocksize_shift = log2 (super.s_blocksize);
+ INFO->fullblocksize_shift = grub_log2 (super.s_blocksize);
INFO->blocksize_shift = INFO->fullblocksize_shift - SECTOR_BITS;
INFO->cached_slots =
(FSYSREISER_CACHE_SIZE >> INFO->fullblocksize_shift) - 1;
--- grub-0.95/lib/device.c.gcc4 2005-03-03 02:49:01.000000000 -0500
+++ grub-0.95/lib/device.c 2005-03-03 02:52:06.000000000 -0500
@@ -648,24 +648,24 @@
}
/* Read mapping information from FP, and write it to MAP. */
+static void rdm_show_error (const char *map_file, int no, const char *msg)
+{
+ fprintf (stderr, "%s:%d: error: %s\n", map_file, no, msg);
+}
+
+static void rdm_show_warning (const char *map_file,int no, const char *msg, ...)
+{
+ va_list ap;
+
+ va_start (ap, msg);
+ fprintf (stderr, "%s:%d: warning: ", map_file, no);
+ vfprintf (stderr, msg, ap);
+ va_end (ap);
+}
+
static int
read_device_map (FILE *fp, char **map, const char *map_file)
{
- static 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, ...)
- {
- va_list ap;
-
- va_start (ap, msg);
- fprintf (stderr, "%s:%d: warning: ", map_file, no);
- vfprintf (stderr, msg, ap);
- va_end (ap);
- }
-
/* If there is the device map file, use the data in it instead of
probing devices. */
char buf[1024]; /* XXX */
@@ -695,14 +695,14 @@
if (*ptr != '(')
{
- show_error (line_number, "No open parenthesis found");
+ rdm_show_error (map_file, line_number, "No open parenthesis found");
return 0;
}
ptr++;
if ((*ptr != 'f' && *ptr != 'h') || *(ptr + 1) != 'd')
{
- show_error (line_number, "Bad drive name");
+ rdm_show_error (map_file, line_number, "Bad drive name");
return 0;
}
@@ -713,12 +713,12 @@
drive = strtoul (ptr, &ptr, 10);
if (drive < 0)
{
- show_error (line_number, "Bad device number");
+ rdm_show_error (map_file, line_number, "Bad device number");
return 0;
}
else if (drive > 127)
{
- show_warning (line_number,
+ rdm_show_warning (map_file, line_number,
"Ignoring %cd%d due to a BIOS limitation",
is_floppy ? 'f' : 'h', drive);
continue;
@@ -729,7 +729,7 @@
if (*ptr != ')')
{
- show_error (line_number, "No close parenthesis found");
+ rdm_show_error (map_file, line_number, "No close parenthesis found");
return 0;
}
@@ -740,7 +740,7 @@
if (! *ptr)
{
- show_error (line_number, "No filename found");
+ rdm_show_error (map_file, line_number, "No filename found");
return 0;
}
@@ -753,7 +753,7 @@
/* Multiple entries for a given drive is not allowed. */
if (map[drive])
{
- show_error (line_number, "Duplicated entry found");
+ rdm_show_error (map_file, line_number, "Duplicated entry found");
return 0;
}
--- grub-0.95/grub/asmstub.c.gcc4 2005-03-03 02:53:16.000000000 -0500
+++ grub-0.95/grub/asmstub.c 2005-03-03 02:59:13.000000000 -0500
@@ -94,7 +94,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;
@@ -167,7 +167,7 @@
/* We need a nested function so that we get a clean stack frame,
regardless of how the code is optimized. */
- static volatile void doit ()
+ void doit ()
{
/* Make sure our stack lives in the simulated memory area. */
asm volatile ("movl %%esp, %0\n\tmovl %1, %%esp\n"