This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin 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] |
This patch removes old cruft from and streamlines the mainline of path_conv::check (avoiding a bunch of strlen, strcpy and the like). It also removes trailing / in win32 paths. I noticed that fs.update is called in the inner loop of ::check. The only reason is to check if extended attributes are supported. That's necessary with the old style of symlinks where the link is written both to the file and to the EA (for speed when reading). However today only setup uses the old style, and it doesn't use EA. Thus overall I think that trying to read the EA (and failing) is counterproductive and fs.update() should be removed from the inner loop (I have verified that nothing bad happens even with old symlinks). Pierre 2004-04-04 Pierre Humblet <pierre.humblet@ieee.org> * path.cc (path_prefix_p): Optimize test order. (normalize_posix_path): Add "tail" argument and set it. Do not remove final slash. Pass 3rd argument to normalize_win32_path. (path_conv::check): Pass tail to normalize_posix_path. Set need_directory and remove final slash after that call. Remove last argument to mount_table->conv_to_win32_path(). Remove noop dostail check. Improve tail finding search. (normalize_win32_path): Add and set tail argument. (mount_item::build_win32): Avoid calling strcpy. (mount_info::conv_to_win32_path): Remove third argument and simplify because the source is normalized. Keep /proc path in Posix form. Call win32_device_name() only once. (mount_info::conv_to_posix_path): Add and use 3rd argument to normalize_win32_path to avoid calling strlen. (cwdstuff::set): Add 3rd argument to normalize_posix_path and remove final slash if any. * shared_info.h (mount_info::conv_to_win32_path): Remove last argument in declaration.
Attachment:
path.cc.diff3
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |