Bug 198597 - dbopen man page is broken
dbopen man page is broken
Product: Fedora
Classification: Fedora
Component: db4 (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2006-07-12 03:38 EDT by Nigel Horne
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-07-13 02:54:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
db4-devel demonstration program (702 bytes, text/x-csrc)
2006-07-13 04:10 EDT, Nigel Horne
no flags Details

  None (edit)
Description Nigel Horne 2006-07-12 03:38:12 EDT
Description of problem:

I wrote the following program as per the dbopen man page:

#include <sys/types.h>
#include <limits.h>
#include <db.h>
#include <fcntl.h>
#include <errno.h>

        DB *db = dbopen("/etc/aliases.db", O_RDONLY, O_RDONLY, DB_HASH, NULL);

        if(db == NULL) {
                return errno;
        return db->close(db);

However it fails to compile:

dbopen.c: In function ‘main’:
dbopen.c:10: warning: initialization makes pointer from integer without a cast
dbopen.c:16: error: too few arguments to function ‘db->close’

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1. cc file.c
Actual results:
As above

Expected results:
Should compile

Additional info:
The man page is the real problem here
Comment 1 Jindrich Novy 2006-07-12 07:28:08 EDT
Yes, the man page qualifies in the most-obsolete top ten hitparade. It's
generally better to look into the c_api HTML documentation db4-devel have in
/usr/share/doc which is much more recent.

The original dbopen man page comes from man-pages package so I'll try to
convince the man-pages maintainer (Ivana) to remove all db4 related man pages so
that I can package it as part of db4-devel.

Ivana, is that ok?

Comment 2 Ivana Varekova 2006-07-12 08:52:00 EDT
Yes, of course. 
Which man-pages do you want to remove?
Comment 3 Jindrich Novy 2006-07-12 08:57:59 EDT
These for now:

btree.3  dbopen.3  hash.3  mpool.3  recno.3

They are mostly identical to the ones in man-pages, but it's better to keep them
with db4, where I'm going to patch it to keep them more recent.
Comment 4 Jindrich Novy 2006-07-12 09:52:54 EDT
While looking a bit more into it I found that the noted man pages are for a
pretty ancient db-1.85, so it makes sense to let them be removed as db4 ships
only HTML information about its API what also caused your man page confusion.
Comment 5 Ivana Varekova 2006-07-13 02:54:23 EDT
The man pages are removed from the version man-pages-2.34-2.
Comment 6 Nigel Horne 2006-07-13 04:10:30 EDT
Created attachment 132354 [details]
db4-devel demonstration program

This is a simple program demonstrating how to use db4 which you may wish to add
to the documentation.

Note You need to log in before you can comment on or make changes to this bug.