Date: Fri, 18 Aug 2000 15:15:33 +0200 (CEST) From: Marc van Woerkom <marc.vanwoerkom@science-factory.com> To: bbec@capgemini.fr Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Compile FreeBSD with an ANSI-C compiler Message-ID: <20000818131533.9FECA1E6B@nil.science-factory.com> In-Reply-To: <399D0056.953E6B67@capgemini.fr> (message from Bruno BEC on Fri, 18 Aug 2000 11:22:30 %2B0200) References: <399D0056.953E6B67@capgemini.fr>
index | next in thread | previous in thread | raw e-mail
> We made the same experience with the Linux Kernel and had bad surprises
> due to significant non ANSI code souce (this code is not rejected by gcc
> which is not fully ANSI-C).
>
> Did one of you have any experience or information about the ANSI
> compliance of the FreeBSD kernel ?
Well in general there is old K&R style C, ANSI style C, and
gcc C extensions.
You will run into K&R and ANSI style C in case of FreeBSD
Here is some K&R:
static int
mmrw(dev, uio, flags)
dev_t dev;
struct uio *uio;
int flags;
{
register int o;
register u_int c, v;
u_int poolsize;
register struct iovec *iov;
int error = 0;
caddr_t buf = NULL;
while (uio->uio_resid > 0 && error == 0) {
iov = uio->uio_iov;
if (iov->iov_len == 0) {
source:
http://www.FreeBSD.org/cgi/cvsweb.cgi/src/sys/i386/i386/mem.c?rev=1.79.2.4&content-type=text/x-cvsweb-markup
I am not sure if there are any gcc specific features used
in the code.
Possibly inline assembler would come to mind, that would be
gcc specific syntax. But as far as I know the assembler code
in FreeBSD is put into separate .S files.
What I have seen are certain adjustment (extrac braces) to
make sure it compiles with gcc.
Guess you have to look at the code yourself.
Regards,
Marc
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000818131533.9FECA1E6B>
