Current-Users archive

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

Re: Weirdness in comm(1)



On Tuesday 01 December 2009 00:46:03 Greg A. Woods wrote:
> I'm not at all comfortable with the introduction of EOVERFLOW to fgetln(3).

It now gets converted to EINVAL.

> The ability to handle lines longer than INT_MAX is much more academic.

It can now handle lines up to SSIZE_MAX, but may needlessly realloc the buffer 
if reading lines > INT_MAX.

> The fact that it does it badly, is, well, not its fault, since as you say:
> > At some point the libc ABI should be fixed to not
> > use an internal buffer length of type int,
> 
> Indeed.  That's the real bug.  And here we'll get stuck unless a wide
> enough audience can agree that we need to be able to regularly make
> fixes such as this in libc.

Is there a reason that it's exposed to userland anyway?
If not, we could just #define it as void * for non libc.
That would allow for any future changes to its internals.

Thanks

Roy


Home | Main Index | Thread Index | Old Index