Commit Graph

8153 Commits

Author SHA1 Message Date
Christopher Faylor 2aeef06579 * fhandler.cc (fhandler_base::dup): Call setup_overlapped unconditionally.
(fhandler_base::fork_fixup): Ditto.
(fhandler_base::fixup_after_fork): Ditto.
(fhandler_base::fixup_after_exec): Ditto.
(fhandler_base_overlapped::setup_overlapped): Move to this class from
fhandler_base.
(handler_base_overlapped::destroy_overlapped): Ditto.
(fhandler_base_overlapped::wait_overlapped): Ditto.  Track when we expect
pending I/O.
(fhandler_base_overlapped::read_overlapped): Move to this class from
fhandler_base.  Return error if ongoing I/O.
(fhandler_base_overlapped::write_overlapped): Ditto.
(fhandler_base_overlapped::has_ongoing_io): Semi-reinstate previous function.
* fhandler.h (fhandler_base::wait_overlapped): Move to fhandler_base_overlapped
class.
(fhandler_base::write_overlapped): Ditto.
(fhandler_base::get_overlapped): Ditto.
(fhandler_base::get_overlapped_buffer): Ditto.
(fhandler_base_overlapped): New class.
(fhandler_pipe): Inherit from fhandler_base_overlapped.  Remove overlapped
stuff as a result.
(fhandler_fifo): Ditto.
* pipe.cc (fhandler_pipe::fhandler_pipe): Initialize fhandler_base_overlapped.
(pipe): Put a descriptive name in the fhandler.
2010-03-31 04:26:11 +00:00
Corinna Vinschen d8b4cbe896 * fhandler_socket.cc (fhandler_socket::wait_for_events): Remove call to
sig_dispatch_pending.
2010-03-30 16:20:15 +00:00
Corinna Vinschen ca8eb333c9 2010-03-30 Thomas Wolff <towo@towo.net>
* fhandler.h (class dev_console): Drop vt100_graphics_mode_active.
	Add flags vt100_graphics_mode_G0, vt100_graphics_mode_G1 and
	iso_2022_G1.
	* fhandler_console.cc: Throughout, tune VT100 graphics mode switching
	to follow ISO 2022 strictly.
2010-03-30 16:17:34 +00:00
Corinna Vinschen 298cf05c21 * syscalls.cc (open): Remove call to sig_dispatch_pending. 2010-03-30 14:36:42 +00:00
Corinna Vinschen 83dddecb34 * net.cc: Remove calls to sig_dispatch_pending throughout.
* libc/rexec.cc: Ditto.
2010-03-30 09:25:46 +00:00
Corinna Vinschen e23275a8ac * mount.cc (fs_info::update): Allow variable FILE_SUPPORTS_SPARSE_FILES
flag in netapp flag test.  Add comment.
2010-03-30 08:55:23 +00:00
Corinna Vinschen b3cbb06c9d * spawn.cc (find_exec): Enable finding paths in backslash notation,
especially for the exec[vl]p functions.

	* path.cc (symlink_info::check): Disable returning directories with
	suffix appended here.
2010-03-29 17:15:51 +00:00
Corinna Vinschen 3f4a0c963a * new-features.sgml (ov-new1.7.3): New section. 2010-03-29 15:10:09 +00:00
Corinna Vinschen ef7fc14537 * include/cygwin/version.h: Bump DLL minor version number to 3. 2010-03-29 15:06:09 +00:00
Corinna Vinschen ce3d89938b * fhandler.cc (fhandler_base::fstat): Keep st_ctime and st_birthtime
fixed to 2006-12-01 00:00 UTC.
2010-03-29 15:02:50 +00:00
Corinna Vinschen f1c6730ba3 * libc/rcmd.c: Enable IPv6. 2010-03-29 09:00:25 +00:00
Christopher Faylor 7a2df116fc change wording 2010-03-28 18:36:02 +00:00
Christopher Faylor e2402ed859 * fhandler.cc (fhandler_base::fstat): Set st_mtime time to current time. 2010-03-28 17:49:35 +00:00
Christopher Faylor c019a66c32 * globals.cc (exit_status): Add new ES_EXIT_STARTING enum.
* dcrt0.cc (cygwin_exit): Set exit_state to ES_EXIT_STARTING prior to calling
real exit.
* dll_init.cc (dll_list::detach): Remove dll from linked list and call
destructors even if exiting.  Don't call __cxa_finalize in exiting case.
2010-03-28 17:27:52 +00:00
Corinna Vinschen 84fef941e8 * setup2.sgml (setup-locale-charsetlist): Add EUC-CN and GB2312. 2010-03-27 21:13:04 +00:00
Corinna Vinschen 0b66e4d7aa * locale.cc (print_charmaps): Add EUC-CN and GB2312. 2010-03-27 21:08:02 +00:00
Corinna Vinschen 68b0fa820d * nlsfuncs.cc (__set_charset_from_locale): Set default charset for
locales defaulting to codepage 936 to GB2312.
2010-03-27 21:07:17 +00:00
Corinna Vinschen 8a3cfef325 * textbinary.sgml: Add missing </para>. 2010-03-27 17:10:23 +00:00
Christopher Faylor cf989df66a * textbinary.sgml: Remove tr example and just mention u2d and d2u instead. 2010-03-27 05:26:51 +00:00
Christopher Faylor ca8d80165f * pathnames.sgml: Clarify wording of user-specific fstab files. Fix typo. 2010-03-25 12:52:32 +00:00
Corinna Vinschen 708d2a1e64 * regtool.cc (find_key): Fix allocation size of "value". 2010-03-24 19:52:00 +00:00
Corinna Vinschen 4951591733 * legal.sgml: Bump copyright date. 2010-03-24 08:54:52 +00:00
Corinna Vinschen 536ad25322 * locale.cc (add_locale_alias_locales): Always use loc_num at function
start to avoid confusing bsearch.
2010-03-23 21:26:03 +00:00
Corinna Vinschen 1399e29a1f * locale.cc: Revert accidental checkin of unfinished changes. 2010-03-23 21:20:31 +00:00
Corinna Vinschen 1d4c87a15d * locale.cc (print_locale_with_codeset): Drop redundant name parameter.
Simplify creating locale string.  Add "@" in case of a modifier.
	(print_locale): Drop name parameter in calls to
	print_locale_with_codeset.
2010-03-23 21:01:01 +00:00
Corinna Vinschen 65b4b495c6 * fhandler_socket.cc (fhandler_socket::evaluate_events): Make erase
const in parameter list.
	(fhandler_socket::wait_for_events): Take a DWORD flags value instead of
	just a bool.  Call evaluate_events with erase flag according to
	MSG_PEEK value in flags.  Replace check for dontwait with check for
	MSG_DONTWAIT in flags.
	(fhandler_socket::connect): Call wait_for_events with 0 flags value.
	(fhandler_socket::accept4): Ditto.
	(fhandler_socket::recv_internal): Save flags in wait_flags.  Drop
	dontwait variable.  Call wait_for_events with wait_flags.
	(fhandler_socket::send_internal): Save MSG_DONTWAIT flag in wait_flags
	and call wait_for_events with wait_flags as argument.  Drop dontwait
	variable.
	* fhandler.h (class fhandler_socket): Change second parameter in
	declaration of wait_for_events to const DWORD.
2010-03-22 10:47:53 +00:00
Corinna Vinschen 0f6de51ae2 * fhandler_disk_file.cc (fhandler_cygdrive::fstat): Add standard read
permissions again.
2010-03-19 10:59:49 +00:00
Christopher Faylor 60698cf37a * shared.cc (init_installation_root): Change to make sure that scope of the
lock lasts the entire function.
2010-03-18 19:10:11 +00:00
Corinna Vinschen a24d322c76 * faq-using.xml (faq.using.unicode): Remove old examples. 2010-03-17 10:12:32 +00:00
Christopher Faylor cef5dfd75a * shared_info.h (user_info): Add dll_crt0_1 as a friend.
(user_info::version): Make LONG to accommodate spinlock use.
(user_info::create): New static function renamed from user_info_create.
(user_info::initialize): New private function renamed from
user_info_initialize.
(SHARED_VERSION): Delete.
(SHARED_VERSION_MAGIC): Ditto.
(USER_VERSION_MAGIC): Ditto.
(SHARED_INFO_CB): Ditto.
(USER_VERSION): Ditto.
(USER_VERSION_MAGIC): Ditto.
(CURR_SHARED_MAGIC): Update.
(CURR_USER_MAGIC): Ditto.
(shared_info::version): Make LONG to accommodate spinlock use.
(shared_info::create): New static function mirroring user_info::create.
(dll_crt0_1): Accommodate change to user_info::initialize.
* spinlock.h (spinlock::setto): New variable member.
(spinlock::done): New function.
(spinlock::spinlock): Generalize to allow arbitrary values and timeouts.  Call
done() when lock is not needed.
* ntdll.h: Make multiple-inclusion safe.
(NtQuerySystemTime): Declare.
* shared.cc (installation_root_inited): Rename from shared_mem_inited.
(init_installation_root): Make inline.  Use a spinlock to ensure that this is
initialized only once per session.
(user_info::initialize): Rename from user_shared_initialize.  Protect with
spinlock on sversion and remove other spinlock-like things.  Remove reference
to user_shared since it is now implicit.  Refer to spinlock version of
multiple_cygwin_problem to ensure that any spinlock is released.
(user_info::create): Rename from user_shared_create.  Accommodate change from
user_shared_initialize to user_info::initialize.
(shared_info::create): New inline function.
(shared_info::initialize): Protect with spinlock on sversion.  Move heap_init
back under specific control of shared_info spinlock.  Remove reference to
SHARED_INFO_CB and just use sizeof(*this).
(memory_init): Move all locking into respective functions where it is needed.
Accommodate name changes.  Remove call to heap_init().
* syscalls.cc (seteuid32): Accommodate name change to user_info::create().
* mount.cc (mount_info::create_root_entry): Report on errors from add_item
since they should be nonexistent.
(mount_info::init): Don't initialize nmounts.  It should already be zero.  Give
more verbose error when root_idx < 0.  Implicitly use this pointer rather than
explicitly referencing mount_table->.
(mount_info::add_item): Minor whitespace fix.
2010-03-15 21:29:15 +00:00
Christopher Faylor 654e623ce0 * sigproc.cc (no_signals_available): Get sense of the test right for previous
botched change.
2010-03-15 15:46:46 +00:00
Christopher Faylor d1ef5f33e6 * sigproc.cc (no_signals_available): Don't try to send a signal if still in
cygwin startup code.
2010-03-15 15:31:32 +00:00
Christopher Faylor f8af64be87 * spinlock.h: New file.
(spinlock): New class.
* shared.cc: Include spinlock.h.
(memory_init): Use new spinlock methods rather than roll-your-own.  Time out
after ten seconds if shared_mem_inited is not initialized.
* sync.h: Update copyright.  Remove vanity attribution.
* sigproc.cc (sigproc_terminate): Avoid attempts to kill the signal thread
while we're still initializing or suffer a deadlock.
2010-03-13 19:34:35 +00:00
Christopher Faylor 084ea5108e 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-12 23:13:48 +00:00
Corinna Vinschen 36960dec37 * effectively.sgml (using-shortcuts): Match chapter with reality. 2010-03-12 10:33:08 +00:00
Corinna Vinschen 3519b4c361 * faq-using.xml (faq.using.bloda): Add "Credant Guardian Shield". 2010-03-11 10:22:34 +00:00
Christopher Faylor c2fe02c48b * shared.cc (memory_init): Fix comment. Fix indentation. 2010-03-10 15:39:52 +00:00
Christopher Faylor bd3b3783f8 * 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 21:26:55 +00:00
Christopher Faylor e8190d8fbf * 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-09 16:07:15 +00:00
Chris Sutcliffe 1f440e4dbe 2010-03-06 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/_mingw.h: Increment version to 3.18.
2010-03-07 03:10:38 +00:00
Chris Sutcliffe a189160220 2010-03-02 Daniel Atallah <datallah@users.sourceforge.net>
* include/stdio.h: (_vscprintf, _vscwprintf)
        * include/tchar.h: (_vsctprintf)
2010-03-07 03:08:35 +00:00
Corinna Vinschen d909dd6c42 * setup2.sgml (setup-env): Add cross reference to using-cygwinenv.
Change description for locale environment variables to comply with
	changes in 1.7.2.
2010-03-05 15:44:03 +00:00
Corinna Vinschen 8e75995c7f * 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 16:20:37 +00:00
Corinna Vinschen a9fd742428 * 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-04 09:37:52 +00:00
Corinna Vinschen 3b221af1a8 * new-features.sgml (ov-new1.7.2): Describe XDR support. 2010-03-03 15:05:33 +00:00
Corinna Vinschen 53c24915c4 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-03 15:05:19 +00:00
Christopher Faylor cf15694586 * cygtls.h: Replace /*gentls_offsets*/ at end. 2010-03-02 00:49:15 +00:00
Christopher Faylor a9b112ec16 * exception.h: Fix copyright. 2010-03-01 06:39:47 +00:00
Christopher Faylor a0f5a8e549 Fix/delete inaccurate comments. 2010-03-01 06:38:58 +00:00
Christopher Faylor 98a97ac6cf 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-28 15:54:25 +00:00
Christopher Faylor d5d5bf4dd5 * 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 21:36:31 +00:00
Christopher Faylor b6336c95b4 * mkimport: cd away from temp directory or Windows will have problems removing
the directory.
2010-02-26 19:37:43 +00:00
Corinna Vinschen a149bfbfcd * new-features.sgml (ov-new1.7.2): Add strptime changes. 2010-02-26 17:54:24 +00:00
Corinna Vinschen 75bd77d246 * 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 17:53:52 +00:00
Corinna Vinschen f467ede283 * strsig.cc: Fix formatting and copyright. 2010-02-26 16:00:17 +00:00
Pierre Humblet a90dc29d18 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 14:51:59 +00:00
Yaakov Selkowitz e5ddf94aa1 * utils.sgml (kill): Add SIGIO, SIGCLD, and SIGPWR. 2010-02-26 10:47:05 +00:00
Corinna Vinschen 9aabc7c8f3 * new-features.sgml (ov-new1.7.2): Add strftime/wcsftime changes. 2010-02-26 10:28:39 +00:00
Corinna Vinschen d91ab868e1 Add missing ChangeLog checkin. 2010-02-26 09:37:12 +00:00
Corinna Vinschen 627ef695f2 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-26 09:36:21 +00:00
Yaakov Selkowitz 6bcdc0df58 * new-features.sgml (ov-new1.7.2): Add SIGPWR support. 2010-02-26 09:34:38 +00:00
Yaakov Selkowitz 0512608dbc * include/cygwin/signal.h: Define SIGPWR as synonym for SIGLOST.
* strsig.cc: Ditto.
	* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
2010-02-26 05:43:50 +00:00
Corinna Vinschen 1550b620c9 * lc_era.h (lc_era_t): Fix apparent glibc bug in ja_JP era definition. 2010-02-25 16:55:02 +00:00
Corinna Vinschen a8260e19f9 * utils.sgml (locale): Change description of -a and -av to match
latest changes.
2010-02-25 16:42:59 +00:00
Corinna Vinschen f88331443b * new-features.sgml (ov-new1.7.2): Move stty erase support into
correct category.  Change "console window" to "Windows console".
2010-02-25 16:27:39 +00:00
Corinna Vinschen be71be8e18 * sec_auth.cc (get_full_privileged_inheritable_token): Fix dumb typo
when checking linked token for being a primary token.
2010-02-24 17:30:18 +00:00
Christopher Faylor c6a6b5a3ac * dlfcn.cc (dlopen): Make sure exception handler is really loaded after dynamic
load.
2010-02-24 08:03:44 +00:00
Christopher Faylor fd4a56afe8 * cygtls.cc (_cygtls::init_exception_handler): Force installation of our
exception handler to always be at the beginning.
2010-02-24 00:03:42 +00:00
Corinna Vinschen a2036998b1 * locale.cc (printlocale): Remove.
(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.
2010-02-23 14:07:08 +00:00
Christopher Faylor 7414c24a77 * thread.cc (pthread_mutex::unlock): Don't attempt to unlock if there is an
error.
2010-02-23 07:12:38 +00:00
Christopher Faylor dbf41aeeff * strace.cc (mnemonic_table): Add "special" mask option.
(usage): Document it.
* utils.sgml: Ditto.
2010-02-22 20:39:18 +00:00
Christopher Faylor 478ea460eb * 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 20:36:04 +00:00
Corinna Vinschen 80206d7f71 * cygpath.cc (do_pathconv): Fix erroneously printing native NT path
prefix introduced by previous patch.
2010-02-22 17:40:46 +00:00
Corinna Vinschen f2ecf0ee5b * 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-22 11:01:46 +00:00
Corinna Vinschen bd87c87f81 * locale.cc (lc_time_names): Add "date_fmt" entry. 2010-02-22 10:56:00 +00:00
Corinna Vinschen 5d76584680 * 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 22:10:26 +00:00
Corinna Vinschen 53a918f3d6 * path.cc (warn_msdos): Enforce extended hex printing of multibyte
pathnames.
2010-02-20 09:17:07 +00:00
Christopher Faylor 3afd8b74d9 Update copyright 2010-02-19 20:01:49 +00:00
Christopher Faylor ff3e6bcbec utils/ChangeLog:
* strace.cc (mnemonic_table): Add pthread mask option.
(usage): Document strace pthread mask option.
* utils.sgml: Ditto.

cygwin/ChangeLog:
* include/sys/strace.h: Remove old code.  Add support for ptrace
tracing.
2010-02-19 17:55:27 +00:00
Corinna Vinschen 6c36e83bab * 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 17:30:19 +00:00
Corinna Vinschen f13fe16475 * locale.cc (print_lc_mstrings): New function to print
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.
2010-02-19 17:27:05 +00:00
Corinna Vinschen 1929fc8ece * fhandler_disk_file.cc (fhandler_disk_file::opendir): Try to open
directory with stat()-friendly access mask first.  Explain why.
2010-02-19 13:28:49 +00:00
Corinna Vinschen eb67604071 * 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-19 12:37:37 +00:00
Corinna Vinschen 97c8d005d9 * 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 18:07:14 +00:00
Christopher Faylor 90f5de33d5 * fhandler.cc (fhandler_base::setup_overlapped): Revert to starting with handle
in signalled state as it seems to fix some hangs.
2010-02-18 15:07:38 +00:00
Chris Sutcliffe 954e9f99fb 2010-02-17 LRN <lrn1986@gmail.com>
* include/shlguid.h (IID_IFolderView): Define.
        * include/shlobj.h (IFolderView interface): Define.
        * lib/shell32.c (IID_IFolderView): Export.
2010-02-18 13:01:56 +00:00
Corinna Vinschen 16e235b5ad * new-features.sgml (ov-new1.7.2): Accommodate name change of getlocale
to locale.
	* setup2.sgml (setup-locale-how): Ditto.
2010-02-17 15:02:17 +00:00
Corinna Vinschen ce4f5f76ab * Makefile.in (CYGWIN_BINS): Rename getlocale to locale.
* 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.
2010-02-17 15:01:56 +00:00
Chris Sutcliffe f94e2b9f58 2010-02-14 Roumen Petrov <rumen@users.sourceforge.net>
Issue [2134161]: time64 functions and types for msvcrt >= 8.0
        (initial implementation)

        * new type: __time32_t

        * new structures: _finddata32_t, _finddata32i64_t, _finddata64i32_t,
        __stat32, _stat32i64, _stat64i32, __timeb32, __utimbuf32,
        __wfinddata32_t, _wfinddata32i64_t, _wfinddata64i32_t

        * new functions: _ctime32, _difftime32, _difftime64, _findfirst32
        _findfirst32i64, _findfirst64i32, _findnext32, _findnext32i64,
        _findnext64i32, _fstat32, _fstat32i64, _fstat64i32, _ftime32,
        _futime32, _gmtime32, _localtime32, _mkgmtime32, _mkgmtime64,
        _mktime32, _stat32, _stat32i64, _stat64i32, _time32, _utime32,
        _wctime32, _wfindfirst32, _wfindfirst32i64, _wfindfirst64i32,
        _wfindnext32, _wfindnext32i64, _wfindnext64i32, _wstat32,
        _wstat32i64, _wstat64i32,_wutime32

        * new define _USE_32BIT_TIME_T set 32 or 64 aliases for: time_t,
        ctime, difftime, _findfirst, _findfirsti64, _findnext, _findnexti64,
        _fstat, _fstati64, _ftime, _futime, gmtime, localtime, mktime,
        _stat, _stati64, time, _utime, _wctime, _wfindfirst, _wfindfirsti64,
        _wfindnext, _wfindnexti64, _wstat, _wstati64, _wutime
2010-02-17 02:41:06 +00:00
Corinna Vinschen 0da7a27a1b * new-features.sgml (ov-new1.7.2): Add native DOS path and UNC path
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.
2010-02-15 13:35:53 +00:00
Corinna Vinschen 66f2d8f13e * path.cc (path_conv::check): Treat native DOS paths as "noacl". 2010-02-15 13:29:02 +00:00
Corinna Vinschen 93579594b7 * mount.cc (mount_info::conv_to_win32_path): Set UNC path flags to
cygdrive prefix path flags.
2010-02-15 12:42:31 +00:00
Christopher Faylor 8103e40743 * 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-15 01:45:05 +00:00
Christopher Faylor d67a6ce4a8 * regex/regcomp.c (xwcrtomb): Fix one explicable and one inexcplicable C
warning.
2010-02-14 21:28:44 +00:00
Corinna Vinschen 15a9e17656 * 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-13 12:26:06 +00:00
Corinna Vinschen 03ac74c168 * cygpath.cc (do_pathconv): Fix potential crash. 2010-02-13 11:41:53 +00:00
Corinna Vinschen 6b3f923fe2 * 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 20:17:22 +00:00
Christopher Faylor 2b1407d372 * 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 20:07:13 +00:00
Christopher Faylor 97e5d3ffa4 fix typo 2010-02-12 18:38:59 +00:00
Corinna Vinschen 7bd2296c83 * 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 17:46:39 +00:00