perl4.003 and ndbm

Ozan Yigit oz at yunexus.yorku.ca
Thu May 9 12:18:59 AEST 1991


In article <339 at kyzyl.mi.org> tkacik at kyzyl.mi.org (Tom Tkacik) writes:

>Now the 3b1 does not come with -lndbm, but that didn't stop me.
>I just grabbed Ozan Yigit's sdbm package, and used that.

While I do not know the reasons for your current problem, I can tell you
that with the version of sdbm you have, the same test will fail between 7
and 8. When I wrote sdbm, I considered an attempt to store null key (dsize
0) to be a sure sign of something bizarre going on, and decided to check
for it. By some poetic :-) coincidence, the dbm test for perl attempts to
store a null key between 7 and 8, and gets caught by this check.

If you wish to allow for this, patch sdbm.c with the following diff, and
re-compile with -DNULLKEY.

enjoy...	oz

------------- 

11c11
< static char rcsid[] = "$Id: sdbm.c,v 1.2 1991/04/23 13:48:03 oz Exp $";
---
> static char rcsid[] = "$Id: sdbm.c,v 1.3 91/04/23 13:51:39 oz Exp Locker: oz $";
13a14,20
> /*
>  * $Log:	sdbm.c,v $
>  * Revision 1.3  91/04/23  13:51:39  oz
>  * added #ifdef NULLKEY to allow storing of a key with 0 length,
>  * and NULL dptr..
>  * 
>  */
59a67,69
> #ifdef NULLKEY
> #define bad(x)		((x).dsize < 0)
> #else
60a71
> #endif



More information about the Comp.sys.3b1 mailing list