[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: draft patch to import md5 module from gnulib

From: Paul Eggert
Subject: Re: draft patch to import md5 module from gnulib
Date: Fri, 18 Feb 2011 23:52:39 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20101208 Thunderbird/3.1.7

Here's an updated version of the proposed patch to have Emacs use
the gnulib md5 module.

This differs from the earlier md5 draft
in that it also imports the stdint module from gnulib.  The stdint
module lets C code use <stdint.h> without worrying whether the
underlying system has <stdint.h>, and this simplifies the md5 module.
This patch complicates Emacs configuration a bit, but we expect that
Emacs will eventually need <stdint.h> anyway, for other reasons, so we
might as well address that now.

As I understand it, Visual Studio 2010 has <stdint.h>, and if that can
be assumed then the Windows port shouldn't have to worry about
configuring stdint.h.  If it can't be assumed, the Windows port will
have to create a lib/stdint.h that is good enough for Emacs.  For now,
all that's needed in this stdint.h is a definition "typedef int
uint32_t;" but a more-complete stdint.h will be needed eventually.

Another minor fix in this updated patch is that a stray dependency on
md5.h was removed from the fns.o rule in src/Makefile.in.

Here are the handwritten files in the patch.  I have attached the
complete patch, including autogenerated files, compressed to save

2011-02-19  Paul Eggert  <address@hidden>

        Import simpler crypto/md5 module from gnulib, plus stdint module.
        * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4:
        * src/config.in: Regenerate.
        * lib/md5.c, lib/md5.h: Regenerate with simpler version, which
        assumes C99-style <stdint.h>, supplied by the stdint module.
        * lib/stdint.in.h, m4/longlong.m4, m4/stdint.m4: New files,
        generated from gnulib.
        * src/deps.mk (fns.o): Do not depend on md5.h, fixing a typo in
        the earlier patch.

2011-02-18  Paul Eggert  <address@hidden>

        Import crypto/md5 module from gnulib.
        * Makefile.in (MAKEFILE_MODULES): Add crypto/md5.
        * admin/notes/copyright: Remove src/md5.c and src/md5.h as
        special cases.
        * src/Makefile.in (base_obj): Remove md5.o, since this file
        is in lib now.
        * src/deps.mk (md5.o): Remove.
        * aclocal.m4, configure, lib/Makefile.in, lib/gnulib.mk, m4/gl-comp.m4:
        * lib/md5.c: Regenerate.  This renames the file from src/md5.c,
        and adds some porting improvements from gnulib.
        * lib/md5.h: Regenerate, likwise; rename from src/md5.h.
        * m4/md5.m4: New file, from gnulib.

=== modified file 'Makefile.in'
--- Makefile.in 2011-02-16 00:33:44 +0000
+++ Makefile.in 2011-02-18 08:07:03 +0000
@@ -330,7 +330,8 @@
 # Update modules from gnulib, for maintainers, who should have it in
 # $(gnulib_srcdir) (relative to $(srcdir) and should have build tools
 # as per $(gnulib_srcdir)/DEPENDENCIES.
-GNULIB_MODULES = dtoastr getloadavg getopt-gnu ignore-value mktime strftime
+  crypto/md5 dtoastr getloadavg getopt-gnu ignore-value mktime strftime
  --import --no-changelog --no-vc-files --makefile-name=gnulib.mk
 sync-from-gnulib: $(gnulib_srcdir)

=== modified file 'admin/notes/copyright'
--- admin/notes/copyright       2011-02-16 00:33:44 +0000
+++ admin/notes/copyright       2011-02-18 08:07:03 +0000
@@ -632,8 +632,6 @@
-    src/md5.c
-    src/md5.h

=== modified file 'src/Makefile.in'
--- src/Makefile.in     2011-02-10 03:20:52 +0000
+++ src/Makefile.in     2011-02-18 08:07:03 +0000
@@ -354,7 +354,7 @@
        syntax.o $(UNEXEC_OBJ) bytecode.o \
        process.o gnutls.o callproc.o \
        region-cache.o sound.o atimer.o \
-       doprnt.o intervals.o textprop.o composite.o md5.o xml.o \
+       doprnt.o intervals.o textprop.o composite.o xml.o \
 obj = $(base_obj) $(NS_OBJC_OBJ)

=== modified file 'src/deps.mk'
--- src/deps.mk 2011-02-16 00:33:44 +0000
+++ src/deps.mk 2011-02-19 07:28:29 +0000
@@ -144,7 +144,6 @@
 ralloc.o: ralloc.c lisp.h $(config_h)
 vm-limit.o: vm-limit.c mem-limits.h lisp.h globals.h $(config_h)
 marker.o: marker.c buffer.h character.h lisp.h globals.h $(config_h)
-md5.o: md5.c md5.h $(config_h)
 minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \
    buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \
    termhooks.h lisp.h globals.h $(config_h) coding.h
@@ -283,7 +282,7 @@
 floatfns.o: floatfns.c syssignal.h lisp.h globals.h $(config_h)
 fns.o: fns.c commands.h lisp.h $(config_h) frame.h buffer.h character.h \
-   keyboard.h keymap.h window.h $(INTERVALS_H) coding.h md5.h \
+   keyboard.h keymap.h window.h $(INTERVALS_H) coding.h \
    blockinput.h atimer.h systime.h xterm.h ../lib/unistd.h globals.h
 print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \
    lisp.h globals.h $(config_h) termchar.h $(INTERVALS_H) msdos.h termhooks.h \

Attachment: md5-patch2.txt.gz
Description: GNU Zip compressed data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]