C problem...se megethos domhs
Aggelos Economopoulos
aoiko at cc.ece.ntua.gr
Sat Jan 24 20:42:28 EET 2004
On Sat, 24 Jan 2004 19:30:11 +0200
"John Tsiombikas (Nuclear / the Lab)" <nuclear at siggraph.org> wrote:
> Aggelos Economopoulos wrote:
> > ii) uparxei to option '-fpack-struct' (or something), alla epeidh ta
> perissotera programmata 8eloun apla na einai packed ta structs pou
> grafontai/diabazontai sto disko/diktuo, uparxei to
> >
> > struct a {
> > char c;
> > int i;
> > } __attribute__((packed));
>
> Alla bebea afou to anothen den einai C, kalo tha einai an se
> endiaferei to portability tou kodika (kathos kai to readability) kati
> tetoia na min ta xrisimopoieis.
Gia poio logo to -fpack-struct einai pio portable apo to
/* FIXME: need to check for specific gcc version */
#ifdef _GNUC_
#define attr_packed __attribute__((packed))
#else
#define attr_packed
#endif /* _GNUC_ */
?
> Kai genikos anti na kaneis dump ena struct sto disko, einai poly
> kalyteri idea na organoseis kapos ena fileformat. opote to packing ton
> structs kai alla tetoia den einai kan issue.
To "na organoseis kapos ena fileformat" stereitai periexomenou.
Mhpws mporeis na to diatupwseis kalutera?
Aggelos
More information about the Linux-greek-users
mailing list