Are there any widely used I/O stream abstraction layers for plain C?
By an I/O stream abstraction layer I mean any layer that at least allows the creation of custom read/write functions. For C++, there’s the standard iostream and boost::iostreams. For glibc users, there’s a possibility to use custom streams. These won’t do any good if the requirement is to write portable C code.
It is better to use a library that is either widely used or easy to embed to the source code, or both.
SDL_RWops is an undocumented but widely used feature of SDL, and zziplib can use it. However, it does not make much sense to add a dependency to SDL just to get this feature.
GLib contains a GIOChannel abstraction, but the library is again quite large and they say that “support for Windows is only partially complete”.
However, the above are not quite satisfactory for small libraries, such as decoders, file format readers and signal processors: they contain lots of unnecessary stuff and the LGPL licensing prevents embedding the relevant parts to non-GPL code.
I think you answered your own question.
No, there are no widely used steam abstraction libraries. Those that exist are usually a small part of libraries that most people don’t want to depend on, or are very specialized.
What are your requirements? What is it you are looking for out of an abstraction library? I have to admit that every time I’ve looked at one, or started writing one, I usually end up back at the standard POSIX interfaces… what more abstraction could one want?