Don't define bda as a macro in resume.c - it confuses AVOIDCOMBINE mode.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 3 Jan 2009 04:35:23 +0000 (23:35 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 3 Jan 2009 04:35:23 +0000 (23:35 -0500)
When using AVOIDCOMBINE, macros can have global scope.  This caused
    the bda macro in resume.c to conflict with the bda variable in
    post.c.

src/resume.c

index 4ff313386eb911e8e4e3577315d3d186f0dcc2da..2100383f65ac0ec3e5a658072811ec21a1c04fad 100644 (file)
@@ -33,6 +33,7 @@ handle_resume(u8 status)
     debug_serial_setup();
     dprintf(1, "In resume (status=%d)\n", status);
 
+    struct bios_data_area_s *bda = MAKE_FARPTR(SEG_BDA, 0);
     switch (status) {
     case 0xfe:
         // S3 resume request.  Jump to 32bit mode to handle the resume.
@@ -60,7 +61,6 @@ handle_resume(u8 status)
         // NO BREAK
     case 0x0a:
         // resume execution by jump via 40h:0067h
-#define bda ((struct bios_data_area_s *)MAKE_FARPTR(SEG_BDA, 0))
         asm volatile(
             "movw %%ax, %%ds\n"
             "ljmpw *%0\n"