Re: [PATCH 1/4] Support builds when sys/param.h is missing

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 1/4] Support builds when sys/param.h is missing

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:31

David Michael [off-list ref] writes:
An option is added to the Makefile to skip the inclusion of sys/param.h.
The only known platform with this condition thus far is the z/OS UNIX System
Services environment.

Signed-off-by: David Michael <redacted>
---
Hmm, makes me wonder if we can remove that inclusion everywhere
instead.  What definitions are we getting from it?

8695c8b (Add "show-files" command to show the list of managed (or
non-managed) files., 2005-04-11) added it to show-files, and without
the include the compilation failed due to lack of MAXPATHLEN, but
you shouldn't be using that in the first place (we tend to either
use PATH_MAX or lift the upper limit using strbuf these days.).

65bb491 (Add the ability to prefix something to the pathname to
"checkout-cache.c", 2005-04-21) does the same to checkout-cache.c
to grab MAXPATHLEN.

bb233d6 (Add support for a "GIT_INDEX_FILE" environment variable.,
2005-04-21) moves these two inclusions to cache.h; removing it
bteaks compilation due to lack of MAXPATHLEN, ULONG_MAX, etc.,

I didn't check what else sys/parms.h was accicdentally slurping into
the compilation, but ULONG_MAX is what we explicitly ask for by
including either inttypes or stdint these days.

Later 4050c0d (Clean up compatibility definitions., 2005-12-05)
further consolidated the headers by moving inclusion around.  This
commit did not audit unused headers.

I have this suspicion that nobody would notice if we simply stopped
including the header.

Re: [PATCH 1/4] Support builds when sys/param.h is missing

From: David Michael <hidden>
Date: 2016-06-15 22:55:31

Hi,

On Fri, Dec 14, 2012 at 6:41 PM, Junio C Hamano [off-list ref] wrote:
I have this suspicion that nobody would notice if we simply stopped
including the header.
While I'm not aware of any subtleties it could be causing on other
platforms, it does seem fine to drop sys/param.h on my test GNU/Linux
systems.

I can resend the series and just remove the include, if preferred.

Thanks.

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help