From eed11cf2bb21ad938cfdd73e21174fe987b23841 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 15 Apr 2000 03:52:24 +0000 Subject: [PATCH] * fhandler_console.cc (keytable): Add support for keypad 5 key, which MS seems to think is equivalent to VK_CLEAR. * debug.cc (thread_stub): Eliminate initialization of reent stuff. * init.cc (dll_entry): Move it here. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/debug.cc | 10 ---------- winsup/cygwin/fhandler_console.cc | 1 + winsup/cygwin/init.cc | 6 ++++++ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f2da24eeb..b767a0232 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +Fri Apr 14 23:51:15 2000 Christopher Faylor + + * fhandler_console.cc (keytable): Add support for keypad 5 key, which + MS seems to think is equivalent to VK_CLEAR. + * debug.cc (thread_stub): Eliminate initialization of reent stuff. + * init.cc (dll_entry): Move it here. + Thu Apr 13 18:32:26 2000 Christopher Faylor * dcrt0.cc (insert_file): Avoid freeing previously allocated argument diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc index 99fe1152e..255d0aed0 100644 --- a/winsup/cygwin/debug.cc +++ b/winsup/cygwin/debug.cc @@ -83,16 +83,6 @@ thread_stub (VOID *arg) /* Give up our slot in the start_buf array */ InterlockedExchange (&((thread_start *) arg)->notavail, 0); -#ifdef _MT_SAFE - /* marco@ddi.nl: Needed for the reent's of this local dll thread - I assume that the local threads are using the reent structure of - the main thread - */ - if ( !TlsSetValue(user_data->threadinterface->reent_index, - &user_data->threadinterface->reents) ) - api_fatal(" Sig proc MT init failed\n"); -#endif - /* Initialize this threads ability to respond to things like SIGSEGV or SIGFPE. */ init_exceptions (&except_entry); diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index c7b9a6ec3..47c5ba38d 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -1255,6 +1255,7 @@ static struct { {VK_F11, {"\033[23~", NULL, NULL, NULL}}, {VK_F12, {"\033[24~", NULL, NULL, NULL}}, {VK_NUMPAD5, {"\033[G", NULL, NULL, NULL}}, + {VK_CLEAR, {"\033[G", NULL, NULL, NULL}}, {'6', {NULL, NULL, "\036", NULL}}, {0, {"", NULL, NULL, NULL}} }; diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index 2df50676d..0e660ac3c 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -26,6 +26,12 @@ WINAPI dll_entry (HANDLE h, DWORD reason, void *static_load) dynamically_loaded = (static_load == NULL); break; case DLL_THREAD_ATTACH: + if (user_data->initial_sp) + { + if ( !TlsSetValue(user_data->threadinterface->reent_index, + &user_data->threadinterface->reents)) + api_fatal("Sig proc MT init failed\n"); + } break; case DLL_PROCESS_DETACH: break;