summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2012-08-03 13:14:17 +0200
committerGuillem Jover <guillem@debian.org>2013-07-18 01:41:18 +0200
commitc24cc696c75c55dd832fc3715ebdf155f0449c0e (patch)
tree3c396ac124b1fad5f8397dce35acabaa4149d655
parent797f8512f6326a22d816a08958cef965269f1009 (diff)
downloaddpkg-c24cc696c75c55dd832fc3715ebdf155f0449c0e.tar.gz
libcompat: Take over md5 module from libdpkg
The md5 code is imported from the BSDs, and should not generally be touched, only updated from there. Also on several platforms the code should use the system available interfaces instead.
-rw-r--r--debian/copyright2
-rw-r--r--lib/compat/Makefile.am3
-rw-r--r--lib/compat/md5.c (renamed from lib/dpkg/md5.c)0
-rw-r--r--lib/compat/md5.h (renamed from lib/dpkg/md5.h)0
-rw-r--r--lib/dpkg/Makefile.am1
-rw-r--r--lib/dpkg/buffer.c2
-rw-r--r--po/POTFILES.in1
7 files changed, 5 insertions, 4 deletions
diff --git a/debian/copyright b/debian/copyright
index 85e2636b2..0e3149c05 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -37,7 +37,7 @@ Copyright © 1994 Matt Welsh <mdw@sunsite.unc.edu>
Copyright © 1994 Ian Murdock <imurdock@debian.org>
Includes public domain MD5 code:
- lib/dpkg/md5.c and lib/dpkg/md5.h originally written by Colin Plumb,
+ lib/compat/md5.c and lib/compat/md5.h originally written by Colin Plumb,
Includes code from ‘getopt’ and ‘gettext’:
Copyright © 1984-2002 Free Software Foundation, Inc.
diff --git a/lib/compat/Makefile.am b/lib/compat/Makefile.am
index 33da1bd19..4aa4754b0 100644
--- a/lib/compat/Makefile.am
+++ b/lib/compat/Makefile.am
@@ -12,6 +12,9 @@ libcompat_a_SOURCES = \
compat.h \
gettext.h
+# FIXME: unconditionally include these for now.
+libcompat_a_SOURCES += md5.c md5.h
+
if !HAVE_GETOPT
libcompat_a_SOURCES += getopt.c getopt.h
endif
diff --git a/lib/dpkg/md5.c b/lib/compat/md5.c
index 3da18c98e..3da18c98e 100644
--- a/lib/dpkg/md5.c
+++ b/lib/compat/md5.c
diff --git a/lib/dpkg/md5.h b/lib/compat/md5.h
index f6243603d..f6243603d 100644
--- a/lib/dpkg/md5.h
+++ b/lib/compat/md5.h
diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am
index e53ddbdb9..15bd57590 100644
--- a/lib/dpkg/Makefile.am
+++ b/lib/dpkg/Makefile.am
@@ -46,7 +46,6 @@ libdpkg_a_SOURCES = \
glob.c \
i18n.h \
log.c \
- md5.c md5.h \
mlib.c \
namevalue.c \
nfmalloc.c \
diff --git a/lib/dpkg/buffer.c b/lib/dpkg/buffer.c
index ec818f402..bf365dcb5 100644
--- a/lib/dpkg/buffer.c
+++ b/lib/dpkg/buffer.c
@@ -26,6 +26,7 @@
#include <sys/types.h>
#include <errno.h>
+#include <md5.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
@@ -33,7 +34,6 @@
#include <dpkg/i18n.h>
#include <dpkg/dpkg.h>
#include <dpkg/varbuf.h>
-#include <dpkg/md5.h>
#include <dpkg/fdio.h>
#include <dpkg/buffer.h>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e78e74ca3..35269abe5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -16,7 +16,6 @@ lib/dpkg/fields.c
lib/dpkg/file.c
lib/dpkg/glob.c
lib/dpkg/log.c
-lib/dpkg/md5.c
lib/dpkg/mlib.c
lib/dpkg/nfmalloc.c
lib/dpkg/options.c