Changeset 5383:d4a903e7077b

Show
Ignore:
Timestamp:
2008-05-17 17:36:05 (6 months ago)
Author:
Brendan Cully <brendan@…>
Branch:
HEAD
Message:

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

Files:
6 modified

Legend:

Unmodified
Added
Removed
  • .hgignore

    r5359 r5383  
    22^aclocal\.m4$ 
    33^autom4te\.cache 
     4^compile$ 
    45^(contrib/|doc/|imap/|m4/|po/)?Makefile\.in$ 
    56^config\.h(\.in~?)?$ 
     
    2526^mutt$ 
    2627^mutt_dotlock(\.c)?$ 
     28^mutt_md5$ 
    2729^patchlist\.c$ 
    2830^pgpewrap|pgpring$ 
  • ChangeLog

    r5380 r5383  
    1 2008-05-17 12:31 -0700  Brendan Cully  <brendan@kublai.com>  (fa4990c5b5c6) 
     12008-05-17 12:39 -0700  Brendan Cully  <brendan@kublai.com>  (692b7c063bf1) 
     2 
     3        * .hgsigs: mutt-1.5.18 signed 
     4 
     5        * .hgtags: Added tag mutt-1-5-18-rel for changeset ff9e4d0464b1 
     6 
     7        * ChangeLog, VERSION, po/bg.po, po/ca.po, po/cs.po, po/da.po, 
     8        po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/eu.po, 
     9        po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, po/it.po, 
     10        po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, po/pt_BR.po, 
     11        po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, 
     12        po/zh_TW.po: automatic post-release commit for mutt-1.5.18 
    213 
    314        * UPDATING: Update UPDATING. 
  • Makefile.am

    r5377 r5383  
    33 
    44AUTOMAKE_OPTIONS = 1.6 foreign 
    5 EXTRA_PROGRAMS = mutt_dotlock pgpring pgpewrap 
     5EXTRA_PROGRAMS = mutt_dotlock pgpring pgpewrap mutt_md5 
    66 
    77if BUILD_IMAP 
     
    8181pgpring_LDADD = @LIBOBJS@ $(INTLLIBS)  
    8282pgpring_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS) 
     83 
     84mutt_md5_SOURCES = md5.c 
     85mutt_md5_CFLAGS = -DMD5UTIL 
     86 
     87noinst_PROGRAMS = $(MUTT_MD5) 
    8388 
    8489mutt_dotlock.c: dotlock.c 
  • configure.ac

    r5362 r5383  
    825825 
    826826    need_md5="yes" 
    827  
    828     dnl hcachever.sh tool for calculating struct digest 
    829     AC_CHECK_PROGS([MD5], [md5 md5sum openssl], [none]) 
    830827 
    831828    dnl -- QDBM -- 
     
    953950then 
    954951  MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS md5.o" 
    955 fi 
     952  MUTT_MD5="mutt_md5" 
     953fi 
     954AC_SUBST(MUTT_MD5) 
    956955 
    957956AC_SUBST(MUTTLIBS) 
  • hcachever.sh.in

    r5377 r5383  
    22 
    33BASEVERSION=2 
    4  
    5 MD5=@MD5@ 
    6 if test "$MD5" = "openssl" 
    7 then 
    8   MD5="openssl md5 -hex" 
    9 elif test "$MD5" = "none" 
    10 then 
    11   echo "ERROR: no MD5 tool found" 
    12   exit 1 
    13 fi 
    144 
    155cleanstruct () { 
     
    9282echo " */" >> $TMPD 
    9383 
    94 MD5TEXT=`echo "$TEXT" | $MD5` 
     84MD5TEXT=`echo "$TEXT" | ./mutt_md5` 
    9585echo "#define HCACHEVER 0x"`echo $MD5TEXT | cut -c-8` >> $TMPD 
    9686 
  • md5.c

    r5197 r5383  
    451451  ctx->D = D; 
    452452} 
     453 
     454#ifdef MD5UTIL 
     455/* local md5 equivalent for header cache versioning */ 
     456int main(int argc, char** argv) 
     457{ 
     458  unsigned char r[16]; 
     459  int rc; 
     460 
     461  if ((rc = md5_stream(stdin, r))) 
     462    return rc; 
     463 
     464  printf("%02x%02x%02x%02x%02x%02x%02x%02x" 
     465         "%02x%02x%02x%02x%02x%02x%02x%02x\n", 
     466         r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], 
     467         r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]); 
     468 
     469  return 0; 
     470} 
     471#endif