Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [bug] :P modifier and symlink loops



Oliver Kiddle wrote on Wed, 21 May 2025 16:07 +00:00:
> On 13 May, "Daniel Shahaf" wrote:
>> boilerplate to make sure we have memccpy() [sic].  (I wasn't sure if
>> that function could be assumed to be available, so I went ahead and
>> added a configure check and a fallback codepath.)
>
> I think we can be fairly confident of relying on the existence of
> memccpy(). Searching online for man pages, indicates that it exists on
> all three BSDs plus AIX, HP/UX and Solaris. The man pages also indicate
> that it was present in System V and 4.3BSD.
>

Thanks.

> It would probably be good if we could strip out more of these
> alternative fallback implementations.

Agreed in principle, but let me play devil's advocate for a moment:
wouldn't it be a good thing to keep the alternative (dupstring())
codepath in this case, since in this instance the alternative codepath
is easier for humans to read, and even if someone compiles it and
uses it in production, the runtime impact will be acceptable?

Cheers,

Daniel




Messages sorted by: Reverse Date, Date, Thread, Author