9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] ape ip6, warnings, etc.
Date: Mon, 27 May 2013 23:36:34 -0400	[thread overview]
Message-ID: <8f008febcaa2ce9f150ee6a4d3bf1c9f@brasstown.quanstro.net> (raw)

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



                 reply	other threads:[~2013-05-28  3:36 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=8f008febcaa2ce9f150ee6a4d3bf1c9f@brasstown.quanstro.net \
    --to=quanstro@quanstro.net \
    --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).