www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/09/16:57:14

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200201092157.WAA24942@father.ludd.luth.se>
Subject: Re: Proposed lstat.c patch for Win2000/XP device bit fix
In-Reply-To: <10201091832.AA16353@clio.rice.edu> from Charles Sandmann at "Jan 9, 2002 12:32:20 pm"
To: djgpp-workers AT delorie DOT com
Date: Wed, 9 Jan 2002 22:57:01 +0100 (MET)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to Charles Sandmann:
> strcmp is already used in the same procedure - so nothing new was added.
> see lstat.c source for details.

Indeed. Here's a patch for that (manually cut-and-pasted, so will
probably not apply cleanly and there some offset as well due to my GCC
warning corrections):

Index: djgpp//src/libc/posix/sys/stat/lstat.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/sys/stat/lstat.c,v
retrieving revision 1.8
diff -p -u -r1.8 lstat.c
--- djgpp//src/libc/posix/sys/stat/lstat.c      2001/12/01 20:22:37     1.8
+++ djgpp//src/libc/posix/sys/stat/lstat.c      2002/01/09 21:45:47

@@ -773,7 +784,8 @@ stat_assist(const char *path, struct sta
   statbuf->st_atime = statbuf->st_mtime = statbuf->st_ctime =
     _file_time_stamp(dos_ftime);

-  if ( ! strcmp(ff_blk.lfn_magic,"LFN32") )
+  if ( *(long *)(&(ff_blk.lfn_magic[0])) == 'L'+('F'<<8)+('N'<<16)+('3'<<24)
+    && *(short *)(&(ff_blk.lfn_magic[4])) == 0+('2'<<8) )
     {
       unsigned xtime;
       xtime = *(unsigned *)&ff_blk.lfn_ctime;


What parameters should I give to cvs to get the v2.03 update branch?


Right,

						MartinS

- Raw text -


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