Mail Archives: djgpp/1996/05/19/07:55:04
>>>>> "Scott" == Scott Blachowicz <scott AT statsci DOT com>
Scott> So, does anybody have any recommendations for a way to get DJGPP
Scott> to work? Or for a GNU make that works under Windows 95 and NT
Scott> that recognizes long filenames properly?
Well...I did some digging around and found that I could get what I want by
1) turning on the __OPENDIR_PRESERVE_CASE flag for the DJGPP opendir()
function in the djlsr200.zip file and
2) disabling the dosify() function in the dir.c file in the mak373s.zip
distribution.
So, I came up with these patches (probably mangled in transmission and not
formatted to "standards", but anyways) to add support for a PRECASE
variable (like the LFN variable you can set in DJGPP.ENV) in DJGPP and to
add a NO_DOSIFY cpp define for make-3.73.
--- dirent-old/opendir.c Tue Jan 16 02:38:34 1996
+++ dirent-new/opendir.c Sat May 18 15:22:44 1996
@@ -10,6 +10,9 @@
#include <sys/stat.h>
#include "dirstruc.h"
+#include <ctype.h>
+#include <libc/dosio.h>
+
DIR *
opendir(const char *name)
{
@@ -25,6 +28,17 @@
return 0;
}
+ /* Check for PRESERVE_CASE override */ {
+ char *cp = getenv("PRECASE");
+ if (_USE_LFN && cp) {
+ if (tolower(*cp) == 'y') {
+ __opendir_flags |= __OPENDIR_PRESERVE_CASE;
+ }
+ else if (tolower(*cp) == 'n') {
+ __opendir_flags &= ~__OPENDIR_PRESERVE_CASE;
+ }
+ }
+ }
dir->flags = __opendir_flags;
/* Make absolute path */
--- make-3.73-old/dir.c Tue Nov 8 05:14:50 1994
+++ make-3.73-new/dir.c Sat May 18 15:10:23 1996
@@ -50,6 +50,9 @@
#ifdef __MSDOS__
#include <ctype.h>
+#ifdef NO_DOSIFY
+#define dosify(filename) (filename)
+#else
static char *
dosify (filename)
char *filename;
@@ -88,6 +91,7 @@
*df = 0;
return dos_filename;
}
+#endif
#endif
/* Hash table of directories. */
Three cheers for having sources available! :-)
--
Scott Blachowicz Ph: 206/283-8802x240 Mathsoft (Data Analysis Products Div)
1700 Westlake Ave N #500
scott AT statsci DOT com Seattle, WA USA 98109
Scott DOT Blachowicz AT seaslug DOT org
- Raw text -