On 01/04/2013 08:44 AM, Eric Blake wrote: > Do we even > know of platforms where fwrite will fail on ENOMEM without setting the > error indicator?
I don't know of any, no. I am assuming Jim ran into one at some point, but if we don't know of any, perhaps we should leave the code alone, and just add a comment saying that we're making an assumption that seems to be valid even though POSIX doesn't require it. > wouldn't it better to still just call fwrite(), but > check for an error return, and if so, use the fseterr module Sure, I suppose, though it's hard to get excited about optimizing for dubious platforms.