Mail Archives: djgpp-workers/2000/08/21/10:45:39
> Date: Mon, 21 Aug 2000 13:53:03 +0200
> From: Laurynas Biveinis <lauras AT softhome DOT net>
>
> Here are changes for dosexec.c to DTRT with symlinks.
I have one request: when sending non-trivial diffs for complex
sources, please say "diff -up" or "diff -cp": this causes Diff to
print the function name with each hunk, which makes the diffs much
easier to understand.
> @@ -586,7 +591,7 @@
> usual DOS command line and the !proxy one (which will be put
> into the environment). Sigh... */
> save_argv0 = argv[0];
> - argv[0] = unconst(program, char *); /* since that's where we really found it */
> + argv[0] = unconst(program, char *);
Please don't remove existing comments unless you have a very good
reason for that.
> RCS file: args.c
> diff -N args.c
> --- /dev/null Tue May 5 16:32:27 1998
> +++ args.c Mon Aug 21 07:42:04 2000
> @@ -0,0 +1,9 @@
> +#include <stdio.h>
> +
> +int main(int argc, char *argv[])
> +{
> + int i;
> + for (i = 0; i < argc; i++)
> + printf("argv[%d] = %s\n", i, argv[i]);
> + return 0;
> +}
You didn't really mean that, did you?
> Index: djgpp/tests/libc/dos/process/makefile
> ===================================================================
> RCS file: /cvs/djgpp/djgpp/tests/libc/dos/process/makefile,v
> retrieving revision 1.1
> diff -u -r1.1 makefile
> --- makefile 1995/11/13 03:14:50 1.1
> +++ makefile 2000/08/21 11:42:04
> @@ -1,5 +1,7 @@
> TOP=../..
>
> +SRC += args.c
> SRC += spawnvp.c
> +SRC += symlinks.c
...and also this.
> +int main(void)
> +{
> + symlink("args.exe", "linkargs.exe");
> + system("args.exe 1 2 3");
> + system("linkargs.exe 4 5 6");
> + spawnl(P_WAIT, "args.exe", "args.exe", "what", NULL);
> + spawnl(P_WAIT, "linkargs.exe", "linkargs.exe", "where", "why", NULL);
> + remove("linkargs.exe");
> + symlink("C:/command.com", "linkcom.com");
> + system("linkcom.com");
> + remove("linkcom.com");
> + symlink("test.sh", "linksh.sh");
> + system("test.sh");
> + system("linksh.sh");
> + remove("linksh.sh");
> + return 0;
> +}
One thing that should be tested is when the symlink is not in the
current directory, but along the PATH. I don't think the above tests
this situation, does it?
- Raw text -