newlib-cygwin/winsup/cygwin/ChangeLog

967 lines
37 KiB
Plaintext
Raw Normal View History

2010-03-12 Christopher Faylor <me+cygwin@cgf.cx>
Throughout change all calls of low_priority_sleep (0) to yield ().
* miscfuncs.cc (yield): Rename from low_priority_sleep. Remove all of
the logic which called Sleep() and just use SwitchToThread.
* miscfuncs.h (yield): Rename from low_priority_sleep.
(SLEEP_0_STAY_LOW): Delete unused define.
* shared.cc (memory_init): Move heap_init() call directly after shared
memory initialization to more closely mimic long-standing program flow.
* tty.cc (tty_list::terminate): Replace call to low_priority_sleep with
Sleep.
2010-03-10 Christopher Faylor <me.cygwin@cgf.cx>
* shared.cc (memory_init): Fix comment. Fix indentation.
2010-03-09 Christopher Faylor <me+cygwin@cgf.cx>
* shared_info.h (open_shared): Create function wrapper for common use
case.
(open_shared): Change fifth argument to a pointer rather than a
reference.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Eliminate use
of dummy variable and call open_shared with constant.
* fhandler_process.cc (format_process_mounts): Ditto.
* pinfo.cc (pinfo::init): Pass pointer to shloc.
* shared.cc (shared_mem_inited): New variable.
(open_shared): Crate function wrapper for common use case.
(open_shared): Accommodate change to fifth argument to a pointer.
(shared_info::initialize): Remove spinlock test. Simplify function.
Move get_session_parent_dir call back here.
(memory_init): Protect global shared settings with shared_mem_inited
spinlock. Move get_session_parent_dir call to shared_info::initialize.
2010-03-09 Christopher Faylor <me.cygwin@cgf.cx>
* shared.cc (inst_root_inited): Delete.
* (shared_info::initialize): Reorganize. Move call to
init_installation_root here under spinlock control. Move unneeded
non-shared_info initialization out of this function.
(memory_init): Remove call to init_installation_root. Call heap_init
and get_session_parent_dir here.
2010-03-04 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (nt_path_has_executable_suffix): Change storage class of
blessed_executable_suffixes to static.
(rename): Revert meaning of old_explicit_suffix. Change the rules
for appending a .exe suffix and (yikes!) document them.
2010-03-04 Charles Wilson <cygwin@cwilson.fastmail.fm>
* cygwin.din: Export __xdr functions.
* include/cygwin/version.h: Bump version.
* posix.sgml: Add a few more XDR functions to list
of implemented Solaris functions.
2010-03-03 Charles Wilson <cygwin@cwilson.fastmail.fm>
Add XDR support.
* cygwin.din: Export xdr functions.
* include/cygwin/version.h: Bump version.
* cygxdr.cc: New.
* cygxdr.h: New.
* dcrt0.cc (dll_crt0_1): Print the (rare) xdr-related
error messages to stderr.
* Makefile.in: Add cygxdr.
* posix.sgml: Add new XDR functions to list of implemented Solaris
functions.
2010-03-01 Christopher Faylor <me+cygwin@cgf.cx>
* cygtls.h: Replace /*gentls_offsets*/ at end.
2010-03-01 14:39:47 +08:00
2010-03-01 Christopher Faylor <me+cygwin@cgf.cx>
* exception.h: Fix copyright.
2010-02-27 Christopher Faylor <me+cygwin@cgf.cx>
Update some copyrights.
* cygtls.cc (_cygtls::call): Invoke new exception protection here.
(_cygtls::init_thread): Remove conditionalized exception handler setup.
(exception_list): Delete declaration.
(_cygtls::init_exception_handler): Delete obsolete function.
* cygtls.h: Remove (now) unneeded include.
(_cygtls): Make this a real C++ class.
(_cygtls::handle_exceptions): Remove.
(_cygtls::init_exception_handler): Remove.
(_cygtls::call2): Make private.
(myfault::faulted): Remove unneeded parentheses.
* dcrt0.cc (dll_crt0_1): Remove exception handler setup.
* dlfcn.cc (dlopen): Ditto.
(dlclose): Ditto.
* dll_init.cc (dll_dllcrt0_1): Ditto.
(dll_list::detach): Use new exception handler protection.
* exceptions.cc (dump_exception): Rename to prevent confusion with new
class.
(exception::handle): Rename from _cygtls::handle_exceptions.
Accommodate new exception class. Accommodate rename to dump_exception.
* tlsoffsets.h: Regenerate.
2010-02-26 Christopher Faylor <me+cygwin@cgf.cx>
* cygtls.h (_cygtls::init_exception_handler): Eliminate argument.
(_cygtls::andreas): Convert to a pointer.
(san): Convert to a real class with methods. Use a linked list to
keep track of previous handlers on the "stack".
(myfault): Rewrite to use new san class rather than calling directly
into _cygtls.
* cygtls.cc (_cygtls::init_exception_handler): Just assume that we're
always using the standard exception handler.
(_cygtls::init_thread): Reflect loss of argument to
init_exception_handler.
* dcrt0.cc (dll_crt0_1): Ditto.
* dfcn.cc (dlopen): Ditto.
(dlclose): Reset the exception handler after FreeLibrary.
* dll_init.cc (dll_list::detach): Make sure that the exception handler
is initialized before calling destructors.
* exceptions.cc (_cygtls::handle_exceptions): Accommodate new andreas
pointer.
* thread.cc (verifyable_object_isvalid): Pass objectptr to faulted for
explicit NULL pointer checking.
* tlsoffsets.h: Regenerate.
2010-02-26 Christopher Faylor <me+cygwin@cgf.cx>
* mkimport: cd away from temp directory or Windows will have problems
removing the directory.
2010-02-26 Corinna Vinschen <corinna@vinschen.de>
* libc/strptime.cc: Implement support for era, alt_digits and POSIX
padding and width modifiers.
(era_info_t): New type.
(free_era_info): New static function to free era_info_t storage.
(get_era_info): New static function to create era_info_t storage
from LC_TIME era information.
(alt_digits_t): New type.
(get_alt_digits): New static function to create alt_digits_t storage
from LC_TIME alt_digits information.
(free_alt_digits): New static function to free alt_digits_t storage.
(find_alt_digits): New static function to scan input for alternative
digits and return them, if any. Return NULL otherwise.
(__strptime): New static function taking all code from strptime.
Implement handling for E, O, +, 0, and width modifiers per POSIX-1.2008.
(strptime): Convert into wrapper function to provide era_info and
alt_digits pointers and call __strptime.
(conv_num): Take additional alt_digits_t parameter and if it's not
NULL, call find_alt_digits to convert.
2010-02-26 Corinna Vinschen <corinna@vinschen.de>
* strsig.cc: Fix formatting and copyright.
2010-02-26 Pierre Humblet <Pierre.Humblet@ieee.org>
* security.cc (check_access): Use user.imp_token if appropriate.
Set errno and return if DuplicateTokenEx fails .
2010-02-26 17:37:12 +08:00
2010-02-26 Corinna Vinschen <corinna@vinschen.de>
Remove all traces of __CYGWIN_USE_BIG_TYPES__.
* include/cygwin/config.h: Move Cygwin-specific build flags from
newlib's sys/config.h here. Add a comment.
2010-02-25 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* include/cygwin/signal.h: Define SIGPWR as synonym for SIGLOST.
* strsig.cc: Ditto.
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
2010-02-25 Corinna Vinschen <corinna@vinschen.de>
* lc_era.h (lc_era_t): Fix apparent glibc bug in ja_JP era definition.
2010-02-24 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (get_full_privileged_inheritable_token): Fix dumb typo
when checking linked token for being a primary token.
2010-02-24 Christopher Faylor <me+cygwin@cgf.cx>
* dlfcn.cc (dlopen): Make sure exception handler is really loaded after
dynamic load.
2010-02-23 Christopher Faylor <me+cygwin@cgf.cx>
* cygtls.cc (_cygtls::init_exception_handler): Force installation of
our exception handler to always be at the beginning.
2010-02-23 Christopher Faylor <me+cygwin@cgf.cx>
* thread.cc (pthread_mutex::unlock): Don't attempt to unlock if there
is an error.
* include/sys/strace.h: Define _STRACE_SPECIAL. (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.
2010-02-23 04:36:04 +08:00
2010-02-22 Christopher Faylor <me+cygwin@cgf.cx>
* include/sys/strace.h: Define _STRACE_SPECIAL.
(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.
2010-02-22 Corinna Vinschen <corinna@vinschen.de>
* lc_era.h: Redefine lc_era_t to keep
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.
2010-02-20 Corinna Vinschen <corinna@vinschen.de>
* lc_era.h (lc_era): Fix "ja_JP" era_t_fmt entry to use traditional
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.
2010-02-20 Corinna Vinschen <corinna@vinschen.de>
* path.cc (warn_msdos): Enforce extended hex printing of multibyte
pathnames.
2010-02-19 Christopher Faylor <me+cygwin@cgf.cx>
* include/sys/strace.h: Remove old code. Add support for ptrace
tracing.
2010-02-19 Corinna Vinschen <corinna@vinschen.de>
* lc_era.h: New file.
* 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
2010-02-19 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Try to open
directory with stat()-friendly access mask first. Explain why.
2010-02-19 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Set st_rdev
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.
2010-02-18 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (eval_datetimefmt): Rename force to flags.
(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.
2010-02-18 Christopher Faylor <me+cygwin@cgf.cx>
* fhandler.cc (fhandler_base::setup_overlapped): Revert to starting
with handle in signalled state as it seems to fix some hangs.
2010-02-15 Corinna Vinschen <corinna@vinschen.de>
* path.cc (path_conv::check): Treat native DOS paths as "noacl".
2010-02-15 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (mount_info::conv_to_win32_path): Set UNC path flags to
cygdrive prefix path flags.
2010-02-14 Christopher Faylor <me+cygwin@cgf.cx>
* fhandler.cc (fhandler_base::setup_overlapped): Don't set signalled
state to true initially.
(fhandler_base::has_ongoing_io): Delete ill-advised function.
(fhandler_base::read_overlapped): Rely on caller having checked
nonblocking state. Don't attempt to (incorrectly) check it here.
(fhandler_base::write_overlapped): Remove call to has_ongoing_io.
* select.cc (peek_pipe): Ditto.
* fhandler.h (fhandler_base::has_ongoing_io): Delete declaration.
2010-02-14 Christopher Faylor <me+cygwin@cgf.cx>
* regex/regcomp.c (xwcrtomb): Fix one explicable and one inexcplicable
C warning.
2010-02-13 Corinna Vinschen <corinna@vinschen.de>
* regex/regcomp.c (xwcrtomb): Don't convert Unicode chars outside the
base plane always to UTF-8. Call wcsnrtombs instead to allow arbitrary
multibyte charsets.
2010-02-12 Corinna Vinschen <corinna@vinschen.de>
* regex/regcomp.c (wgetnext): Use size_t as type for n2 since that's
what's returned by mbrtowc.
* regex/regexec.c (xmbrtowc): Ditto.
2010-02-12 Christopher Faylor <me+cygwin@cgf.cx>
* pthread.cc (pthread_mutex_init): Explicitly fill out third arg to
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.
2010-02-12 Corinna Vinschen <corinna@vinschen.de>
* regex/regcomp.c (xwcrtomb): New function to convert wide chars
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.
2010-02-12 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (get_user_local_groups): Retrieve name of well known
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.
2010-02-11 Pierre Humblet <Pierre.Humblet@ieee.org>
2010-02-13 02:38:59 +08:00
* registry.cc (get_registry_hive_path): Add space in string.
2010-02-11 Corinna Vinschen <corinna@vinschen.de>
* regex/engine.c (step): Drop Cygwin-specific definition.
(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.
2010-02-11 Andy Koppe <andy.koppe@gmail.com>
* 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-10 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__set_charset_from_locale): Allow "@euro" modifier only
for locales which use EUR as currency.
2010-02-10 Corinna Vinschen <corinna@vinschen.de>
* 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 Christopher Faylor <me+cygwin@cgf.cx>
* 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-09 Christopher Faylor <me+cygwin@cgf.cx>
* cygtls.h (struct _cygtls): Remove unneeded elements.
* thread.cc (pthread::exit): Avoid potential double call to
_my_tls.remove.
* tlsoffsets.h: Regenerate.
2010-02-09 Corinna Vinschen <corinna@vinschen.de>
* 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 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__set_lc_messages_from_win): Fix typo.
2010-02-09 Corinna Vinschen <corinna@vinschen.de>
* lc_msg.h: New file, fix a problem in locales with modifiers.
2010-02-09 Corinna Vinschen <corinna@vinschen.de>
* lc_msg.h: New file, generated from running Linux system.
2010-02-09 Corinna Vinschen <corinna@vinschen.de>
* 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-08 Corinna Vinschen <corinna@vinschen.de>
* 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-07 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__get_lcid_from_locale): Handle "@cyrillic" modifier
for uz_UZ locale here.
(__set_charset_from_locale): Accommodate above change.
2010-02-07 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__set_locale_from_locale_alias): New function to read
locale aliases from /usr/share/locale/locale.alias.
2010-02-06 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__get_lcid_from_locale): Handle no_NO as nb_NO, rather
than nn_NO.
2010-02-06 Corinna Vinschen <corinna@vinschen.de>
* 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 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__set_charset_from_locale): Set default charset for
"ka_GE" locale to GEORGIAN-PS, for "kk_KZ" to PT154.
2010-02-06 Corinna Vinschen <corinna@vinschen.de>
* 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 Corinna Vinschen <corinna@vinschen.de>
* 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-05 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__set_charset_from_locale): Set default charset for
"uz_UZ" locale to ISO-8859-1, with the "@cyrillic" modifier to UTF-8.
2010-02-05 Christopher Faylor <me+cygwin@cgf.cx>
* dll_init.cc (per_module::run_dtors): Use consistent method for
running destructors.
2010-02-04 Christopher Faylor <me+cygwin@cgf.cx>
* 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 Corinna Vinschen <corinna@vinschen.de>
* 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 Corinna Vinschen <corinna@vinschen.de>
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-03 Christopher Faylor <me+cygwin@cgf.cx>
* sigproc.cc (get_proc_lock): Fix error message typo.
2010-02-03 Corinna Vinschen <corinna@vinschen.de>
* 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-02 Corinna Vinschen <corinna@vinschen.de>
* 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-01 Christopher Faylor <me+cygwin@cgf.cx>
* 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 Dave Korn <dave.korn.cygwin@gmail.com>
* how-startup-shutdown-works.txt: Add new document.
2010-01-29 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (lsaauth): Use CYG_LSA_MAGIC as checksum start value to
decouple from Cygwin release.
2010-01-29 Corinna Vinschen <corinna@vinschen.de>
* libc/strfmon.c (__setup_vars): Test for an empty string rather than
for a NULL pointer.
2010-01-29 Christopher Faylor <me+cygwin@cgf.cx>
* 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 Christopher Faylor <me+cygwin@cgf.cx>
* 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 Corinna Vinschen <corinna@vinschen.de>
Throughout, use FileBothDirectoryInformation info class rather than
FileDirectoryInformation info class to avoid problems with incomplete
filesystem implementations. Fix comments accordingly.
* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Set
fname->Length to 0 in error case to avoid potential crash in debug
output.
(fhandler_disk_file::readdir): Try to speed up the working default case.
Check for STATUS_INVALID_NETWORK_RESPONSE as potential status value
returned by filesystems not implementing FileIdBothDirectoryInformation.
* ntdll.h (STATUS_INVALID_NETWORK_RESPONSE): Define.
(FILE_BOTH_DIRECTORY_INFORMATION): Rename to official name.
* path.cc (symlink_info::check): Don't request FILE_READ_EA access, it's
not required for NFS. Try to speed up the working default case. Check
for STATUS_INVALID_NETWORK_RESPONSE as potential status value returned
by filesystems not supporting non-NULL EA parameters. Fix the way
fs.update is called. Improve debug output.
2010-01-28 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (tags, ctags, CTAGS)): Add rules to create tags file.
2010-01-25 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__get_lcid_from_locale): Add comments. Fix typos in
comments. Make sure to set last_lcid every time. Return locale
without territory part as invalid. Handle modern serbian territory
names per ISO 3166 on older systems as well. Add appropriate comment.
(__set_charset_from_locale): Handle LCID for sr_CS as well to make older
systems happy.
2010-01-25 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__set_charset_from_locale): Rearrange to set charset
more closely aligned to Glibc.
2010-01-25 Corinna Vinschen <corinna@vinschen.de>
* spawn.cc (spawn_guts): Only try to remove long path prefix from
runpath if runpath is not NULL.
2010-01-25 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__get_lcid_from_locale): Fix a comment. Handle special
language/TERRITORY combinations explicitely. Explain why.
2010-01-24 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (__set_charset_from_locale): Fix comment.
2010-01-24 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (check_codepage): Move from syscalls.cc here.
(internal_setlocale): Ditto.
(initial_setlocale): Ditto.
(setlocale): Ditto.
* strfuncs.cc (__sjis_wctomb): Revert previous patch.
(__sjis_mbtowc): Ditto.
* syscalls.cc: Move setlocale-related functions to nlsfuncs.cc.
2010-01-23 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc (__sjis_wctomb): Special handling for characters which
differ between SJIS and Windows codepage 932, if charset is "SJIS".
(__sjis_mbtowc): Ditto.
(_jis_wctomb): Remove.
(__jis_mbtowc): Remove.
2010-01-23 Corinna Vinschen <corinna@vinschen.de>
* nlsfuncs.cc (wcsxfrm): Call LCMapStringW with LCMAP_BYTEREV flag to
allow correct comparison using wcscmp.
2010-01-22 Corinna Vinschen <corinna@vinschen.de>
* posix.sgml (strfmon): Move to implemented SUSv4 API.
2010-01-22 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (DLL_OFILES): Add nlsfunc.o and strfmon.o.
* autoload.cc (LocaleNameToLCID): Define.
* cygwin.din (strfmon): Export.
* nlsfuncs.cc: New file. Define a lot of internal functions called
from setlocale.
(wcscoll): Implement locale-aware here, using CompareStringW function.
(strcoll): Ditto.
(wcsxfrm): Implement locale-aware here, usingLCMapStringW function.
(strxfrm): Ditto.
(__set_charset_from_locale): Replace __set_charset_from_codepage.
Return Linux-compatible charset.
* strfuncs.cc (__set_charset_from_codepage): Remove.
* wchar.h (__set_charset_from_codepage): Drop definition.
* wincap.h (wincaps::has_localenames): New element.
* wincap.cc: Implement above element throughout.
* libc/strfmon.c: New file.
* libc/strptime.cc: Remove locale constant strings in favor of
access to locale-specifc data.
(strptime): Point _CurrentTimeLocale to locale-specific data.
Throughout use correct locale-specific format fields for all
locale-specific formats.
* include/monetary.h: New file.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2010-01-18 Corinna Vinschen <corinna@vinschen.de>
* strfuncs.cc: Remove needless includes.
2010-01-17 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (internal_setlocale): Use UTF-8 internally if external
charset is ASCII.
2010-01-15 Corinna Vinschen <corinna@vinschen.de>
* libc/fnmatch.c: Replace with multibyte capable version from FreeBSD.
2010-01-15 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::accept4): Reset async flag
on accepted socket.
2010-01-15 Pierre A. Humblet <phumblet@phumblet.no-ip.org>
* fhandler_socket.cc (fhandler_socket::accept4): Set nonblocking
flag exactly according to flags, as on Linux.
* net.cc (cygwin_accept): Maintain BSD semantics here.
2010-01-15 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din (accept4): Export.
* fhandler.h (fhandler_socket::accept4): Rename from accept. Take
additional flag parameter.
* fhandler_socket.cc (fhandler_socket::accept4): Ditto. Handle
SOCK_NONBLOCK and SOCK_CLOEXEC flags.
* net.cc (cygwin_socket): Handle SOCK_NONBLOCK and SOCK_CLOEXEC flags
in type. Check for invalid flag values.
(socketpair): Ditto.
(cygwin_accept): Accommodate renaming of fhandler_socket::accept
function to accept4.
(accept4): New function.
* posix.sgml: Mention accept4 as GNU extensions.
* include/cygwin/socket.h (SOCK_NONBLOCK): Define.
(SOCK_CLOEXEC): Define.
(_SOCK_FLAG_MASK): Define when building Cygwin.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* include/sys/socket.h (accept4): Declare.
2010-01-15 Corinna Vinschen <corinna@vinschen.de>
* posix.sgml: Mention dup3 and pipe2 as GNU extensions.
2010-01-14 Corinna Vinschen <corinna@vinschen.de>
* dcrt0.cc (dll_crt0_1): Reset locale to "C" at the last moment before
calling the application's main.
* syscalls.cc (internal_setlocale): Don't reset locale to "C here.
Change comment accordingly.
* cygwin.din (dup3): Export. (pipe2): Export. * dtable.cc (dtable::dup_worker): Take additional flags parameter. Handle O_CLOEXEC flag. (dtable::dup3): Rename from dup2. Take additional flags parameter. Check for valid flags. Drop check for newfd == oldfd. * dtable.h (dtable::dup_worker): Add flags parameter. (dtable::dup3): Rename from dup2. * fcntl.cc (fcntl64): Add F_DUPFD_CLOEXEC case. * fhandler.h (fhandler_mailslot::get_object_attr): Add flags parameter. * fhandler.cc (fhandler_base::open): Use security attribute with inheritance according to setting of O_CLOEXEC flag. * fhandler_console.cc (fhandler_console::open): Ditto. * fhandler_fifo.cc (sec_user_cloexec): New inline function to create security attribute with inheritance according to setting of O_CLOEXEC flag. (fhandler_fifo::open): Call sec_user_cloexec to fetch security attribute. (fhandler_fifo::wait): Ditto. * fhandler_mem.cc (fhandler_dev_mem::open): Ditto. * fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Take additional flags parameter. Use security attribute with inheritance according to setting of O_CLOEXEC flag. (fhandler_mailslot::open): Call get_object_attr with flags parameter. * fhandler_registry.cc (fhandler_registry::open): Call set_close_on_exec on real handles to accommodate O_CLOEXEC flag. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. * fhandler_tape.cc: Create mutex with inheritance according to setting of O_CLOEXEC flag. * pipe.cc: Replace usage of O_NOINHERIT with O_CLOEXEC. (fhandler_pipe::init): Simplify setting close_on_exec flag. (fhandler_pipe::open): Remove setting close_on_exec flag. (fhandler_pipe::create): Use security attribute with inheritance according to setting of O_CLOEXEC flag. (pipe2): New exported function. * posix_ipc.cc: Throughout, open backing files with O_CLOEXEC flag to follow POSIX semantics. * security.h (sec_none_cloexec): New define. * syscalls.cc (dup): Add missing extern "C" qualifier. Accommodate renaming of dtable::dup2 to dtable::dup3. (dup2): Ditto. Check newfd == oldfd here. (dup3): New function. Check newfd == oldfd here. (open): Set close_on_exec flag according to O_CLOEXEC flag before calling fhandler->open. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2010-01-15 02:46:02 +08:00
2010-01-14 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din (dup3): Export.
(pipe2): Export.
* dtable.cc (dtable::dup_worker): Take additional flags parameter.
Handle O_CLOEXEC flag.
(dtable::dup3): Rename from dup2. Take additional flags parameter.
Check for valid flags. Drop check for newfd == oldfd.
* dtable.h (dtable::dup_worker): Add flags parameter.
(dtable::dup3): Rename from dup2.
* fcntl.cc (fcntl64): Add F_DUPFD_CLOEXEC case.
* fhandler.h (fhandler_mailslot::get_object_attr): Add flags parameter.
* fhandler.cc (fhandler_base::open): Use security attribute with
inheritance according to setting of O_CLOEXEC flag.
* fhandler_console.cc (fhandler_console::open): Ditto.
* fhandler_fifo.cc (sec_user_cloexec): New inline function to
create security attribute with inheritance according to setting of
O_CLOEXEC flag.
(fhandler_fifo::open): Call sec_user_cloexec to fetch security
attribute.
(fhandler_fifo::wait): Ditto.
* fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
* fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Take
additional flags parameter. Use security attribute with inheritance
according to setting of O_CLOEXEC flag.
(fhandler_mailslot::open): Call get_object_attr with flags parameter.
* fhandler_registry.cc (fhandler_registry::open): Call set_close_on_exec
on real handles to accommodate O_CLOEXEC flag.
* fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
* fhandler_tape.cc: Create mutex with inheritance according to setting
of O_CLOEXEC flag.
* pipe.cc: Replace usage of O_NOINHERIT with O_CLOEXEC.
(fhandler_pipe::init): Simplify setting close_on_exec flag.
(fhandler_pipe::open): Remove setting close_on_exec flag.
(fhandler_pipe::create): Use security attribute with inheritance
according to setting of O_CLOEXEC flag.
(pipe2): New exported function.
* posix_ipc.cc: Throughout, open backing files with O_CLOEXEC
flag to follow POSIX semantics.
* security.h (sec_none_cloexec): New define.
* syscalls.cc (dup): Add missing extern "C" qualifier. Accommodate
renaming of dtable::dup2 to dtable::dup3.
(dup2): Ditto. Check newfd == oldfd here.
(dup3): New function. Check newfd == oldfd here.
(open): Set close_on_exec flag according to O_CLOEXEC flag before
calling fhandler->open.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
2010-01-13 Corinna Vinschen <corinna@vinschen.de>
* include/fcntl.h (O_TTY_INIT): Define as 0.
2010-01-13 Corinna Vinschen <corinna@vinschen.de>
* fhandler_tty.cc (fhandler_tty_master::init): Don't erase all default
termios settings of slave console.
2010-01-13 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (rename): Don't exit prematurely with EROFS when trying
to rename an AF_LOCAL socket or when trying to replace an AF_LOCAL
socket.
2010-01-12 Corinna Vinschen <corinna@vinschen.de>
* globals.cc (ro_u_nwfs): New R/O unicode string.
* mount.cc (fs_info::update): Check for NWFS filesystem. Set
has_buggy_basic_info, if so. Add comment to explain why.
(fillout_mntent): Add "nwfs" string to fs_names array.
* mount.h (enum fs_info_type): Add nwfs.
(class fs_info): Add has_buggy_basic_info status flag. Add accessors
for has_buggy_basic_info and is_nwfs.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Accommodate
filesystems with broken FileBasicInformation handling.
* path.cc (symlink_info::check): Ditto.
* path.h (path_conv::has_buggy_basic_info): Add method.
2010-01-12 Corinna Vinschen <corinna@vinschen.de>
* dtable.cc (build_fh_name_worker): Remove. Move all functionality
back into build_fh_name.
(build_fh_name): Drop unused HANDLE parameter. Drop call to pc.fillin.
Remove disabled build_fh_name with UNICODE_STRING name parameter.
* dtable.h (build_fh_name): Drop HANDLE parameter from declaration.
Remove declaration for build_fh_name with UNICODE_STRING name parameter.
* path.cc (path_conv::fillin): Remove.
(symlink_info::check): Fix comment.
* path.h (path_conv::fillin): Remove declaration.
* dir.cc: Accommodate change in build_fh_name parameters throughout.
* sec_acl.cc: Ditto.
* syscalls.cc: Ditto.
* ntea.cc (getxattr_worker): Fix debug output.
(setxattr_worker): Ditto.
* times.cc (utimens_worker): Ditto.
2010-01-11 Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc (format_proc_stat): Use new in_buf.
(format_proc_cpuinfo): Replace szBuffer with a union in_buf. Use type
correct throughout. Add a couple of missing or newer cpu flags. Allow
certain AMD flags for intel as well.
2010-01-10 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (fhandler_base::fstat_helper): Declare timestamps as
PLARGE_INTEGER.
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle):
Accommodate fstat_helper change of timestamp arguments.
(fhandler_base::fstat_by_name): Ditto.
(fhandler_base::fstat_helper): Define with timestamps as PLARGE_INTEGER.
Accommodate in call to to_timestruc_t.
2010-01-08 Corinna Vinschen <corinna@vinschen.de>
* sec_auth.cc (get_token_group_sidlist): Add BUILTIN\Users account
to all created tokens.
* sec_helper.cc (well_known_users_sid): Define as BUILTIN\Users.
* security.h (well_known_users_sid): Declare.
2010-01-01 Christopher Faylor <me+cygwin@cgf.cx>
* dcrt0.cc: Bump copyright.
2010-01-01 Christopher Faylor <me+cygwin@cgf.cx>
* dcrt0.cc (dll_crt0_1): Move internal locale setting prior to
potential globify to prevent creation of unglobbed filenames in the
wrong character set.