If ldd is run against a DLL which links to the Cygwin DLL, ldh will end
up loading the Cygwin DLL dynamically, much like cygcheck or strace.
Addresses: https://cygwin.com/pipermail/cygwin/2024-May/255991.html
Fixes: 60675f1a7e ("Cygwin: decouple shared mem regions from Cygwin DLL")
Reviewed-by: Ken Brown <kbrown@cornell.edu>, Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Jeremy Drake <cygwin@jdrake.com>
E. Europe Standard Time is available in the unicode.org windowsZones.xml
file, so we can drop the default handling.
Fix a few comments.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Use official GetDynamicTimeZoneInformation() function instead of
scanning the registry for the timezone keyname.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
The previous change introduced a missing end of comment
Fixes: 60ea9c1c4b ("Cygwin: tzmap-from-unicode.org: drop support for Vista/2008")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Commit b794f2c603 ("Cygwin: drop support for systems not supporting
RFC 4646 locales") erroneously changed tzmap.h manually. Change
the script accordingly.
Fixes: b794f2c603 ("Cygwin: drop support for systems not supporting RFC 4646 locales")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Add FS_PINNED_FL and FS_UNPINNED_FL flags and handle them with
mode bits 'p' and 'u' in chattr(1) and lsattr(1).
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Windows only allows to set the primary group to a group already
present in the TOKEN_GROUP list. Cygwin OTOH fakes success at
setgid() time, to allow a subsequent call to setuid() to do
the actual account switching. To have a sane behaviour in the
command line tool, check group membership and disallow to switch
to groups other than those already present in the user token.
Fixes: 8bd56ec873 ("Cygwin: newgrp: first full version")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Fix an error message accessing argv[1] even after it has been
potentially moved. Print group name from group DB instead.
Fixes: 8bd56ec873 ("Cygwin: newgrp: first full version")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
All three warnings produced with -Og are false positives.
But given we're using -Werror unconditionally it's better
to be safe than sorry.
Reported-by: Kevin Ushey <kevinushey@gmail.com>
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
The definition of PTR has been dropped from newer versions
of ansidecl.h.
Convert definition of print_section_name to use void * instead,
as required by bfd_map_over_sections.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
So far ps(1) always prints the full path of the executable under
the COMMAND heading.
With -f, print the command line instead.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Minor updates to profiler and gmondump, which share some code:
- fix operation of error() so it actually works as intended
- resize 4K-size auto buffer reservations to BUFSIZ (==1K)
- remove trailing '\n' from 2nd arg on error() calls everywhere
- provide consistent annotation of Windows error number displays
Fixes: 9887fb27f6126 ("Cygwin: New tool: profiler")
Fixes: 087a3d76d7335 ("Cygwin: New tool: gmondump")
Signed-off-by: Mark Geisert <mark@maxrnd.com>
The extended _NL_foo names were originally designed after their GLibc
counterparts. However, the OUTDIGIT macros were accidentally defined as
OUTDIGITS, plural. Fix them.
Fixes: d47d5b850b ("Extend locale support to maintain wide char values of native strings")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Preconditions of WSL or empty directories dependent on Windows
versions was totally screwed up. Drop the description from
--help, describe the preconditions for case-sensitive dirs in the
man page instead.
Fixes: fc6e89c937 ("Cygwin: chattr: clarify requirements for casesensitive directories")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
- Windows 10 requires WSL
- Windows 11 only allows enabling casesensitivity if dir is empty
Fixes: 0d4b39d37b ("Cygwin: Add lsattr and chattr tools")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
- Don't print all RT signals, just the allowed patterns
- Add -L/--table option to print a table of signals with signal
numbers
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Allow RT<N>, RTMIN+<N> and RTMAX-<N> for RT signals.
Translate RT signal numbers to an "RT<N>" string.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Make kill -V and kill -l exit immediately, thus stopping to
print "not enough arguments" accidentally.
Fixes: ef48a2cad3 ("* kill.cc (prog_name) New global variable.")
Fixes: c49fa76263 ("* Makefile.in (kill.exe): Add as a specific target.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
So far locale(1) had to have knowledge how to construct, thus
duplicating the effort how Cygwin handles locale strings.
Move locale list and codeset list generation into Cygwin by
providing /proc/codesets and /proc/locales files. /proc/locales
does not list aliases, those are still handled in locale(1).
locale(1) opens the files and ueses that info for printing,
like any other application can do now.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
The @euro locale is only useful, if the locale uses the EUR currency
and the codeset of the base locale is ISO-8859-1, or the locale is
el_GR.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Used on Linux as default codeset for Tajik. There's no matching
Windows codepage, so fake it as CP103.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
LCIDs are deprecated since Windows Vista. Worse, lots of new locales
have been added in the meantime which have no LCID attached. They
are only available by locale name.
As first step, rearrange the locale(1) tool to use Windows locale
names, rather than LCIDs, so we can now enumerate *all* locales
available in more recent Windows versions.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Spaces are filtered out by PathMatchSpecA so they can't
be used as pattern anchors. Overwrite all spaces with
commas and fix the search expresion accordingly.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
TODO: implement options to print all deps, all build-deps,
all packages depending on packages matching the search string
and so on.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
A recent binutils version introduced `libsframe` and made it a
dependency of `libbfd`. This caused a linker problem in the MSYS2
project, and once Cygwin upgrades to that binutils version it would
cause the same problems there.
Let's preemptively detect the presence of `libsframe` and if detected,
link to it in addition to `libbfd`.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
- if the user has no perms to write to /etc/setup, don't try
to fetch user homedir from Cygwin (crashes galore). Use
LOCALAPPDATA path instead.
- info is more rpm like
- print info of installed package
- added info selectors --inst, --curr, --prev, --test
- add installation date
TODO:
- Human-readable filesize
- url and license needs to be added to setup.ini yet
-
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
In preparation of new functionality, split fetching data
from cygwin.com out of the package_grep() function.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
adding <target>_LDFLAGS overrides AM_LDFLAGS and thus fails to
build cygcheck and strace statically. Fix it.
Fixes: 8d318bf142 ("Cygwin: disable high-entropy VA for cygcheck and strace")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
It's not a good idea to enable high-entropy VA for tools loading the
Cygwin DLL dynamically. The addresses used by HEVA tend to collide with
fixed address areas managed by Cygwin.
Fixes: 60675f1a7e ("Cygwin: decouple shared mem regions from Cygwin DLL")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
- add '-' option
- make group argument optional
- drop ability to take a numerical group argument
- simplify usage output to bare minimum
- Add manpage and documentation
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>