Commit 27a1b5eb authored by Brendan Cully's avatar Brendan Cully

Build local md5 tool for hcachever.sh. Closes #3025.

parent f7884cbe
# autoconf products
^aclocal\.m4$
^autom4te\.cache
^compile$
^(contrib/|doc/|imap/|m4/|po/)?Makefile\.in$
^config\.h(\.in~?)?$
^config\.(log|status)$
......@@ -24,6 +25,7 @@
^doc/makedoc$
^mutt$
^mutt_dotlock(\.c)?$
^mutt_md5$
^patchlist\.c$
^pgpewrap|pgpring$
^reldate\.h$
......
2008-05-17 12:31 -0700 Brendan Cully <brendan@kublai.com> (fa4990c5b5c6)
2008-05-17 12:39 -0700 Brendan Cully <brendan@kublai.com> (692b7c063bf1)
* .hgsigs: mutt-1.5.18 signed
* .hgtags: Added tag mutt-1-5-18-rel for changeset ff9e4d0464b1
* ChangeLog, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po,
po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po,
po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po,
po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po,
po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po,
po/zh_TW.po: automatic post-release commit for mutt-1.5.18
* UPDATING: Update UPDATING.
......
......@@ -2,7 +2,7 @@
## Use aclocal -I m4; automake --foreign
AUTOMAKE_OPTIONS = 1.6 foreign
EXTRA_PROGRAMS = mutt_dotlock pgpring pgpewrap
EXTRA_PROGRAMS = mutt_dotlock pgpring pgpewrap mutt_md5
if BUILD_IMAP
IMAP_SUBDIR = imap
......@@ -81,6 +81,11 @@ pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c
pgpring_LDADD = @LIBOBJS@ $(INTLLIBS)
pgpring_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS)
mutt_md5_SOURCES = md5.c
mutt_md5_CFLAGS = -DMD5UTIL
noinst_PROGRAMS = $(MUTT_MD5)
mutt_dotlock.c: dotlock.c
cp $(srcdir)/dotlock.c mutt_dotlock.c
......
......@@ -825,9 +825,6 @@ then
need_md5="yes"
dnl hcachever.sh tool for calculating struct digest
AC_CHECK_PROGS([MD5], [md5 md5sum openssl], [none])
dnl -- QDBM --
if test "$with_qdbm" != "no"
then
......@@ -952,7 +949,9 @@ dnl -- end cache --
if test "$need_md5" = "yes"
then
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS md5.o"
MUTT_MD5="mutt_md5"
fi
AC_SUBST(MUTT_MD5)
AC_SUBST(MUTTLIBS)
AC_SUBST(MUTT_LIB_OBJECTS)
......
......@@ -2,16 +2,6 @@
BASEVERSION=2
MD5=@MD5@
if test "$MD5" = "openssl"
then
MD5="openssl md5 -hex"
elif test "$MD5" = "none"
then
echo "ERROR: no MD5 tool found"
exit 1
fi
cleanstruct () {
echo "$1" | sed -e 's/} *//' -e 's/;$//'
}
......@@ -91,7 +81,7 @@ do
done
echo " */" >> $TMPD
MD5TEXT=`echo "$TEXT" | $MD5`
MD5TEXT=`echo "$TEXT" | ./mutt_md5`
echo "#define HCACHEVER 0x"`echo $MD5TEXT | cut -c-8` >> $TMPD
# TODO: validate we have all structs
......
......@@ -450,3 +450,22 @@ md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
ctx->C = C;
ctx->D = D;
}
#ifdef MD5UTIL
/* local md5 equivalent for header cache versioning */
int main(int argc, char** argv)
{
unsigned char r[16];
int rc;
if ((rc = md5_stream(stdin, r)))
return rc;
printf("%02x%02x%02x%02x%02x%02x%02x%02x"
"%02x%02x%02x%02x%02x%02x%02x%02x\n",
r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7],
r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]);
return 0;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment