summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-12-18 17:35:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-12-20 02:57:46 (GMT)
commitb2d05e0653f29a75b57260c4d963d560ad65691b (patch)
tree5047abf51666abe033529ad9a3b748608c75f2d7 /git-compat-util.h
parentb3e103dabeb01555f8766b74de73493f7a6ba048 (diff)
downloadgit-b2d05e0653f29a75b57260c4d963d560ad65691b.zip
git-b2d05e0653f29a75b57260c4d963d560ad65691b.tar.gz
git-b2d05e0653f29a75b57260c4d963d560ad65691b.tar.bz2
git-compat-util.h: do not #include <sys/param.h> by default
Earlier we allowed platforms that lack <sys/param.h> not to include the header file from git-compat-util.h; we have included this header file since the early days back when we used MAXPATHLEN (which we no longer use) and also depended on it slurping ULONG_MAX (which we get by including stdint.h or inttypes.h these days). It turns out that we can compile our modern codebase just file without including it on many platforms (so far, Fedora, Debian, Ubuntu, MinGW, Mac OS X, Cygwin, HP-Nonstop, QNX and z/OS are reported to be OK). Let's stop including it by default, and on platforms that need it to be included, leave "make NEEDS_SYS_PARAM_H=YesPlease" as an escape hatch and ask them to report to us, so that we can find out about the real dependency and fix it in a more platform agnostic way. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index d7359ef..a88147b 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -104,7 +104,7 @@
#endif
#include <errno.h>
#include <limits.h>
-#ifndef NO_SYS_PARAM_H
+#ifdef NEEDS_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <sys/types.h>