Re: [AD] Finishing up 4.2 for RC1

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


On 2005-08-04, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> - Purge main docs of DOSisms if that hasn't been done already
> 
> Ditto, but requires some more time perhaps.

This should not hold up the release.  Actually, most of the things on
the todo list are like that.

> - configure/OSS detection problems on Solaris
> - OSS requires -lossaudio in OpenBSD
> - OSS MIDI doesn't work on OpenBSD; make it work or fix detection in 
> aclocal.m4
> 
> How about these?

I'll try to fix them with the SF.net compile farm before Monday.

> - disallow ModeX and VBE/AF drivers in C-only Linux console port
>   (at least the bank switcher for the ModeX driver is in asm so has 
> different
>   calling conventions than expected in the C port)
> 
> Done, I think? If not, it shouldn't be hard to do...

Attached is a patch that just makes those drivers fail to initialise if
Allegro is built in C-only mode.  If you try to mix modules from
asm-Allegro with C-Allegro you'll circumvent the check, but whatever.

Peter
Index: src/misc/modex.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/misc/modex.c,v
retrieving revision 1.34
diff -u -p -r1.34 modex.c
--- src/misc/modex.c	22 Jun 2005 17:37:56 -0000	1.34
+++ src/misc/modex.c	5 Aug 2005 08:34:00 -0000
@@ -661,6 +661,14 @@ static BITMAP *modex_init(int w, int h, 
    unsigned long addr;
    int c;
 
+   /* Do not continue if this version of Allegro was built in C-only mode.
+    * The bank switchers assume asm-mode calling conventions, but the
+    * library would try to call them with C calling conventions.
+    */
+#ifdef ALLEGRO_USE_C
+   return NULL;
+#endif
+
    /* see modexsms.c */
    _split_modex_screen_ptr = really_split_modex_screen;
 
@@ -809,6 +817,14 @@ static BITMAP *xtended_init(int w, int h
    unsigned long addr;
    BITMAP *b;
 
+   /* Do not continue if this version of Allegro was built in C-only mode.
+    * The bank switchers assume asm-mode calling conventions, but the
+    * library would try to call them with C calling conventions.
+    */
+#ifdef ALLEGRO_USE_C
+   return NULL;
+#endif
+
    /* see modexsms.c */
    _split_modex_screen_ptr = really_split_modex_screen;
 
Index: src/misc/vbeaf.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/misc/vbeaf.c,v
retrieving revision 1.23
diff -u -p -r1.23 vbeaf.c
--- src/misc/vbeaf.c	12 Mar 2005 06:29:05 -0000	1.23
+++ src/misc/vbeaf.c	5 Aug 2005 08:34:01 -0000
@@ -1179,6 +1179,14 @@ static BITMAP *vbeaf_init(int w, int h, 
    char tmp1[512];
    void *vaddr;
 
+   /* Do not continue if this version of Allegro was built in C-only mode.
+    * The bank switchers assume asm-mode calling conventions, but the
+    * library would try to call them with C calling conventions.
+    */
+#ifdef ALLEGRO_USE_C
+   return NULL;
+#endif
+
    /* locate and load VBE/AF driver from disk */
    if (!vbeaf_locate_driver())
       return NULL;


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