[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: implementing fmemopen, open_memstream
From: |
Bruno Haible |
Subject: |
Re: implementing fmemopen, open_memstream |
Date: |
Mon, 22 Feb 2021 00:07:50 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-201-generic; KDE/5.18.0; x86_64; ; ) |
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
Re: new module 'string-buffer', Bruno Haible, 2021/02/27