diff options
author | David Michael <fedora.dm0@gmail.com> | 2012-12-14 14:56:58 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-12-15 10:13:23 -0800 |
commit | 6ede720529b00115abe46b8ab524bf06c58047e2 (patch) | |
tree | bbbfba906aa57ede3587f8c4db43b54a09f5d095 | |
parent | bdd478d620034dc6517aea940f5dc6b88f780c04 (diff) | |
download | git-6ede720529b00115abe46b8ab524bf06c58047e2.tar.gz git-6ede720529b00115abe46b8ab524bf06c58047e2.tar.xz |
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 <fedora.dm0@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | git-compat-util.h | 2 |
3 files changed, 13 insertions, 0 deletions
@@ -165,6 +165,8 @@ all:: # Define NO_POLL if you do not have or don't want to use poll(). # This also implies NO_SYS_POLL_H. # +# Define NO_SYS_PARAM_H if you don't have sys/param.h. +# # Define NO_PTHREADS if you do not have or do not want to use Pthreads. # # Define NO_PREAD if you have a problem with pread() system call (e.g. @@ -1739,6 +1741,9 @@ endif ifdef NO_SYS_POLL_H BASIC_CFLAGS += -DNO_SYS_POLL_H endif +ifdef NO_SYS_PARAM_H + BASIC_CFLAGS += -DNO_SYS_PARAM_H +endif ifdef NO_INTTYPES_H BASIC_CFLAGS += -DNO_INTTYPES_H endif 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=], diff --git a/git-compat-util.h b/git-compat-util.h index 2e79b8a2f..ace154901 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -104,7 +104,9 @@ #endif #include <errno.h> #include <limits.h> +#ifndef NO_SYS_PARAM_H #include <sys/param.h> +#endif #include <sys/types.h> #include <dirent.h> #include <sys/time.h> |