Mail Archives: djgpp-workers/1998/01/27/08:02:45
--=====================_885927823==_
Content-Type: text/plain; charset="us-ascii"
At 02:47 PM 1/27/98 +0200, you wrote:
>> *** src\libc\posix\sys\stat\stat.c~1 Sun Nov 16 14:04:58 1997
>> --- src\libc\posix\sys\stat\stat.c Mon Jan 26 15:01:46 1998
Looks like I wasn't paying attention. A diff with the proper slashes is
attached (let me double check, looks correct).
>> + if (__FSEXT_call_open_handlers(__FSEXT_stat, &ret, &path))
>> + return ret;
>
>This doesn't pass `statbuf' to the handler. How on earth is this
>supposed to work?
Actually thats what I thought the first time I saw a fsext -- how on earth
did you guys get the first argument in the va_list? From
src/libc/dos/io/_open.c:
if (__FSEXT_call_open_handlers(__FSEXT_open, &rv, &filename))
My understanding of whats going on is that va_list is simply a void* that
points to a position in the stack; the &first_argument_name gets that
position, just like a va_start. DJ is probably the best authority on the
subject.
Randy
--=====================_885927823==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="statc.dif"
*** src/libc/posix/sys/stat/stat.c~1 Sun Nov 16 14:04:58 1997
--- src/libc/posix/sys/stat/stat.c Mon Jan 26 15:01:46 1998
***************
*** 108,112 ****
#include <dos.h>
#include <dir.h>
!
#include <dpmi.h>
#include <go32.h>
--- 108,112 ----
#include <dos.h>
#include <dir.h>
! #include <sys/fsext.h>
#include <dpmi.h>
#include <go32.h>
***************
*** 825,829 ****
{
int e = errno;
! int pathlen;
if (!path || !statbuf)
--- 825,829 ----
{
int e = errno;
! int pathlen, ret;
if (!path || !statbuf)
***************
*** 845,848 ****
--- 845,851 ----
return -1;
}
+
+ if (__FSEXT_call_open_handlers(__FSEXT_stat, &ret, &path))
+ return ret;
if (stat_assist(path, statbuf) == -1)
--=====================_885927823==_
Content-Type: text/plain; charset="us-ascii"
--=====================_885927823==_--
- Raw text -