www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/26/16:24:14

Message-Id: <3.0.1.32.19980126152600.007f3d80@yacker.xiotech.com>
Date: Mon, 26 Jan 1998 15:26:00 -0600
To: djgpp-workers AT delorie DOT com
From: Randy Maas <randym AT acm DOT org>
Subject: stat patch
Mime-Version: 1.0

--=====================_885871560==_
Content-Type: text/plain; charset="us-ascii"

Hello all,

Here is that patch to stat to allow file system extensions to be stat'd
(not to be confused with fstat'd -- I believe I've already sent that patch
in... 8-).  It works as an open handler call.  Previously I had suggested
that maybe opening the file and the fstat'ing it would be a good way to
keep things simple.  I've decided not to propose that since it sometimes
wouldn't work (if the file was already exclusively opened) and sometimes
would be wrong (eg, the st_atime field could/should be modified by the
open...).

So attached is the diff to stat.c that lets fsextsbe stat'd.
Randy
randym AT acm DOT org
--=====================_885871560==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="stat.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)

--=====================_885871560==_
Content-Type: text/plain; charset="us-ascii"



--=====================_885871560==_--

- Raw text -


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