diff options
author | Kai Tietz <ktietz@redhat.com> | 2011-03-25 20:20:52 +0100 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2011-03-25 20:20:52 +0100 |
commit | ba78087b6c12fa4e3ab9d6b10c074624daec20ce (patch) | |
tree | 5bb0b204a88f6a48512bf569dcbe77a176e03ee7 /gcc/gcc.c | |
parent | 4489800d000d008d3bf47ffcdc85349eff1aec14 (diff) | |
download | gcc-ba78087b6c12fa4e3ab9d6b10c074624daec20ce.tar.gz |
Changelog c-family/
2011-03-25 Kai Tietz <ktietz@redhat.com>
* c-ada-spec.c (compare_comment): Use filename_cmp
instead of strcmp for filename.
Changelog fortran/
2011-03-25 Kai Tietz <ktietz@redhat.com>
* scanner.c (preprocessor_line): Use filename_cmp
instead of strcmp.
Changelog gcc/
2011-03-25 Kai Tietz <ktietz@redhat.com>
* collect2.c (write_c_file_stat): Handle backslash
as right-hand directory separator.
(resolve_lib_name): Use IS_DIR_SEPARATOR instead of
checking just for slash.
* coverage.c (coverage_init): Use IS_ABSOLUTE_PATH
instead of checking for trailing slash.
* gcc.c (record_temp_file): Use filename_cmp instead
of strcmp.
(do_spec_1): Likewise.
(replace_outfile_spec_function): Likewise.
(is_directory): Use filename_ncmp instead of strncmp.
(print_multilib_info): Likewise.
* gcov.c (find_source): Use filename_cmp instead
instead of strcmp.
(make_gcov_file_name): Fix order of slash/backslash
checks.
* incpath.c (DIRS_EQ): Use filename_cmp instead of strcmp.
(add_standard_paths): Likewise.
* mips-tfile.c (saber_stop): Handle backslash.
* prefix.c (update_path): Use filename_ncmp instead of
strncmp.
* profile.c (output_location): Use filename_cmp instead
of strcmp.
* read-md.c (handle_toplevel_file): Handle backslash.
* tlink.c (frob_extension): Likewise.
* tree-cfg.c (same_line_p): Use filename_cmp instead of
strcmp.
* tree-dump.c (dequeue_and_dump): Handle backslash.
* tree.c (get_file_function_name): Likewise.
* gengtype.c (read_input_list): Likewise.
(get_file_realbasename): Likewise.
(get_output_file_with_visibility): Use filename_cmp
instead of strcmp.
ChangeLog java/
2011-03-25 Kai Tietz <ktietz@redhat.com>
* jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
instead of strcmp.
(set_source_filename): Likewise.
* win32-host.c (jcf_open_exact_case): Likewise.
ChangeLog lto/
2011-03-25 Kai Tietz <ktietz@redhat.com>
* lto.c (lto_resolution_read): Use filename_cmp instead
of strcmp.
(lto_read_section_data): Likewise.
ChangeLog cp/
2011-03-25 Kai Tietz <ktietz@redhat.com>
* lex.c (interface_strcmp): Handle dos-paths.
(handle_pragma_implementation): Use filename_cmp instead of
strcmp.
(in_main_input_context): Likewise.
From-SVN: r171522
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index e6ddf41afd2..c399d14eedb 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -44,6 +44,7 @@ compilation is specified by a string called a "spec". */ #include "flags.h" #include "opts.h" #include "vec.h" +#include "filenames.h" /* By default there is no special suffix for target executables. */ /* FIXME: when autoconf is fixed, remove the host check - dj */ @@ -1949,7 +1950,7 @@ record_temp_file (const char *filename, int always_delete, int fail_delete) { struct temp_file *temp; for (temp = always_delete_queue; temp; temp = temp->next) - if (! strcmp (name, temp->name)) + if (! filename_cmp (name, temp->name)) goto already1; temp = XNEW (struct temp_file); @@ -1964,7 +1965,7 @@ record_temp_file (const char *filename, int always_delete, int fail_delete) { struct temp_file *temp; for (temp = failure_delete_queue; temp; temp = temp->next) - if (! strcmp (name, temp->name)) + if (! filename_cmp (name, temp->name)) goto already2; temp = XNEW (struct temp_file); @@ -3629,9 +3630,9 @@ process_command (unsigned int decoded_options_count, { temp = gcc_exec_prefix + len - sizeof ("/lib/gcc/") + 1; if (IS_DIR_SEPARATOR (*temp) - && strncmp (temp + 1, "lib", 3) == 0 + && filename_ncmp (temp + 1, "lib", 3) == 0 && IS_DIR_SEPARATOR (temp[4]) - && strncmp (temp + 5, "gcc", 3) == 0) + && filename_ncmp (temp + 5, "gcc", 3) == 0) len -= sizeof ("/lib/gcc/") - 1; } @@ -4729,7 +4730,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) tmp[basename_length + suffix_length] = '\0'; temp_filename = tmp; - if (strcmp (temp_filename, gcc_input_filename) != 0) + if (filename_cmp (temp_filename, gcc_input_filename) != 0) { #ifndef HOST_LACKS_INODE_NUMBERS struct stat st_temp; @@ -4755,7 +4756,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) /* Just compare canonical pathnames. */ char* input_realname = lrealpath (gcc_input_filename); char* temp_realname = lrealpath (temp_filename); - bool files_differ = strcmp (input_realname, temp_realname); + bool files_differ = filename_cmp (input_realname, temp_realname); free (input_realname); free (temp_realname); if (files_differ) @@ -5934,11 +5935,11 @@ is_directory (const char *path1, bool linker) if (linker && IS_DIR_SEPARATOR (path[0]) && ((cp - path == 6 - && strncmp (path + 1, "lib", 3) == 0) + && filename_ncmp (path + 1, "lib", 3) == 0) || (cp - path == 10 - && strncmp (path + 1, "usr", 3) == 0 + && filename_ncmp (path + 1, "usr", 3) == 0 && IS_DIR_SEPARATOR (path[4]) - && strncmp (path + 5, "lib", 3) == 0))) + && filename_ncmp (path + 5, "lib", 3) == 0))) return 0; return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode)); @@ -6760,8 +6761,8 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" } gcc_assert (debug_check_temp_file[1] - && strcmp (debug_check_temp_file[0], - debug_check_temp_file[1])); + && filename_cmp (debug_check_temp_file[0], + debug_check_temp_file[1])); if (verbose_flag) inform (0, "comparing final insns dumps"); @@ -7665,7 +7666,7 @@ print_multilib_info (void) /* If this is a duplicate, skip it. */ skip = (last_path != 0 && (unsigned int) (p - this_path) == last_path_len - && ! strncmp (last_path, this_path, last_path_len)); + && ! filename_ncmp (last_path, this_path, last_path_len)); last_path = this_path; last_path_len = p - this_path; @@ -7869,7 +7870,7 @@ replace_outfile_spec_function (int argc, const char **argv) for (i = 0; i < n_infiles; i++) { - if (outfiles[i] && !strcmp (outfiles[i], argv[0])) + if (outfiles[i] && !filename_cmp (outfiles[i], argv[0])) outfiles[i] = xstrdup (argv[1]); } return NULL; @@ -7890,7 +7891,7 @@ remove_outfile_spec_function (int argc, const char **argv) for (i = 0; i < n_infiles; i++) { - if (outfiles[i] && !strcmp (outfiles[i], argv[0])) + if (outfiles[i] && !filename_cmp (outfiles[i], argv[0])) outfiles[i] = NULL; } return NULL; |