musl/src/stdio/ext.c, branch master musl - an implementation of the standard library for Linux-based systems change stdio_ext __freading/__fwriting semantics slightly 2012年06月18日T01:24:58+00:00 Rich Felker dalias@aerifal.cx 2012年06月18日T01:24:58+00:00 deb90c79e5c498fbb48de1423df034447f330e38 the old behavior was to only consider a stream to be "reading" or "writing" if it had buffered, unread/unwritten data. this reportedly differs from the traditional behavior of these functions, which is essentially to return true as much as possible without creating the possibility that both __freading and __fwriting could return true. gnulib expects __fwriting to return true as soon as a file is opened write-only, and possibly expects other cases that depend on the traditional behavior. and since these functions exist mostly for gnulib (does anything else use them??), they should match the expected behavior to avoid even more ugly hacks and workarounds...
the old behavior was to only consider a stream to be "reading" or
"writing" if it had buffered, unread/unwritten data. this reportedly
differs from the traditional behavior of these functions, which is
essentially to return true as much as possible without creating the
possibility that both __freading and __fwriting could return true.
gnulib expects __fwriting to return true as soon as a file is opened
write-only, and possibly expects other cases that depend on the
traditional behavior. and since these functions exist mostly for
gnulib (does anything else use them??), they should match the expected
behavior to avoid even more ugly hacks and workarounds...
fix logic in __fwriting 2011年06月30日T17:27:08+00:00 Rich Felker dalias@aerifal.cx 2011年06月30日T17:27:08+00:00 e5cb55fedd811f71cd91ef097a8a4a4964d8c564
add and consolidate nasty stdio_ext junk 2011年06月30日T16:44:48+00:00 Rich Felker dalias@aerifal.cx 2011年06月30日T16:44:48+00:00 a0b56b947a5a8a58fe2accea7f6d9ee927d70ad4 hopefully this resolves the rest of the issues with hideously nonportable hacks in programs that use gnulib.
hopefully this resolves the rest of the issues with hideously
nonportable hacks in programs that use gnulib.

AltStyle によって変換されたページ (->オリジナル) /