9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ape function args not checked|mixed ansi/old function declaration
@ 2021-06-29 15:24 adr via 9fans
  2021-06-29 16:47 ` ori
  0 siblings, 1 reply; 2+ messages in thread
From: adr via 9fans @ 2021-06-29 15:24 UTC (permalink / raw)
  To: 9fans

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?

Regards,
adr.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] ape function args not checked|mixed ansi/old function declaration
  2021-06-29 15:24 [9fans] ape function args not checked|mixed ansi/old function declaration adr via 9fans
@ 2021-06-29 16:47 ` ori
  0 siblings, 0 replies; 2+ messages in thread
From: ori @ 2021-06-29 16:47 UTC (permalink / raw)
  To: 9fans

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-29 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 15:24 [9fans] ape function args not checked|mixed ansi/old function declaration adr via 9fans
2021-06-29 16:47 ` ori

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