ndbm on Linux
Sometime back I came across an issue with application using ndbm interfaces on Linux. The application was using ndbm interfaces and was linked to libdb.so and was compiled with DDB_DBM_HSEARCH which implies asking libdb to comply with ndbm interfaces.
The application was having issues which I root caused to database corruption. On some debugging I fugured out that an independent application using ndbm interfaces was not able to read this database (generated by the main application).
Later I replaced the use of libdb.so and linked it with libgdbm.so and also replaced the db.h with gdbm.h. Now the application generated database was usable by the independent code I wrote. It also fixed the issue with the code.
I found this issue with Linux on X86 as well as PPC.
Not sure what was the limit beyond which data corruption happens but I guess it is better to use gdbm directly over libdb
