summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-22 20:27:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-22 20:27:16 (GMT)
commit2f17ecbd8d58c79e76767da82cf824840dfd367f (patch)
treeeb6f57c76e79155a84fc74820856354b160399fa /configure.ac
parent0b5ae7ba68476da128aa0507f44eaabea0870bf1 (diff)
parentd543d9c0f44a89f30ec1670f16c698b5da801476 (diff)
downloadgit-2f17ecbd8d58c79e76767da82cf824840dfd367f.zip
git-2f17ecbd8d58c79e76767da82cf824840dfd367f.tar.gz
git-2f17ecbd8d58c79e76767da82cf824840dfd367f.tar.bz2
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
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6af9647..5c1312f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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.