Commit Graph

646 Commits

Author SHA1 Message Date
Corinna Vinschen 16e1c98c1b * ldd.cc (report): Drop long pathname considerations which result in
invalid path, now that this is done in cygwin_conv_path.
2010-08-23 11:04:04 +00:00
Corinna Vinschen 5578c33733 * mount.cc (from_fstab): Fix potentially fatal typo. 2010-08-13 19:10:22 +00:00
Corinna Vinschen 68a178b37c * mount.cc (do_mount): Don't treat "bind" mount as remote mount.
(mount_entries): Drop the "bind" option from output.
	* utils.sgml (mount): Match examples to actual mount output.  Add
	"bind" option and add example.
2010-08-11 11:01:14 +00:00
Yaakov Selkowitz ac8050277c * mingw: Use sysroot, if present, for mingw_dir. 2010-08-11 03:01:55 +00:00
Corinna Vinschen 822b654fe0 * dump_setup.cc (tfx_chars): New WCHAR array, copied from Cygwin.
(transform_chars): New function, copied from Cygwin.
	(simple_nt_stat): New function to check file existance using native
	NT function.  Explain why.
	(directory_exists): Call simple_nt_stat.
	(file_exists): Ditto.
2010-07-21 10:30:53 +00:00
Christopher Faylor c8fe6dc446 * ldd.cc: Clean up formatting throughout.
(head): Move earlier.
(saw_file): Ditto.
(print_dlls): Reset head here.  Record seen dll names so they will not
potentially be printed later.
(process_file): Remove clearing of head here.
2010-07-05 16:24:24 +00:00
Corinna Vinschen 96f1582977 * dump_setup.cc (dump_file): Read requested content from setup.rc
file created by newer setup.exe.
2010-07-05 12:28:48 +00:00
Corinna Vinschen 01798d4e59 * utils.sgml (locale): Change stray local cygdrive prefix to Cygwin's
default.
2010-06-29 15:12:52 +00:00
Corinna Vinschen 3db442e639 * utils.sgml (mount): Add description for "dos" and "ihash" mount
options.
2010-04-29 10:53:31 +00:00
Corinna Vinschen a361b4715f * path.cc: Include sys/cygwin.h if built for mount(1).
(struct opt): Add "dos" and "ihash" options.
	(from_fstab_line): Call cygwin_internal rather than read_flags if
	built for mount(1).
2010-04-29 10:39:35 +00:00
Corinna Vinschen a82a8dcb4e * mount.cc (oopts): Remove entirely.
(usage): Call cygwin_internal (CW_LST_MNT_OPTS) to create list of
	mount options.
	(print_version): Fix copyright date.
	(main): Replace option processing loop with single call to
	cygwin_internal (CW_CVT_MNT_OPTS).
2010-04-29 08:50:23 +00:00
Corinna Vinschen 22b6e8101e * locale.cc (print_lc_xxx_charset): Remove.
(enum type_t): Change according to the fact that nl_langinfo now returns
	all locale category values.
	(lc_ctype_names): Add new category members.  Redefine for exclusive
	nl_langinfo usage.
	(lc_numeric_names): Ditto.
	(lc_time_names): Ditto.
	(lc_collate_names): Ditto.
	(lc_monetary_names): Ditto.
	(lc_messages_names): Ditto.
	(print_lc): Change switch according to new type_t values.
2010-04-28 10:00:40 +00:00
Corinna Vinschen 0b66e4d7aa * locale.cc (print_charmaps): Add EUC-CN and GB2312. 2010-03-27 21:08:02 +00:00
Corinna Vinschen 708d2a1e64 * regtool.cc (find_key): Fix allocation size of "value". 2010-03-24 19:52:00 +00:00
Corinna Vinschen 536ad25322 * locale.cc (add_locale_alias_locales): Always use loc_num at function
start to avoid confusing bsearch.
2010-03-23 21:26:03 +00:00
Corinna Vinschen 1399e29a1f * locale.cc: Revert accidental checkin of unfinished changes. 2010-03-23 21:20:31 +00:00
Corinna Vinschen 1d4c87a15d * locale.cc (print_locale_with_codeset): Drop redundant name parameter.
Simplify creating locale string.  Add "@" in case of a modifier.
	(print_locale): Drop name parameter in calls to
	print_locale_with_codeset.
2010-03-23 21:01:01 +00:00
Yaakov Selkowitz e5ddf94aa1 * utils.sgml (kill): Add SIGIO, SIGCLD, and SIGPWR. 2010-02-26 10:47:05 +00:00
Corinna Vinschen a8260e19f9 * utils.sgml (locale): Change description of -a and -av to match
latest changes.
2010-02-25 16:42:59 +00:00
Corinna Vinschen a2036998b1 * locale.cc (printlocale): Remove.
(loc_t): New type to keep locale information for printing.
	(print_codeset): New function to print codeset as on Linux.
	(print_locale_with_codeset): New function to print single locale.
	Print verbose style as the Linux locale(1) tool.
	(print_locale): New function to print single locale plus its UTF-8
	variation, if available.
	(compare_locales): New helper function for bsearch and qsort on loc_t.
	(add_locale): New function to store locale in loc_t array.
	(add_locale_alias_locales): New function to store locales from
	locale.alias file in loc_t.
	(print_all_locales): Call add_locale instead of printlocale.
	Call add_locale_alias_locales, sort locales alphabetically and print
	them.
2010-02-23 14:07:08 +00:00
Christopher Faylor dbf41aeeff * strace.cc (mnemonic_table): Add "special" mask option.
(usage): Document it.
* utils.sgml: Ditto.
2010-02-22 20:39:18 +00:00
Corinna Vinschen 80206d7f71 * cygpath.cc (do_pathconv): Fix erroneously printing native NT path
prefix introduced by previous patch.
2010-02-22 17:40:46 +00:00
Corinna Vinschen bd87c87f81 * locale.cc (lc_time_names): Add "date_fmt" entry. 2010-02-22 10:56:00 +00:00
Christopher Faylor 3afd8b74d9 Update copyright 2010-02-19 20:01:49 +00:00
Christopher Faylor ff3e6bcbec utils/ChangeLog:
* strace.cc (mnemonic_table): Add pthread mask option.
(usage): Document strace pthread mask option.
* utils.sgml: Ditto.

cygwin/ChangeLog:
* include/sys/strace.h: Remove old code.  Add support for ptrace
tracing.
2010-02-19 17:55:27 +00:00
Corinna Vinschen f13fe16475 * locale.cc (print_lc_mstrings): New function to print
semicolon-separated strings.
	(enum type_t): New type is_sepstrings_linf.
	(lc_time_names): Change type of era and alt_digits entry to
	is_sepstrings_linf.
	(print_lc): Add case for is_sepstrings_linf and call print_lc_mstrings
	in that case.
2010-02-19 17:27:05 +00:00
Corinna Vinschen ce4f5f76ab * Makefile.in (CYGWIN_BINS): Rename getlocale to locale.
* getlocale.c: Rename to ...
	* locale.cc: Revamp to add full functionality of POSIX locale(1) tool,
	as far as Cygwin supports it.
	* utils.sgml (getlocale): Move and rename to ...
	(locale): Accommodate new functionality.
2010-02-17 15:01:56 +00:00
Corinna Vinschen 03ac74c168 * cygpath.cc (do_pathconv): Fix potential crash. 2010-02-13 11:41:53 +00:00
Corinna Vinschen 583c495774 * getlocale.c (main): Rename local variable to avoid problems.
Avoid string comparisons, rather test language and sublanguage codes
	wheere possible.  Add more code to handle Serbian language/territory
	state identical on all Windows versions.  Fix handling for "@latin"
	modifier in Belarusian locale.
	* utils.sgml (getlocale): Try to make wording and example clearer.
2010-02-11 11:39:23 +00:00
Corinna Vinschen 374a555fda * getlocale.c (usage): Change text slightly. 2010-02-10 15:58:59 +00:00
Corinna Vinschen bb6d8123db * getlocale.c (main): Restrict -a loop to avoid psudo language entries
on Vista and later.
2010-02-10 12:39:40 +00:00
Corinna Vinschen 96cbb3a380 * getlocale.c (main): Revamp -a loop to avoid duplicates and to print
locales with the correct, supported modifiers.
2010-02-10 12:36:29 +00:00
Corinna Vinschen ca2b906d55 * getlocale.c (main): Use setlocale and fetch string from Windows
using GetLocaleInfoW.  Explain why.
2010-01-25 09:22:12 +00:00
Corinna Vinschen be822de2a1 * Makefile.in (CYGWIN_BINS): Add getlocale.
* getlocale.c: New file.
	* utils.sgml (getlocale): New section describing new getlocale tool.
2010-01-22 22:31:50 +00:00
Corinna Vinschen 1b526b480b * cygpath.cc (get_mixed_name): Drop function. Replace with call to
convert_slashes throughout.
	(do_sysfolders): Free allocated buffer.
	(do_pathconv): Fix freeing last buffer.
2010-01-16 10:25:58 +00:00
Corinna Vinschen f380ca5803 * mount.cc (do_mount_from_fstab): Allow to change cygdrive prefix, too. 2010-01-11 12:13:55 +00:00
Corinna Vinschen bf4b80201a * cygpath.cc: Throughout, free obsolete path buffers. 2010-01-07 17:19:12 +00:00
Corinna Vinschen 6004370ba1 * cygpath.cc (main): Remove enforcing "en_US.UTF-8" locale.
Revert usage of argz functions when reading input from file and
	simplify option usage.  Allow only one option argument and use
	the rest as filename argument to allow spaces in filenames.  Restrict
	processing special folder type options to one line.
2010-01-07 12:08:11 +00:00
Christopher Faylor d0e99ecc19 * ps.cc (main): Return 0 if pid found. 2009-12-18 03:34:59 +00:00
Corinna Vinschen 7077c48e54 * regtool.cc: Throughout, convert all registry calls to wide char
calls and use string conversion according to current locale.
	(longopts): Change "dword-le" to "dword-be", as was originally
	intended.
	(usage): Change usage accordingly.
	(print_version): Simplify copyright dates in output.
	(cmd_list): Handle REG_LINK like REG_SZ.
	(cmd_get): Ditto.
	(main): Call setlocale.
	* utils.sgml (regtool): Fix options and add missing descriptions for
	new features.
2009-12-16 14:02:57 +00:00
Corinna Vinschen 19ac72547f * setfacl.c (getaclentry): Allow to delete default entries for the
owner and owner group.
2009-11-29 14:28:29 +00:00
Corinna Vinschen 3449d470ba * cygcheck.cc (dump_sysinfo): Fix typo in products. 2009-11-27 10:01:50 +00:00
Corinna Vinschen afb7f5666d * getfacl.c (print_version): Fix copyright.
(main): Don't reuse local variables confusingly.  Don't print any file
	information if acl() fails.  Improve error message.  Always print a
	trailing empty line.  Set return code to 2 if accessing some file fails.
2009-11-11 10:12:35 +00:00
Corinna Vinschen 13e8e14ab5 * path.cc (read_mounts): Skip unnecessary test if path has been
fetched from loaded cygwin1.dll.
2009-11-04 17:09:32 +00:00
Corinna Vinschen b5f48aa961 * cygcheck.cc (cygwin_dll_path): New global variable.
(load_cygwin): Fetch cygwin DLL path and store in cygwin_dll_path.
	* strace.cc: Full ditto.
	* path.cc (read_mounts): First use the path stored in cygwin_dll_path,
	if available.  Then fall back to fetching own path.  Add comment.
	Drop printing warnings since they look funny in strace output.
2009-11-04 17:00:45 +00:00
Corinna Vinschen 44a019897f * path.cc (read_mounts): First get installation path from own path.
Check if cygwin1.dll exists in same directory.  Only if not, try to
	get installation path from setup registry key.  Add ample warnings.
2009-11-04 15:47:29 +00:00
Corinna Vinschen 73f2ecd19d * Makefile.in (cygpath.exe): Add -fno-threadsafe-statics to CXXFLAGS. 2009-11-04 14:14:52 +00:00
Corinna Vinschen 34861325a5 * cygcheck.cc: Include cygprops.h.
(del_orphaned_reg): New option variable.
	(unique_object_name_opt): Ditto.
	(handle_reg_installation): New function.
	(print_reg_installations): Ditto.
	(del_orphaned_reg_installations): Ditto.
	(memmem): Ditto.
	(handle_unique_object_name): Ditto.
	(dump_sysinfo): Call print_reg_installations from here.
	(usage): Add usage for new options --delete-orphaned-installation-keys,
	--enable-unique-object-names, --disable-unique-object-names, and
	--show-unique-object-names.
	(longopts): Add new options --delete-orphaned-installation-keys,
	--enable-unique-object-names, --disable-unique-object-names, and
	--show-unique-object-names.
	(main): Handle new options.
	* utils.sgml (cygcheck): Change documentaion accordingly.
2009-10-31 13:26:37 +00:00
Corinna Vinschen d952e44c44 * cygcheck.cc (pretty_id): Drop arguments. Don't change CYGWIN
environment variable.
	(dump_sysinfo): Don't tweak CYGWIN environment variable, just call
	pretty_id once.
2009-10-28 11:41:27 +00:00
Corinna Vinschen aa0937c308 * cygcheck.cc (dump_sysinfo): Update with latest NT 6.1 versions. 2009-10-20 15:26:33 +00:00
Corinna Vinschen 175e39bb7f * cygpath.cc (get_special_folder): Fetch path as WCHAR and convert
using my_wcstombs.
	(get_user_folder): Remove.
	(do_sysfolders): Use get_special_folder instead of get_user_folder.
	Fetch system paths as WCHAR and convert using my_wcstombs.
2009-10-15 11:40:02 +00:00
Corinna Vinschen 9e278ffd2c * kill.cc (main): Skip to PID loop on invalid option to handle
negative pids there.
2009-10-12 16:01:44 +00:00
Christopher Faylor a37e07482c * mkpasswd.c: Properly define __progname as __declspec(dllimport).
* mkgroup.c: Ditto.
2009-10-02 13:49:39 +00:00
Corinna Vinschen 91dd009e81 * mkgroup.c (enum_local_groups): Avoid error message if given group
name isn't found and return 0 to allow searching to proceed.  Always
	return 0 or 1, not -1.
	(enum_groups): Avoid error message if given group name isn't found.
	* mkpasswd.c (enum_users): Ditto.
2009-08-11 08:59:50 +00:00
Dave Korn 4f2e34d821 * mingw: Add fallbacks to search for MinGW components in standard
install locations if not found in compiler's $prefix.
2009-08-10 01:55:14 +00:00
Corinna Vinschen 29222c4d6a * mount.cc (do_mount): Don't exit, just return. 2009-08-09 14:13:53 +00:00
Corinna Vinschen 8b1e0815ab * cygcheck.cc (dump_sysinfo): Add missing "Server Foundation" to
products array.
2009-07-23 09:12:18 +00:00
Corinna Vinschen 3955529c8b * mount.cc (do_mount): Replace --no-executable flag with notexec
mount option in hint for remote filesystems.
	* path.cc (getmntent): Fix typo (noexec -> notexec).
2009-07-22 16:24:17 +00:00
Corinna Vinschen 1e497ebd33 * Makefile.in (path-mount.o): Add a rule to build stripped down version
of path.cc for usage in mount.
	(mount.exe): Add dependency to path-mount.o.
	* mount.cc (force): Convert to bool value.  Accommodate throughout.
	(from_fstab): New function.
	(do_mount_from_fstab): New function.
	(longopts): Add --all option.
	(opts): Add -a option.
	(usage): Document -a/--all option.
	(main): Handle -a option as well as single parameter.
	* path.cc: Add FSTAB_ONLY conditional to allow building path-mount.o.
	(mount_table): Remove static storage class.
	(max_mount_entry): Ditto.
	(root_here): Unused.  Remove.
	(from_fstab_line): Remove static.
	* path.h (struct mnt_t): Define here rather than in path.cc.
	(from_fstab_line): Declare.
	(mount_table): Declare.
	(max_mount_entry): Declare.
	* utils.sgml (mount): Document -a/--all option and mounting of single
	path from fstab files.
2009-07-22 10:20:26 +00:00
Corinna Vinschen 8b800efea5 * strace.cc (main): Open trace output file in UNIX mode. 2009-07-15 15:18:51 +00:00
Corinna Vinschen c6b9d71981 * cygcheck.cc (dump_sysinfo): Remove "not yet supported" text. 2009-07-13 10:40:42 +00:00
Christopher Faylor cea37699d1 * cygwin-console-helper.cc: New file. 2009-07-05 00:01:26 +00:00
Corinna Vinschen 070a99e8aa * path.cc (oopts): Sort alphabetically, add missing "auto" and
"override" entries.
	(from_fstab_line): Handle mount points same as Cygwin itself.  Use
	"cygdrive prefix" as posix name of cygdrive prefix.
	(from_fstab): Add auto entries for /usr/bin and /usr/lib.  Add
	MOUNT_AUTOMATIC and MOUNT_IMMUTABLE flags to default root dir entry.
	Use "cygdrive prefix" as posix name of default cygdrive prefix.
	(getmntent): Allocate smaller buffers.  Align output closer to output
	of mount(1).
2009-06-10 10:42:22 +00:00
Corinna Vinschen 0a23799aee * cygpath.cc (codepage): New variable.
(long_options): Add --codepage option.
	(options): Add -C option.
	(usage): Add -C/--codepage description.
	(my_wcstombs): New function.  Use througout instead of wcstombs.
	(do_options): Handle -C/--codepage option.
	* utils.sgml (cygpath): Add description for new -C/--codepage option.
2009-05-17 11:16:12 +00:00
Corinna Vinschen 48829c1d86 * Makefile.in (cygpath.exe): Link against cygwin.a before linking
against ntdll.dll to avoid linking symbols defined in both DLLs
	from ntdll.
	(ps.exe): Ditto.
2009-05-16 15:46:42 +00:00
Corinna Vinschen 73535010d7 * cygpath.cc (main): Only setlocale for LC_CTYPE category. Fallback
to UTF-8 if locale is "C".
	* ldd.cc (main): Ditto.
	* mkgroup.c (main): Ditto.
	* mkpasswd.c (main): Ditto.
	* passwd.c (main): Ditto.
2009-05-15 11:30:18 +00:00
Christopher Faylor e951743709 cygwin ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (mount_info::got_usr_bin): Define.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	(mount_info::create_root_entry): Create root entry as immutable and
	flag as automatic.
	(mount_info::init): Remove "Huh?  No /etc/fstab..." warning.
	Unconditionally call from_fstab for user and system tables.  Fill in
	/usr/bin and /usr/lib if they have not been specified in /etc/fstab.
	(oopts): Alphabetize.  Add "override" option to allow overriding
	immutable mount points.
	(mount_info::add_item): Accommodate new MOUNT_IMMUTABLE flag intended
	for root mount.
	(mount_info::add_item): Detect "/usr/bin", "/usr/lib", and "/" and set
	appropriate global state.
	(fillout_mntent): Add ,auto to mount points added by Cygwin DLL.
	(mount): Remove masking of MOUNT_SYSTEM.  Allow user to shoot
	themselves.  Add comment.
	* mount.h (mount_info::got_usr_bin): Declare.
	(mount_info::got_usr_lib): Ditto.
	(mount_info::root_idx): Ditto.
	* include/sys/mount.h: Reformat enum.
	Add MOUNT_{OVERRIDE,IMMUTABLE,AUTOMATIC}.

doc ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* pathnames.sgml (mount-table): Sort mount options and add override
	option.  Add description of root mount handling.

utils ChangeLog
2009-05-13  Corinna Vinschen  <corinna@vinschen.de>
	    Christopher Faylor  <me+cygwin@cgf.cx>

	* mount.cc (oopts): Sort.  Add override option.  Add dummy "auto"
	option for consistency.
	(mount_entries): Avoid adding auto-mounted entries to -m output.

	* utils.sgml: Sort mount options.  Add description of override option.
2009-05-14 03:25:45 +00:00
Corinna Vinschen 46777e0a3d * Makefile.in: Link ps.exe agains ntdll.dll.
* ps.cc (main): Enable SE_DEBUG_NAME privilege if Windows processes
	have to be enumerated.  Workaround EnumProcessModules problem when
	running under WOW64 and use NtQueryInformationProcess to fetch
	process image name.
2009-05-11 14:01:17 +00:00
Corinna Vinschen 967c052689 * Move ChangeLog entry. 2009-05-06 12:08:07 +00:00
Corinna Vinschen 05e6f7b2b9 * mkpasswd.c (current_user): Don't use HOMEDRIVE/HOMEPATH to generate
user's homedir.

	* mkgroup.c: Accommodate ctype changes.
	* mkpasswd.c: Ditto.
	* setfacl.c: Ditto.
	* ssp.c: Ditto.
2009-05-06 11:54:24 +00:00
Christopher Faylor 3227665e19 * cygcheck.cc (find_app_on_path): Avoid using NULL pointer if find_on_path
doesn't find the app on the path.
2009-05-04 18:51:08 +00:00
Corinna Vinschen 143cb0bed5 * cygcheck.cc (usage): Fix option order and print. 2009-05-04 10:15:48 +00:00
Christopher Faylor 08825b6edc * strace.cc (create_child): Set CYGWIN=noglob when starting new process so that
Cygwin will leave already-parsed the command line alonw.
2009-04-22 19:08:53 +00:00
Corinna Vinschen 8c3a79bb97 * cygpath.cc (do_pathconv): Only skip \\?\ prefix if it's really
given.  Do backslash to slash conversion for mixed paths after
	handling \\?\ prefix.
2009-04-15 10:00:40 +00:00
Dave Korn 228f0b11fd * Makefile.in (dumper.exe): Add -lz to ALL_LDFLAGS. 2009-04-13 22:51:02 +00:00
Corinna Vinschen 18ac7638b9 * path.cc (readlink): Accommodate new UTF-16 symlinks. 2009-04-07 16:24:50 +00:00
Corinna Vinschen d10a1e5154 * utils.sgml: Various syntactical and semantical fixes.
* cygcheck.cc (usage): Fix --find-package explanation.
2009-04-03 11:50:26 +00:00
Corinna Vinschen 12ddd5e5b7 * utils.sgml (passwd -R): Remove references to CYGWIN="server". 2009-03-27 10:16:13 +00:00
Corinna Vinschen 2971f07610 * cygcheck.cc (dump_sysinfo): Fix compiler warning in printf.
* strace.cc (proc_child): Ditto.
	* ldd.cc: Remove now useless undef wcscasecmp.
2009-03-24 13:35:08 +00:00
Corinna Vinschen 6199f417ab * passwd.c (usage): Change description for -d option according to
previous change.
	(main): Fix typo.
	* utils.sgml: Add missing description for passwd -d option.
2009-03-23 20:40:17 +00:00
Corinna Vinschen 0e0f5748e0 * passwd.c (caller_is_admin): New function to test if calling user
is an administrator by inspecting user token.
	(main): Drop fetching caller info from logonserver.  Only fetch
	server from environment when trying to change password for own
	account.  Drop admin check entirely in case of doing account
	maintainance.  Otherwise replace check for admin by result of
	caller_is_admin call.
2009-03-23 16:37:49 +00:00
Corinna Vinschen a26691a67c * passwd.c (main): Always get logonserver from environment and
use when fetching user info for caller.
2009-03-22 19:18:26 +00:00
Corinna Vinschen 35aeac58b0 * ldd.cc: Fix compiler warning.
* passwd.c: Use mbstowcs instead of MultiByteToWideChar throughout.
	(main): Call setlocale.  Fix a bug in fetching the logon server from
	the environment.
2009-03-22 10:09:01 +00:00
Christopher Faylor f48bb39e20 *** empty log message *** 2009-03-18 14:47:13 +00:00
Christopher Faylor c4509a7ac2 Re-add inexplicably missing ldh.cc. 2009-03-18 14:46:24 +00:00
Christopher Faylor 2e13058eac * ldd.cc (load_dll): Start helper program rather than ldd.exe.
(set_entry_point_break): Rename from get_entry_point.
(print_dlls): Rename from print_dlls_and_kill_inferior.  Avoid printing
specific dll name if we're looking at a dll.
(report): Always dump dlls on process exit.  Don't allow thread creation.
Accommodate get_entry_point rename.
(start_process): Start process with DEBUG_ONLY_THIS_PROCESS.
(longopts): Eliminate "dll" option.
(main): Ditto.
* ldd.cc: Use wide character Win32 paths throughout.
(load_dll): Fix size expression (add fn) in realloc.
2009-03-18 04:19:05 +00:00
Christopher Faylor d5e4f55b14 * ldd.cc (longopts): Add --dll option.
(get_module_filename): Generalized wrapper function which avoid path length
restrictions.
(load_dll): Handle special-case of inspecting a DLL.
(start_process): Accept an output parameter "isdll".  Detect when file to start
is a DLL and start a wrapper instead.
(print_dlls_and_kill_inferior): When dealing with a DLL, avoid printing
everything before the DLL itself first appears.  (This is not strictly correct
and should be fixed eventually)
(report): Deal with DLLs.  Don't set a breakpoint for DLLs, just let captive
ldd process terminate normally.  Pass dll info to print_dlls_and_kill_inferior.
(main): Handle special-case "--dll" option by loading the DLL and exiting.
2009-03-14 18:40:59 +00:00
Corinna Vinschen 5c8c49cc43 * path.cc (from_fstab): Use wcstombs/mbstowcs instead of
WideCharToMultiByte/MultiByteToWideChar to accommodate current locale.
2009-03-14 14:58:05 +00:00
Corinna Vinschen 26fb7ef5e4 * 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.
2009-03-14 14:56:20 +00:00
Christopher Faylor 962acfe58a * ldd.cc: Rework to detect missing DLLs.
(start_process): Change to expect windows filename as input.
(tocyg): New function - convert cygwin fn to windows fn.
(print_dlls_and_kill_inferior): Accept extra argument denoting whether to open
input and look for nonexistent DLLs.  Use tocyg to convert filename and pass it
to start_process.
(report): Flag when an DLL-not-found exception occurs and pass this information
to print_dlls_and_kill_inferior.
(filelist): New structure.
(saw_file): New function.
(dump_import_directory): Ditto.
(map_file): Ditto.
(skip_dos_stub): Ditto.
(get_directory_index): Ditto.
(process_file): Ditto.
2009-03-14 06:46:00 +00:00
Corinna Vinschen 313fb10ba2 * utils.sgml: Fix typo. 2009-03-09 09:20:38 +00:00
Christopher Faylor 9caeaa61c0 * cygcheck.cc (usage): Fix typo. 2009-03-08 21:13:26 +00:00
Corinna Vinschen 17a12c5065 * utils.sgml: Set example prompt to "$" throughout. Don't use "/"
as example cygdrive prefix.  Remove reference to -u and -s options.
	Add an example using the -o flag.
2009-03-02 10:56:19 +00:00
Corinna Vinschen 8262e64256 * mount.cc (mount_entries): Handle a "/" cygdrive prefix correctly.
Add comments.
2009-03-02 10:47:04 +00:00
Christopher Faylor 99fe2b7866 Add DESTDIR functionality to Makefile.in's. 2009-02-24 02:11:14 +00:00
Corinna Vinschen bacd5877ba * cygcheck.cc (dump_sysinfo): Evaluate and print state of
obcaseinsensitive kernel flag.
2009-01-29 19:31:04 +00:00
Corinna Vinschen 7ffaa17c80 ChangeLog:
* configure.in: Remove --enable-server option.  Allways add the
	cygserver directory to $SUBDIRS.
	* configure: Regenerate.

cygwin/ChangeLog:

	Remove USE_SERVER define.  Accommodate throughout.
	* configure.in: Remove --enable-server option.
	* configure: Regenerate.
	* environ.cc: Remove CYGWIN=server setting.

cygserver/ChangeLog:

	* client.cc (allow_server): Remove variable.
	(client_request_get_version::client_request_get_version): Drop checking
	allow_server.

utils/ChangeLog:

	* passwd.c: Remove CYGWIN=server requirement from usage text.

doc/ChangeLog:

	* cygserver.sgml: Remove the "How to use the Cygserver services"
	section.
	* cygwinenv.sgml: Move "(no)server" to the removed options section.
	* faq-programming.xml: Remove CYGWIN=server requirement for running
	the Cygwin testsuite.
	* ntsec.sgml: Ditto for using `passwd -R'.
2009-01-21 17:14:39 +00:00
Corinna Vinschen 2ac273a946 * Makefile.in: Fix copyright date.
* cygcheck.cc (scan_registry): Take additional parameter and add code
	to avoid recursion in Wow6432Node subkey.  Rename variable cygnus to
	cygwin.  Scan for "Cygwin" instead of for "cygnus" substring.
	(dump_sysinfo): Drop unused calls to scan_registry.  Drop scanning
	HKEY_CURRENT_CONFIG.
2009-01-17 11:59:16 +00:00
Corinna Vinschen ab30b9e352 * cygcheck.cc (dump_sysinfo): Raise size of osname. Add Windows 7
and Windows 2008 R2 as recognized OSes.  Update products array to
	the latest documented list.
2009-01-16 12:10:02 +00:00
Christopher Faylor 086dc27fec * ldd.cc: New file. First stab at implementing ldd-like functionality for
Cygwin.
* Makefile.in (CYGWIN_BINS): Add ldd.
(ldd.exe): Use -lpsapi.
2009-01-09 05:11:57 +00:00