Subject: Re: current isn't building and I think it's /usr/src/sys/sys/endian.h
To: Perry E. Metzger <firstname.lastname@example.org>
From: Garrett D'Amore <email@example.com>
Date: 12/26/2005 18:28:48
There is a lot of software out there, and a lot of it configures for -ansi.
I think it is a poor choice to break C90 code in applications. That
stuff should be ifdef'd for C99 -- C99 is not yet universal. (Note that
in the kernel, it is different, because we always build the kernel with
controlled options and compiler.)
Now, it does seem fine (and probably even good) to me to go ahead and
break K&R -- everyone should at least be using ANSI/C89/C90 these days.
Perry E. Metzger wrote:
>YAMAMOTO Takashi <firstname.lastname@example.org> writes:
>>>The firefox port is broken on -current because of an error in 'configure'
>>>(see below). I suspect the problem is related, but I'm not sure.
>>>I tried adding the 'S' to the linflags in /usr/pkg/share/mk/sys.mk, but
>>>it didn't help. (I see that /usr/share/mk/sys.mk already has the 'S'.)
>>>configure:5213: checking for pthread_create in -lpthread
>>>cc -o dummy dummy.c -O2 -I/usr/pkg/include -I/usr/include -I/usr/X11R6/include -DGLX_GLXEXT_LEGACY -I/usr/pkg/include/freetype2 -pip
>>>e -ansi -Wall -I/usr/pkg/include -I/usr/include -I/usr/X11R6/include -DGLX_GLXEXT_LEGACY -I/usr/pkg/include/freetype2 -lpthread -Wl,
>>>-R/usr/pkg/lib/firefox -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -lm -lintl
>>as __inline was converted to inline even for public headers,
>>pre-C99 sources, including -ansi, are now broken.
>The sources aren't broken. An old *compiler* is broken. "-ansi" tells
>gcc to act like an ISO C90 compiler.
>However, there should be no need to compile anything with -ansi though
>-- it does not break programs to build them without turning off
>C99. Is there a reason configure for firefox is insisting on -ansi???
>If this is a widespread problem I can revert it very easily but I'm
>not sure why one would compile with -ansi except in specialized cases,
>such as if one wanted to catch things that would break older
Garrett D'Amore http://www.tadpolecomputer.com/
Sr. Staff Engineer Extending the Power of 64-bit UNIX Computing
Tadpole Computer, Inc. Phone: (951) 325-2134