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> int main() { DB *db = dbopen("/etc/aliases.db", O_RDONLY, O_RDONLY, DB_HASH, NULL); if(db == NULL) { perror("/etc/aliases.db"); 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): db4-4.3.29-3.fc5 How reproducible: Every time Steps to Reproduce: 1. cc file.c 2. 3. Actual results: As above Expected results: Should compile Additional info: The man page is the real problem here
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? Thanks.
Yes, of course. Which man-pages do you want to remove?
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.
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.
The man pages are removed from the version man-pages-2.34-2.
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.