summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-30 05:17:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-30 05:17:24 (GMT)
commit7dded6610e813c849b8f656862626586d883c31f (patch)
tree3a8f57dd20898582771f008e63d9c60edee01f2e
parent0ba92ef3386a360442e0403b6655384c2d62557f (diff)
parenta6fd4fb55d255ae14dc3ced5eae6247b4a9d86ea (diff)
downloadgit-7dded6610e813c849b8f656862626586d883c31f.zip
git-7dded6610e813c849b8f656862626586d883c31f.tar.gz
git-7dded6610e813c849b8f656862626586d883c31f.tar.bz2
Merge branch 'jt/itimer-autoconf'
setitmer(2) and related API elements can be configured from Makefile but autoconf did not know about it. * jt/itimer-autoconf: autoconf: check for setitimer() autoconf: check for struct itimerval git-compat-util.h: add missing semicolon after struct itimerval
-rw-r--r--configure.ac14
-rw-r--r--git-compat-util.h2
2 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4b1ae7c..6af9647 100644
--- a/configure.ac
+++ b/configure.ac
@@ -746,6 +746,14 @@ case $ac_cv_type_socklen_t in
esac
GIT_CONF_SUBST([SOCKLEN_T])
+#
+# Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval.
+AC_CHECK_TYPES([struct itimerval],
+[NO_STRUCT_ITIMERVAL=],
+[NO_STRUCT_ITIMERVAL=UnfortunatelyYes],
+[#include <sys/time.h>])
+GIT_CONF_SUBST([NO_STRUCT_ITIMERVAL])
+#
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
AC_CHECK_MEMBER(struct dirent.d_ino,
[NO_D_INO_IN_DIRENT=],
@@ -903,6 +911,12 @@ AC_CHECK_LIB([iconv], [locale_charset],
[CHARSET_LIB=-lcharset])])
GIT_CONF_SUBST([CHARSET_LIB])
#
+# Define NO_SETITIMER if you don't have setitimer.
+GIT_CHECK_FUNC(setitimer,
+[NO_SETITIMER=],
+[NO_SETITIMER=YesPlease])
+GIT_CONF_SUBST([NO_SETITIMER])
+#
# Define NO_STRCASESTR if you don't have strcasestr.
GIT_CHECK_FUNC(strcasestr,
[NO_STRCASESTR=],
diff --git a/git-compat-util.h b/git-compat-util.h
index 0c4e663..fb41118 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -192,7 +192,7 @@ extern int compat_mkdir_wo_trailing_slash(const char*, mode_t);
struct itimerval {
struct timeval it_interval;
struct timeval it_value;
-}
+};
#endif
#ifdef NO_SETITIMER