In support of this not being a bug, I have code which uses the correct, standards-compliant behavior of fgets. Contrary to Andrew's report, it's very easy to know how much is read by fgets and use it with data containing '\0'. Simply ensure the buffer does not contain any occurrances of '\n' (for instance memset to all '\0') before reading, then use memchr to search for '\n' in the results. If you find '\n', its position tells how many bytes were read. If not, the entire buffer was filled without reaching a newline.
-- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org