delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/27/03:41:45

Date: Wed, 27 May 1998 10:33:30 +0200
From: Alexander Bokovoy <bokovoy AT bspu DOT ac DOT by>
Reply-To: Alexander Bokovoy <bokovoy AT bspu DOT ac DOT by>
Organization: BSPU named after Maxim Tank
Message-ID: <17439.980527@bspu.unibel.by>
To: djgpp AT delorie DOT com
Subject: Re[2]: Bug in GCC 2.8.0? MAXFILE is equal 9 while LFN are supported
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980526191856 DOT 20866H-100000 AT is>
Mime-Version: 1.0

Hello Eli,

26.05.98, you wrote:
> On Mon, 25 May 1998, Alexander Bokovoy wrote:
>> I  found that constant MAXFILE defined in dir.h is equal 9 which means
>> that  buffer  for  file name generated by fnsplit() must be at least 8
>> symbols  length.  But DJGPP's libc support long file names (LFN) up to
>> 260  symbols  length  and  in  such case buffer must be greater than 8
>> symbols  to  proper  file name handling. It means that every time when
>> fnsplit() proceed with file name longer than 8 symbols the result will
>> be undefined.
> I understand that this is a bug in the example only, because the rest of
> the code doesn't depend on MAXFILE.  Is that what you are telling, or is 
> there any additional problems with the function itself?
Yes,  but  the  same  problem  can arise and at other users, since the
documentation  on  libc  speaks that the buffer for filename should be
length MAXFILE. I suggest to change this constant to be larger in the
next releases of GCC.


Alexander Bokovoy, <bokovoy AT bspu DOT unibel DOT by>
--=== The Soft Age coming soon ===--


- Raw text -


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