Merge branch 'dm/compat-s-ifmt-for-zos'

Long overdue departure from the assumption that S_IFMT is shared by
everybody made in 2005.

* dm/compat-s-ifmt-for-zos:
  compat: convert modes to use portable file type values
This commit is contained in:
Junio C Hamano
2014-12-22 12:27:16 -08:00
5 changed files with 113 additions and 7 deletions

View File

@ -873,6 +873,29 @@ else
SNPRINTF_RETURNS_BOGUS=
fi
GIT_CONF_SUBST([SNPRINTF_RETURNS_BOGUS])
#
# Define NEEDS_MODE_TRANSLATION if your OS strays from the typical file type
# bits in mode values.
AC_CACHE_CHECK([whether the platform uses typical file type bits],
[ac_cv_sane_mode_bits], [
AC_EGREP_CPP(yippeeyeswehaveit,
AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[#if S_IFMT == 0170000 && \
S_IFREG == 0100000 && S_IFDIR == 0040000 && S_IFLNK == 0120000 && \
S_IFBLK == 0060000 && S_IFCHR == 0020000 && \
S_IFIFO == 0010000 && S_IFSOCK == 0140000
yippeeyeswehaveit
#endif
]),
[ac_cv_sane_mode_bits=yes],
[ac_cv_sane_mode_bits=no])
])
if test $ac_cv_sane_mode_bits = yes; then
NEEDS_MODE_TRANSLATION=
else
NEEDS_MODE_TRANSLATION=UnfortunatelyYes
fi
GIT_CONF_SUBST([NEEDS_MODE_TRANSLATION])
## Checks for library functions.