check for ctime_r

git-svn: trunk@1475
remotes/push_mirror/metadata
Tomasz Kojm 20 years ago
parent df091a1a1a
commit f4b5b80e40
  1. 4
      clamav-devel/ChangeLog
  2. 9
      clamav-devel/clamav-config.h.in
  3. 75
      clamav-devel/configure
  4. 21
      clamav-devel/configure.in

@ -1,3 +1,7 @@
Thu Apr 14 14:04:46 CEST 2005 (tk)
----------------------------------
* configure: check for ctime_r
Tue Apr 12 09:54:58 BST 2005 (trog)
-----------------------------------
* libclamav/unrar: First commit of RAR3, RAR2 and RAR1 code.

@ -93,6 +93,15 @@
/* ancillary data style fd pass */
#undef HAVE_CONTROL_IN_MSGHDR
/* Define to 1 if you have the `ctime_r' function. */
#undef HAVE_CTIME_R
/* ctime_r takes 2 arguments */
#undef HAVE_CTIME_R_2
/* ctime_r takes 3 arguments */
#undef HAVE_CTIME_R_3
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

@ -9365,7 +9365,8 @@ fi
for ac_func in poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat inet_ntop setgroups initgroups
for ac_func in poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat inet_ntop setgroups initgroups ctime_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@ -13369,6 +13370,78 @@ _ACEOF
echo "${ECHO_T}yes, and it takes $ac_cv_readdir_args arguments" >&6
fi
echo "$as_me:$LINENO: checking for ctime_r" >&5
echo $ECHO_N "checking for ctime_r... $ECHO_C" >&6
if test "$ac_cv_func_ctime_r" = "yes"; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <time.h>
int
main ()
{
char buf[31];
time_t t;
ctime_r(&t, buf, 30);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_ctime_args=3
cat >>confdefs.h <<\_ACEOF
#define HAVE_CTIME_R_3 1
_ACEOF
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_ctime_args=2
cat >>confdefs.h <<\_ACEOF
#define HAVE_CTIME_R_2 1
_ACEOF
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: yes, and it takes $ac_cv_ctime_args arguments" >&5
echo "${ECHO_T}yes, and it takes $ac_cv_ctime_args arguments" >&6
fi
if test "$test_clamav" = "yes"
then
if test "$use_id" = "no"

@ -50,7 +50,7 @@ AC_COMPILE_CHECK_SIZEOF(long long)
AC_CHECK_LIB(socket, bind, [LIBS="$LIBS -lsocket"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lsocket"; LDFLAGS="$LDFLAGS -lsocket"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lsocket"; CLAMD_LIBS="$CLAMD_LIBS -lsocket"])
AC_CHECK_LIB(nsl, gethostent, [LIBS="$LIBS -lnsl"; CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lnsl"; LDFLAGS="$LDFLAGS -lnsl"; FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lnsl"; CLAMD_LIBS="$CLAMD_LIBS -lnsl"])
AC_CHECK_FUNCS(poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat inet_ntop setgroups initgroups)
AC_CHECK_FUNCS(poll setsid memcpy snprintf vsnprintf strerror_r strlcpy strlcat inet_ntop setgroups initgroups ctime_r)
AC_FUNC_MMAP
AC_FUNC_FSEEKO
@ -775,6 +775,25 @@ else
AC_MSG_RESULT([yes, and it takes $ac_cv_readdir_args arguments])
fi
AC_MSG_CHECKING(for ctime_r)
if test "$ac_cv_func_ctime_r" = "yes"; then
AC_TRY_COMPILE([
#include <time.h>
],[
char buf[31];
time_t t;
ctime_r(&t, buf, 30);
],[
ac_cv_ctime_args=3
AC_DEFINE(HAVE_CTIME_R_3,1,[ctime_r takes 3 arguments])
],[
ac_cv_ctime_args=2
AC_DEFINE(HAVE_CTIME_R_2,1,[ctime_r takes 2 arguments])
])
AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments])
fi
dnl Check for clamav in /etc/passwd
if test "$test_clamav" = "yes"
then

Loading…
Cancel
Save