From 981ff520b7487886c773910d6309ec327efba3ea Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Fri, 29 Aug 2014 09:42:33 -0700 Subject: git-compat-util.h: add missing semicolon after struct itimerval This hasn't been a problem in practice as almost all systems have the setitimer() API (or it is provided by git in the case of mingw). This code wasn't used in any default circumstances, as the build system never sets NO_STRUCT_ITIMERVAL - this breakage only occured if the user asked for it. We repair this case so we can rely on it in the following commits. Signed-off-by: Jonas 'Sortie' Termansen Signed-off-by: Junio C Hamano diff --git a/git-compat-util.h b/git-compat-util.h index f587749..f7fae20 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -191,7 +191,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 -- cgit v0.10.2-6-g49f6 From 6441090cf234b88c2fdbb9cd754714108fd57755 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Fri, 29 Aug 2014 09:42:34 -0700 Subject: autoconf: check for struct itimerval The Makefile has provisions for this case, so let's detect it in the configure script as well. Signed-off-by: Jonas 'Sortie' Termansen Signed-off-by: Jacob Keller Signed-off-by: Junio C Hamano diff --git a/configure.ac b/configure.ac index 4b1ae7c..652bfdd 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 ]) +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=], -- cgit v0.10.2-6-g49f6 From a6fd4fb55d255ae14dc3ced5eae6247b4a9d86ea Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Fri, 29 Aug 2014 09:42:35 -0700 Subject: autoconf: check for setitimer() The Makefile has provisions for this case, so let's detect it in the configure script as well. Signed-off-by: Jonas 'Sortie' Termansen Signed-off-by: Junio C Hamano diff --git a/configure.ac b/configure.ac index 652bfdd..6af9647 100644 --- a/configure.ac +++ b/configure.ac @@ -911,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=], -- cgit v0.10.2-6-g49f6