Sfoglia il codice sorgente

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.
Guillem Jover 14 anni fa
parent
commit
c24cc696c7
7 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 1 1
      debian/copyright
  2. 3 0
      lib/compat/Makefile.am
  3. 0 0
      lib/compat/md5.c
  4. 0 0
      lib/compat/md5.h
  5. 0 1
      lib/dpkg/Makefile.am
  6. 1 1
      lib/dpkg/buffer.c
  7. 0 1
      po/POTFILES.in

+ 1 - 1
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.

+ 3 - 0
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

lib/dpkg/md5.c → lib/compat/md5.c


lib/dpkg/md5.h → lib/compat/md5.h


+ 0 - 1
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 \

+ 1 - 1
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>
 

+ 0 - 1
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