Re: Functions htonq and ntohq in <click/integers.hh>
Eddie Kohler <[email protected]> Fri, 12 Oct 2012 07:54:47 -0400
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAF0C5S+AjTi_zU4PFbzSTWGfTqnB0dsg87fQH+9bqoAs_TXZFA@mail.gmail.com> |
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 <[email protected]> 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)? > >