Re: support for POSIX 1003.1-2001 hosts
От | Bruce Momjian |
---|---|
Тема | Re: support for POSIX 1003.1-2001 hosts |
Дата | |
Msg-id | 200203122143.g2CLhTc08817@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: support for POSIX 1003.1-2001 hosts (Paul Eggert <eggert@twinsun.com>) |
Список | pgsql-patches |
Paul Eggert wrote: > > From: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au> > > Date: Tue, 12 Mar 2002 10:35:35 +0800 > > Importance: Normal > > > > What's wrong with "head -n 1"? > > Nothing's wrong with it from a standards-compliance point of view. > > But I worry that "head -n 1" may not work on some older (pre-POSIX) > hosts, as it did not work on Unix Version 7 hosts. In contrast, "sed > q" did work on those ancient hosts, so I figure "sed q" should be > safer. "sed 1q" should be equally good from a portability viewpoint, > if you prefer. I have made the 'sed 1q' change you suggested in configure.in, but not in the docs because I thought it would be too confusing. The sort changes, however, were not embraced, as I suspected. Certainly when we hit a platform that doesn't understand sort +/-, we will need to make that change. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 Index: configure.in =================================================================== RCS file: /cvsroot/pgsql/configure.in,v retrieving revision 1.168 diff -c -r1.168 configure.in *** configure.in 5 Mar 2002 17:55:21 -0000 1.168 --- configure.in 12 Mar 2002 21:23:15 -0000 *************** *** 297,303 **** # Create compiler version string if test x"$GCC" = x"yes" ; then ! cc_string="GCC `${CC} --version | head -1`" else cc_string=$CC fi --- 297,303 ---- # Create compiler version string if test x"$GCC" = x"yes" ; then ! cc_string="GCC `${CC} --version | sed q`" else cc_string=$CC fi
В списке pgsql-patches по дате отправления: