9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: 9fans@9fans.net
Subject: Re: [9fans] ape function args not checked|mixed ansi/old function declaration
Date: Tue, 29 Jun 2021 12:47:50 -0400	[thread overview]
Message-ID: <42FF8039B4AFA3F4DF4B29ED45609806@eigenstate.org> (raw)
In-Reply-To: <1de59d4b-192d-5b7b-fbe4-137b47cada9a@SDF.ORG>

Quoth adr via 9fans <9fans@9fans.net>:
> Hi, let see if someone can put me in the right direction.
> 
> I'm having now this issue compiling ape/lib/sec (/sys/src/libsec
> is modified):
> 
> pcc -FTVw -c -+ -D_POSIX_SOURCE -D_PLAN9_SOURCE -I../../../../libmp/port -I. -I/sys/include/ape -I/sys/include ../../../../libsec/port/tlshand.c
> /sys/src/ape/lib/sec/port/../../../../libsec/port/tlshand.c:2896[stdin:5401] function args not checked: setrealloctag
> 
> So I thought setrealloctag is not been declared, so I added it to
> the local libc.h (/sys/src/ape/lib/sec/port/libc.h):
> 
> [...]
> extern  void    setmalloctag(void*, ulong);
> extern  void    setrealloctag(void*, uintptr);
> extern  ulong   getcallerpc(void*);
> [...]
> 
> But now:
> 
> pcc -FTVw -c -+ -D_POSIX_SOURCE -D_PLAN9_SOURCE -I../../../../libmp/port -I. -I/sys/include/ape -I/sys/include ../../../../libsec/port/des.c
> /sys/src/ape/lib/sec/port/./libc.h:173[stdin:1533] mixed ansi/old function declaration: setrealloctag
> 
> I'm missing something about how ape is importing the headers, any hint?
> 

You need to spell ulong, uintptr in posix types.
look at how it's done in 9front's ape/lib/9/libc.h
for a working example.

ape is its own separate world -- even fds are emulated
so that select and friends can be implemented with
procs in userspace.




------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T5d3998509603ebde-M2b943cc25dc92598f092e0d0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

      reply	other threads:[~2021-06-29 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-29 15:24 adr via 9fans
2021-06-29 16:47 ` ori [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=42FF8039B4AFA3F4DF4B29ED45609806@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=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).