www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/23/22:02:50

From: Dave Pearson <davep AT hagbard DOT demon DOT co DOT uk>
Subject: Win95 LFNs With v2.01 (Changes?)
Keywords: DJGPP v2.01 WINDOWS 95 WIN95 LFN LONG FILE NAMES
Sender: usenet AT hagbard DOT demon DOT co DOT uk
Organization: Hagbard's World (A Private Internet Host)
Message-ID: <slrn56rmuq.41.davep@hagbard.demon.co.uk>
Date: Wed, 23 Oct 1996 08:48:28 GMT
Summary: How has the way LFNs are used changed with v2.01?
Newsgroups: comp.os.msdos.djgpp
Lines: 46
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I've been having a bit of a play with v2.01 of DJGPP and seem to have
found what appears to be a big(ish) difference in the way that long
filenames are handled in a 2.01 compiled program as opposed to the way
they are handled with a 2.00 compiled program.

I don't know that it's a "bug" as such, but I can't find anything that
documents the change so I was wondering if somone could point me in
the direction of any details, or perhaps clear up the "problem"?

With 2.0, any of my code that I ran under Win95 would happily open
long file names no matter what the setting of LFN was. With 2.01 it
seems that the setting of LFN makes a big difference. Is this correct?

Take the example code below:

----------------------------------------------------------------------
#include <stdio.h>

int main( int argc, char **argv )
{
    FILE *f = fopen( argv[ 1 ], "r" );
    
    if ( f != NULL ) {
	printf( "That's fine\n" );
	fclose( f );
    } else {
	perror( argv[ 1 ] );
    }
    return( 0 );
}
----------------------------------------------------------------------

If I compile this with 2.0, and LFN is not in the environment and in
~djgpp/djgpp.env LFN is set to N (and DJGPP points to it) it will
happily open a long file name. With 2.01 it won't, I either have to
set LFN to 'y' in the environment, set LFN to 'y' in ~djgpp/djgpp.env
or unset DJGPP.

Am I going mad or has there been a change?

-- 
Take a look in Hagbard's World: |     w3ng - The WWW Norton Guide reader.
http://www.acemake.com/hagbard  |  ng2html - The NG to HTML converter.
Resist UK Internet Censorship:  |       eg - Norton Guide reader for OS/2.
http://babylon.ivision.co.uk    |   dgscan - DGROUP scanner for Clipper.

- Raw text -


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