Mail Archives: djgpp-workers/2003/01/30/15:56:19
Hello.
Currently we call findfirst from __internal_readlink with the attributes
set to 0. I think we should pass in some combination of the FA_* bits.
The patch below passes in FA_RDONLY|FA_ARCH. I know these bits
are ignored by the INT 21h subfunction that's used by findfirst,
but I think we should pass them in, because:
(a) it shows what we mean to do;
(b) it won't break if something does ever support those bits.
OK to commit?
Bye, Rich =]
Index: src/libc/compat/unistd/_irdlink.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/unistd/_irdlink.c,v
retrieving revision 1.7
diff -p -u -3 -r1.7 _irdlink.c
--- src/libc/compat/unistd/_irdlink.c 29 Dec 2002 05:59:00 -0000 1.7
+++ src/libc/compat/unistd/_irdlink.c 30 Jan 2003 20:53:31 -0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */
@@ -44,7 +45,7 @@ int __internal_readlink(const char * __p
__path, __buf, __max))
return ret;
/* We will check if file exists by the way */
- if (findfirst(__path, &file_info, 0))
+ if (findfirst(__path, &file_info, FA_RDONLY|FA_ARCH))
{
errno = ENOENT;
return -1;
- Raw text -