Mail Archives: djgpp-workers/2003/01/30/10:13:12
Hello.
Laurynas Biveinis wrote:
[snip]
> Can you set a breakpoint on offending __solve_symlinks call and tell
> contents of both arguments? (i.e. before any _fixpath'ing)
Test 3: Solving c:../../../../../../djgpp.204/tests/libc/compat/unistd/test1
__symlink_path:
"c:../../../../../../djgpp.204/tests/libc/compat/unistd/test1"
__real_path:
""
I have plain CVS, plus these diff below. If I don't the diff below applied,
then it looked like __real_path contained the result of the last
__solve_symlinks call (__symlink_path ending with file1 instead of test1).
Index: xsymlink.c
===================================================================
RCS file: /cvs/djgpp/djgpp/tests/libc/compat/unistd/xsymlink.c,v
retrieving revision 1.5
diff -p -u -3 -r1.5 xsymlink.c
--- xsymlink.c 23 Dec 2002 11:46:10 -0000 1.5
+++ xsymlink.c 30 Jan 2003 15:11:34 -0000
@@ -242,6 +242,9 @@ static int test_success(const int test_n
char real_fixed[FILENAME_MAX + 1];
char expect_fixed[FILENAME_MAX + 1];
char err_buf[50];
+
+ memset(real_name, 0, sizeof(real_name));
+
if (!__solve_symlinks(slink, real_name))
{
sprintf(err_buf, "Test %d failed ", test_num);
@@ -268,6 +271,9 @@ static int test_failure(const int test_n
char buf[FILENAME_MAX + 1];
char err_buf[50];
errno = 0;
+
+ memset(buf, 0, sizeof(buf));
+
if (__solve_symlinks(slink, buf))
{
fprintf(stderr,
Perhaps you could e-mail me your version of the xsymlink.c test sources?
> > Maybe the test "xsymlink" should take a drive specifier. It could then
> > create a cross-drive symlink to any file on that disk. E.g. c:/temp/foo
> > -> d:/whatever.
>
> BTW, I wonder if we could do something like SUBST does at runtime...
What would you do, if we could?
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -