Commit Graph

8000 Commits

Author SHA1 Message Date
Corinna Vinschen 9bb1d645b3 * new-features.sgml (ov-new1.7.2): Rephrase getlocale entry. 2010-02-11 11:39:58 +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 87c0903113 * nlsfuncs.cc (initial_setlocale): Move check whether charset has
changed from here...
	(internal_setlocale): ...to here, to avoid unnecessary work when invoked
	via CW_INT_SETLOCALE.
2010-02-11 10:04:51 +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 3b994b1249 * new-features.sgml (ov-new1.7.2): Add LC_MESSAGES support.
* setup2.sgml (setup-locale-ov): Change "@euro" modifier description.
	(setup-locale-missing): Remove.
2010-02-10 12:34:54 +00:00
Corinna Vinschen 4f1c922e06 * nlsfuncs.cc (__set_charset_from_locale): Allow "@euro" modifier only
for locales which use EUR as currency.
2010-02-10 12:29:26 +00:00
Corinna Vinschen ae40237a0a * nlsfuncs.cc (__get_lcid_from_locale): Convert iu_CA to iu-Latn-CA
rather than iu-Cans-CA on Vista and later.
	(__set_charset_from_locale): Set default charset for iu_CA to UTF-8.
2010-02-10 10:44:21 +00:00
Christopher Faylor 3700578ee8 * dcrt0.cc (_dll_crt0): Set _main_tls as early as possible.
* thread.cc (pthread_mutex::can_be_unlocked): Remove check for
MUTEX_OWNER_ANONYMOUS since it is racy and unsafe.
(pthread::init_mainthread): Initialize thread directly from _my_tls.
(pthread::self): Ditto.
(pthread::get_tls_self_pointer): Delete.
(pthread_mutex::pthread_mutex): Use an event rather than a semaphore.
(pthread_mutex::lock): Rename from _<func>.  Derive self directly.
(pthread_mutex::tryunlock): Ditto.
(pthread_mutex::destroy): Ditto.
(pthread_mutex::unlock): Ditto.  Accommodate change from semaphore to event.
(pthread_mutex::_fixup_after_fork): Accommodate change from semaphore to event.
(pthread_mutex::init): Don't attempt to initialize a semaphore unless it is in
an initialized state.  Do this check under mutex_initialization_lock.lock
* thread.h (fast_mutex::init): Use event rather than semaphore.
(fast_mutex::lock): Ditto.
(pthread_mutex::_lock): Delete.
(pthread_mutex::_unlock): Ditto.
(pthread_mutex::_trylock): Ditto.
(pthread_mutex::_destroy): Ditto.
(pthread_mutex::get_pthread_self): Ditto.
(pthread_mutex::get_tls_self_pointer): Ditto.
(pthread_mutex::lock): Un-inline.
(pthread_mutex::unlock): Ditto.
(pthread_mutex::trylock): Ditto.
(pthread_mutex::destroy): Ditto.
2010-02-10 07:25:26 +00:00
Christopher Faylor 161387a725 * cygtls.h (struct _cygtls): Remove unneeded elements.
* thread.cc (pthread::exit): Avoid potential double call to _my_tls.remove.
* tlsoffsets.h: Regenerate.
2010-02-10 03:17:32 +00:00
Corinna Vinschen 23a4a3517f * nlsfuncs.cc (lc_wcstombs): Add `return_invalid' flag to specify
whether invalid chars should be ignored or not.  Change comment.
	(__set_lc_monetary_from_win): Call lc_wcstombs with return_invalid
	flag set.
	(__set_lc_messages_from_win): Simplify to accommodate the fact that
	lc_wcstombs just ignores invalid chars.  Explain why.
2010-02-09 12:22:26 +00:00
Corinna Vinschen 3d9e3644ee * nlsfuncs.cc (__set_lc_messages_from_win): Fix typo. 2010-02-09 11:44:03 +00:00
Corinna Vinschen 9008eb4041 * lc_msg.h: New file, fix a problem in locales with modifiers. 2010-02-09 11:38:44 +00:00
Corinna Vinschen 09dfe7e025 * lc_msg.h: New file, generated from running Linux system. 2010-02-09 11:16:38 +00:00
Corinna Vinschen 502a4f52ed * lc_msg.h: New file, autogenerated from CLDR data.
* nlsfuncs.cc: Include lc_msg.h.
	(lc_time_buf): Remove.
	(lc_numeric_buf): Remove.
	(lc_monetary_buf): Remove.
	(lc_mbstowcs): Fix previous fix.
	(__set_lc_time_from_win): Take additional pointer to buffer pointer,
	defined in newlib.
	(__set_lc_numeric_from_win): Ditto.
	(__set_lc_monetary_from_win): Ditto.
	(locale_cmp): New static function.
	(__set_lc_messages_from_win): New function to be called from newlib.
2010-02-09 08:59:49 +00:00
Corinna Vinschen 2f27950afb Now *really* check in what should have been checked in 12 hours ago. 2010-02-08 21:33:59 +00:00
Corinna Vinschen 4dce4255ff This patch got lost in the previous checkin, accidentally:
* nlsfuncs.cc (lc_mbstowcs): Fix call to f_mbtowc.
2010-02-08 09:55:35 +00:00
Corinna Vinschen f5a73638cd * external.cc (cygwin_internal): Add CW_INT_SETLOCALE case to
allow to call internal_setlocale().
	* nlsfuncs.cc (internal_setlocale): Make externally available.
	* include/cygwin/version.h: Bump API minor number.
	* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_INT_SETLOCALE.

	* nlsfuncs.cc (lc_mbstowcs): Fix call to f_mbtowc.
	(__set_locale_from_locale_alias): Ignore "@cjknarrow" modifier.
2010-02-08 09:52:40 +00:00
Yaakov Selkowitz b6ab02dea8 * new-features.sgml (ov-new1.7-misc): Fix typo. 2010-02-07 22:06:16 +00:00
Corinna Vinschen ab6ef08082 * nlsfuncs.cc (__get_lcid_from_locale): Handle "@cyrillic" modifier
for uz_UZ locale here.
	(__set_charset_from_locale): Accommodate above change.
2010-02-07 17:35:59 +00:00
Corinna Vinschen 8803e713c7 * new-features.sgml (ov-new1.7.2): Add support for locales from
/usr/share/locale/locale.alias.
	* setup2.sgml (setup-locale-ov): Ditto.
2010-02-07 13:42:49 +00:00
Corinna Vinschen 07d061aeec * nlsfuncs.cc (__set_locale_from_locale_alias): New function to read
locale aliases from /usr/share/locale/locale.alias.
2010-02-07 13:31:08 +00:00
Corinna Vinschen 689109a76f * nlsfuncs.cc (__get_lcid_from_locale): Handle no_NO as nb_NO, rather
than nn_NO.
2010-02-06 21:57:33 +00:00
Corinna Vinschen 573df59cd4 * setup2.sgml (setup-locale-ov): Align description of working modifiers
to latest changes.
2010-02-06 21:41:05 +00:00
Corinna Vinschen 28d3c4fa38 * nlsfuncs.cc (has_modifier): MOve up in file to use in
__get_lcid_from_locale as well.
	(__get_lcid_from_locale): Handle no_NO locale as alias for nn_NO.
	Default all sr_XY locales to Cyrillic script.  Change lcid to Latin
	script if "@latin" modifier has been specified.
	(__set_charset_from_locale): Handle Serbian in codepage 1251 case as
	well.  Also check for sr_BA lcid.  Restrict "@euro" modifier to
	locales otherwise defaulting to ISO-8859-1.
2010-02-06 21:40:53 +00:00
Corinna Vinschen 3673ff5968 * new-features.sgml (ov-new1.7.2): Add support for new charsets.
Change text for modifier support.
	(setup-locale-charsetlist): Add new GEORGIAN-PS and PT154 charsets
	to list of supported charsets.  Reorder list for non-ISO, non-CP
	charsets alphabetically.
2010-02-06 18:33:40 +00:00
Corinna Vinschen b6b236270e * nlsfuncs.cc (__set_charset_from_locale): Set default charset for
"ka_GE" locale to GEORGIAN-PS, for "kk_KZ" to PT154.
2010-02-06 18:30:18 +00:00
Corinna Vinschen 38d9821daf * path.cc (symlink_info::check_nfs_symlink): Reopen file with
FILE_READ_EA access since, surprisingly, you need it to read EAs even
	on NFS.
2010-02-06 15:57:21 +00:00
Corinna Vinschen b96600ef91 * sec_auth.cc (get_full_privileged_inheritable_token): New function
to fetch token with full privileges from logon token in Vista and
	later, and to make token inheritable.  Add lengthy comments to explain
	the function's job.
	(cygwin_logon_user): Drop calling SetHandleInformation.  Enable TCB
	privilege and call get_full_privileged_inheritable_token.
	(lsaauth): Don't fetch linked token and don't make handle inheritable
	here, just call get_full_privileged_inheritable_token instead.
	(lsaprivkeyauth): Ditto.
2010-02-06 13:13:15 +00:00
Corinna Vinschen e90f14f5d3 * setup2.sgml (setup-locale-ov): Add description for "uz_UZ@cyrillic"
and "tt_RU@iqtelif" modifiers.  Slightly rephrase locale specifier
	description in terms of the modifier string.
2010-02-05 21:38:31 +00:00
Corinna Vinschen 207889c9a7 * nlsfuncs.cc (__set_charset_from_locale): Set default locale for
"uz_UZ" locale to ISO-8859-1, with the "@cyrillic" modifier to UTF-8.
2010-02-05 21:35:34 +00:00
Christopher Faylor e7fd08839e * dll_init.cc (per_module::run_dtors): Use consistent method for running
destructors.
2010-02-05 15:05:22 +00:00
Corinna Vinschen 8c9c8fa938 * new-features.sgml (ov-new1.7.2): Add grouping for printf/wprintf. 2010-02-05 08:57:32 +00:00
Christopher Faylor 6e3f2c626d * regcomp.c (p_ere): Workaround incorrect compiler warning.
* regerror.c (regatoi): Return non-const string or compiler complains in
certain inexplicable situations.
2010-02-04 21:05:07 +00:00
Corinna Vinschen aec8c3d510 * regex/engine.c (step): Declare and define with `int ch' rather than
`wint_t ch' parameter.  Explain why.
	(NONCHAR): Remove related Cygwin patch here, including wrong comment.
2010-02-04 17:34:44 +00:00
Corinna Vinschen 4db9544f4f * new-features.sgml (ov-new1.7.2): Add multibyte-awareness of regcomp
and regexec.
2010-02-04 12:38:00 +00:00
Corinna Vinschen e1e595a649 Replace regex files with multibyte-aware version from FreeBSD.
* Makefile.in (install-headers): Remove extra command to install
	regex.h.
	(uninstall-headers): Remove extra command to uninstall regex.h.
	* nlsfuncs.cc (collate_lcid): Make externally available to allow
	access to collation internals from regex functions.
	(collate_charset): Ditto.
	* wchar.h: Add __cplusplus guards to make C-clean.
	* include/regex.h: New file, replacing regex/regex.h.  Remove UCB
	advertising clause.
	* regex/COPYRIGHT: Accommodate BSD license.  Remove UCB advertising
	clause.
	* regex/cclass.h: Remove.
	* regex/cname.h: New file from FreeBSD.
	* regex/engine.c: Ditto.
	(NONCHAR): Tweak for Cygwin.
	* regex/engine.ih: Remove.
	* regex/mkh: Remove.
	* regex/regcomp.c: New file from FreeBSD.  Tweak slightly for Cygwin.
	Import required collate internals from nlsfunc.cc.
	(p_ere_exp): Add GNU-specific \< and \> handling for word boundaries.
	(p_simp_re): Ditto.
	(__collate_range_cmp): Define.
	(p_b_term): Use Cygwin-specific collate internals.
	(findmust): Ditto.
	* regex/regcomp.ih: Remove.
	* regex/regerror.c: New file from FreeBSD.  Fix a few compiler warnings.
	* regex/regerror.ih: Remove.
	* regex/regex.7: New file from FreeBSD.  Remove UCB advertising clause.
	* regex/regex.h: Remove.  Replaced by include/regex.h.
	* regex/regexec.c: New file from FreeBSD.  Fix a few compiler warnings.
	* regex/regfree.c: New file from FreeBSD.
	* regex/tests: Remove.
	* regex/utils.h: New file from FreeBSD.
2010-02-04 12:35:49 +00:00
Christopher Faylor 66dd5c4ff5 * sigproc.cc (get_proc_lock): Fix error message typo. 2010-02-03 19:57:05 +00:00
Corinna Vinschen 4a49c71595 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Workaround
another bug in NWFS.  Add comment to explain why.  Improve debug output
	in case the NT calls to test for binary fail.
	* path.h (path_conv::fs_is_cifs): New method.
	(path_conv::fs_is_nwfs): New method.
2010-02-03 16:05:33 +00:00
Corinna Vinschen fac3c73ba0 * include/paths.h (_PATH_MNTTAB): Define.
(_PATH_MOUNTED): Define.
	* include/mntent.h: Include paths.h.  Define MNTTAB and MOUNTED as their
	paths.h equivalents.  Add comment.
2010-02-02 11:17:54 +00:00
Christopher Faylor fc6a0dc849 * dcrt0.cc (atexit_lock): Delete.
(cygwin_exit): Remove atexit lock.
(cygwin_atexit): Ditto.  Rename parameter to match newlib.  Call __cxa_atexit
when invoked by a registered DLL.
* dll_init.cc (remove_dll_atexit): Delete.
(dll_list::find): New function.
(dll_list::detach): Use dll_list::find to find dll associated with return
address.  Use __cxa_finalize to run atexit functions associated with the dll.
(cygwin_detach_dll): Don't assume that HANDLE == void *.
* dll_init.h (dll_list::find): Declare.
(__cxa_atexit): Ditto.
(__cxa_finalize): Ditto.
* init.cc (dll_entry): Clarify comment.
2010-02-02 02:00:01 +00:00
Dave Korn a390615010 * how-startup-shutdown-works.txt: Add new document. 2010-02-02 01:54:55 +00:00
Yaakov Selkowitz 50da6b49ed * faq-programming.xml: Update for Cygwin docbook-utils package. 2010-02-02 01:18:03 +00:00
Yaakov Selkowitz 2972058a05 * README: Update for Cygwin docbook-utils package. 2010-02-02 01:02:49 +00:00
Corinna Vinschen 54c4a92634 * sec_auth.cc (lsaauth): Use CYG_LSA_MAGIC as checksum start value to
decouple from Cygwin release.
2010-01-29 19:51:11 +00:00
Corinna Vinschen cd5401de59 * cyglsa.c: Include lmcons.h instead of lm.h to make newer WinDDK happy.
(LsaApLogonUserEx): Use CYG_LSA_MAGIC as checksum start value to
	decouple from Cygwin release.
	* make-64bit-version-with-visual-c.bat: Avoid compiler warning.
	* cyglsa64.dll: New build.
2010-01-29 19:50:15 +00:00
Corinna Vinschen 0b189c1ef3 * libc/strfmon.c (__setup_vars): Test for an empty string rather than
for a NULL pointer.
2010-01-29 19:38:22 +00:00
Christopher Faylor d5c4cd3f6c * dll_init.cc (remove_dll_atexit): New function.
(dll_list::detach): Run any atexit handlers registered in the DLL prior to
unloading.
2010-01-29 18:34:09 +00:00
Christopher Faylor 2b37c431b1 * libc/strfmon.c (__setup_vars): Fix compiler warning about assigning const
strings.  Compare a pointer to NULL rather than '\0'.
* dll_init.cc (dll_dllcrt0_1): Minor comment fix.
* pipe.cc (fhandler_pipe::create_selectable): Remove Win9x accommodation.
2010-01-29 17:37:54 +00:00