projects
/
mes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
125b43a
)
mescc: Support binutils-2.14: fopen: Return 0 upon failure.
author
Jan Nieuwenhuizen
<janneke@gnu.org>
Sat, 16 Jun 2018 08:54:59 +0000
(10:54 +0200)
committer
Jan Nieuwenhuizen
<janneke@gnu.org>
Sat, 16 Jun 2018 08:54:59 +0000
(10:54 +0200)
* lib/libc+tcc.c (fopen): Return 0 upon failure.
lib/libc+tcc.c
patch
|
blob
|
history
diff --git
a/lib/libc+tcc.c
b/lib/libc+tcc.c
index 064c2cc447beab3c83939f35b6de5ac11b214cea..e2a5a1a41365fb1caf62594bb4ff74b9e304482a 100644
(file)
--- a/
lib/libc+tcc.c
+++ b/
lib/libc+tcc.c
@@
-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;
}