Paul Eggert wrote: > 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
Back when I first tried to trigger that bug in glibc, I found a gdb bug ;-) so it's been a while. I don't know. > 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. I would be happy with that. >> 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.