www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/16/01:23:03

Date: Thu, 16 Jan 1997 08:15:07 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Scott Blachowicz <scott AT statsci DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: DJGPP w/long file name support
In-Reply-To: <m0vkZZl-0003wJC@main.statsci.com>
Message-ID: <Pine.SUN.3.91.970116080226.16632A-100000@is>
MIME-Version: 1.0

On Wed, 15 Jan 1997, Scott Blachowicz wrote:

> Nope - it was MSVC compiled.

Then it is clear why it works.  MSVC links your program against native
Win32 libraries that call the NT filemanager to do the job.  So you get
what is called ``a console application'' which is a Win32 program, not a
DOS program that DJGPP produces. 

> > If not, somebody should find out how can a DOS program access LFN on NT
> > (e.g., how does NT Command.com does it when you type DIR?) and add that
> > support to low-level libc functions in DJGPP, or at least post the
> > information so others could add it.
> 
> Yes!  Hmmm..maybe 'dir' is a builtin for the NT cmd.exe and cmd.exe uses
> the underlying _findfirst() function?

Most probably, see above.  But if somebody (you?) would see what's
involved in calling the Win32 function which `_findfirst' calls, they will
probably see that it boils down to some Int XX call (after thunking back
and forth through the layered NT filesystem).  It is possible that calling
that Int whatever with a certain register layout will let you get the LFN
on NT from DJGPP.  Armed with that knowledge, we could add LFN support on
NT to DJGPP library.  (If you decide to give it a try, be sure to browse
the latest release 53 of the Interrupt List, maybe this info is already
there; I'd also suggest to post a question to suitable NT-related news
groups.)

> I don't suppose there's any way one could somehow detect that the program
> is being run in an NT environment,

Actually, this is quite easy.

> then somehow access the system supplied DLLs for getting this info?

This *is* the missing link.

> I don't really know what the pieces/players are here and how they 
> relate to each other (so I'm probably not the right person to be 
> finding/implementing this :-)).

The right person to do this is anybody with enough motivation and access 
to relevant platform(s).  Experience shows that nothing in DJGPP gets 
done without a person that has motivation and resources to do it.

> Hmmm...have the GNU make sources made it to a point where they just build
> (and work) using native MS tools?

The sources of the latest GNU Make 3.75 indicate that it supports Win32,
so you should be able to compile it with MSVC.  But you will have to look 
on the net for the rest of the tools (most GNU packages don't support 
Win32 out of the box), and I'm not sure what quality you will find in 
those ports.

- Raw text -


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