mescc: Support binutils-2.14: fopen: Return 0 upon failure.
* lib/libc+tcc.c (fopen): Return 0 upon failure.
This commit is contained in:
parent
125b43acc8
commit
65d530f4ec
|
@ -229,6 +229,13 @@ fopen (char const *file_name, char const *opentype)
|
|||
eputs (" => fd="); eputs (itoa (fd)); eputs ("\n");
|
||||
}
|
||||
|
||||
if (!fd)
|
||||
{
|
||||
eputs (" ***MES LIB C*** fopen of stdin: signal me in band\n");
|
||||
exit (1);
|
||||
}
|
||||
if (fd < 0)
|
||||
fd = 0;
|
||||
return (FILE*)fd;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue