Mail Archives: djgpp-workers/2000/08/23/06:47:26
> Date: Wed, 23 Aug 2000 12:14:51 +0200
> From: Laurynas Biveinis <lauras AT softhome DOT net>
>
> diff -urp filutil3.16/src/Makefile filutil3.16.my/src/Makefile
> --- filutil3.16/src/Makefile Fri May 26 20:40:58 2000
> +++ filutil3.16.my/src/Makefile Wed Aug 23 12:02:34 2000
> @@ -388,13 +388,11 @@ $(dir_OBJECTS): ../config.h
> dir: $(dir_OBJECTS) $(dir_DEPENDENCIES) ln
> $(LINK) $(dir_LDFLAGS) $(dir_OBJECTS) $(dir_LDADD) $(LIBS)
> ./ln -s $@ d
> - stubedit d.exe argv0=dir
This isn't right, but I don't blame you: the reasons for this are
subtle, and I didn't document them anywhere but in the code itself.
Here's the scoop: each Fileutils program *must* get its exact name in
argv[0], and that name *must* be _exactly_ what it was told to expect.
And, that argv[0] must be _without_ the .exe extension. Otherwise,
some aspects of the programs will mysteriously break.
For the detailed explanation why is this so, see the large comment in
the beginning of the file src/djstart.c, and the code of the
init_stat_bits function defined there. You will see that each program
sets up the bits for the `stat' function given its name in argv[0].
To make all this work as intended, the two "ln -s/stubedit" lines in
the Makefile need to be changed to run "stubify -g/stubedit" instead,
so that people could invoke gmkdir etc. from the DOS prompt. After
all, that's why I added those ``symlinks'': to give users a way to
invoke the GNU programs instead of COMMAND.COM's internal commands.
The rest of the patches seem okay to me, but please somebody be sure
to run the test suite after applying them.
- Raw text -