On 2012-11-14 16:38, Ian Lepore wrote:
On Wed, 2012-11-14 at 10:25 +0100, Dimitry Andric wrote:
...
That way, you are sure never to lose information.  This also works for
gcc from ports (which is the reason for the space after 'version' in the
grep command):

    $ gcc47 -v 2>&1 | grep 'version '
    gcc version 4.7.3 20120929 (prerelease) (FreeBSD Ports Collection)

I realize this is a bit long, but it is better to have complete than
stripped information.

Rather than just taking whatever the compiler emits, the proposed patch
seems to be carefully crafted to avoid breaking existing 3rd party tools
which parse uname output based on the location of whitespace.  I'm not
sure how important that is given that the uname manpage doesn't document
the output format as if it were somehow rigidly specified.

I can see where you're coming from, but I also think it is very fragile
to depend on parsing such information from uname.  If you do so, you
must be prepared to accept wonky input, otherwise, just don't do it. :)

And as I remarked in another reply, now that I have thought about it a
bit, I would much rather see this information moved to a sysctl or dmesg
line, than in uname.  With the happy side effect that no existing uname
parsers would be confused!
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to