jef@ace.ee.lbl.gov (Jef Poskanzer) (07/30/90)
Does anybody do this? Is there some trick that we're missing? Nntpd claims that cnews already has whatever article we offer to it. I thought that configuring NNTP to use DBM calls but linking with the DBZ library would be enough, but apparently not. --- Jef Jef Poskanzer jef@well.sf.ca.us {ucbvax, apple, hplabs}!well!jef "And for you, a puppy!" "Ohhhh!"
tadguy@abcfd01.larc.nasa.gov (Tad Guy) (07/30/90)
In article <6313@helios.ee.lbl.gov> jef@ace.ee.lbl.gov (Jef Poskanzer) writes: > Does anybody do this? Is there some trick that we're missing? Nntpd > claims that cnews already has whatever article we offer to it. I thought > that configuring NNTP to use DBM calls but linking with the DBZ library > would be enough, but apparently not. If you define BSD_43, common/conf.h forces a defintion of NDBM, even if you've explicitly defined DBM earlier in the file. The following patch prevents this behavior. After patching, link with dbz.o (not -ldbm), and it should correctly reject dups. ...tad *************** *** 127,134 **** # define READ_SUPER # endif # endif ! # ifndef NDBM ! # define NDBM # endif #endif --- 127,136 ---- # define READ_SUPER # endif # endif ! # ifndef DBM ! # ifndef NDBM ! # define NDBM ! # endif # endif #endif
jef@ace.ee.lbl.gov (Jef Poskanzer) (07/30/90)
In the referenced message, tadguy@abcfd01.larc.nasa.gov (Tad Guy) wrote: }If you define BSD_43, common/conf.h forces a defintion of NDBM, even }if you've explicitly defined DBM earlier in the file. The following }patch prevents this behavior. We already did that. }After patching, link with dbz.o (not -ldbm), We already did that. }and it should correctly reject dups. It doesn't. --- Jef Jef Poskanzer jef@well.sf.ca.us {ucbvax, apple, hplabs}!well!jef "A child is a person who can't understand why someone would give away a perfectly good kitten." -- Doug Larson
flee@guardian.cs.psu.edu (Felix Lee) (07/30/90)
Note, if you use dbz and #include <dbm.h>, you are probably inadvertently defining several unused variables, like pagbuf[] and dirbuf[], since <dbm.h> doesn't declare them as "extern". This is about 5k of unused space in the bss segment. The impact on performance is probably insignificant. -- Felix Lee flee@cs.psu.edu
tadguy@abcfd01.larc.nasa.gov (Tad Guy) (08/01/90)
In article <6315@helios.ee.lbl.gov> jef@ace.ee.lbl.gov (Jef Poskanzer) writes: > > [ tadguy offers fix to cnews/dbz problem ] > > We already did that. > > }and it should correctly reject dups. > > It doesn't. What can I say; it works for me... You may want to write a quickie dbz test program to make sure your history dbz is valid, etc. ...tad