9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David du Colombier <0intro@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] C question on struct Biobuf in bio.h
Date: Tue,  7 Oct 2014 17:41:38 +0200	[thread overview]
Message-ID: <CANUoZoHhhqr2ogHK2zK6SQABZBvsy8Md4KzY9ea1r+dj4imjuA@mail.gmail.com> (raw)
In-Reply-To: <1341360045.898340.1412695492957.JavaMail.ngmail@webmail12.arcor-online.net>

> in bio.h there is a
>
> struct  Biobuf
> {
>         Biobufhdr;
>         uchar   b[Bungetsize+Bsize];
> };
>
> where Biobufhdr is declared as
>
> typedef struct  Biobufhdr       Biobufhdr;

This is an unnamed structure. Recent versions of GCC
should be able to handle them when setting the
-fplan9-extension flag.

Otherwise, your change is fine, but "hdr" would probably be
a better name than "Biobufhdr". Also, don't forget to update
your code to use b->hdr.fid instead of b->fid, and so on.

--
David du Colombier



  parent reply	other threads:[~2014-10-07 15:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 15:24 Carsten Kunze
2014-10-07 15:35 ` Bence Fábián
2014-10-07 15:41 ` David du Colombier [this message]
2014-10-07 15:58 ` Carsten Kunze
2014-10-07 17:27   ` Álvaro Jurado
2014-10-08 13:35     ` Charles Forsyth

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=CANUoZoHhhqr2ogHK2zK6SQABZBvsy8Md4KzY9ea1r+dj4imjuA@mail.gmail.com \
    --to=0intro@gmail.com \
    --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).