mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Re: request: please detect reads from stdin with unflushed
@ 2021-10-25 13:17 Lorenzo Beretta
  2021-10-25 17:25 ` Rich Felker
  0 siblings, 1 reply; 3+ messages in thread
From: Lorenzo Beretta @ 2021-10-25 13:17 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

> Suggestion: fix those broken programs!

I know, I know... the problem is that they work with glibc and they fail
silently with musl, and on top of that I've just discovered that at least
netbsd and openbsd do the same as glibc, ie a broken program like
#include <stdio.h>
int main(){
        printf("not flushed: ");
        char line[123];
        return fgets(line,sizeof line,stdin) ? 0 : 123;

happens to work!!!

What I'm asking is that musl (while technically correct!) helps
__detecting__ those programs, possibly as an option ("#ifdef

I'm not subscribed to this mailing list, sorry for not mentioning it the
first time

[-- Attachment #2: Type: text/html, Size: 1224 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-25 19:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 13:17 [musl] Re: request: please detect reads from stdin with unflushed Lorenzo Beretta
2021-10-25 17:25 ` Rich Felker
2021-10-25 18:13   ` Lorenzo Beretta

Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).