Subject: C99
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: tech-pkg
Date: 08/24/2006 17:11:20
--a2FkP9tdjPU2nyhF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi all,

Many packages now use C99, and on some platforms, you actually have to
pass the proper flags to the compiler to get C99 support or not fail.
On IRIX, for example, if you try to compile a package that uses C99
without telling the compiler, it will fail.  So far, I've manually added
a check to individual packages, in which I check for the MIPSPro
compiler and then add "-c99" to the CFLAGS.

However, trying to build stuff on IRIX with gcc, I realize that an
additional CFLAGS (-std=3Dc99) is also required for gcc.  Instead of
patching the same number of packages again with an additional check, I
was thinking it might make more sense to simply add a=20

USE_LANGUAGES+=3D	c99

or

USE_C99=3D	YES

to the package and then let the compiler.mk framework take care of
this.  If we follow this practice, then any package that has
USE_LANGUAGES=3Dc (ie not c99) should default to c89 and enforce it.

How does that sound?

-Jan

--=20
Free Speech Online - Stop Internet Censorship
   --- Electronic Frontier Foundation -- http://www.eff.org ---

--a2FkP9tdjPU2nyhF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFE7hX4fFtkr68iakwRAj4PAJ9jVhqSy3dOJb1VDPzThssTBX57nACeO/ea
hOI0va4ekFx6BhdotG98rlM=
=P72a
-----END PGP SIGNATURE-----

--a2FkP9tdjPU2nyhF--