9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] ape ip6, warnings, etc.
@ 2013-05-28  3:36 erik quanstrom
  0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2013-05-28  3:36 UTC (permalink / raw)
  To: 9fans

to support jeff sickel doing a new port of the python tip to plan 9,
using the native ssl and ssh implementations, it looked like a
good idea to do two things
1. modernize socket handling,
2. turn on warnings.  (a late addition, based on chasing some
bugs that should have been noticed by the linker.)

for 1, the noticable changes are,
- added struct addrinfo, getaddrinfo, freeaddrinfo, getnameinfo, gai_strerror,
inet_ntop, inet_pton.
- definition of EALREADY and ECONNRESET
- sockets support ip6.

for 2, the noticable changes are,
- inttypes.h has moved from /sys/include/ape to /$M/include/ape
so uintptr_t can be properly sized on both 32- and 64-bit
machines

- _C99_SNPRINTF_EXTENSION created two type signatures for
snprintf, so it had to go.  since c99 is now 10 years old, the c99
extension is assumed.

- segattach, segbrk, rendezvous, _SEGATTACH, _SEGBRK, and
_RENDEZVOUS were convered to use void* and not int.  on 64-bit
machines, crashes had been observed for addresses above 0x80000000
due to truncation and sign extension.

- <signal.h> now declares the prototype as per posix
	extern void (*signal(int, void (*)(int)))(int);

- the following functions were also declared
	<unistd.h>	int gethostname(char *, size_t);
	<utf.h>		extern	void	rerrstr(char*, unsigned int);		/* gross */
	<utf.h>		extern	int	getfields(char*, char**, int, int, char*);	/* gross */

the source is at /n/atom/plan9.  if you have an atom install, you can pull as glenda
and get the new stuff.  a new iso will be out shortly.  this may be of use
if you are porting other ape stuff.

note that the 9atom ape currently has a bit of skew with the distribution,
which should be fixed soon.  9atom ...

- declares ssize_t pread(int, void*, size_t, off_t), and pwrite().
- Runes are 21-bits so that awk plays nicely with others.

i don't think this should cause any trouble,

i certainly would appreciate any reports of how this works for folks,
especially with contrib packages. as the intention is to continue to
hone this for inclusion in the distribution so we can all have python
imported from the tip.

enjoy

- erik



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-28  3:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-28  3:36 [9fans] ape ip6, warnings, etc erik quanstrom

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