From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 2 Dec 2013 16:51:32 -0500 To: 9fans@9fans.net Message-ID: <23d08c32941ef86be9e751700edf48b0@coraid.com> In-Reply-To: References: <5fc4ecdb1523a9dbda1829df0018500a@proxima.alt.za> <20131202183901.Horde.so34A23woqwLYjKomWz6Ag1@ssl.eumx.net> <74126e01b30ebb946afb3adcd8705e01@coraid.com> <20131202212426.0730342a@zinc.9fans.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Go and 21-bit runes (and a bit of Go status) Topicbox-Message-UUID: 8ecc15cc-ead8-11e9-9d60-3106f5b1d025 On Mon Dec 2 16:08:20 EST 2013, skip.tavakkolian@gmail.com wrote: > wait! so, you had to make changes to Plan 9 to support Python? :) > > (sorry, couldn't resist) i'll take the bait. the changes were very different from the changes for go. python is an ape program, and ape has been very neglected. many of these changes were not strictly necessary for the python port. none are really python specific. they fix broken things in ape. go needs new system calls, and makes other demands, like the silly libbio macros. here's a highlevel overview of what was done. stars by the necessary changes: *0. support for ssl was added to ape by importing mp, sec, bio into ape. also compile crypt from /sys/src/libc/port (necessary to avoid using openssl) *1. was moved to /$objtype/include/ape because it's not portable. (necessary for amd64 port) *2. inet_ntop, inet_pton, getaddrinfo (and friends) were added. python doesn't work well with old-style name lookup. *3. all the system calls have had their signatures corrected e.g.: - extern int _RENDEZVOUS(unsigned long, unsigned long); + extern void* _RENDEZVOUS(void*, void*); this is required for amd64. change brk() and _buf() accordingly. *4. fix frexp, modf, (endian issues, subnormal #s) and copysign(). *5. make a lame attempt to deal with wait4() vs rfork. *6. _IO_getc needs to return EOF on eof. *7. fix %p for 64-bit add vfscanf in stdio; use USED() not #pragma ref *8. getsrvbyaddr() remember that htons! *9. further envp rework. *10. socketpair: wrong signature. and unnecessary but helpful fixes: 0. all ape compoents are built with -VTw to prevent simple linker mistakes. snprintf() now always uses the c99 definition to prevent link errors with -T. *1. support for ssl was added to ape by importing mp, sec, bio into ape. (necessary to avoid using openssl) *2. was moved to /$objtype/include/ape because it's not portable. (necessary for amd64 port) 3. ip6 support was added. *4. inet_ntop, inet_pton, getaddrinfo (and friends) were added. python doesn't work well with old-style name lookup. 5. librexexp was fixed in line with fixes to the normal lib. 6. Rune and wchar_t are an uint/int for 21-bit runes. decode 21-bit runes in mbwc.c 7. getcallerpc/getfcr implemented for all arches. 8. make qsort 64-bit safe. 9. fix const in strcspn, strpbrk, strrchr, strspn, strstr, rename, pathconf 10. fix types in setuid, setgid, signal, mkfifo, getgrent, getpwent 11. fix conflict between bind() [libdraw] and bind [socket]. 12. fmt: fix %p; fix %C (21-bit rune) 13. utf: 21-bit runes 14. libv: fix impossible definition of nap(). - erik