summaryrefslogtreecommitdiffstats
path: root/winsup/utils/cygcheck.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen2016-06-231-4/+1
| | | | | | | | | | | | | | Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause. Everything else stays under GPLv3+. New Linking Exception exempts resulting executables from LGPLv3 section 4. Add CONTRIBUTORS file to keep track of licensing. Remove 'Copyright Red Hat Inc' comments. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* Remove ill-advised cygwin_propsCorinna Vinschen2016-03-191-116/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cygwin_props have been invented to allow switching off the unique installation keys in the first place, supposedly for debugging. This never really was a good idea, after all we *want* the installations to be independent and there's no good reason to break that, not even for debugging purposes. Other than that, cygwin_props were meant to be used for some other global settings which never took place. There's just no good reason to tweak the DLL binary invisibly where a setting could be done in a file or the environment. This patch removes the cygwin_props entirely, including the related settings in cygcheck. cygwin: * cygprops.h: Remove file. * globals.cc (cygwin_props): Remove. * cygheap.cc (init_cygheap::init_installation_root): Drop removing installation key. utils: * cygcheck.cc: Drop including cygprops.h. Remove now unused option values. (unique_object_name_opt): Remove. (handle_unique_object_name): Remove function. (usage): Remove text for unique-object-names options. (longopts): Remove unique-object-names options. (main): Drop handling unique-object-names options. doc: * utils.xml (cygcheck): Remove text for unique-object-names options. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck.cc: Fix missing commas in products arrayCorinna Vinschen2015-08-301-5/+5
| | | | | | * cygcheck.cc (dump_sysinfo): Fix missing commas in products array. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck.cc: Fix debugger problemCorinna Vinschen2015-08-301-4/+8
| | | | | | | * cygcheck.cc (load_cygwin): Only unload cygwin DLL if not running under a debugger. Explain why. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck.cc: Handle W10/2016 sysinfoCorinna Vinschen2015-08-301-27/+63
| | | | | | | * cygcheck.cc (dump_sysinfo): Correctly handle Windows 10/Server 2016. Add missing product types. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* cygcheck.cc: Fix downlevel DLL handlingCorinna Vinschen2015-08-301-2/+7
| | | | | | | * cygcheck.cc (track_down): Skip error output for "api-ms-win-" downlevel DLLs. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
* * cygcheck.cc (dump_sysinfo): Handle Windows 10/Server 2014(?).Corinna Vinschen2014-11-101-2/+5
|
* * cygcheck.cc (CYGLSA64_DLL): Remove unused macro.Corinna Vinschen2014-10-211-4/+15
| | | | | (dump_sysinfo): If COMSPEC isn't set in the MSVCRT environment, set it. Explain why.
* * cygcheck.cc (RtlGetVersion): Declare.Corinna Vinschen2013-11-191-9/+9
| | | | | | | | (dump_sysinfo): Call RtlGetVersion rather than GetVersionEx to get correct OS info even on Windows 8.1. Don't check return value since RtlGetVersion never fails per MSDN. Move fetching kernel32 module handle where it's really needed. Drop temporary comment added by previous checkin.
* * cygcheck.cc (dump_sysinfo): Revert Windows 8.1 hack. It's notCorinna Vinschen2013-11-191-11/+4
| | | | working. Add a (hopefully temporary) comment.
* * cygcheck.cc (dump_sysinfo): Drop code trying to fetch OSVERSIONINFOCorinna Vinschen2013-11-191-21/+15
| | | | | | if fetching OSVERSIONINFOEX failed. Drop code handling unsupported platform IDs. Add code to tweak dwMinorVersion on Windows 8.1 if no manifest is present.
* * Makefile.in (cygcheck.exe): Link against wininet.dll.Corinna Vinschen2013-11-191-53/+9
| | | | | | | | | | (dumper.exe): Link against psapi.dll. * cygcheck.cc (_WIN32_WINNT): Define as 0x0602. (pInternetCloseHandle): Drop pointer. (PRODUCT_UNLICENSED): Drop definition. (PRODUCT_PROFESSIONAL_WMC): Ditto. (package_grep): Delete code loading wininet functions dynamically, just call functions directly.
* * cygcheck.cc (dump_sysinfo): Distinguish Windows 8 and 8.1, as wellCorinna Vinschen2013-11-191-47/+23
| | | | | | | | | as Windows Server 2012 and 2012 R2. Add missing commas in products array to avoid crashes. Drop Windows NT4 and 2000 printouts. Just call IsWow64Process, GetNativeSystemInfo, and GetDiskFreeSpaceEx directly, rather than loading them dynamically, since they are exported by all supported OS versions. Fix questionable type usage in call to GetDiskFreeSpaceEx.
* * cygcheck.cc (package_grep): Accommodate arch-specific package layout.Christopher Faylor2013-08-231-2/+6
|
* * cygcheck.cc (dll_info): Detect and report on symlinks. Output wrongChristopher Faylor2013-07-071-6/+17
| | | | | | architecture message inline with stdout for clarity. * path.cc (is_symlink): Always reset file pointer to beginning on exit. (readlink): Assume that file pointer is set to the beginning.
* * Merge in cygwin-64bit-branch.Corinna Vinschen2013-04-231-19/+46
|
* Update copyrightsChristopher Faylor2013-01-211-2/+2
|
* * configure.in: Add check for MINGW_CXX. Remove libiconv check.Yaakov Selkowitz2012-10-241-5/+4
| | | | | | | | | | | * configure: Regenerate. * Makefile.in: Remove references to mingw and w32api directories. Use MINGW_CXX instead of mingw script to build MINGW_BINS. Check for libiconv with $CC --print-file-name. * cygcheck.cc: Use relative include paths for Cygwin headers. * path.cc: Ditto. * strace.cc: Ditto * mingw: Remove.
* * cygcheck.cc (dump_sysinfo): Convert "if/else if" chain to a switchCorinna Vinschen2012-10-091-9/+15
| | | | | statement. Drop "not yet supported" and "Server" from Windows 2012 output string.
* * cygcheck.cc (dump_sysinfo): Drop "not yet supported" text fromCorinna Vinschen2012-09-021-25/+54
| | | | Windows 8. Update products array.
* * Makefile.in (cygcheck.exe): Link against psapi.dll.Corinna Vinschen2012-07-111-1/+9
| | | | | | | | | | | | | | | | | | | | | | * bloda.cc: Change include section to work with Mingw64 headers. Include psapi.h. Use SystemProcessInformation instead of SystemProcessesAndThreadsInformation throughout and add define for w32api headers. Ditto for PSYSTEM_PROCESS_INFORMATION vs. PSYSTEM_PROCESSES. (system_module_list): New type to replace SYSTEM_MODULE_INFORMATION. Change usage throughout accordingly. (get_module_list): Fetch module list using PSAPI functions EnumDeviceDrivers and GetDeviceDriverBaseNameA. * cygcheck.cc (max): Define as __max if not defined already. (alloca): Only define if not defined already. (handle_unique_object_name): Use explicit sharing flags rather than FILE_SHARE_VALID_FLAGS which officially is only available in DDK headers. (PRODUCT_ULTIMATE_E): Only define if not defined already. * dump_setup.cc: Change include section to work with Mingw64 headers. (NtQueryAttributesFile): Drop NTOSAPI aka DECLSPEC_IMPORT. * strace.cc: Change include section to work with Mingw64 headers. (alloca): Only define if not defined already.
* * cygcheck.cc (dump_sysinfo): Change "Server 8" to officialCorinna Vinschen2012-06-031-2/+2
| | | | "Server 2012".
* Clean up whitespace.Christopher Faylor2011-12-171-36/+36
|
* * cygcheck.cc (dump_sysinfo): Add Windows 8 recognition. Note asCorinna Vinschen2011-10-131-4/+10
| | | | unsupported. Update products array.
* * Align usage output, version output, as well as usage and versionCorinna Vinschen2011-10-101-22/+15
| | | | | | | | | option handling to use the same style throughout all Cygwin utils. Throughout use program_invocation_short_name to refer to current process name in Cygwin executables. * utils.sgml: Align documentation to above change. Add missing sections for getconf, ldd, and setmetamode. * strace.cc (proc_child): Avoid compiler warning.
* * cygcheck.cc (check_keys): Use UNICODE Win32 functions.Corinna Vinschen2011-10-101-6/+6
|
* * cygcheck.cc (handle_unique_object_name): Avoid a compiler warning.Corinna Vinschen2011-03-291-2/+2
| | | | | | | | (dump_sysinfo): Ditto. * loadlib.h (_load_sys_library): Mark as used, to avoid a compiler warning. * path.cc (oopt): Gurad with !FSTAB_ONLY to avoid a compiler warning. (read_flags): Ditto.
* * cygcheck.cc: Fix copyright dates.Corinna Vinschen2011-02-151-1/+1
|
* * cygcheck.cc (main): don't imply -d from -s option to cygcheckCorinna Vinschen2011-01-101-3/+3
|
* * loadlib.h: New header implementing safe LoadLibrary calls.Corinna Vinschen2010-08-281-4/+3
| | | | | | | | | | | | Include throughout files using LoadLibrary function. * cygcheck.cc (dump_sysinfo): Retrieve kernel32.dll handle via GetModuleHandle, rather than using LoadLibrary. * cygpath.cc (get_long_name): Ditto. (do_sysfolders): Append .dll suffix in LoadLibrary call. * ldh.cc (WinMain): Use LoadLibraryExW with DONT_RESOLVE_DLL_REFERENCES to avoid loading malicious library code. * locale.cc (print_locale_with_codeset): Change way to retrieve kernel32.dll path.
* * cygcheck.cc (dump_sysinfo): Fix typo in products.Corinna Vinschen2009-11-271-1/+1
|
* * cygcheck.cc (cygwin_dll_path): New global variable.Corinna Vinschen2009-11-041-0/+2
| | | | | | | | (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.
* * cygcheck.cc: Include cygprops.h.Corinna Vinschen2009-10-311-5/+227
| | | | | | | | | | | | | | | | | | | (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.
* * cygcheck.cc (pretty_id): Drop arguments. Don't change CYGWINCorinna Vinschen2009-10-281-17/+3
| | | | | | environment variable. (dump_sysinfo): Don't tweak CYGWIN environment variable, just call pretty_id once.
* * cygcheck.cc (dump_sysinfo): Update with latest NT 6.1 versions.Corinna Vinschen2009-10-201-45/+74
|
* * cygcheck.cc (dump_sysinfo): Add missing "Server Foundation" toCorinna Vinschen2009-07-231-1/+1
| | | | products array.
* * cygcheck.cc (dump_sysinfo): Remove "not yet supported" text.Corinna Vinschen2009-07-131-5/+2
|
* * cygcheck.cc (find_app_on_path): Avoid using NULL pointer if find_on_pathChristopher Faylor2009-05-041-0/+3
| | | | doesn't find the app on the path.
* * cygcheck.cc (usage): Fix option order and print.Corinna Vinschen2009-05-041-5/+6
|
* * utils.sgml: Various syntactical and semantical fixes.Corinna Vinschen2009-04-031-1/+1
| | | | * cygcheck.cc (usage): Fix --find-package explanation.
* * cygcheck.cc (dump_sysinfo): Fix compiler warning in printf.Corinna Vinschen2009-03-241-1/+1
| | | | | * strace.cc (proc_child): Ditto. * ldd.cc: Remove now useless undef wcscasecmp.
* * wide_path.h (class wide_path): New class to convert Windows pathCorinna Vinschen2009-03-141-16/+24
| | | | | | | | | | | | | | | | | | | | 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.
* * cygcheck.cc (usage): Fix typo.Christopher Faylor2009-03-081-1/+1
|
* * cygcheck.cc (dump_sysinfo): Evaluate and print state ofCorinna Vinschen2009-01-291-0/+13
| | | | obcaseinsensitive kernel flag.
* * Makefile.in: Fix copyright date.Corinna Vinschen2009-01-171-18/+18
| | | | | | | | * 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.
* * cygcheck.cc (dump_sysinfo): Raise size of osname. Add Windows 7Corinna Vinschen2009-01-161-32/+54
| | | | | and Windows 2008 R2 as recognized OSes. Update products array to the latest documented list.
* * cygcheck.cc (dump_sysinfo_services): Quote the path for popen.Pierre Humblet2009-01-061-1/+1
|
* * cygcheck.cc (pretty_id): Quote the path for popen.Pierre Humblet2008-12-311-5/+6
| | | | (dump_sysinfo_services): Ditto.
* * cygcheck.cc (pathlike::check_existence): Remove class name from declaration.Christopher Faylor2008-09-121-12/+11
| | | | | | | | | | | | | | | | | | | | | (display_internet_error): Use proper format specifier for DWORD. (environ): Remove unneeded declaration. (main): Use brace around nested if to avoid an overly-helpful compiler warning. * dump_setup.cc (parse_filename): Reorganize nested if to avoid an overly-helpful compiler warning. * path.cc (GUID_shortcut): Use braces around part of initializer which needs them. (conv_fstab_spaces): Parenthesize assignment in while loop to avoid a compiler warning. (struct opt): Make static. * ps.cc (main): Reorganize nested if to avoid an overly-helpful compiler warning. * regtool.cc: Make some anonymous structs static to avoid a compiler warning. * ssp.c (lookup_thread_id): Initialize *tix to zero to avoid potential uninitialized use. * strace.cc (add_child): Use proper format specifier for DWORD. (remove_child): Ditto. (proc_child): Ditto.
* * cygcheck.cc (nuke): Use malloc rather than alloca for environment variables.Christopher Faylor2008-08-271-2/+2
| | | | | | (load_cygwin): Ditto. * dump_setup.cc (parse_filename): Cosmetic changes. (get_packages): Ditto.