From: David Michael <fedora.dm0@gmail.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Cc: gitster@pobox.com
Subject: [PATCH 1/4] Support builds when sys/param.h is missing
Date: Fri, 14 Dec 2012 14:56:58 -0500 [thread overview]
Message-ID: <CAEvUa7mHHy1=aOMfg4hNnDzod4zSnNHZN87isgf6Yxh5cRAf0Q@mail.gmail.com> (raw)
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>
---
Makefile | 5 +++++
configure.ac | 6 ++++++
git-compat-util.h | 2 ++
3 files changed, 13 insertions(+)
diff --git a/Makefile b/Makefile
index 736ecd4..8c3a0dd 100644
--- a/Makefile
+++ b/Makefile
@@ -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.
@@ -1748,6 +1750,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 ad215cc..317bfc6 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 2e79b8a..ace1549 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>
--
1.7.11.7
next reply other threads:[~2012-12-14 19:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 19:56 David Michael [this message]
2012-12-14 23:41 ` [PATCH 1/4] Support builds when sys/param.h is missing Junio C Hamano
2012-12-15 2:46 ` David Michael
2012-12-15 17:53 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEvUa7mHHy1=aOMfg4hNnDzod4zSnNHZN87isgf6Yxh5cRAf0Q@mail.gmail.com' \
--to=fedora.dm0@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).