Path: utzoo!telly!ddsw1!lll-winken!uunet!tut.cis.ohio-state.edu!WHEATIES.AI.MIT.EDU!rms From: rms@WHEATIES.AI.MIT.EDU (Richard Stallman) Newsgroups: gnu.gcc.bug Subject: Little known fix to use dbm & gcc together Message-ID: <8812230705.AA01037@sugar-bombs.ai.mit.edu> Date: 23 Dec 88 07:05:43 GMT References: <5692@medusa.cs.purdue.edu> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 23 That fix will work on machines where PCC uses its traditional nonreentrant calling convention: the 68k, the vax, and probably the 32k. It won't work on the 386 or the sparc, since there PCC uses a different convention, and returning a structure does not look like returning a pointer. On the 386, PCC and GCC use the same convention except for 1, 2, 4 or 8 byte structures. Alas, this structure is 8 bytes. You might be able to win by declaring `datum' to have a third int field, so that would be more than 8 bytes long. I don't know what would work on the sparc. Perhaps that same technique would work. If anyone can design a clean piece of shell script to add to the fixincludes file, which would automatically determine which machine you are on (perhaps by looking at the names or contents of files made by config.gcc) and make the right changes to a copy of dbm.h, I would be glad to install it. Note there is no need for this copy to contain any #ifdef's for GNU CC, since a file in the gcc-include directory is used only with GNU CC in the first place.