Jim Meyering <jim <at> meyering.net> writes: > > ?? As far as I can see, one cannot remove ASSIGN_STRDUPA, > since it is not defined anyplace else. > The code (cp.c, df.c, copy.c) won't compile without it.
Aargh. Serves me right for deleting without testing. I merely grepped for strdupa (no other uses) rather than ASSIGN_STRDUPA. I've reverted that portion of the patch. Although there's still the issue that ASSIGN_STRDUPA can cause stack overflow if used on arbitrarily long names; maybe it's worth rewriting these interfaces to use Bruno's malloca interfaces (alloca for short lengths, but malloc for long; requires adding a cleanup call, but still provides speed in the common case of short strings). -- Eric Blake