Jim Meyering wrote:
> How about the patch below instead?
> I've moved the prototype down, so that we see
> the offensive, "$"-containing symbol name only once ;-)
It is less understandable than John Malmberg's patch, because
- normally you should have a declaration of a function before you start
using it,
- gnulib has a declaration of __getcwd also in lib/getcwd.c, and it's a
different function.
But what the patch does appears wrong to me anyway: It says that
- there is a system function getcwd,
- there is also a system function decc$getcwd,
- there is also a gnulib rpl_getcwd,
- the rpl_getcwd does not work as well as decc$getcwd.
The last point is understandable, since (IIRC, someone said) on VMS there are
several root directories and going up with ../, ../../, etc. will most often
lead to the wrong one.
The action to do in this situation is to make gnulib's rpl_getcwd work
better, not work around it in many other source files. Keep all getcwd
related changes in lib/getcwd.c, m4/getcwd.m4, lib/unistd.in.h.
John, can you do that?
Bruno