Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brachiosaur.cis.ohio-state.edu!cml From: cml@brachiosaur.cis.ohio-state.edu (Christopher Lott) Newsgroups: comp.unix.questions Subject: Re: dbm(3x) bug help needed BADLY Message-ID: <47961@tut.cis.ohio-state.edu> Date: 11 May 89 13:34:56 GMT References: <312@dkstar.UUCP> Sender: news@tut.cis.ohio-state.edu Reply-To: Christopher Lott Distribution: usa Organization: The Ohio State University Dept of Computer & Information Science Lines: 25 In article vixie@decwrl.dec.com (Paul A Vixie) writes: >Jon Bennett asks a fair question: why doesn't dbm(3) work on a Symmetric? > >Moral of story: compile up a libdbm.a or libc.a(ndbm.o) with GCC. Hi, I tinkered with gcc and dbm routines and want to tell anyone who tries this to be certain to compile both the dbm libraries and your appl. with the same compiler. pcc-derived c compilers return structure contents in a different way from gcc and they are not compatible. dbm_fetch() and friends return datum structs; you can't mix a dbm library compiled by pcc (as supplied by SunOS 3.5.1, which does pcc-flavor struct returns) with an application compiled by gcc (which will expect gcc-compliant struct return procedures). I tried this, and trust me, it doesn't work. :-) Look carefully at the gcc flag -pcc_struct_return, although last I heard, it wasn't quite working correctly yet. chris... -=- cml@cis.ohio-state.edu Computer Science Dept, OSU 614-292-1826 or: ...!{att,pyramid,killer}!osu-cis!cml