OSDN Git Service

* wide_path.h (class wide_path): New class to convert Windows path
authorcorinna <corinna>
Sat, 14 Mar 2009 14:56:20 +0000 (14:56 +0000)
committercorinna <corinna>
Sat, 14 Mar 2009 14:56:20 +0000 (14:56 +0000)
commit6f7b7fb1f182e3a75a48d97075ad5d791ec9db45
treef0a468418883df3f19cc9a4e4a210a39f43d82b7
parent4eecc5e08e3306b9baf034a6018752f3f989ead4
* wide_path.h (class wide_path): New class to convert Windows path
to WCHAR win32 path, including long path conversion if necessary.
* cygcheck.cc: Use class wide_path throughout to call Win32 functions
taking potentially long filenames.
(display_error): Use snprintf rather than sprintf.
(display_error_fmt): Ditto.
(dump_sysinfo): Use FindFirstFileW/FindNextFileW.
* cygpath.cc: Use class wide_path throughout to call Win32 functions
taking potentially long filenames.
(get_device_name): Raise buffer size to take long pathnames.
(get_short_paths): Convert to using GetShortPathNameW.
(get_short_name): Ditto.
(get_long_path_name_w32impl): Convert to equivalent of GetLongPathNameW.
(get_long_name): Convert to using GetLongPathNameW.
(do_sysfolders): Raise buffer size for POSIX pathname to PATH_MAX.
(do_pathconv): In case of POSIX->Win32 conversion, convert to wchar_t
Win32 path name and drop long pathname prefix if possible.
(main): Call setlocale to accommodate wide char/multibyte conversions.
winsup/utils/ChangeLog
winsup/utils/cygcheck.cc
winsup/utils/cygpath.cc
winsup/utils/wide_path.h [new file with mode: 0644]