Index | Thread | Search

From:
Marc Espie <marc.espie.openbsd@gmail.com>
Subject:
FILE * interfaces
To:
tech@openbsd.org
Date:
Sat, 18 Jul 2026 15:01:08 +0200

Download raw body.

Thread
  • Marc Espie:

    FILE * interfaces

It's great that we made FILE* opaque.

I've run into a (very small) nit in unicon: the language has a poll
interface that looks into the internals of FILE* to figure out
whether there's something in the input buffer before actually calling
poll and the likes. As far as I know, we don't have any interface
(OpenBSD or otherwise) to look inside FILE* to tell us whether
there's still any data to get read (in a non-destructive/non-hanging
manner: meaning: fgetc + ungetc won't work)

This is not life-breaking. But suggestions ?...