diff -u -p -r tinycdb-0.76pre1/cdb.1 tinycdb-0.76pre2/cdb.1
--- tinycdb-0.76pre1/cdb.1	2006-06-28 19:19:19.000000000 +0400
+++ tinycdb-0.76pre2/cdb.1	2006-09-03 16:16:51.000000000 +0400
@@ -1,4 +1,4 @@
-.\" $Id: cdb.1,v 1.7 2006/06/28 15:19:19 mjt Exp $
+.\" $Id: cdb.1,v 1.8 2006/09/03 12:16:51 mjt Exp $
 .\" cdb command tool manpage
 .\"
 .\" This file is a part of tinycdb package by Michael Tokarev, mjt@corpit.ru.
@@ -141,7 +141,7 @@ slightly modified output in a form:
 .br
     +\fIklen\fR:\fIkey\fR\\n
 .br
-(note \fIvlen\fR and \vIval\fR are omitted, together with surrounding
+(note \fIvlen\fR and \fIval\fR are omitted, together with surrounding
 delimiters).
 
 If \fB\-m\fR option is given, \fBcdb\fR will expect or produce one line
diff -u -p -r tinycdb-0.76pre1/cdb.3 tinycdb-0.76pre2/cdb.3
--- tinycdb-0.76pre1/cdb.3	2006-06-28 19:19:19.000000000 +0400
+++ tinycdb-0.76pre2/cdb.3	2006-06-29 17:36:13.000000000 +0400
@@ -1,4 +1,4 @@
-.\" $Id: cdb.3,v 1.7 2006/06/28 15:19:19 mjt Exp $
+.\" $Id: cdb.3,v 1.9 2006/06/29 13:36:13 mjt Exp $
 .\" cdb library manpage
 .\"
 .\" This file is a part of tinycdb package by Michael Tokarev, mjt@corpit.ru.
@@ -127,8 +127,8 @@ respectively, using \fBcdb_read\fR().
 
 .nf
 const void *\fBcdb_get\fR(\fIcdbp\fR, \fIlen\fR, \fIpos\fR)
-const void *\fBcdb_getdata\fR(\fIcdbp\fR, \fIlen\fR, \fIpos\fR)
-const void *\fBcdb_getkey\fR(\fIcdbp\fR, \fIlen\fR, \fIpos\fR)
+const void *\fBcdb_getdata\fR(\fIcdbp\fR)
+const void *\fBcdb_getkey\fR(\fIcdbp\fR)
    const struct cdb *\fIcdbp\fR;
    unsigned \fIlen\fR;
    unsigned \fIpos\fR;
@@ -177,7 +177,7 @@ int \fBcdb_findnext\fR(\fIcdbfp\fR)
 .fi
 .RS
 sequential-find routines that used separate structure.  It is
-possible to have many than one record with the same key in a
+possible to have more than one record with the same key in a
 database, and these routines allows to enumerate all them.
 \fBcdb_findinit\fR() initializes search structure pointed to
 by \fIcdbfp\fR.  It will return negative value on error or
diff -u -p -r tinycdb-0.76pre1/cdb_init.c tinycdb-0.76pre2/cdb_init.c
--- tinycdb-0.76pre1/cdb_init.c	2006-06-28 15:42:36.000000000 +0400
+++ tinycdb-0.76pre2/cdb_init.c	2006-09-03 14:17:45.000000000 +0400
@@ -1,4 +1,4 @@
-/* $Id: cdb_init.c,v 1.10 2006/06/28 11:42:36 mjt Exp $
+/* $Id: cdb_init.c,v 1.11 2006/09/03 10:17:45 mjt Exp $
  * cdb_init, cdb_free and cdb_read routines
  *
  * This file is a part of tinycdb package by Michael Tokarev, mjt@corpit.ru.
@@ -10,6 +10,9 @@
 # include <windows.h>
 #else
 # include <sys/mman.h>
+# ifndef MAP_FAILED
+#  define MAP_FAILED ((void*)-1)
+# endif
 #endif
 #include <sys/stat.h>
 #include "cdb_int.h"
@@ -44,7 +47,7 @@ cdb_init(struct cdb *cdbp, int fd)
     return -1;
 #else
   mem = (unsigned char*)mmap(NULL, fsize, PROT_READ, MAP_SHARED, fd, 0);
-  if (mem == (unsigned char *)-1)
+  if (mem == MAP_FAILED)
     return -1;
 #endif /* _WIN32 */
 
diff -u -p -r tinycdb-0.76pre1/cdb_seek.c tinycdb-0.76pre2/cdb_seek.c
--- tinycdb-0.76pre1/cdb_seek.c	2003-11-03 19:42:41.000000000 +0300
+++ tinycdb-0.76pre2/cdb_seek.c	2006-09-03 13:51:25.000000000 +0400
@@ -1,4 +1,4 @@
-/* $Id: cdb_seek.c,v 1.6 2003/11/03 16:42:41 mjt Exp $
+/* $Id: cdb_seek.c,v 1.7 2006/09/03 09:51:25 mjt Exp $
  * old interface for reading cdb file
  *
  * This file is a part of tinycdb package by Michael Tokarev, mjt@corpit.ru.
@@ -75,7 +75,7 @@ cdb_seek(int fd, const void *key, unsign
 	/* read the key from file and compare with wanted */
 	unsigned l = klen, c;
 	const char *k = (const char*)key;
-	if (*dlenp)
+	if (dlenp)
 	  *dlenp = cdb_unpack(rbuf + 4); /* save value length */
 	for(;;) {
 	  if (!l) /* the whole key read and matches, return */
diff -u -p -r tinycdb-0.76pre1/debian/changelog tinycdb-0.76pre2/debian/changelog
--- tinycdb-0.76pre1/debian/changelog	2006-06-29 14:21:53.000000000 +0400
+++ tinycdb-0.76pre2/debian/changelog	2006-09-03 16:29:51.000000000 +0400
@@ -1,5 +1,9 @@
 tinycdb (0.76) unstable; urgency=low
 
+  * 0.76 release.
+    Closes Debian bugs: #342849, #316253, #360129, #383417.
+    Also closes: #299026
+
   * manpage spelling fixes, from Claus Assmann <ca+tinycdb (at) esmtp.org>.
 
   * little mods to allow compiling tinycdb by C++ compiler,
@@ -61,7 +65,14 @@ tinycdb (0.76) unstable; urgency=low
 
   * bumped Debian Standards-Version to 3.7.2 (no changes necessary).
 
- -- Michael Tokarev <mjt@corpit.ru>  Wed, 28 Jun 2006 21:50:57 +0400
+  * fixed a typo in cdb_seek.c, -- it segfaulted if passed NULL dlenp
+    pointer.  Thanks Daiki for the patch.  Closes: #383417
+
+  * use MAP_FAILED to test mmap() return value, instead of hardcoded -1.
+
+  * several minor fixes for debian/* files, thanks to Bernhard R. Link.
+
+ -- Michael Tokarev <mjt@corpit.ru>  Sun,  3 Sep 2006 14:56:38 +0400
 
 tinycdb (0.75) unstable; urgency=low
 
@@ -75,6 +86,7 @@ tinycdb (0.75) unstable; urgency=low
     - development files libcdb-dev
     - utility tinycdb
     - nss module nss-cdb
+    Closes: Debian #360129, #316253.
 
   * rewrote cdb_make_put(CDB_PUT_REPLACE) to a) actually replace *all*
     duplicates, not just the first one, and b) perform real replace,
diff -u -p -r tinycdb-0.76pre1/debian/control tinycdb-0.76pre2/debian/control
--- tinycdb-0.76pre1/debian/control	2006-06-29 14:22:06.000000000 +0400
+++ tinycdb-0.76pre2/debian/control	2006-09-03 14:56:25.000000000 +0400
@@ -4,18 +4,16 @@ Priority: optional
 Maintainer: Michael Tokarev <mjt@corpit.ru>
 Build-Depends: debhelper (>= 4)
 Standards-Version: 3.7.2
-Origin: debian
-Bugs: debbugs://bugs.debian.org
 
 Package: tinycdb
 Architecture: any
 Depends: ${shlibs:Depends}
 Description: an utility to manipulate constant databases (cdb)
- tinycdb is a small, fast and reliable utility set and subroutine
+ tinycdb is a small, fast and reliable utility and subroutine
  library for creating and reading constant databases. The database
  structure is tuned for fast reading.
  .
- This package contains command-line utility to create, analyze, dump
+ This package contains a command-line utility to create, analyze, dump
  and query cdb files.
 
 Package: libcdb1
@@ -23,20 +21,20 @@ Architecture: any
 Section: lib
 Depends: ${shlibs:Depends}
 Description: shared library for constant databases (cdb)
- tinycdb is a small, fast and reliable utility set and subroutine
+ tinycdb is a small, fast and reliable utility and subroutine
  library for creating and reading constant databases. The database
  structure is tuned for fast reading.
  .
- This package package provides shared library needed  to run programs
- using it.
+ This package package provides a shared library needed to run
+ programs using it.
 
 Package: libcdb-dev
 Architecture: any
-Section: libdev
+Section: libdevel
 Depends: libcdb1 (= ${Source-Version})
 Recommends: tinycdb
 Description: development files for constant databases (cdb)
- tinycdb is a small, fast and reliable utility set and subroutine
+ tinycdb is a small, fast and reliable utility and subroutine
  library for creating and reading constant databases. The database
  structure is tuned for fast reading.
  .
@@ -48,7 +46,7 @@ Architecture: any
 Section: lib
 Depends: ${shlibs:Depends}, tinycdb
 Description: cdb-based nss (name service switch) module
- tinycdb is a small, fast and reliable utility set and subroutine
+ tinycdb is a small, fast and reliable utility and subroutine
  library for creating and reading constant databases. The database
  structure is tuned for fast reading.
  .
diff -u -p -r tinycdb-0.76pre1/debian/copyright tinycdb-0.76pre2/debian/copyright
--- tinycdb-0.76pre1/debian/copyright	2005-04-18 03:26:42.000000000 +0400
+++ tinycdb-0.76pre2/debian/copyright	2006-09-03 16:16:26.000000000 +0400
@@ -1,12 +1,6 @@
-This package was debianized by Michael Tokarev <mjt@corpit.ru> on Sun May 27
-2001, based on work for freecdb by Tommi Virtanen <tv@debian.org>. Further
-changes were done by Christian Kurz <debian.org> -- Thank you very much
-Christian for this work.  And further changes are again by Michael Tokarev,
-since 18 Apr 2005.
+This package was written by Michael Tokarev <mjt@corpit.ru>,
+based on ideas by Dan Bernstein.
 
-Source code was obtained from:
-	ftp://ftp.corpit.ru/pub/tinycdb
+All the files are in public domain.
 
-The following copyright applies to this package:
-
- Public domain.
+Source code and home page is at http://www.corpit.ru/mjt/tinycdb.html
