[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about FILE * structures in the Hurd



The Hurd and Linux use the same libc (shared source), but not exactly the same.
GNU/Linux uses libio as its stdio implementation, while the Hurd still uses
the original GNU libc stdio; eventually the Hurd will change to use the
same libio code now used on Linux.

Emacs also does this (see its src/dispnew.c).  What works on the Hurd now is:

	#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer)

A configure check for this would do fine. 

It is a bad kludge that programs look into stdio internals like this, and
the Right Thing is to add a new stdio function to glibc that returns this
(e.g. `size_t fpending_output_count(FILE *);').  That was the plan long ago
but it never seem to have happened and I can't now find any place a
particular name for the function was suggested.  


Reply to: