Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!oz From: oz@yunexus.yorku.ca (Ozan Yigit) Newsgroups: comp.lang.perl Subject: Re: perl4.003 and ndbm Message-ID: <22689@yunexus.YorkU.CA> Date: 9 May 91 14:00:29 GMT References: <339@kyzyl.mi.org> Sender: news@yunexus.YorkU.CA Organization: York U. Communications Research & Development Lines: 37 In article <339@kyzyl.mi.org> tkacik@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