Commit 77f99bc7 by Richard Stallman

*** empty log message ***

From-SVN: r1225
parent 9ac73056
...@@ -2083,6 +2083,7 @@ process_aux_info_file (base_source_filename, keep_it, is_syscalls) ...@@ -2083,6 +2083,7 @@ process_aux_info_file (base_source_filename, keep_it, is_syscalls)
const char *aux_info_second_line; const char *aux_info_second_line;
time_t aux_info_mtime; time_t aux_info_mtime;
size_t aux_info_size; size_t aux_info_size;
int must_create;
/* Construct the aux_info filename from the base source filename. */ /* Construct the aux_info filename from the base source filename. */
...@@ -2094,13 +2095,13 @@ process_aux_info_file (base_source_filename, keep_it, is_syscalls) ...@@ -2094,13 +2095,13 @@ process_aux_info_file (base_source_filename, keep_it, is_syscalls)
start_over: ; start_over: ;
{ /* If file doesn't exist, set must_create.
int retries = 0; Likewise if it exists and we can read it but it is obsolete.
Otherwise, report an error. */
retry: must_create = 0;
if (my_access (aux_info_filename, R_OK) == -1) if (my_access (aux_info_filename, R_OK) == -1)
{ {
if (errno == ENOENT && retries == 0) if (errno == ENOENT)
{ {
if (is_syscalls) if (is_syscalls)
{ {
...@@ -2108,16 +2109,38 @@ retry: ...@@ -2108,16 +2109,38 @@ retry:
pname, aux_info_filename); pname, aux_info_filename);
return; return;
} }
if (!gen_aux_info_file (base_source_filename)) must_create = 1;
}
else
{ {
fprintf (stderr, "%s: error: can't read aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
sys_errlist[errno]);
errors++; errors++;
return; return;
} }
retries++;
goto retry;
} }
#if 0 /* There is code farther down to take care of this. */
else else
{ {
struct stat s1, s2;
stat (aux_info_file_name, &s1);
stat (base_source_file_name, &s2);
if (s2.st_mtime > s1.st_mtime)
must_create = 1;
}
#endif /* 0 */
/* If we need a .X file, create it, and verify we can read it. */
if (must_create)
{
if (!gen_aux_info_file (base_source_filename))
{
errors++;
return;
}
if (my_access (aux_info_filename, R_OK) == -1)
{
fprintf (stderr, "%s: error: can't read aux info file `%s': %s\n", fprintf (stderr, "%s: error: can't read aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename), pname, shortpath (NULL, aux_info_filename),
sys_errlist[errno]); sys_errlist[errno]);
...@@ -2125,7 +2148,6 @@ retry: ...@@ -2125,7 +2148,6 @@ retry:
return; return;
} }
} }
}
{ {
struct stat stat_buf; struct stat stat_buf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment