Mail Archives: djgpp-workers/2001/01/07/15:57:00
--PNTmBPCT7hxwcZjr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Sun, Jan 07, 2001 at 07:44:51PM +0200, Eli Zaretskii wrote:
> if (!__solve_dir_symlinks(path, real_path))
> return -1;
> static int try_fsext (int *ret, const char *path, struct stat *statbuf)
> {
> return __FSEXT_call_open_handlers (__FSEXT_stat, ret, &path);
> }
Why are you passing statbuf arg here? Where it is used? Am I
missing something?
I've made a patch without this arg. It is attached and waiting
for comments.
Laurynas
--PNTmBPCT7hxwcZjr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="lstat.c.diff"
Index: lstat.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/sys/stat/lstat.c,v
retrieving revision 1.3
diff -u -r1.3 lstat.c
--- lstat.c 2000/08/25 11:39:49 1.3
+++ lstat.c 2001/01/07 20:50:53
@@ -1,3 +1,4 @@
+/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
@@ -872,6 +873,15 @@
return 0;
}
+/* A wrapper around __FSEXT_call_open_handlers(), to provide its
+ * arguments properly.
+ */
+static inline int fsext_wrapper(int * ret, const char * path)
+{
+ return __FSEXT_call_open_handlers(__FSEXT_stat, ret, &path);
+}
+
+
/* Main entry point. This is library lstat() function.
*/
@@ -907,8 +917,8 @@
return -1;
}
- if (__FSEXT_call_open_handlers(__FSEXT_stat, &ret, &real_path))
- return ret;
+ if (fsext_wrapper(&ret, real_path))
+ return ret;
if (stat_assist(real_path, statbuf) == -1)
{
--PNTmBPCT7hxwcZjr--
- Raw text -