develooper Front page | perl.perl5.porters | Postings from December 2000

[ID 20001213.003] DB3's dbm/ndbm emulation support

Thread Next
Stanislav Brabec
December 13, 2000 15:10
[ID 20001213.003] DB3's dbm/ndbm emulation support
Message ID:
Hallo Perl developers,

I am adding small patch fixing some problems of ndbm/odbm emulation in

- Some ndbm/odbm defines are disabled by default. On systems, where
dbm.h and ndbm.h are simple symlinks to db.h, emualtion needs set-u

- ACTION is defined in both DB and PERL (unfortunatelly in different
meaning). Carefull permutation of includes can simply workaround the

The patch was not tested with real historic implementations of ndbm/dbm,
but I guess it should work.


lib/odbm.............FAILED at test 9
    Failed 1/64 tests, 98.44% okay

DB3 is, by default installed without links to historical names. This
patch doesn't solve this - simply if these links are not created, perl
builds without odbm/ndbm emulation. But it's problem of DB3's packager,
not Perl.

ln -s /usr/lib/
ln -s /usr/lib/
ln -s /usr/lib/
ln -s /usr/lib/
ln -s db.h /usr/include/ndbm.h
ln -s db.h /usr/include/dbm.h

Stanislav Brabec

--- perl-5.6.0/ext/NDBM_File/NDBM_File.xs.orig	Tue Feb 15 06:42:40 2000
+++ perl-5.6.0/ext/NDBM_File/NDBM_File.xs	Wed Dec 13 19:45:28 2000
@@ -1,7 +1,9 @@
+#define DB_DBM_HSEARCH 1
+#include <ndbm.h>
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
-#include <ndbm.h>
 typedef struct {
 	DBM * 	dbp ;
--- perl-5.6.0/ext/ODBM_File/ODBM_File.xs.orig	Wed Feb 16 07:12:17 2000
+++ perl-5.6.0/ext/ODBM_File/ODBM_File.xs	Wed Dec 13 20:33:05 2000
@@ -1,7 +1,7 @@
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
+#include "config.h"
+#undef VOIDUSED
+#define DB_DBM_HSEARCH 1
 #ifdef I_DBM
 #  include <dbm.h>
@@ -10,6 +10,10 @@
 #  endif
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
  * DBM on at least Ultrix and HPUX call dbmclose() from dbminit(),

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About