www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/27/08:02:45

Message-Id: <3.0.1.32.19980127070343.007ebdf0@yacker.xiotech.com>
Date: Tue, 27 Jan 1998 07:03:43 -0600
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
From: Randy Maas <randym AT acm DOT org>
Subject: Re: stat patch
Cc: djgpp-workers AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.980127144350.843C-100000@is>
References: <3 DOT 0 DOT 1 DOT 32 DOT 19980126152600 DOT 007f3d80 AT yacker DOT xiotech DOT com>
Mime-Version: 1.0

--=====================_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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019