Re: [PATCH 2/2] bswap: add NO_UNALIGNED_LOADS define

2015-12-28 Thread Eric Sunshine
On Tue, Dec 29, 2015 at 1:36 AM, Jeff King wrote: > The byte-swapping code automatically decides, based on the > platform, whether it is sensible to cast an do a potentially s/an/and/ or something? > unaligned ntohl(), or to pick individual bytes out of an > array. > > It can be

[PATCH 2/2] bswap: add NO_UNALIGNED_LOADS define

2015-12-28 Thread Jeff King
The byte-swapping code automatically decides, based on the platform, whether it is sensible to cast an do a potentially unaligned ntohl(), or to pick individual bytes out of an array. It can be handy to override this decision, though, when turning on compiler flags that will complain about

Re: [PATCH 2/2] bswap: add NO_UNALIGNED_LOADS define

2015-12-28 Thread Jeff King
On Tue, Dec 29, 2015 at 01:42:45AM -0500, Eric Sunshine wrote: > On Tue, Dec 29, 2015 at 1:36 AM, Jeff King wrote: > > The byte-swapping code automatically decides, based on the > > platform, whether it is sensible to cast an do a potentially > > s/an/and/ or something? Yes, it