* draft patch to import md5 module from gnulib
@ 2011-02-18 8:18 Paul Eggert
2011-02-18 9:42 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Paul Eggert @ 2011-02-18 8:18 UTC (permalink / raw
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 2909 bytes --]
Here's a patch to import the md5 module from gnulib into Emacs.
I haven't committed this yet, as I would like to test it more,
but thought I'd give a heads-up.
For Windows, I expect the hand-generated makefiles will need to be
changed to compile lib/md5.c instead of src/md5.c, since the file was
moved.
The patch that I wrote is below. I'm attaching the full patch
(including automatically generated changes), as a compressed file.
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:
Regenerate.
* 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 01:35:20 +0000
+++ Makefile.in 2011-02-18 07:45:14 +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
+GNULIB_MODULES = \
+ crypto/md5 dtoastr getloadavg getopt-gnu ignore-value mktime strftime
GNULIB_TOOL_FLAGS = \
--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 01:35:20 +0000
+++ admin/notes/copyright 2011-02-18 07:45:14 +0000
@@ -632,8 +632,6 @@
lib/*.[ch]
lib/gnulib.mk
src/gmalloc.c
- src/md5.c
- src/md5.h
src/termcap.c
src/tparam.c
=== modified file 'src/Makefile.in'
--- src/Makefile.in 2011-02-10 03:20:52 +0000
+++ src/Makefile.in 2011-02-18 07:45:14 +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 \
$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ)
obj = $(base_obj) $(NS_OBJC_OBJ)
=== modified file 'src/deps.mk'
--- src/deps.mk 2011-02-16 01:35:20 +0000
+++ src/deps.mk 2011-02-18 07:45:14 +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
[-- Attachment #2: patch.txt.gz --]
[-- Type: application/x-gzip, Size: 12271 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: draft patch to import md5 module from gnulib
2011-02-18 8:18 draft patch to import md5 module from gnulib Paul Eggert
@ 2011-02-18 9:42 ` Eli Zaretskii
2011-02-19 7:52 ` Paul Eggert
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-02-18 9:42 UTC (permalink / raw
To: Paul Eggert; +Cc: emacs-devel
> Date: Fri, 18 Feb 2011 00:18:13 -0800
> From: Paul Eggert <eggert@cs.ucla.edu>
>
> For Windows, I expect the hand-generated makefiles will need to be
> changed to compile lib/md5.c instead of src/md5.c, since the file was
> moved.
Yes, it looks like that would be the only change needed.
Please post here a message when you commit these changes, so that the
Windows build could be fixed ASAP after that.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: draft patch to import md5 module from gnulib
2011-02-18 9:42 ` Eli Zaretskii
@ 2011-02-19 7:52 ` Paul Eggert
2011-02-19 8:55 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Paul Eggert @ 2011-02-19 7:52 UTC (permalink / raw
To: Eli Zaretskii; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 4823 bytes --]
Here's an updated version of the proposed patch to have Emacs use
the gnulib md5 module.
This differs from the earlier md5 draft
<http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg00783.html>,
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
space.
2011-02-19 Paul Eggert <eggert@cs.ucla.edu>
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 <eggert@cs.ucla.edu>
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:
Regenerate.
* 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
+GNULIB_MODULES = \
+ crypto/md5 dtoastr getloadavg getopt-gnu ignore-value mktime strftime
GNULIB_TOOL_FLAGS = \
--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 @@
lib/*.[ch]
lib/gnulib.mk
src/gmalloc.c
- src/md5.c
- src/md5.h
src/termcap.c
src/tparam.c
=== 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 \
$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ)
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 @@
msdos.h
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 #2: md5-patch2.txt.gz --]
[-- Type: application/x-gzip, Size: 85068 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: draft patch to import md5 module from gnulib
2011-02-19 7:52 ` Paul Eggert
@ 2011-02-19 8:55 ` Eli Zaretskii
2011-02-19 9:53 ` Paul Eggert
0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2011-02-19 8:55 UTC (permalink / raw
To: Paul Eggert; +Cc: emacs-devel
> Date: Fri, 18 Feb 2011 23:52:39 -0800
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: emacs-devel@gnu.org
>
> 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.
Yes, both MinGW and MSVC have stdint.h.
> 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.
But what about the dependency of fns.o on lib/md5.h instead?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: draft patch to import md5 module from gnulib
2011-02-19 8:55 ` Eli Zaretskii
@ 2011-02-19 9:53 ` Paul Eggert
2011-02-20 8:50 ` Paul Eggert
0 siblings, 1 reply; 8+ messages in thread
From: Paul Eggert @ 2011-02-19 9:53 UTC (permalink / raw
To: Eli Zaretskii; +Cc: emacs-devel
On 02/19/2011 12:55 AM, Eli Zaretskii wrote:
> what about the dependency of fns.o on lib/md5.h instead?
Yes, thanks, that should be added, like this:
* deps.mk (fns.o): Depend on ../lib/md5.h.
=== modified file 'src/deps.mk'
--- src/deps.mk 2011-02-19 07:28:29 +0000
+++ src/deps.mk 2011-02-19 09:50:53 +0000
@@ -282,7 +282,7 @@
msdos.h
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 \
+ keyboard.h keymap.h window.h $(INTERVALS_H) coding.h ../lib/md5.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 \
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: draft patch to import md5 module from gnulib
@ 2011-02-20 2:30 Ben Key
2011-02-20 7:54 ` Eli Zaretskii
0 siblings, 1 reply; 8+ messages in thread
From: Ben Key @ 2011-02-20 2:30 UTC (permalink / raw
To: Emacs-devel
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
Eli Zaretskii wrote:
> Yes, both MinGW and MSVC have stdint.h.
While Visual Studio 2010 may have stdint.h, older versions of Visual Studio
such as Visual Studio 2005, do not have stdint.h.
[-- Attachment #2: Type: text/html, Size: 281 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: draft patch to import md5 module from gnulib
2011-02-20 2:30 Ben Key
@ 2011-02-20 7:54 ` Eli Zaretskii
0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2011-02-20 7:54 UTC (permalink / raw
To: Ben Key; +Cc: Emacs-devel
> From: Ben Key <bkey76@gmail.com>
> Date: Sat, 19 Feb 2011 20:30:55 -0600
> Cc:
>
> While Visual Studio 2010 may have stdint.h, older versions of Visual Studio
> such as Visual Studio 2005, do not have stdint.h.
Yes, I was planning on adding nt/inc/stdint.h anyway, since MSVC does
not support #include_next, and its headers can be anywhere, so the
alternatives provided by gnulib don't work, either.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-02-20 8:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-18 8:18 draft patch to import md5 module from gnulib Paul Eggert
2011-02-18 9:42 ` Eli Zaretskii
2011-02-19 7:52 ` Paul Eggert
2011-02-19 8:55 ` Eli Zaretskii
2011-02-19 9:53 ` Paul Eggert
2011-02-20 8:50 ` Paul Eggert
-- strict thread matches above, loose matches on Subject: below --
2011-02-20 2:30 Ben Key
2011-02-20 7:54 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.