lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers


From: Michael Williamson
Subject: Re: [lwip-users] Problem With dns.c Using 32-Bit Compilers
Date: Thu, 28 Aug 2008 16:19:02 -0400
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

address@hidden wrote on 8/28/2008 3:43 PM:
> Alain, Michael,
>
> I agree this is the worst problem when porting lwIP to another
> compiler (not platform), but until someone comes up with an idea that
> is really easy and nice to implement, I'm still against including such
> workarounds for bad (sorry, only my opinion!) compilers!
>
> What would be the solution for the sizeof() problem? Define every
> sizeof independently of the struct definition?
>
> Simon
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
Hi Simon,

Seems like sizeof() as a MEMCPY arguement out of a fragment should only
be used  "stdint.h" or similarly typed fields (so that you don't get
burned as you suggest), or it shouldn't be used.  Protocol fragment
sizes should be #defined, in a purist sense, because the protocol
defines the fragment size, not the compiler.

Like I tried to say before... I agree with everything you say except
"another compiler (not platform)".  A lot of times there is only one
compiler for a platform.   I'm sure as hell not going to port GCC to a
multi-ALU DSP and hope to get the same performance as the TI compiler
does.  We're stuck it with.   It may be a "bad" compiler, but using
structure overlaying with #pragma pack, while convenient and elegant, is
simply not universally portable. 

The person who ported the autoip.c code was nice enough to use MEMCPY()
instead of assignment to data structures, and this ported cleanly to our
"crappy" compiler (though we got lucky in that the sizeof() operands
matched, so even that wasn't perfect).  Worked right out of the box. 
DNS didn't.  So, seems like it's not impossible to be more friendly to a
user base that's probably larger than you think....  The "sorry, you're
out of luck response" is OK, I can deal with that, and I appreciate the
contributors to lwIP very much.  But it has sort of stifled any
motivation on my end to get too active in pushing capabilities and bug
fixes we've ported back into the code base.

-Mike


Attachment: michael_williamson.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]