Re: [PATCH] block-sha1: Windows declares ntohl() in winsock2.h
- From
Sebastian Schuberth <sschuberth@gmail.com>
- Date
- Aug 18, 2009, 16:59 UTC
- Message-ID
- <bdca99240908180959h69f37671k4d526fbf4814e8d1@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.2.00.0908181240400.6044@xanadu.home>
On Tue, Aug 18, 2009 at 18:43, Nicolas Pitre<nico@cam.org> wrote:
Show 5 quoted lines
>> Well... Given that git already uses ntohl/htonl quite extensively in >> its core already, I'd suggest making this more globally available >> instead. > > What about something like this?
I like the idea of making bswap available more globally, but I'm not sure if it's worth to introduce a new file for only that purpose. Isn't there already a central header for such things?
Moreover, including compat/bswap.h would only give you ntohl()/htonl() on one platform. For consistency, I'd expect to get those for any platform if I include compat/bswap.h, but maybe I'm not aware of some Git source code rules.
Finally, there's a typo in your comment saying "sinple" instead of "simple".
-- Sebastian Schuberth