Date: Wed, 19 Mar 1997 20:11:50 +0300 (IDT) From: Eli Zaretskii To: djgpp-workers AT delorie DOT com Subject: Patch for _use_lfn (yet again) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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");