From: Junio C Hamano Date: Wed, 20 Dec 2006 21:52:19 GMT Subject: Re: [PATCH] index-pack usage of mmap() is unacceptably slower on many OSes other than Linux Message-ID: <7v1wmu8cbw.fsf@assigned-by-dhcp.cox.net> In-Reply-To: Linus Torvalds writes: > On Wed, 20 Dec 2006, Junio C Hamano wrote: >> >> I needed to fix the changes to git-compat-util.h a bit from the >> version I sent earlier to make OpenBSD happy (sys/types.h there >> did not expose u_int unless _BSD_SOURCE was set, and >> netinet/in.h was duplicated by mistake). > > Please don't use "u_int" in the first place. It's an abomination of a > type. It should never be used. I did not want to touch imported sources in compat/, but > The only user in git seems to have been copied from a source that is > insane. It does > > u_int words[NS_IN6ADDRSZ / NS_INT16SZ]; > > which is just insane. It actually seems to want to use "uint16_t", which > at least would make sense, and be a type that has some _point_ to it. the above argument makes 100% sense. Will fix. However, on sane platforms we do not even compile that file. The problem I observed was that on OpenBSD uses u_int wants the source code that uses that header file to first include to get u_int, which in turn requires __BSD_VISIBLE to be in effect. Unfortunately I think _BSD_SOURCE needs to stay for this reason.