Re: [PATCH 1/4] Support builds when sys/param.h is missing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 14, 2012, 23:41 UTC
- Message-ID
- <7vpq2curpa.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CAEvUa7mHHy1=aOMfg4hNnDzod4zSnNHZN87isgf6Yxh5cRAf0Q@mail.gmail.com>
David Michael <fedora.dm0@gmail.com> writes:
Show 6 quoted lines
> 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 <fedora.dm0@gmail.com> > ---
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.