[Click] Functions htonq and ntohq in <click/integers.hh>

Eddie Kohler ekohler at gmail.com
Fri Oct 12 07:54:47 EDT 2012


GCC could potentially do it but Click is certainly not set up for such
things and neither I believe is the Linux kernel (__constant_htons)

E


On Fri, Oct 12, 2012 at 2:56 AM, Markku Savela <Markku.Savela at vtt.fi> wrote:
> On 10/11/2012 06:43 PM, Eddie Kohler wrote:
>>
>> Ouch! Does the diff I just checked in work for you?
>
>
> Seems to work (just copied the integers.hh, as I didn't want
> to start messing up with git merges at this point).
>
> Just wondering: what about machines where endiannes can be
> chosen dynamically (ARM?). Now you must at cross-compile time
> know what endiannes your target is set for?
>
> Would it be even possible for gcc to compile "endiannes
> independent" code (e.g. not knowing the endiannes at
> compile time)?
>
>


More information about the click mailing list