Merge branch 'rh/autoconf-rhel3'
Build update for older RHEL. * rh/autoconf-rhel3: configure.ac: check for HMAC_CTX_cleanup configure.ac: check for clock_gettime and CLOCK_MONOTONIC configure.ac: check 'tv_nsec' field in 'struct stat'
This commit is contained in:
commit
63a0e83ea6
12
Makefile
12
Makefile
@ -343,6 +343,11 @@ all::
|
|||||||
# return NULL when it receives a bogus time_t.
|
# return NULL when it receives a bogus time_t.
|
||||||
#
|
#
|
||||||
# Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.
|
# Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt.
|
||||||
|
#
|
||||||
|
# Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC in librt.
|
||||||
|
#
|
||||||
|
# Define NO_HMAC_CTX_CLEANUP if your OpenSSL is version 0.9.6b or earlier to
|
||||||
|
# cleanup the HMAC context with the older HMAC_cleanup function.
|
||||||
|
|
||||||
GIT-VERSION-FILE: FORCE
|
GIT-VERSION-FILE: FORCE
|
||||||
@$(SHELL_PATH) ./GIT-VERSION-GEN
|
@$(SHELL_PATH) ./GIT-VERSION-GEN
|
||||||
@ -1075,6 +1080,9 @@ ifndef NO_OPENSSL
|
|||||||
ifdef NEEDS_CRYPTO_WITH_SSL
|
ifdef NEEDS_CRYPTO_WITH_SSL
|
||||||
OPENSSL_LIBSSL += -lcrypto
|
OPENSSL_LIBSSL += -lcrypto
|
||||||
endif
|
endif
|
||||||
|
ifdef NO_HMAC_CTX_CLEANUP
|
||||||
|
BASIC_CFLAGS += -DNO_HMAC_CTX_CLEANUP
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
BASIC_CFLAGS += -DNO_OPENSSL
|
BASIC_CFLAGS += -DNO_OPENSSL
|
||||||
BLK_SHA1 = 1
|
BLK_SHA1 = 1
|
||||||
@ -1402,6 +1410,10 @@ ifdef HAVE_CLOCK_GETTIME
|
|||||||
EXTLIBS += -lrt
|
EXTLIBS += -lrt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef HAVE_CLOCK_MONOTONIC
|
||||||
|
BASIC_CFLAGS += -DHAVE_CLOCK_MONOTONIC
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(TCLTK_PATH),)
|
ifeq ($(TCLTK_PATH),)
|
||||||
NO_TCLTK = NoThanks
|
NO_TCLTK = NoThanks
|
||||||
endif
|
endif
|
||||||
|
@ -35,6 +35,7 @@ ifeq ($(uname_S),Linux)
|
|||||||
LIBC_CONTAINS_LIBINTL = YesPlease
|
LIBC_CONTAINS_LIBINTL = YesPlease
|
||||||
HAVE_DEV_TTY = YesPlease
|
HAVE_DEV_TTY = YesPlease
|
||||||
HAVE_CLOCK_GETTIME = YesPlease
|
HAVE_CLOCK_GETTIME = YesPlease
|
||||||
|
HAVE_CLOCK_MONOTONIC = YesPlease
|
||||||
endif
|
endif
|
||||||
ifeq ($(uname_S),GNU/kFreeBSD)
|
ifeq ($(uname_S),GNU/kFreeBSD)
|
||||||
HAVE_ALLOCA_H = YesPlease
|
HAVE_ALLOCA_H = YesPlease
|
||||||
|
39
configure.ac
39
configure.ac
@ -754,6 +754,19 @@ AC_CHECK_TYPES([struct itimerval],
|
|||||||
[#include <sys/time.h>])
|
[#include <sys/time.h>])
|
||||||
GIT_CONF_SUBST([NO_STRUCT_ITIMERVAL])
|
GIT_CONF_SUBST([NO_STRUCT_ITIMERVAL])
|
||||||
#
|
#
|
||||||
|
# Define USE_ST_TIMESPEC=YesPlease when stat.st_mtimespec.tv_nsec exists.
|
||||||
|
# Define NO_NSEC=YesPlease when neither stat.st_mtim.tv_nsec nor
|
||||||
|
# stat.st_mtimespec.tv_nsec exists.
|
||||||
|
AC_CHECK_MEMBER([struct stat.st_mtimespec.tv_nsec])
|
||||||
|
AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec])
|
||||||
|
if test x$ac_cv_member_struct_stat_st_mtimespec_tv_nsec = xyes; then
|
||||||
|
USE_ST_TIMESPEC=YesPlease
|
||||||
|
GIT_CONF_SUBST([USE_ST_TIMESPEC])
|
||||||
|
elif test x$ac_cv_member_struct_stat_st_mtim_tv_nsec != xyes; then
|
||||||
|
NO_NSEC=YesPlease
|
||||||
|
GIT_CONF_SUBST([NO_NSEC])
|
||||||
|
fi
|
||||||
|
#
|
||||||
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
|
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
|
||||||
AC_CHECK_MEMBER(struct dirent.d_ino,
|
AC_CHECK_MEMBER(struct dirent.d_ino,
|
||||||
[NO_D_INO_IN_DIRENT=],
|
[NO_D_INO_IN_DIRENT=],
|
||||||
@ -934,6 +947,32 @@ AC_CHECK_LIB([iconv], [locale_charset],
|
|||||||
[CHARSET_LIB=-lcharset])])
|
[CHARSET_LIB=-lcharset])])
|
||||||
GIT_CONF_SUBST([CHARSET_LIB])
|
GIT_CONF_SUBST([CHARSET_LIB])
|
||||||
#
|
#
|
||||||
|
# Define NO_HMAC_CTX_CLEANUP=YesPlease if HMAC_CTX_cleanup is missing.
|
||||||
|
AC_CHECK_LIB([crypto], [HMAC_CTX_cleanup],
|
||||||
|
[], [GIT_CONF_SUBST([NO_HMAC_CTX_CLEANUP], [YesPlease])])
|
||||||
|
#
|
||||||
|
# Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.
|
||||||
|
GIT_CHECK_FUNC(clock_gettime,
|
||||||
|
[HAVE_CLOCK_GETTIME=YesPlease],
|
||||||
|
[HAVE_CLOCK_GETTIME=])
|
||||||
|
GIT_CONF_SUBST([HAVE_CLOCK_GETTIME])
|
||||||
|
|
||||||
|
AC_DEFUN([CLOCK_MONOTONIC_SRC], [
|
||||||
|
AC_LANG_PROGRAM([[
|
||||||
|
#include <time.h>
|
||||||
|
clockid_t id = CLOCK_MONOTONIC;
|
||||||
|
]])])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Define HAVE_CLOCK_MONOTONIC=YesPlease if CLOCK_MONOTONIC is available.
|
||||||
|
AC_MSG_CHECKING([for CLOCK_MONOTONIC])
|
||||||
|
AC_COMPILE_IFELSE([CLOCK_MONOTONIC_SRC],
|
||||||
|
[AC_MSG_RESULT([yes])
|
||||||
|
HAVE_CLOCK_MONOTONIC=YesPlease],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
|
HAVE_CLOCK_MONOTONIC=])
|
||||||
|
GIT_CONF_SUBST([HAVE_CLOCK_MONOTONIC])
|
||||||
|
#
|
||||||
# Define NO_SETITIMER if you don't have setitimer.
|
# Define NO_SETITIMER if you don't have setitimer.
|
||||||
GIT_CHECK_FUNC(setitimer,
|
GIT_CHECK_FUNC(setitimer,
|
||||||
[NO_SETITIMER=],
|
[NO_SETITIMER=],
|
||||||
|
@ -218,6 +218,9 @@ extern char *gitbasename(char *);
|
|||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#undef MAC_OS_X_VERSION_MIN_REQUIRED
|
#undef MAC_OS_X_VERSION_MIN_REQUIRED
|
||||||
#undef __AVAILABILITY_MACROS_USES_AVAILABILITY
|
#undef __AVAILABILITY_MACROS_USES_AVAILABILITY
|
||||||
|
#ifdef NO_HMAC_CTX_CLEANUP
|
||||||
|
#define HMAC_CTX_cleanup HMAC_cleanup
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* On most systems <netdb.h> would have given us this, but
|
/* On most systems <netdb.h> would have given us this, but
|
||||||
|
2
trace.c
2
trace.c
@ -322,7 +322,7 @@ int trace_want(struct trace_key *key)
|
|||||||
return !!get_trace_fd(key);
|
return !!get_trace_fd(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_CLOCK_GETTIME
|
#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_MONOTONIC)
|
||||||
|
|
||||||
static inline uint64_t highres_nanos(void)
|
static inline uint64_t highres_nanos(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user