On 12/27/18 6:39 PM, enh wrote:
> On Thu, Dec 27, 2018 at 12:18 PM Rob Landley <[email protected]> wrote:
>>
>> On 12/27/18 12:46 PM, enh wrote:
>>> meh, BSD-based regex implementations seem to think that the empty
>>> regex is an error anyway. (i only skimmed it, but i think POSIX
>>> agrees: 
>>> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html)
>>
>> Earlier versions I was catching the empty regex and manually matching the 
>> whole
>> thing, I can do that again. :)
>>
>> (Some build script somewhere cared, I forget which since I haven't gotten the
>> LFS/BLFS build environment recreated yet...)
> 
> really? isn't this just a pathologically stupid way to say `cat`?

Back circa http://lists.busybox.net/pipermail/busybox/2004-May/011538.html one
of the very first problems I hit was autoconf using awk with an empty string as
a cat synonym, and at the time busybox awk hung. (What they did was have a
$VARIABLE accumulating the transforms they wanted applied to some header file,
and the common case for Linux was no changes, and at the end they'd call cat
with the $VARIABLE and it would just copy the file unmodified for Linux. It
makes a certain amount of sense in context, but means all sorts of weird
behavior winds up being depended on. :P)

Rob

P.S. You want pathologically stupid, commit 32b3587af261 was fun to debug.
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to