[PATCH] prevent retries on fclose/fflush after write errors

Rich Felker dalias at aerifal.cx
Tue Mar 13 22:35:52 UTC 2012


On Tue, Mar 13, 2012 at 04:24:33PM -0400, Mike Frysinger wrote:
> > > >>>  #endif /* __UCLIBC_HAS_WCHAR__ */
> > > >>>  	int __filedes;
> > > >>> +	int __errno_value;
> > > >>>  #ifdef __STDIO_BUFFERS
> > > >>>  	unsigned char *__bufstart;	/* pointer to buffer */
> > > >>>  	unsigned char *__bufend;	/* pointer to 1 past end of buffer */
> > > 
> > > ->      unsigned char *__bufpos;
> > 
> > Indeed, I missed this. It should definitely not be added near the
> > beginning of the structure, only past elements that could be part of
> > the macro ABI.
> 
> that would help only if the uClibc code itself had versioned functions which 
> handled the growing struct.  if you're attempting to support code that 

No, there is no need for versioned functions. The uClibc code is in
uClibc and will always be using the version of FILE corresponding to
itself. Code in other libraries or applications only cares that FILE *
is a pointer (it might as well be void *) and about the offsets/types
of the buffer pointers (if getc/putc macros are enabled).

> allocated sizeof(FILE) memory (which is dumb), then location in the struct 
> wouldn't matter.

There's nothing useful/meaningful that such code could do.

Rich


More information about the uClibc mailing list