delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/07/02:05:54

Message-Id: <01BDF1C9.FB5AE300@secp6071.mlg.cit.alcatel.es>
From: =?iso-8859-1?Q?Diego_Dom=EDnguez_Cazorla?=
<ddomingu AT mlg DOT cit DOT alcatel DOT es>
To: "'djgpp'" <djgpp AT delorie DOT com>
Subject: RE: ALLEGRO and ANSI C ????
Date: Wed, 7 Oct 1998 08:10:42 +-100
Mime-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id CAA19393
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019