delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/08/07/03:09:03

Message-id: <fc.000f77f30012d22e3b9aca00c12e18d9.12d24f@bni.mg>
Date: Tue, 07 Aug 2001 09:27:27 +0300
Subject: Re(2): Q: Long file names, djgpp 2.95.3 / WinNT 4.00 NTFS
To: djgpp AT delorie DOT com
Cc: djgpp AT delorie DOT com
From: "NirinaMichel Ratoandromanana/DF" <n DOT ratoandromanana AT bni DOT mg>
References: <9kn4vo$s4$1 AT newstoo DOT ericsson DOT se>
<s3kumt46rt9i8k7noi9eo5t8evd4oh64g0 AT 4ax DOT com>
In-Reply-To: <s3kumt46rt9i8k7noi9eo5t8evd4oh64g0@4ax.com>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

IMHO, the problem is not about the code built with gcc but WinNt itself.
Win9x/2k/Me allow a program to access files in the LFN format, even if it
is a 16 bit executable, through an API. With WinNt you don't have this
gadget. Andrew Crabtree and Wojciech Galazka wrote an utility
program:lfnload to implement this API for WinNt. I think you may try it.
Pls check http://www.cybertrails.com/~fys/longfile.htm. and Simtel along
with other djgpp stuff.
 ntlfn08b.zip 25Ko.

djgpp AT delorie DOT com a écrit:
>On Tue, 7 Aug 2001 00:33:57 +0200, "Boris Gaspic"
><boris DOT gaspic AT am2 DOT ericsson DOT se> wrote in comp.os.msdos.djgpp:
>
>> 
>> Hello,
>> 
>> I am new to djgpp. I am trying to write a program which
>> -must- use long file names on a WinNT 4.00 NTFS disk.
>> And I can't fopen() anything that's not 8.3. (a big problem
>> to me, since I'm dealing with thousands of files whose name
>> is a combination of two 32-bit database keys, and I must
>> access them knowing these keys...)
>> 
>> So it's about the fopen ("123456789.345678901", "rb");
>> Is there something I'm doing wrong? Am I -supposed-
>> to be able to use LFN in a shell on NT4.0? I can open the
>> files fine in the "123456~4.345" format, but nothing in
>> LFN. The printf ("%d\n", _USE_LFN); dumps a zero. (?!?)
>> Something I should change in DJGPP.ENV? (I use the original)
>> Or do I need a different libc or something?
>> 
>> I'd be pretty thankful for any solution which works on the
>> NT4.0 / NTFS, regardless if the same program would
>> later work on a different OS/FSYS combination or not.
>> 
>> Thank you,
>> Boris
>
>I can't help you with the LFN problem under NT, but if you basically
>only need this to solve one particular task you might consider
>downloading and using lcc-win32, a C only compiler that makes native
>Win32 executables (including console applications) using the C
>run-time library DLL built into Windows.
>
>If you're interested you can find it at
>http://www.cs.virginia.edu/~lcc-win32/
>
>-- 
>Jack Klein
>Home: http://JK-Technology.Com
>FAQs for
>comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
>comp.lang.c++ http://www.parashift.com/c++-faq-lite/
>alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq


- Raw text -


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