autoconf-patches
[Top][All Lists]
Advanced

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

Re: awk for config headers


From: Benoit SIGOURE
Subject: Re: awk for config headers
Date: Mon, 8 Oct 2007 23:42:29 +0200

On Oct 8, 2007, at 9:25 PM, Ralf Wildenhues wrote:


* Paul Eggert wrote on Wed, Oct 03, 2007 at 01:43:01AM CEST:
Ralf Wildenhues <address@hidden> writes:
      split(line, ws1, "#")
      split(ws1[2], ws2, substr(defundef, 1, 1))
      line = ws1[1] "#" ws2[1] "define " macro " " value

Better, but I think it's even clearer to use "index".

Hmm, Solaris awk has `index', but Autoconf's manual says:
|      Traditional Awk supports only the predefined functions `exp',
| `int', `length', `log', `split', `sprintf', `sqrt', and `substr'.

Which is why I tried to avoid it.  ;-)

On the other hand, the manual says that traditional Awk doesn't support user-defined functions, has a `split' with only arguments, and many more warts. The manual is not really clear but when I read this part, it means (to me) that traditional Awk is unusable and that one can write portable Awk without necessarily worrying about it working on these "traditional Awk". The fact that AC_PROG_AWK tries to find a version of Awk without these warts seems to confirm this feeling.

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


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


reply via email to

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