From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Thu, 12 Sep 2013 01:30:17 -0400 To: 9fans@9fans.net Message-ID: <2906a8aa08ff577a1ff6393ab13d50ef@brasstown.quanstro.net> In-Reply-To: <94594e360af74d88545fc8c2358c4c44@brasstown.quanstro.net> References: <56b14cb05fe9efa2d1c1ee474b6434c7@proxima.alt.za> <94594e360af74d88545fc8c2358c4c44@brasstown.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] incompatible type signature Topicbox-Message-UUID: 7e0a463c-ead8-11e9-9d60-3106f5b1d025 it appears that there are mistakes in ntohl and ntohs. for obvious reasons int is valid for both "unsigned long" and "unsigned short" due to the usual conversions (and the local, temporary conventions on amd64), but remember, type signatures are based on C types, and may differ from the implementation. - erik ; 9diff ntohl.c /n/sources/plan9/sys/src/ape/lib/bsd/ntohl.c:1,5 - ntohl.c:1,5 unsigned long - ntohl(int x) + ntohl(unsigned long x) { unsigned long n; unsigned char *p; /n/sources/plan9/sys/src/ape/lib/bsd/ntohl.c:24,30 - ntohl.c:24,30 } unsigned short - ntohs(int x) + ntohs(unsigned short x) { unsigned short n; unsigned char *p;