Re: Unportable use of uname in pg_upgrade test script

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Unportable use of uname in pg_upgrade test script
Date: 2012-09-29 17:46:27
Message-ID: 4017.1348940787@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Exactly, the sed script pulls the last token from the line, which is
> Msys on all my Mingw systems.

Perhaps that's "uname -v"?

> If you want to do it another way we could possibly pass the PORTNAME
> from the global make file.

That might be safer. The last few words of uname's output are
*completely* unstandardized (the spec says that implementation-defined
fields can be added to -a's output ...)

regards, tom lane

> cheers

> andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2012-09-29 17:49:58 Re: pg_upgrade tests vs alter generic changes
Previous Message Andrew Dunstan 2012-09-29 17:33:49 Re: Unportable use of uname in pg_upgrade test script