From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <1341360045.898340.1412695492957.JavaMail.ngmail@webmail12.arcor-online.net> References: <1341360045.898340.1412695492957.JavaMail.ngmail@webmail12.arcor-online.net> Date: Tue, 7 Oct 2014 17:35:00 +0200 Message-ID: From: =?UTF-8?B?QmVuY2UgRsOhYmnDoW4=?= To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=089e013a214e3a150d0504d6f152 Subject: Re: [9fans] C question on struct Biobuf in bio.h Topicbox-Message-UUID: 18f4f340-ead9-11e9-9d60-3106f5b1d025 --089e013a214e3a150d0504d6f152 Content-Type: text/plain; charset=UTF-8 hi, no, it is an anonym field. and it is used in a way that is not part of ansi c. there is an extension in newer versions of gcc which supports it, but if you wan't to port plan 9 c to unix you can use the libs from plan9port. that's far more easier. bence 2014-10-07 17:24 GMT+02:00 Carsten Kunze : > Hello, > > in bio.h there is a > > struct Biobuf > { > Biobufhdr; > uchar b[Bungetsize+Bsize]; > }; > > where Biobufhdr is declared as > > typedef struct Biobufhdr Biobufhdr; > > To make it compile with gcc under UNIX I changed the struct to > > struct Biobuf > { > Biobufhdr Biobufhdr; > uchar b[Bungetsize+Bsize]; > }; > > but is that what is meant by the original description above? > > Carsten > > --089e013a214e3a150d0504d6f152 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
hi,

no, it is an anonym field.=C2= =A0 and it is used in a way that is not part
of ansi c.=C2=A0 there is a= n extension in newer versions of gcc which
supports it, but if you wan&#= 39;t to port plan 9 c to unix you can use the
libs from plan9port.=C2=A0= that's far more easier.

bence

2014-10-07 17:24 GMT+02:00 Carsten = Kunze <carsten.kunze@arcor.de>:
Hello,

in bio.h there is a

struct=C2=A0 Biobuf
{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Biobufhdr;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 uchar=C2=A0 =C2=A0b[Bungetsize+Bsize];
};

where Biobufhdr is declared as

typedef struct=C2=A0 Biobufhdr=C2=A0 =C2=A0 =C2=A0 =C2=A0Biobufhdr;

To make it compile with gcc under UNIX I changed the struct to

struct=C2=A0 Biobuf
{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Biobufhdr Biobufhdr;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 uchar=C2=A0 =C2=A0b[Bungetsize+Bsize];
};

but is that what is meant by the original description above?

=C2=A0 =C2=A0Carsten


--089e013a214e3a150d0504d6f152--