m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: fix-bootstrap-translation-download-on-darwin


From: Gary V. Vaughan
Subject: Re: FYI: fix-bootstrap-translation-download-on-darwin
Date: Tue, 11 Sep 2007 20:15:18 +0100

On Sep 6, 2007, at 2:19 PM, Ralf Wildenhues wrote:
Hi Gary,

Hallo Ralf,

Gary V. Vaughan <gary <at> gnu.org> writes:

        Work around a bug in darwin's awk:

        (func_get_translations): The first awk script mangles the last
        entry passed to it for at least the awk implementation shipped
        with Darwin 8.10.1.  Capture $3 into a variable too to work-
        around that problem.

Could you be bothered to explain what this bug does?  I don't quite
understand from the patch nor the description.  Should it be listed
in the Autoconf shell portability section?

Sure.

$ cat in
cs:1.4o:../PO-files
da:1.4o:../PO-files
de:1.4o:../PO-files
el:1.4n:../PO-files
el:1.4o:../PO-files
fr:1.4o:../PO-files


# Before the patch (note the last line of output):

$ cat in | /opt/local/bin/gawk -F: '
>   { if (lang && $1 != lang) print lang, ver, $3 }
>   { lang = $1; ver = $2 }
>   END { if (lang) print lang, ver, $3 }'
cs 1.4o ../PO-files
da 1.4o ../PO-files
de 1.4o ../PO-files
el 1.4o ../PO-files
fr 1.4o ../PO-files
$ cat in | /usr/bin/awk -F: '
>   { if (lang && $1 != lang) print lang, ver, $3 }
>   { lang = $1; ver = $2 }
>   END { if (lang) print lang, ver, $3 }'
cs 1.4o ../PO-files
da 1.4o ../PO-files
de 1.4o ../PO-files
el 1.4o ../PO-files
fr 1.4o


# After the patch:

$ cat in | /opt/local/bin/gawk -F: '
>   { if (lang && $1 != lang) print lang, ver, subdir }
>   { lang = $1; ver = $2; subdir = $3 }
>   END { if (lang) print lang, ver, subdir }'
cs 1.4o ../PO-files
da 1.4o ../PO-files
de 1.4o ../PO-files
el 1.4o ../PO-files
fr 1.4o ../PO-files
$ cat in | /usr/bin/awk -F: '
>   { if (lang && $1 != lang) print lang, ver, subdir }
>   { lang = $1; ver = $2; subdir = $3 }
>   END { if (lang) print lang, ver, subdir }'
cs 1.4o ../PO-files
da 1.4o ../PO-files
de 1.4o ../PO-files
el 1.4o ../PO-files
fr 1.4o ../PO-files

It appears that only gawk saves $3 from the last input line for use in the END clause, where darwin awk (maybe others too, I haven't looked elsewhere) discards it.

Cheers,
        Gary
--
  ())_.              Email me: address@hidden
  ( '/           Read my blog: http://blog.azazil.net
  / )=         ...and my book: http://sources.redhat.com/autobook
`(_~)_      Join my AGLOCO Network: http://www.agloco.com/r/BBBS7912




Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]