|
From: | Alain M. |
Subject: | Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers |
Date: | Wed, 27 Aug 2008 23:29:00 -0300 |
User-agent: | Thunderbird 2.0.0.6 (X11/20070728) |
Jonathan Larmour escreveu:
address@hidden wrote:Jonathan Larmour wrote:One workaround may be to dispense with the uses of sizeof for those DNS records in that file, and replace them with e.g. #define SIZEOF_DNS_ANSWER 10 and use that instead. The format and size is fixed after all.Wouldn't that be working around a bug in a compiler (that doesn't support structure packing) which we agreed not to do?From what he said, it does support structure packing, but still includespadding for alignment at the end.
I believe that is not a bug, on the contrary it looks like a bug-fixing. Let me explain: I use OpenWatcom and the new versions have the padding, the very old don't. I believe it is because of the array problem that has alredy been explained...
I agree that no structure packing at all would not be worth attempting to support.
I agree too. Not to use packing would make the code bigger and all compilers have packing, it just a problem of syntax.
IMHP the appropriate pack/unpack files of each compiler should be included somewhere, so that any new user can use it :)
Alain
[Prev in Thread] | Current Thread | [Next in Thread] |