On 09/18/2013 01:17 AM, Yann Ylavic wrote: > On Tue, Sep 17, 2013 at 12:38 PM, <[email protected] > <mailto:[email protected]>> wrote: > > Author: humbedooh > Date: Tue Sep 17 10:38:12 2013 > New Revision: 1523974 > > <...> > > > +static apr_uint64_t ap_ntoh64(const apr_uint64_t *input) > +{ > + apr_uint64_t rval; > + unsigned char *data = (unsigned char *)&rval; > + > + data[0] = *input >> 56; > + data[1] = *input >> 48; > + data[2] = *input >> 40; > + data[3] = *input >> 32; > + data[4] = *input >> 24; > + data[5] = *input >> 16; > + data[6] = *input >> 8; > + data[7] = *input >> 0; > + > + return rval; > +} > > > Isn't that code byte-order dependent > > (eg. simply "return *input" when big-endian) > ? > This is one of the things I enjoy about httpd - there's always someone there to spot bugs or missing snippets :) Thanks for the heads up, I've added a big endian check in the function now.
With regards, Daniel.
