From 6ede720529b00115abe46b8ab524bf06c58047e2 Mon Sep 17 00:00:00 2001 From: David Michael Date: Fri, 14 Dec 2012 14:56:58 -0500 Subject: Support builds when sys/param.h is missing 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 Signed-off-by: Junio C Hamano --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c85888c85..1393aa336 100644 --- a/configure.ac +++ b/configure.ac @@ -699,6 +699,12 @@ AC_CHECK_HEADER([sys/poll.h], [NO_SYS_POLL_H=UnfortunatelyYes]) GIT_CONF_SUBST([NO_SYS_POLL_H]) # +# Define NO_SYS_PARAM_H if you don't have sys/param.h +AC_CHECK_HEADER([sys/param.h], +[NO_SYS_PARAM_H=], +[NO_SYS_PARAM_H=UnfortunatelyYes]) +GIT_CONF_SUBST([NO_SYS_PARAM_H]) +# # Define NO_INTTYPES_H if you don't have inttypes.h AC_CHECK_HEADER([inttypes.h], [NO_INTTYPES_H=], -- cgit v1.2.1 From 110d6985463886ecc53dbafe32e626704ec612cb Mon Sep 17 00:00:00 2001 From: David Michael Date: Fri, 14 Dec 2012 14:56:59 -0500 Subject: Detect when the passwd struct is missing pw_gecos NO_GECOS_IN_PWENT was documented with other Makefile variables but was only enforced by manually defining it to the C preprocessor. This adds support for detecting the condition with configure and defining the make variable. Signed-off-by: David Michael Signed-off-by: Junio C Hamano --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 1393aa336..66d0c91ec 100644 --- a/configure.ac +++ b/configure.ac @@ -759,6 +759,14 @@ AC_CHECK_MEMBER(struct dirent.d_type, [#include ]) GIT_CONF_SUBST([NO_D_TYPE_IN_DIRENT]) # +# Define NO_GECOS_IN_PWENT if you don't have pw_gecos in struct passwd +# in the C library. +AC_CHECK_MEMBER(struct passwd.pw_gecos, +[NO_GECOS_IN_PWENT=], +[NO_GECOS_IN_PWENT=YesPlease], +[#include ]) +GIT_CONF_SUBST([NO_GECOS_IN_PWENT]) +# # Define NO_SOCKADDR_STORAGE if your platform does not have struct # sockaddr_storage. AC_CHECK_TYPE(struct sockaddr_storage, -- cgit v1.2.1 From b3e103dabeb01555f8766b74de73493f7a6ba048 Mon Sep 17 00:00:00 2001 From: David Michael Date: Fri, 14 Dec 2012 14:57:01 -0500 Subject: Generalize the inclusion of strings.h The header strings.h was formerly only included for HP NonStop (aka Tandem) to define strcasecmp, but another platform requiring this inclusion has been found. The build system will now include the file based on its presence determined by configure. Signed-off-by: David Michael Signed-off-by: Junio C Hamano --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 66d0c91ec..e3ab6fe28 100644 --- a/configure.ac +++ b/configure.ac @@ -886,6 +886,12 @@ AC_CHECK_HEADER([libcharset.h], [HAVE_LIBCHARSET_H=YesPlease], [HAVE_LIBCHARSET_H=]) GIT_CONF_SUBST([HAVE_LIBCHARSET_H]) +# +# Define HAVE_STRINGS_H if you have strings.h +AC_CHECK_HEADER([strings.h], +[HAVE_STRINGS_H=YesPlease], +[HAVE_STRINGS_H=]) +GIT_CONF_SUBST([HAVE_STRINGS_H]) # Define CHARSET_LIB if libiconv does not export the locale_charset symbol # and libcharset does CHARSET_LIB= -- cgit v1.2.1 From b2d05e0653f29a75b57260c4d963d560ad65691b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 18 Dec 2012 09:35:33 -0800 Subject: git-compat-util.h: do not #include by default Earlier we allowed platforms that lack 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 --- configure.ac | 6 ------ 1 file changed, 6 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index e3ab6fe28..8fbb533d9 100644 --- a/configure.ac +++ b/configure.ac @@ -699,12 +699,6 @@ AC_CHECK_HEADER([sys/poll.h], [NO_SYS_POLL_H=UnfortunatelyYes]) GIT_CONF_SUBST([NO_SYS_POLL_H]) # -# Define NO_SYS_PARAM_H if you don't have sys/param.h -AC_CHECK_HEADER([sys/param.h], -[NO_SYS_PARAM_H=], -[NO_SYS_PARAM_H=UnfortunatelyYes]) -GIT_CONF_SUBST([NO_SYS_PARAM_H]) -# # Define NO_INTTYPES_H if you don't have inttypes.h AC_CHECK_HEADER([inttypes.h], [NO_INTTYPES_H=], -- cgit v1.2.1