9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "adr via 9fans" <9fans@9fans.net>
To: 9fans@9fans.net
Subject: [9fans] Re: ape function args not checked|mixed ansi/old function declaration
Date: Tue, 29 Jun 2021 23:27:22 +0000	[thread overview]
Message-ID: <20210629232722.zzz4guyifmox733u@sdf.org> (raw)

Ok, the first error was that I used uintptr as in /sys/include/libc.h,
not uintptr_t as in /sys/include/ape/inttypes.h, that's the reason
of the ansi/old mix definition error.

I saw that setrealloctag.c is implemented in 9front's /sys/src/ape/lib/9/
the same way as setmalloctag.c, an empty definition. I added it to
my ape/lib/9/, the SUSV2 dance is taken from ape/lib/mp for
consistency:

mkfile:
[...]
        setrealloctag.$O\
[...]

libc.h:
[...]
#ifndef _SUSV2_SOURCE
#define _SUSV2_SOURCE
#include <inttypes.h>
#undef  _SUSV2_SOURCE
#else
#include <inttypes.h>
#endif
[...]
extern  void            setrealloctag(void*, uintptr_t);
[...]

setrealloctag.c:
#ifndef _SUSV2_SOURCE
#define _SUSV2_SOURCE
#include <inttypes.h>
#undef  _SUSV2_SOURCE
#else
#include <inttypes.h>
#endif

void
setrealloctag(void*, uintptr_t)
{
}

Maybe just use #include "libc.h" here?

It compiles, and now after making similar changes my ape/port/sec
compiles too.

If someone is asking what is all of this about, is about importing
9front libsec to 9legacy. As I said before, the code is written on
top of the contributions I've seen in the 9legacy patches in a very
conservative way, after adding back aesCTR the impact is minimal.

This was the last piece... I'll put in some place the patches I
used from 9legacy and the steps to get a working base src from the
4th distribution, then my changes.

I used almost all the patches listed as included in the 9legacy
image so the common base is wider, even when some of them are of
not use to me.  The only patches I didn't use were one that didn't
exist, the multiline tag acme patch (glitches) and two or three
which couldn't be applied.

Regards,
adr.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ta3a6ef4d223738a9-M325536ac295e33bbad90bc0d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

                 reply	other threads:[~2021-06-29 23:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210629232722.zzz4guyifmox733u@sdf.org \
    --to=9fans@9fans.net \
    /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).