Xref: news2.mv.net comp.os.msdos.djgpp:4001 Newsgroups: comp.os.msdos.djgpp From: Scott Blachowicz Subject: Re: Are "real" long filenames possible with DJGPP v2 (make)? Message-ID: Lines: 78 Sender: scott AT apple Reply-To: scott AT statsci DOT com Organization: Mathsoft, Inc (Data Analysis Products Div) References: Date: Sat, 18 May 1996 22:52:11 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp >>>>> "Scott" == Scott Blachowicz 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 #include "dirstruc.h" +#include +#include + 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 +#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