[hackers] [scc] [cc1] Return error in addinput() when a file cannot be openend || Roberto E. Vargas Caballero
commit 94acab63933f1d05f6e7d35dcd3e1dd7bf655d5a
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Feb 14 14:48:22 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Feb 14 14:48:22 2017 +0100
[cc1] Return error in addinput() when a file cannot be openend
This function is used to try to open the included files, if it
die() when a file isn't found then it is impossible to try
the next location.
diff --git a/cc1/lex.c b/cc1/lex.c
index 66612d6..7e9e459 100644
--- a/cc1/lex.c
+++ b/cc1/lex.c
_AT_@ -103,7 +103,7 @@ addinput(char *fname, Symbol *hide, char *buffer)
} else if (fname) {
/* a new file */
if ((fp = fopen(fname, "r")) == NULL)
- die("Error opening '%s': %s", fname, strerror(errno));
+ return 0;
flags = IFILE;
if (curip && onlyheader)
printf("%s: %s\n", infile, fname);
Received on Tue Feb 14 2017 - 14:49:29 CET
This archive was generated by hypermail 2.3.0
: Tue Feb 14 2017 - 15:00:21 CET