Skip to content

Commit

Permalink
Merge branch 'jt/itimer-autoconf'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Junio C Hamano committed Sep 30, 2014
2 parents 0ba92ef + a6fd4fb commit 7dded66
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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=],
Expand Down Expand Up @@ -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=],
Expand Down
2 changes: 1 addition & 1 deletion git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7dded66

Please sign in to comment.