diff options
| author | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:27:16 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2014-12-22 12:27:16 -0800 |
| commit | 2f17ecbd8d58c79e76767da82cf824840dfd367f (patch) | |
| tree | eb6f57c76e79155a84fc74820856354b160399fa /configure.ac | |
| parent | Merge branch 'ps/new-workdir-into-empty-directory' (diff) | |
| parent | compat: convert modes to use portable file type values (diff) | |
| download | git-2f17ecbd8d58c79e76767da82cf824840dfd367f.tar.gz git-2f17ecbd8d58c79e76767da82cf824840dfd367f.zip | |
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.ac | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 6af964797f..5c1312f24a 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. |
