From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <05d96d5bb6d5b58b192fbdd998953556@terzarima.net> From: Charles Forsyth Date: Wed, 9 Sep 2009 16:41:23 +0100 To: fernanbolando@mailc.net, 9fans@9fans.net In-Reply-To: <1d5d51400909090803n4c4d5b7ewba9dfe0573d02495@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] porting help please (gcc void pointer handling) Topicbox-Message-UUID: 6b6906ec-ead5-11e9-9d60-3106f5b1d025 >is it valid just to add to make the porting non-destructive? >#ifdef Plan9 >#define void unsigned char >#endif not really, as a global define. it's legal to write Type *t; t = malloc(sizeof(*t)); and that won't work unless malloc returns a real void* (only void* is compatible with all types of data pointer). it's similar for void* as a formal parameter; it accepts any type of data pointer as an actual parameter, but uchar* will not.