Skip to content

Commit

Permalink
Support builds when sys/param.h is missing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dm0- authored and gitster committed Dec 15, 2012
1 parent bdd478d commit 6ede720
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Expand Up @@ -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=],
Expand Down
2 changes: 2 additions & 0 deletions git-compat-util.h
Expand Up @@ -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>
Expand Down

0 comments on commit 6ede720

Please sign in to comment.