Hi Bruce,

> I mentioned this a couple of decades ago. There was no solution, so I 
> rolled my own.
> ...
> I wanted something that could act like a dropin replacement for 
> fopen-ing a regular file. There are some quirks (if memory serves), but 
> it is based on either fopencookie or funopen:

We can see from lib/stdio-impl.h and related files that there are essentially
the following groups of stdio implementations:
  - glibc
  - FreeBSD, NetBSD, OpenBSD, Mac OS X, Cygwin, Android
  - AIX, HP-UX, Solaris, OpenServer, UnixWare, native Windows

fopencookie exists on
  glibc, FreeBSD, Cygwin

funopen exists on
  FreeBSD, NetBSD, OpenBSD, Mac OS X, Cygwin, Android

What do you do on
  AIX, HP-UX, Solaris, OpenServer, UnixWare, native Windows ?
Their stdio implementation does not contain function pointers in structs.

Bruno


Reply via email to