delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/17/12:52:27

Message-ID: <399C178E.E9B73BA2@softhome.net>
Date: Thu, 17 Aug 2000 18:49:18 +0200
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: Mozilla 4.74 [en] (Win98; U)
X-Accept-Language: lt,en
MIME-Version: 1.0
To: DJGPP Workers <djgpp-workers AT delorie DOT com>
Subject: Patch: FSEXT nits for stat()/lstat()
Reply-To: djgpp-workers AT delorie DOT com

When I've moved most code from stat() to lstat(), FSEXT hook
has been moved too. However, its name __FSEXT_stat is misleading
now, because it actually should be __FSEXT_lstat. Simple switch
is impossible due to backwards compatibility (sounds like a curse ;),
so I have added simple #define __FSEXT_lstat __FSEXT_stat in header,
and updated docs to refer to __FSEXT_lstat.

BTW, I was surprised: fsext.txh did not contain documentation for
__FSEXT_stat. I bet it didn't for 5 years ;). I've added that too.

Any comments?

Laurynas

Index: djgpp/include/sys/fsext.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/sys/fsext.h,v
retrieving revision 1.5
diff -u -r1.5 fsext.h
--- fsext.h	2000/08/16 18:28:19	1.5
+++ fsext.h	2000/08/17 16:50:27
@@ -37,6 +37,8 @@
   __FSEXT_symlink
 } __FSEXT_Fnumber;
 
+#define __FSEXT_lstat __FSEXT_stat
+
 /* _ready gets passed a fd and should return a mask of these,
    as if we were emulating "int ready(int fd)" */
 #define __FSEXT_ready_read	1
Index: djgpp/src/libc/fsext/fsext.txh
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/fsext/fsext.txh,v
retrieving revision 1.8
diff -u -r1.8 fsext.txh
--- fsext.txh	2000/08/16 18:30:38	1.8
+++ fsext.txh	2000/08/17 16:50:36
@@ -110,6 +110,16 @@
 A file dup2 handler (@pxref{dup2}).  This is called when two different
 file descriptors are used to refer to the same open file.
 
+@item __FSEXT_lstat
+
+A file lstat handler (@pxref{lstat}).  This extension should provide
+information about stated file.
+
+@item __FSEXT_stat
+
+This is just another name for @code{__FSEXT_lstat} handler, due
+to backwards compatibility.
+
 @item __FSEXT_fstat
 
 A file fstat handler (@pxref{fstat}).  The extension should fill in

- Raw text -


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