Re: [AD] Allegro 4.2.0 RC1 timetable

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2005-06-04, Peter Wang <tjaden@xxxxxxxxxx> wrote:
> On 2005-06-04, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> > Let's see if I don't forget anything that still needs to be done:
> > 
> >  - some gcc 4.0 fixes for DJGPP need to be applied
> 
> - in particular, int_ds in src/misc/vbeafex.c

Bandaid solution for this is attached, unless someone knows how to fix
it properly.

Peter
Index: src/misc/vbeafex.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/misc/vbeafex.c,v
retrieving revision 1.5
diff -u -r1.5 vbeafex.c
--- src/misc/vbeafex.c	4 Jul 2004 13:44:49 -0000	1.5
+++ src/misc/vbeafex.c	5 Jun 2005 23:07:32 -0000
@@ -680,8 +680,11 @@
 
 
 
-/* temporary global for storing the data selector */
-static int int_ds;
+/* temporary global for storing the data selector
+ * FIXME: this is supposed to be static but that doesn't work with the
+ * following asm code with gcc 4
+ */
+int __al_vbeafex_int_ds;
 
 
 
@@ -702,7 +705,7 @@
 
       "  movw (%%esi), %%es ; "           /* load selectors */
       "  movw 6(%%esi), %%ax ; "
-      "  movw %%ax, _int_ds ; "
+      "  movw %%ax, ___al_vbeafex_int_ds ; "
       "  movw 8(%%esi), %%fs ; "
       "  movw 10(%%esi), %%gs ; "
 
@@ -713,13 +716,13 @@
       "  movl 16(%%edi), %%esi ; "
       "  movl 20(%%edi), %%edi ; "
 
-      "  movw _int_ds, %%ds ; "           /* load %ds selector */
+      "  movw ___al_vbeafex_int_ds, %%ds ; " /* load %ds selector */
 
       "  clc ; "                          /* generate the interrupt */
       "  popl %%ebp ; "
       "  call *%%ebp ; "
 
-      "  movw %%ds, %%ss:_int_ds ; "      /* store returned %ds value */
+      "  movw %%ds, %%ss:___al_vbeafex_int_ds ; " /* store returned %ds value */
       "  popw %%ds ; "                    /* restore original %ds */
 
       "  movl %%edi, %%ebp ; "            /* store %edi */
@@ -740,7 +743,7 @@
       "  popl %%esi ; "                   /* pop sregs pointer into %esi */
 
       "  movw %%es, (%%esi) ; "           /* store output selectors */
-      "  movw _int_ds, %%ax ; "
+      "  movw ___al_vbeafex_int_ds, %%ax ; "
       "  movw %%ax, 6(%%esi) ; "
       "  movw %%fs, 8(%%esi) ; "
       "  movw %%gs, 10(%%esi) ; "


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/