Subject: Re: bug#70036: 30.0.50; Move file-truename to the C level

From: Po Lu <[email-masked]>
Date: Thu, 28 Mar 2024 11:05:05 +0800

Po Lu <[email-masked]> writes:

> Haiku supports realpath, but not wordexp.  We must reimplement virtually
> all POSIX functions of this nature on Windows, as the versions provided
> by system C libraries, if they exist at all, are inadequate for some
> reason or another.  Furthermore, these functions are absent from a
> number of other operating systems, such as OpenBSD and Android 14.0, and
> on others (Alpine, I believe) wordexp is severely inefficient for being
> implemented as a wrapper around /bin/sh.

BTW, after reading the subject of this bug report, I don't believe there
is a place for wordexp at all.  wordexp is no replacement for
Fexpand_file_name, but rather a means of expanding input in the manner
of a shell, which input might include arithmetic expressions, shell
command substitutions, and other expressions valid as shell input.  If
Fexpand_file_name alone will not suffice, TRT is to replicate the
mechanics of file-truename in whole, not cutting corners with these
admittedly tempting functions.