delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/17/11:25:34

Date: Sun, 17 Oct 1999 14:16:58 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "A. Darrow" <msmsh AT freewwweb DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Newbie frustration: headers not found
In-Reply-To: <s0buirjhu270@corp.supernews.com>
Message-ID: <Pine.SUN.3.91.991017141635.25053N-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 14 Oct 1999, A. Darrow wrote:

> I beg to differ, the LFN's are still there according to
> Diskedit they just don't show up in the DIR command
> listing. Did you alter your dir command through
> programming or a different DOS command interpreter?

No, I used the stock version of the DIR command built into
COMMAND.COM.  You do use COMMAND.COM as your shell, do you?

If you also used DIR from COMMAND.COM, then I suspect that long file
names are somehow disabled in your version of Windows.  I'm attaching
below a simple test program that checks long file name support.
Please compile it, like this:

	gcc -Wall -O2 -o tlfn tlfn.c

then run it like this:

        tlfn

and tell here what did it print.

> I tried unzip32 with the result that there were no LFN
> entries at all, not even those pesky numeric tails. All
> entries longer than the standard 8+3 were all truncated.

This is another sign that long file name support is disabled, at least
as far as DJGPP programs are concerned.  You should, at least, to be
able to compile C++ proghrams now, if you set LFN=n in the environment.

Can you create a file with a long file name with some Windows utility,
like Notepad?

And, sorry for asking the obvious, but you are running Windows 9X, not
Windows NT or Windows 2000, right?

> Oh this is just so much fun!!

Your case is somehow very special, I have never seen one like it, not
on Windows 9X.  Please keep looking into it.  We will solve it,
eventually.

Here's the source of the test program:
------------------------ tlfn.c ----------------------------------
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <crt0.h>

int main (int argc, char *argv[])
{
  char *path = ".";
  unsigned flags;
  char fsname[32];
  int  maxfile, maxpath;

  printf ("_USE_LFN reports %d at startup\n", _USE_LFN);
  if (argc > 1)
    path = argv[1];
  flags = _get_volume_info (path, &maxfile, &maxpath, fsname);
  printf ("Flags: %x, MaxFile: %d, MaxPath: %d, FSName: %s\n",
	  flags, maxfile, maxpath, fsname);
  _crt0_startup_flags |= _CRT0_FLAG_NO_LFN;
  printf ("_USE_LFN reports %d when _CRT0_FLAG_NO_LFN is set\n", _USE_LFN);
  _crt0_startup_flags &= ~_CRT0_FLAG_NO_LFN;
  putenv ("LFN=y");
  printf ("_USE_LFN reports %d when LFN is set to Y\n", _USE_LFN);
  putenv ("LFN=n");
  printf ("_USE_LFN reports %d when LFN is set to N\n", _USE_LFN);
  return 0;
}

- Raw text -


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