Sean Boudreau wrote: > If it were a simple matter of porting I would have done it
It is a simple matter of porting. The code is already ported to GNU libc, *BSD, MacOS X, AIX, HP-UX, IRIX, OSF/1, Solaris, Cygwin, mingw, BeOS, uClibc. > Consider a system where FILE * is opaque which is possible while maintaining > POSIX conformance. This is a theoretical argumentation. coreutils, emacs, Perl all rely on internal fields of FILE that are not specified by POSIX. coreutils for closing streams reliably emacs PENDING_OUTPUT_COUNT macro Perl see perlio.c Bruno