Mail Archives: djgpp/1996/04/14/03:19:53
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 -