delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/03/19/12:23:23

Date: Wed, 19 Mar 1997 20:11:50 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: djgpp-workers AT delorie DOT com
Subject: Patch for _use_lfn (yet again)
Message-ID: <Pine.SUN.3.91.970319200852.21619B-100000@is>
MIME-Version: 1.0

The last version of `_use_lfn' (with the patch by Robert) makes trouble 
in dumped Emacs (it remembers some variables from the machine where it 
was dumped).  Here's the patch relative to Robert's version (I did some 
limited testing on Windows 95 as well, but please test this anyway):

*** src/libc/dos/lfn/_use_lfn.c~2	Thu Mar 13 17:11:14 1997
--- src/libc/dos/lfn/_use_lfn.c	Wed Mar 19 18:38:54 1997
*************** _use_lfn (const char *path)
*** 122,127 ****
--- 122,136 ----
      return 0;
    }
  
+   /* Forget everything we knew before we were dumped (Emacs).  */
+   if (use_lfn_bss_count != __bss_count)
+     {
+       use_lfn_bss_count = __bss_count;
+       filesystem_flags = _FILESYS_UNKNOWN;
+       _lfnenv = 'y';
+       last_drive = 0;
+     }
+ 
    same_drive_as_last_time = 1;
    if (path)
    {
*************** _use_lfn (const char *path)
*** 141,153 ****
  
    if (!same_drive_as_last_time
        || last_env_changed  != __environ_changed
!       || use_lfn_bss_count != __bss_count
!       || filesystem_flags  == _FILESYS_UNKNOWN)	/* paranoia */
    {
      /* Check the environment for $LFN.  */
      char *lfnenv;
  
-     use_lfn_bss_count = __bss_count;
      last_env_changed  = __environ_changed;
  
      lfnenv = getenv ("LFN");
--- 150,160 ----
  
    if (!same_drive_as_last_time
        || last_env_changed  != __environ_changed
!       || filesystem_flags  == _FILESYS_UNKNOWN)
    {
      /* Check the environment for $LFN.  */
      char *lfnenv;
  
      last_env_changed  = __environ_changed;
  
      lfnenv = getenv ("LFN");

- Raw text -


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