This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 3.0.3 build-procedure incompatibilities with POSIX 1003.1-2001
> Date: Tue, 19 Feb 2002 10:35:43 -0800
> From: Zack Weinberg <zack@codesourcery.com>
>
> If I see any free operating system distribution released within the
> next five years which fails to support the old syntax, I will file
> maximum-severity bug reports.
I expect it to be an option that you can select, e.g. by setting an
environment variable (which is how GNU textutils 2.0.21 does it). So
your bug reports will probably come back saying "please set (or don't
set) this environment variable" or "please put this directory in your
path" or something like that.
The problems are easy enough to avoid, so we might as well do it.
> > I tried to limit myself to usage that is supported by both the
> > pre-POSIX (i.e. pre-1992) and POSIX variants, except I did indulge in
> > 1992 syntax in places where I thought the programs would be run only
> > by a maintainer.
>
> I went through it more carefully; the only problems that jump out at
> me are sort -u and diff -C.
sort -u is safe: it has been supported since Unix Version 7 (dated
1978). And GCC 3.0.3 already uses "sort -u" in several other places
without any problems.
diff -C is safe too. Those uses of diff are in contexts where you can
safely assume GNU diff, and GNU diff has supported -C with the current
semantics ever since diffutils version 1.15 was released (in 1991).
But come to think of it, there's little point to invoking "diff -C3"
(or "diff -c3", for that matter). Both commands are equivalent to
"diff -c", which should be a tad more portable than either, if you're
worried about pre-1992 hosts. So I can submit an improved patch if
you like.