From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] malloc redefinition when linking pcc with 8c programs In-Reply-To: Your message of "Mon, 01 Dec 2003 13:00:15 MST." <8b07c6b4228a0fc8e0ce580643589136@plan9.ucalgary.ca> From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <58805.1070313109.1@t40.swtch.com> Message-Id: Date: Mon, 1 Dec 2003 16:11:49 -0500 Topicbox-Message-UUID: 99c9b17a-eacc-11e9-9e20-41e7f4b1d025 > > you're trying to link the ape library > > with the normal c library, and you cannot do that. > > one or the other, as discussed earlier. > > multiple mallocs aren't the only reason. > > I guess I've misunderstood the original discussion. no chance for > writing just the graphical portion of a program in libdraw and linking > it against the ape-compiled rest then. you'd have to get libdraw compiling using pcc, meaning make a /sys/include/ape/draw.h, etc. i don't think it would be a lot of work, but it's not trivial and could be another copy to maintain. it's possible that in the specific case of libdraw the port would be easy because open(), read(), write(), etc. mean much the same in ape as they do in native plan 9. you need not to include libc.h, because it has a tag informing the linker to link with /386/lib/libc.a, and you need to do without that library.