This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch gcc c++ c-family java fortan lto]: Fix DOS-filesystem issues


Hello,

This patch addresses some general issues occuring for DOS-based
filesystems. In some cases it might be better to replace the strrchr
by lbasename, but I did this initial patch more mechanical. Of special
interest is the code-change in gcov.c's function make_gcov_file_name.
Most of the code is dead from Oct 2010. I modified it in a way that it
has intended behavior.
The cp/lex.c interface_strcmp() part I used filename_cmp for character
comparision. Sadly there is no character comparision routine for
filenames. So it might be an option here to implement directly within
this option the file-system dependent code. For cleaness I avoid this
for now.

Changelog c-family/

2011-03-14  Kai Tietz

	* c-ada-spec.c (compare_comment): Use filename_cmp
	instead of strcmp for filename.


Changelog fortran/

2011-03-14  Kai Tietz

	* scanner.c (preprocessor_line): Use filename_cmp
	instead of strcmp.

Changelog gcc/

2011-03-14  Kai Tietz

	* 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-14  Kai Tietz

	* 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-14  Kai Tietz

	* lto.c (lto_resolution_read): Use filename_cmp instead
	of strcmp.
	(lto_read_section_data): Likewise.


ChangeLog cp/

2011-03-14  Kai Tietz

	* lex.c (interface_strcmp): Handle dos-paths.
	(handle_pragma_implementation): Use filename_cmp instead of
	strcmp.
	(in_main_input_context): Likewise.

Tested for x86_64-pc-linux-gnu, i686-pc-cygwin, and
x86_64-w64-mingw32. Ok for apply?

Regards,
Kai

Attachment: gcc_fname.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]