(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.
(strace_printf_wrap): Fix NOSTRACE definitions.
(strace_printf_wrap1): Fix NOSTRACE definitions.
(special_printf): Define.
* thread.cc: Perform minor syntax fix in a comment. Rename
"is_good_initialzer*" to "is_initializer*" throughout. Use pthread_printf
rather than debug_printf throughout. Add extra pthread_printf debugging
throughout.
(pthread_mutex::_new_mutex): New constant value.
(pthread_mutex::_unlocked_mutex): Ditto.
(pthread_mutex::_destroyed_mutex): Ditto.
(pthread_mutex::no_owner): Define new function.
(pthread_mutex::can_be_unlocked): Detect no_owner situation. Handle
PTHREAD_MUTEX_NORMAL as a special case.
(pthread::create_cancel_event): Use C++ boolean values.
(pthread::precreate): Use method to set mutex type.
(pthread_cond::pthread_cond): Ditto.
(pthread_rwlock::pthread_rwlock): Ditto.
(pthread_mutex::pthread_mutex): Set owner to _new_mutex initially.
(pthread_mutex::~pthread_mutex): Reset various elements to make it clearer if
they are incorrectly reused.
(pthread_mutex::lock): Add clarifying comment.
(pthread_mutex::unlock): Attempt to handle various mutex types correctly. In
particular, reinstate ability to have one thread unlock another thread's mutex
if type == PTHREAD_MUTEX_NORMAL.
(semaphore::_fixup_after_fork): Avoid redundancy.
(pthread_mutex::_fixup_after_fork): Ditto. Fix debugging statement.
(__pthread_cond_dowait): Accommodate changes to remove previously inexplicable
use can_be_unblocked() as a static function.
* thread.h: Rename "is_good_initialzer*" to "is_initializer*" throughout.
(pthread_mutex): Reorganize. Make many things private.
(pthread_mutex::no_owner): Define new method.
(pthread_mutex::_new_mutex): Define new constant.
(pthread_mutex::_unlocked_mutex): Ditto.
(pthread_mutex::_destroyed_mutex): Ditto.
default date and time formats as well to workaround YA Windows
shortcoming. Refresh with latest data.
* lc_msg.h: Refresh with latest data.
* nlsfuncs.cc (__eval_datetimefmt): Revert latest change.
(__set_lc_time_from_win): Rename res to era. Prefer default date and
time formats from era array if available.
(__set_lc_messages_from_win): Rename res to msg.
format.
* nlsfuncs.cc (dt_flags): Remove DT_ERACAL since crippled era data
in Windows makes it useless.
(__eval_datetimefmt): Check if locale's default calender has
non-gregorian start year. Use era year also in default date entries,
if so.
* nlsfuncs.cc: Include lc_era.h.
(locale_cmp): convert arguments to char** to be usable for both types,
lc_msg_t and lc_era_t.
(__set_lc_time_from_win): Handle era-related data
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.
to same value as st_dev. Avoid useless debug output in executable
check. Add filename to debug output.
(fhandler_disk_file::facl): Simplify code calling fstat methods to
just call fstat to avoid errors with the cygdrive directory.
(enum dt_flags): Define.
(__eval_datetimefmt): Change force to flags and change type to
dt_flags. Accommodate throughout.
(__set_lc_time_from_win): Accommodate above change. Set era-related
values to empty strings for now.
* 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.
change.
* pathnames.sgml (pathnames-intro): Make the Win32 path text a note
and xref to new pathnames-win32 section.
(cygdrive): Add description how the cygdrive mount flags apply to
UNC paths starting with slashes.
(pathnames-win32): New section describing native path handling.
pthread_mutex::init.
* thread.cc: Remov some obsolete comments.
(verifyable_object_isvalid): Reflect change to use thread_magic_t for magic
numbers.
(pthread_mutex::pthread_mutex): Set magic number to invalid initially until
we've verified that everything is valid.
(pthread_mutex::unlock): Fix a comment.
(verifyable_object::verifyable_object): Delete here.
(~verifyable_object::~verifyable_object): Ditto.
(pthread_mutex::init): Don't run is_good_initializer for non-static objects.
* thread.h (thread_magic_t): New typedef.
(verifyable_object::verifyable_object): Use thread_magic_t;
(verifyable_object::magic): Ditto.
(pthread_mutex::is_good_initializer_or_bad_object): Remove unneeded variable
names.
(pthread_mutex::can_be_unlocked): Ditto.
(pthread_mutex::init): Ditto. Remove default for third argument.
outside of the base plane to UTF-8. Call throughout instead of
wcrtomb.
(wgetnext): Handle surrogate pairs on UTF-16 systems.
* regex/regexec.c (xmbrtowc): Ditto.
builtin group from system. Explain why.
* sec_helper.cc (well_known_builtin_sid): New SID for BUILTIN group.
* security.h (well_known_builtin_sid): Declare.
(NONCHAR): Better cast here to make the test work. Move comment
from step here.
(matcher): Disable skipping initial string in multibyte case.
* regex/regcomp.c (p_bracket): Don't simplify singleton in the invert
case.
(p_b_term): Handle early end of pattern after dash in bracket
expression.
(singleton): Don't ignore the wides just because there's already a
singleton in the single byte chars. Fix condition for a singleton
wide accordingly.
(findmust): Check for LC_CTYPE charset, rather than LC_COLLATE charset.
* regex2.h (CHIN): Fix condition in the icase & invert case.
(ISWORD): Fix wrong cast to unsigned char.
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.