[AD] Serious Bugs in the DJGPP port of ALLEGRO in 4.1.17

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


The 4.1.17 (WIP) release of Allegro, had a serious bug
which prevented to build the library, and others bugs,
which caused the demo program and some examples to
crash.  The first problem (which prevented to build
the library) was solved in the following CVS snapshot,
but the others remained until the last CVS weekly
snapshot (dated January 8th, 2005).

I've managed to correct most of these problems, and
the library doesn't seems to crash anymore. The diff
patches and error reports are attached.

Here follows the whole story:
===========================================
I tryied to build allegro 4.1.17 (WIP) from the
sources using DJGPP. But unfortunately I couldn't
build it, due to an error in mouse.c. The error report
is in the attached file build_error_djgpp.txt
Happily, this error, which was preventing a sucessful
build of Allegro for DJGPP, was fixed in 01/01/2005.

Re-building the library with the WARNMODE flag set
(WARNMODE=1), I've noticed that some files had bugs
(which didn't prevented a sucessful compilation when
the WARNMODE flag was off). I belive these bugs where
responsible for the gfx_mode_select and
gfx_mode_select_ex crash (Allegro programs crashed
when they called gfx_mode_select or
gfx_mode_select_ex, this includes the demo program and
some examples).
  These bugs where caused because some fields where
added to some structures (e.g to GFX_DRIVER in gfx.h),
and some files that should be updated have been left
behind. To fix these bugs I basically updated these
files.
   The original files were renamed to xxx.c.orig
(where xxx is the base name), and the updated files
remained with the .c extension. After testing the
changes, I run "diff -u xxx.c.orig xxx.c > xxx.diff"
(thanks to Daniel Schlyder, who explained me how to
use diff).

  The affected files are:
     src/dos/dmouse.c => Fix it with dmouse.diff
     src/dos/vesa.c => Fix it with vesa.diff
     src/dos/wss.c => I don't know how to fix the
        warning issued in this file, so I compiled it
        with the WARNMODE flag OFF.
     src/misc/modex.c => Fix it with modex.diff
     src/misc/vbeaf.c => Weird warning. I fixed it
        making screen_vtable.triangle NULL (not 
        a very elegant solution).

  These patches are for the last CVS snapshot (dated
January 8th).

   Note: I've delayed to post the diff patches because
I was doing some tests during my little spare time of
January 8th and 9th, to make sure these changes didn't
caused any side effect. Anyway it's a good idea to
check the patch files before applying them to the
sources.

  In the build process I used GCC 3.3.4 (at home) and
GCC 3.4.1 (at work), under a Windows 98 SE DOS box (in
both machines).

  Since I'm a newbie to alleg-developers, I would
appreciate some feedback (eg. it's better to post
multiple bugs in a sigle thread or each bug in each
thread).

  Anyway, thanks for this wonderful library. I'm using
Allegro in a scientific program I'm writing for my
Master thesis.

  Marcio A. A. Fialho.

  Here follows the error and warning reports and diff
patches:
===================================================================

__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -W -Wstrict-prototypes -Wno-unused -Werror -mcpu=pentium -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/djgpp/alleg/mouse.o -c src/mouse.c
src/mouse.c: In function `install_mouse':
src/mouse.c:943: error: `mouse_pointer_data' undeclared (first use in this function)
src/mouse.c:943: error: (Each undeclared identifier is reported only once
src/mouse.c:943: error: for each function it appears in.)
make.exe: *** [obj/djgpp/alleg/mouse.o] Error 1

C:\djgpp\alleg417>
Reading specs from c:/djgpp/bin/../lib/gcc-lib/djgpp/3.34/specs
Configured with: /gcc/gnu/gcc-3.34/configure djgpp --prefix=/dev/env/DJDIR --disable-nls
Thread model: single
gcc version 3.3.4
Compiling Allegro for djgpp, optimised. Please wait...
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -W -Wstrict-prototypes -Wno-unused -Werror -mcpu=pentium -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/djgpp/alleg/dmouse.o -c src/dos/dmouse.c
src/dos/dmouse.c:130: warning: missing initializer
src/dos/dmouse.c:130: warning: (near initialization for `mousedrv_int33.select_system_cursor')
src/dos/dmouse.c:156: warning: missing initializer
src/dos/dmouse.c:156: warning: (near initialization for `mousedrv_polling.select_system_cursor')
src/dos/dmouse.c:180: warning: missing initializer
src/dos/dmouse.c:180: warning: (near initialization for `mousedrv_winnt.select_system_cursor')
make.exe: *** [obj/djgpp/alleg/dmouse.o] Error 1
Compiling Allegro for djgpp, optimised. Please wait...
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -W -Wstrict-prototypes -Wno-unused -Werror -mcpu=pentium -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/djgpp/alleg/vesa.o -c src/dos/vesa.c
src/dos/vesa.c:91: warning: initialization from incompatible pointer type
src/dos/vesa.c:93: warning: missing initializer
src/dos/vesa.c:93: warning: (near initialization for `gfx_vesa_2b.windowed')
src/dos/vesa.c:114: warning: initialization from incompatible pointer type
src/dos/vesa.c:116: warning: missing initializer
src/dos/vesa.c:116: warning: (near initialization for `gfx_vesa_2l.windowed')
src/dos/vesa.c:139: warning: initialization from incompatible pointer type
src/dos/vesa.c:141: warning: missing initializer
src/dos/vesa.c:141: warning: (near initialization for `gfx_vesa_3.windowed')
make.exe: *** [obj/djgpp/alleg/vesa.o] Error 1
Compiling Allegro for djgpp, optimised. Please wait...
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -W -Wstrict-prototypes -Wno-unused -Werror -mcpu=pentium -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/djgpp/alleg/wss.o -c src/dos/wss.c
src/dos/wss.c: In function `wss_init':
src/dos/wss.c:282: warning: dereferencing type-punned pointer will break strict-aliasing rules
make.exe: *** [obj/djgpp/alleg/wss.o] Error 1
Compiling Allegro for djgpp, optimised. Please wait...
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -W -Wstrict-prototypes -Wno-unused -Werror -mcpu=pentium -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/djgpp/alleg/modex.o -c src/misc/modex.c
src/misc/modex.c:208: warning: initialization from incompatible pointer type
src/misc/modex.c:209: warning: initialization makes pointer from integer without a cast
src/misc/modex.c:215: warning: missing initializer
src/misc/modex.c:215: warning: (near initialization for `gfx_xtended.windowed')
make.exe: *** [obj/djgpp/alleg/modex.o] Error 1
Compiling Allegro for djgpp, optimised. Please wait...
gcc -DALLEGRO_SRC -DALLEGRO_LIB_BUILD -Wall -W -Wstrict-prototypes -Wno-unused -Werror -mcpu=pentium -O2 -funroll-loops -ffast-math -fomit-frame-pointer -I. -I./include -o obj/djgpp/alleg/vbeaf.o -c src/misc/vbeaf.c
src/misc/vbeaf.c: In function `vbeaf_drawing_mode':
src/misc/vbeaf.c:2016: warning: assignment from incompatible pointer type
make.exe: *** [obj/djgpp/alleg/vbeaf.o] Error 1

Attachment: dmouse.diff
Description: dmouse.diff

Attachment: vesa.diff
Description: vesa.diff

Attachment: modex.diff
Description: modex.diff

Attachment: vbeaf.diff
Description: vbeaf.diff



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