git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: David MichaelNext: David Michael
Message 2 of 4 in “Support builds when sys/param.h is missing”
  1. 1/4 Support builds when sys/param.h is missingDavid Michael, Dec 14, 2012
  2. Junio C HamanoDec 14, 2012
  3. David MichaelDec 15, 2012
  4. Junio C HamanoDec 15, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.