> But if I try to read foo.c from stdin then foo.c itself is unable to
> read, b.c. stdin is already closed:
No, it isn't.
As demonstrated in the following code snippet, it's not closed,
there is simply nothing else to read from it (tcc reads stdin until EOF).
#define _XOPEN_SOURCE 700
#include <stdio.h>
int
main()
{
char buf[1024] = {0};
fgets(buf, sizeof buf, stdin);
perror("fgets");
if (feof(stdin)) puts("EOF");
return 0;
}
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel