Re: Problems when moving Ubuntu -> Cygwin -SOLVED

2009-03-26 Thread Dave Korn
Mikael Normark wrote: > I addedd __attrubute__((packed)) to both structures and that made it > all work as supposed to. Gah, ISHFRTT! At least the use-specifically-sized-types advice is still good. > Adding "packed" to the sample_pkg_t only > saved 2 bytes, What!? That looks like a typo.

Re: Problems when moving Ubuntu -> Cygwin -SOLVED

2009-03-26 Thread Greg Chicares
On 2009-03-26 10:12Z, Mikael Normark wrote: > I addedd __attrubute__((packed)) to both structures and that made it > all work as supposed to. Adding "packed" to the sample_pkg_t only > saved 2 bytes, adding it to sample_t saved the rest down to 396 so > obviously that structure is poorly aligned. >

Re: Problems when moving Ubuntu -> Cygwin -SOLVED

2009-03-26 Thread Mikael Normark
I addedd __attrubute__((packed)) to both structures and that made it all work as supposed to. Adding "packed" to the sample_pkg_t only saved 2 bytes, adding it to sample_t saved the rest down to 396 so obviously that structure is poorly aligned. The ultimate solution would be to use an aligned stru