bug-gnu-utils
[Top][All Lists]
Advanced

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

gdbm-1.8.1


From: Spratte, Michael
Subject: gdbm-1.8.1
Date: Fri, 27 Sep 2002 16:56:55 -0600

I just pulled down gdbm-1.8.1 from gatekeeper.research.compaq.com and 
discovered two bugs.

The first one requires some minor code changes.  If you look at the differences 
between the 1.8.0 and 1.8.1 versions of gdbmopen.c you will see that in the 
later version the flags argument is not being set to GDBM_WRITER.  This causes 
gdbm_store() to fail when gdbm_open() is called with any read_write value other 
than GDBM_WRITER.  I fixed this by inserting two "flags = GDBM_WRITER" 
assignments at lines 138 and 143 in the case labels of the "switch (flags...)"
statement:

  switch (flags & GDBM_OPENMASK)
    {
      case GDBM_READER:
        dbf->desc = open (dbf->name, O_RDONLY, 0);
        break;

      case GDBM_WRITER:
        dbf->desc = open (dbf->name, O_RDWR, 0);
        break;

      case GDBM_NEWDB:
        dbf->desc = open (dbf->name, O_RDWR|O_CREAT, mode);
        flags = GDBM_WRITER;    /* <= ADDED */
        need_trunc = TRUE;
        break;

      default:
        dbf->desc = open (dbf->name, O_RDWR|O_CREAT, mode);
        flags = GDBM_WRITER;    /* <= ADDED */
        break;

    }

The second one is easily worked around.  Make fails at the very end if makeinfo 
is not installed on the system.  My workaround was to simply do:

        make MAKEINFO=echo

Thanks,
Michael Spratte
Hewlett-Packard Company
(formerly Compaq Computer Corporation, formerly Digital Equipment Corporation)
Colorado Springs, Colorado





reply via email to

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