www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/06/07/06:28:29

Date: Fri, 7 Jun 1996 12:24:25 +0200 (METDST)
From: Robert Hoehne <robert DOT hoehne AT Mathematik DOT TU-Chemnitz DOT DE>
To: djgpp-workers AT delorie DOT com
Subject: Re: long file name bug in 'make'
Message-Id: <Pine.HPP.3.91.960607121815.14171C-100000@newton.mathematik.tu-chemnitz.de>
Mime-Version: 1.0

I have found a patch for make 3.73, to remove the bug with LFN's.
This patch works for me ok in both cases, when LFN is set to y
or n.

Some comments about the changes:

1) I use the variable '__opendir_flags', to tell 'readdir' not to
   convert the filenames to lower case, when LFN is enabled, with
   the help of the very good macro '_USE_LFN' in the 'init_dir'
   function.

2) The function 'dosify' must not modify the filename, if LFN is
   enabled.


Robert


*** i:/djgpp.v2/gnu/make-3.73/dir.c	Tue Nov  8 05:14:50 1994
--- dir.c	Wed Jun  5 18:52:42 1996
***************
*** 49,54 ****
--- 49,58 ----
  
  #ifdef __MSDOS__
  #include <ctype.h>
+ #if (DJGPP > 1)
+ #include <libc/dosio.h>
+ int __opendir_flags = 0;
+ #endif
  
  static char *
  dosify (filename)
***************
*** 58,63 ****
--- 62,70 ----
    char *df;
    int i;
  
+ #if (DJGPP > 1)
+   if (_USE_LFN) return filename;
+ #endif
    if (filename == 0)
      return 0;
  
***************
*** 610,615 ****
--- 617,625 ----
  void
  init_dir ()
  {
+ #if (DJGPP > 1)
+   if (_USE_LFN) __opendir_flags = __OPENDIR_PRESERVE_CASE;
+ #endif
    __glob_opendir_hook = open_dirstream;
    __glob_readdir_hook = read_dirstream;
    __glob_closedir_hook = (void (*) __P ((__ptr_t stream))) free;


*****************************************************************
* Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau *
* Post:    Am Berg 3, D-09573 Dittmannsdorf                     *
* e-Mail:  Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE              *
* WWW:     http://www.tu-chemnitz.de/~rho                       *
*****************************************************************

- Raw text -


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