Thread (3 messages) flat view 3 messages, 2 authors, 2016-08-11

Re: [PATCH] index-pack usage of mmap() is unacceptably slower on many OSes other than Linux

From: Junio C Hamano <hidden>
Date: 2016-08-11 20:37:01

Linus Torvalds [off-list ref] writes:
On Wed, 20 Dec 2006, Junio C Hamano wrote:
quoted
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 <include/netinet/tcp.h> on
OpenBSD uses u_int wants the source code that uses that header
file to first include <sys/types.h> 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help