Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-06-06Cygwin: remove most occurrences of __stdcall and __cdeclKen Brown
These have no effect on x86_64. Retain a few occurrences of __cdecl in files imported from other sources. Also retain all occurrences of WINAPI, even though the latter is simply a macro that expands to __stdcall. Most of these occurrences are associated with Windows API functions, and removing them might make the code confusing instead of simpler.
2022-06-06Cygwin: Drop pointless loadlib.h includes in utilitiesJon Turney
These utilities used to LoadLibrary()/GetProcAddress(), but don't anymore.
2021-07-09Cygwin: Define PSAPI_VERSION as 1 before including psapi.hJon Turney
The default PSAPI_VERSION is controlled by WIN32_WINNT, which we set to 0x0a00 when building utils since 48a76190 (and is the default in w32api >= 9.0.0) In order for the built executables to run on Windows Vista, we must also define PSAPI_VERSION as 1 (otherwise '#define GetModuleFileNameExA K32GetModuleFileNameExA' causes a 'The procedure entry point K32GetModuleFilenameExA could not be located in the dynamic link library kernel32.dll' error at run time). Also drop uneeded psapi.h from dlfcn.cc (31ddf45d), resource.cc (34a6eeab) and ps.cc (1def2148).
2020-09-24Cygwin: winlean.h: remove most of the extended memory APIKen Brown
This was added as a temporary measure in commit e18f7f99 because it wasn't yet in the mingw-w64 headers. With one exception, it is now in the current release of the headers (version 8.0.0), so we don't need it in winlean.h. The exception is that VirtualAlloc2 is declared conditionally in <w32api/memoryapi.h>, but the compilation of Cygwin requires it to always be declared, even though it will only be executed on systems that support it. So retain the declaration in winlean.h. And add "WINAPI" to the declaration, as in memoryapi.h. Add a check that version >= 8 of the mingw-w64 headers is intalled. Also revert commit 3d136011, which was a related temporary workaround.
2020-08-07Cygwin: utils: convert usage() to proper noreturn function throughoutCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-04-07Cygwin: utils: override definition of PMEM_EXTENDED_PARAMETERCorinna Vinschen
PMEM_EXTENDED_PARAMETER is defined in the local winlean.h as long as mingw-w64 doesn't define it (in winnt.h). ntdll.h needs the definition for declaring NtMapViewOfSectionEx. cygpath.cc and ps.cc both include ntdll.h but not winlean.h, so they complain about the missing definition. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2020-02-26Cygwin: ps: fix compiler warning in ttynamCorinna Vinschen
The helper function ttynam creates a tty name by using sprintf wrongly on a pretty short buffer. The foramt string only specifies a minimum field length, not a maximum field length, so gcc-9.2.0 complains: ps.cc:101:23: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=] Fix this thoroughly by specifying a maximum field width as well as by using snprintf with a fixed buffer length. Also, drop using a static buffer in favor of using a buffer in the caller. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-08-12Cygwin: ps: fix a compiler warningCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-03-25get and convert boot time once and use as neededBrian Inglis
2019-03-25default ps -W process start time to system boot time when inaccessible, 0, -1Brian Inglis
2019-03-12Cygwin: ps: simplify codeCorinna Vinschen
Always use NtQuerySystemInformation(SystemProcessIdInformation). This drops two code paths calling NtQueryInformationProcess or GetModuleFileNameExW and only requires to open the process to fetch system time info. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2019-03-12Cygwin: ps: show *all* processes in ps -W outputCorinna Vinschen
There's a long-standing bug in ps -W. It only shows processes which ps can open with PROCESS_QUERY_LIMITED_INFORMATION permissions. However, that fails for a lot of system processes. Due to that, output is basically restricted to processes in the same session, as well as Cygwin processes... which isn't *quite* what ps -W was supposed to do. Basically we only need to open the process to fetch the image name. If that fails, utilize the undocumented SystemProcessIdInformation info class introduced with Windows Vista, which allows to fetch the image name by specifying the PID. Restructure the code a bit. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-08-09Cygwin: utils: ps: use fputs to print fixed stringsCorinna Vinschen
Avoid gcc warning "format not a string literal and no format arguments" Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-27Remove pre-Vista considerations from utilitiesCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout optioncygwin-2_5_2-releaseCorinna Vinschen
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>
2015-07-29cygwin: Fix copyright datesCorinna Vinschen
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-06-10Drop Windows 2000 considerations in ps, fix uid field lengthCorinna Vinschen
* ps.cc (main): Widen UID field in long format to accommodate longer UIDs since Cygwin 1.7.34. Remove Windows 2000 considerations. Fix comments accordingly. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2013-04-23 * Merge in cygwin-64bit-branch.Corinna Vinschen
2013-01-21Update copyrightsChristopher Faylor
2012-07-06 * cygpath.cc: Change including headers to allow building againstCorinna Vinschen
Mingw64 headers. Include ntdef.h and ntdll.h rather than ddk headers. Define _WIN32_WINNT and WINVER as 0x0602. (RtlEqualUnicodePathPrefix): Drop definition. Pulled in from ntdll.h now. (get_device_name): s/Zw/Nt. * dumper.cc: Include sys/param.h (dumper::dump_memory_region): Use MIN rather than min. * locale.cc: Include stdlib.h. Define _WIN32_WINNT and WINVER as 0x0602. * ps.cc: Include ntdef.h and ntdll.h rather than ddk headers. * regtool.cc (regDeleteKeyEx): Drop WINADVAPI qualifier.
2011-12-22 Don't leave Windows 2000 behind.Corinna Vinschen
* Makefile.in (ps.exe): Revert previous change. * ps.cc: Include psapi.h again. (main): In CW_GETPINFO_FULL case. Evaluate minimal process access mask required per OS and use that in OpenProcess call. Use GetModuleFileNameExW on Windows 2000 or if fetching the drive mapping failed. Handle empty process name.
2011-12-22 * Makefile.in (ps.exe): Drop -lpsapi from ALL_LDFLAGS.Corinna Vinschen
* ps.cc: Don't include psapi.h. (dosdevs): Drop. (unicode_buf): Define. (main): Simplify path evaluation in CW_GETPINFO_FULL case. Fetch drive map from Cygwin DLL. Use it to convert NT device paths to Win32 paths.
2011-12-18Clean up whitespace.Christopher Faylor
2011-11-28 * ps.cc: Remove all Win 9x considerations. Use psapi functionsCorinna Vinschen
directly. Drop support for older Cygwin DLLs. Just use progname_long as is since it's already a POSIX path now. Rename "tty" to "pty" as in the Cygwin DLL. Call setlocale to make sure wcstombs does the right thing according to the current locale. * Makefile.in (ps.exe): Link against psapi.dll.
2011-10-10 * Align usage output, version output, as well as usage and versionCorinna Vinschen
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.
2011-08-10 * ps.cc (main): Don't overwrite process name, just attach <defunct>Corinna Vinschen
to it for zombie processes.
2011-05-29* ps.cc (ttynam): Accommodate new console numbering.Christopher Faylor
(main): Ditto.
2010-08-28 * loadlib.h: New header implementing safe LoadLibrary calls.Corinna Vinschen
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.
2009-12-18* ps.cc (main): Return 0 if pid found.Christopher Faylor
2009-05-11 * Makefile.in: Link ps.exe agains ntdll.dll.Corinna Vinschen
* 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.
2008-09-13* cygcheck.cc (pathlike::check_existence): Remove class name from declaration.Christopher Faylor
(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.
2008-07-22 * Makefile.in (cygcheck.exe): Link against ntdll.Corinna Vinschen
* bloda.cc: Use statically linked functions throughout. * cygpath.cc: Drop 9x considerations. * mkgroup.c: Revamp. Redefine -l and -d options to take optional machine and domain parameters. Redefine -c to work always, using token information. Add -L, -D, -C to create unique groupnames in domain\group syntax. Add -S option to define domain\group separator char. Ignore -u and -s options. * mkpasswd.c: Revamp. Redefine -l and -d options to take optional machine and domain parameters. Redefine -c to work always, using token information. Add -L, -D, -C to create unique usernames in domain\user syntax. Add -S option to define domain\user separator char. Ignore -g and -s options. Prefer to take homedir from $HOME over $HOMEDRIVE/$HOMEPATH. * path.cc (oopts): Add "acl", "noacl", "posix=0" and "posix=1" options. (getmntent): Accomodate throughout. * ps.cc: Fix copyright dates. * utils.sgml: Fix text for mkgroup and mkpasswd.
2008-03-12 * cygpath.cc (do_sysfolders): Use cygwin_conv_path.Corinna Vinschen
(do_pathconv): Use cygwin_conv_path and cygwin_conv_path_list. * dumper.cc (main): Use cygwin_conv_path. Allocate target path dynamically. * mkpasswd.c (current_user): Use cygwin_conv_path. (enum_users): Ditto. * ps.cc (NT_MAX_PATH): Define. (main): Use cygwin_conv_path. * regtool.cc (find_key): Ditto. Allocate target path dynamically. (cmd_save): Ditto.
2007-12-06 * ps.cc: Include limits.h.Corinna Vinschen
(main): Set file name buffer size to PATH_MAX. Use progname or progname_long member of struct external_pinfo dependent of the value of the struct's version member.
2006-02-17 * ps.cc (main): Set aflag if -p option is given.Corinna Vinschen
2006-02-16 * ps.cc (longopts): Add --process option.Corinna Vinschen
(opts): Add -p option. (usage): Mention -p/--process option. (main): Handle -p option. * utils.sgml: Describe -p/--process option.
2005-01-16* ps.cc (main): Eliminate use of PID_ZOMBIE.Christopher Faylor
* strace.cc (main): Recognize new option for displaying hex value of strace type. (handle_output_debug_string): Prepend output with hex value of strace message if -H is specified.
2004-10-25fix whitespace, update some copyrightsChristopher Faylor
2003-04-27* cygcheck.cc (usage) Add description output.Joshua Daniel Franklin
2002-09-15Add final newlines to utilsJoshua Daniel Franklin
2002-05-30 * ps.cc (main): Use uid or uid32 member of struct external_pinfoCorinna Vinschen
dependent of the value of the struct's version member.
2002-05-29 * ps.cc (main): Change print format for uid to unsigned. Use uid32Corinna Vinschen
member of struct external_pinfo instead of uid.
2002-05-28 * ps.cc (usage): Fix typo.Corinna Vinschen
2002-05-28* ps.cc (prog_name): New global variable.Christopher Faylor
(longopts): Ditto. (opts): Ditto. (usage): New function. (print_version): New function. (main): Accomodate longopts and new --help, --version options.
2001-12-12* Makefile.in: Add define to CXXFLAGS.Christopher Faylor
2001-04-29* passwd.cc (ttymnam): New function.Christopher Faylor
(main): Use ttynam() to report name of tty.
2000-10-19* ps.cc (main): Add some extra space to Windows pid output for Windows 95.Christopher Faylor
2000-10-18* ps.cc (main): Add some extra space to pid output for Windows 95.Christopher Faylor
2000-10-15* ps.cc (main): Accomodate new PID_ constant.Christopher Faylor
2000-10-09* ps.cc (main): Change order of reporting slightly so that windows pids areChristopher Faylor
more obvious. * strace.cc (add_child): Just add child's pid directly. (remove_child): No need to close the child process pid since ContinueDebugEvent does that automatically. (proc_child): Ditto for child thread.