9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] malloc redefinition when linking pcc with 8c programs
Date: Mon,  1 Dec 2003 16:11:49 -0500	[thread overview]
Message-ID: <E1AQvKf-000FIV-NH@t40.swtch.com> (raw)
In-Reply-To: Your message of "Mon, 01 Dec 2003 13:00:15 MST." <8b07c6b4228a0fc8e0ce580643589136@plan9.ucalgary.ca>

> > 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.




      parent reply	other threads:[~2003-12-01 21:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-01 18:13 mirtchov
2003-12-01 19:43 ` Russ Cox
2003-12-01 20:00   ` mirtchov
2003-12-01 20:54     ` Latchesar Ionkov
2003-12-01 21:20       ` boyd, rounin
2003-12-01 21:43       ` andrey mirtchovski
2003-12-01 21:53         ` Russ Cox
2003-12-01 22:13           ` mirtchov
2003-12-01 23:05             ` Hugo Santos
2003-12-01 23:10               ` Russ Cox
2003-12-01 23:21                 ` Hugo Santos
2003-12-02  0:05                   ` David Arnold
2003-12-01 21:11     ` Russ Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1AQvKf-000FIV-NH@t40.swtch.com \
    --to=rsc@swtch.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).