Mail Archives: djgpp/1998/10/07/02:05:54
On Tue, 6 Oct 1998, Salvador Eduardo Tropea (SET) wrote:
> Diego Domínguez Cazorla <ddomingu AT mlg DOT cit DOT alcatel DOT es>
>
> > I tried to make a proyect containing ALLEGRO 3.0 functions and qhen I turned on the gcc ANSI
> > switch it complaint about some elements in ALLEGRO (directive #error for
> > example).
> >
> > Have I done something wrong?
> > Is ALLEGRO 3.0 non ANSI C?
>
> Allegro uses low level hardware stuff, isn't supposed to be ANSI.
True but even so perhaps the header should be parsable in strict
ANSI mode. This allows people to write the rest of their code
portably, apart from the Allegro calls. It'll make it easier to
port to WinAllegro+MSVC, for instance.
I just made a couple of changes to my version of the WinAllegro
header (used with RSXNTDJ), and it works fine with `-ansi'. I
needed to change all `asm' to `__asm__' -- that's all.
For the DOS Allegro header some other changes may be necessary.
`DJGPP' isn't defined, we must use `__DJGPP__' instead. I think
this would need changing in the Windows version too actually.
Thanks very much to you both.
I think it can be time consuming making it ANSI C compilable by making a lot of changes in the header and some things may even be corrupted after the process. I don't know if I'll try it yet, but if I do so in the end,
wouldn't it be a good idea to have an ANSI C makeable version of ALLEGRO?
Thanx again,
Diego Dominguez
- Raw text -