www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/14/03:19:53

Date: Sun, 14 Apr 1996 10:05:31 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Nick Burton <nmr AT doc DOT ntu DOT ac DOT uk>
Cc: djgpp AT delorie DOT com
Subject: Re: dir.h problem
In-Reply-To: <199604121413.KAA20749@delorie.com>
Message-Id: <Pine.SUN.3.91.960414095731.1640Z-100000@is>
Mime-Version: 1.0

On Fri, 12 Apr 1996, Nick Burton wrote:

> The actual output is,
> GTEST.TGA
> ME.TGA
> RAMID.TGA
> NO10.TGA
> S1.TGA
> S2.TGA
> S4.TGA
> Z3.TGA
> 
> As you can see the first two chars of each line are missing,
> can anyone help please.

Are you calling `findfirst' from a C++ program?  There is a known bug in 
the C++ compiler that comes with GCC 2.7.2: it doesn't pack structures, 
and struct ffblk is defined with __attribute__((packed)).

To work around, either call `findfirst' from a C function, or surround 
the definition of struct ffblk (on <dir.h>) with #pragma pack(1) ... 
#pragma pack() lines.

- Raw text -


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