[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] CHAR_BIT=16?
From: |
Fisher, John |
Subject: |
Re: [lwip-users] CHAR_BIT=16? |
Date: |
Mon, 5 Dec 2011 10:15:20 +1100 |
>On 23/11/2011 12:27, Simon Goldschmidt wrote:
>I don't think a 16 bit int would cause too much of a problem, with some
>inspection/effort. I believe, however, the OP said it was a 16 bit
>char, which leads me to think he is probably using a DSP, which would
>definitely cause a problem. Maybe definitely is too strong a word, but
>as the original reply said, making it work would probably require a
>large effort.
Yes I am using a DSP.
Since C doesn't support bit arrays, the nearest thing to a packet is an
array of one of the basic integer data types. All access to fields in
packets should be via macros that are defined in terms of array
elements. The macros can then be revised as needed to support different
architectures. The packed structs may as well be eliminated. They are
the source of the major portability problem. ISO C doesn't support
packed structs.
Regards
John Fisher
This correspondence is for the named persons only. It may contain confidential
or privileged information or both. No confidentiality or privilege is waived or
lost by any mis transmission. If you receive this correspondence in error
please delete it from your system immediately and notify the sender. You must
not disclose, copy or relay on any part of this correspondence, if you are not
the intended recipient.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [lwip-users] CHAR_BIT=16?,
Fisher, John <=