www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/30/16:28:02

Sender: nate AT cartsys DOT com
Message-ID: <35C0CC65.15E950C7@cartsys.com>
Date: Thu, 30 Jul 1998 12:41:25 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
MIME-Version: 1.0
To: "D. H. Bahi" <bahi AT ctron DOT com>
CC: djgpp AT delorie DOT com
Subject: Re: zip - DOS and long file names (LFN=n) - ENOENT
References: <35C088DD DOT 22063174 AT ctron DOT com>

D. H. Bahi wrote:
> 
> i'm kind of frustrated and this may be longer than need be.
> oh well. thanks for reading on anyway....
> 
> my question is - are pkunzip or unzip386 are the only
> decompression programs that may be used to explode
> the packages? and if so why. and if not what's my problem?

You can use WinZip, but that requires that you get LFN's working (which
is probably a Good Thing anyway).  Read on.
 
> i ask because i used WinZip in windows - yes it was
> slow going package by package - but i didn't have
> unzip386, and now it is done.
> 
> so i am trying to do a little cout << "hello world"
> action and the compiler barfs with the message that
> it cannot find streambuf.h (no such file or directory
> ENOENT).
 
> well, i can see the file is in lang/cxx, but
> prompt> find /djgpp281 -name streambuf.h -print
> returns nothing. something weird is going on here.
> time to read the FAQ.

The root cause of all this is the fact that `streambuf.h' is more than
the usual DOS 8+3.  Thus, without LFN's working, all DOSish programs
will see `stream~1.h' or something similar, which is clearly not the
same as `streambuf.h'.
 
> ok. so there is a variable in djgpp.env called LFN and the FAQ
> says things all over the place that leave me with more questions
> than answers:
> 
>      3.3 Will it work under Windows/NT?
> 
>   1) "Note that the long filename API for DOS box is not
>      supported by current versions of Win/NT, so you cannot
>      have long filenames there from DJGPP programs."
> 
>      what is this trying to say? is a dos box what you get
>      when you launch "Programs->MSDOS Prompt" or is it what
>      you get when you "shutdown->restart in MS-DOS Mode"? is
>      there a difference? what should one do to make djgpp work
>      then? can it find long file names in DOS mode? vs the box?

Long file names only work when Windows is *running*, thus only in a DOS
box.  Are you using NT?  You don't say.

If you are using NT, you should leave LFN=N and unzip with a non-LFN
unzipper, like PKUNZIP.  The file will then be `streambu.h', excess
characters will always be truncated, and you can go happily on your way.

There is also an experimental driver to allow LFN's in NT DOS boxen. 
Check the archives.

> 
>      8.1 GCC can't find headers or libraries
> 
>   2) "Note that if you run DJGPP under Win95/NT or any other env
>      that supports long filenames, you cannot use long names of
>      the directories in the pathname of djgpp.env when you set
>      the above variable in the environment, you should use their
>      8+3 aliases instead.
> 
>      well that's clear enough.
> 
>      8.2 GCC can't find C++ headers
> 
>   3) "If you have problems with header files with long filenames,
>      and you run under Win95 or some other environment which allows
>      for long filenames, try disabling the LFN support in DJGPP, by
>      setting the LFN envirnonmenet variable to No, like this:
>         set LFN=n
>      "(DJGPP comes with LFN disabled by default on [sic] the DJGPP.ENV
>      file, but you might have enabled it.)"
> 
>      and it goes on to talk about renaming munged files to their
>      long names and how to keep win95 from munging 8 character names.
> 
>      well, LFN=n by default, huh? so why might one have set LFN=y ?

If you wanted long file names to work.  It was only N by default since
the LFN support was not known to be stable enough to use by default.  In
v2.02, it will be Y by default.

>      since i used a zipper other than the two suggested i do not see
>      any munged names from WindowsExplorer - might this not be the case
>      if i had used pkunzip or unzip386 - would i then see munged names
>      from withing windows too?

"Munged" here refers to the numeric tails used to convert long names to
8+3.  Of course you won't see those from a Windows app.  If you'd used
PKUNZIP or something equivalent, you'd never see any hint of a long
name.

>      does "running under Win95" mean "Programs->MSDOS Prompt" or
>      "shutdown->restart in MS-DOS Mode"? is there any difference?

MSDOS prompt.  There is quite definitely a difference.  LFN's will not
work at all in the second case, for instance.

> i set the LFN=y and rebooted and it didn't work in DOS Prompt or Mode. funny
> though now it works in a DOS Prompt but not in DOS Mode and the only other thing
> i did was add the FILES=20 to my config.sys (which was empty). so there it is.
> i hope this helps someone and gets more FAQ attention in the future (what zippers
> do, when to use LFN, when it won't work, and how to get around it not working.)

Are you using NT, then?
-- 

Nate Eldredge
nate AT cartsys DOT com


- Raw text -


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