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

Re: Install run-help and *.zwc files system wide in build system



Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
>
> In particular, I'm not convinced by these...
>
>     open(LOCALE, '-|', 'locale', '-a') || &Die('cannot execute locale -a');

I just realize that this should better be 'locale -a' instead 'locale', '-a':
According to perl's manpage, the "list form" is only supported if the
underlying system has a real "fork()".

> etc...  I don't think you find out if locale even failed to start

You get an error if there is no "locale" in $PATH (tested on linux,
no matter whether list form is used or not). But you are right that
one should better also check the return value of "close".

However, evenif an error does not get catched, it is not a big problem:
Just the heuristics cannot be used, i.e. LC_CTYPE would not be modified.
(Maybe one should print a clearer message in this case than just
"Using LC_CTYPE=", e.g. the current value of LC_CTYPE which is actually used).

> It would be good to make run-help into run-help.in, substitute the help
> directory in it when config.status gets run, and install the result

If the script should be provided to the user (as it is currently) so
that he can create the help-directory wherever he wants later on,
it is not good to force a fixed destination directory.
Fixing environment variables like e.g. LC_CTYPE has the same problem,
because the available locales on the machine where zsh is compiled
typically differ from the available locales on the machine where
zsh is executed/installed.



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