* include/cygwin/cygwin_dll.h: Update for modern compilers.

* lib/cygwin_crt0.c: Inexplicably need to define alloca for newer compilers.
* fhandler.h (fhandler_console): Add new method.
* fhandler.cc (fhandler_console::set_cursor_maybe): New method.
(fhandler_console::read): Set cursor if it has moved to make it visible.
This commit is contained in:
Christopher Faylor 2000-07-29 04:19:24 +00:00
parent d1baac7725
commit 9eef1530d5
3 changed files with 10 additions and 6 deletions

View File

@ -573,6 +573,7 @@ private:
/* Input calls */ /* Input calls */
int igncr_enabled (); int igncr_enabled ();
int input_tcsetattr (int a, const struct termios *t); int input_tcsetattr (int a, const struct termios *t);
void set_cursor_maybe ();
public: public:

View File

@ -28,8 +28,9 @@ CDECL_BEGIN \
int WINAPI _cygwin_noncygwin_dll_entry (HANDLE h, DWORD reason, void *ptr); \ int WINAPI _cygwin_noncygwin_dll_entry (HANDLE h, DWORD reason, void *ptr); \
\ \
int WINAPI Entry (HANDLE h, DWORD reason, void *ptr); \ int WINAPI Entry (HANDLE h, DWORD reason, void *ptr); \
extern int cygwin_attach_dll (); \ typedef int (*mainfunc) (int, char **, char **); \
extern void cygwin_detach_dll (); \ extern int cygwin_attach_dll (HMODULE, mainfunc); \
extern void cygwin_detach_dll (DWORD); \
CDECL_END \ CDECL_END \
\ \
static HANDLE storedHandle; \ static HANDLE storedHandle; \
@ -41,9 +42,9 @@ static int __dllMain (int a, char **b, char **c) \
return Entry (storedHandle, storedReason, storedPtr); \ return Entry (storedHandle, storedReason, storedPtr); \
} \ } \
\ \
static int dll_index; \ static DWORD dll_index; \
\ \
int WINAPI _cygwin_dll_entry (HANDLE h, DWORD reason, void *ptr) \ int WINAPI _cygwin_dll_entry (HINSTANCE h, DWORD reason, void *ptr) \
{ \ { \
int ret; \ int ret; \
ret = 1; \ ret = 1; \
@ -56,7 +57,7 @@ int WINAPI _cygwin_dll_entry (HANDLE h, DWORD reason, void *ptr) \
storedReason = reason; \ storedReason = reason; \
storedPtr = ptr; \ storedPtr = ptr; \
dll_index = cygwin_attach_dll (h, &__dllMain); \ dll_index = cygwin_attach_dll (h, &__dllMain); \
if (dll_index == -1) \ if (dll_index == (DWORD) -1) \
ret = 0; \ ret = 0; \
} \ } \
break; \ break; \
@ -67,7 +68,7 @@ int WINAPI _cygwin_dll_entry (HANDLE h, DWORD reason, void *ptr) \
if (ret) \ if (ret) \
{ \ { \
cygwin_detach_dll (dll_index); \ cygwin_detach_dll (dll_index); \
dll_index = -1; \ dll_index = (DWORD) -1; \
} \ } \
} \ } \
break; \ break; \

View File

@ -13,6 +13,8 @@ details. */
#include <sys/cygwin.h> #include <sys/cygwin.h>
#include "crt0.h" #include "crt0.h"
#define alloca __builtin_alloca
extern void dll_crt0__FP11per_process (struct per_process *) __declspec (dllimport) __attribute ((noreturn)); extern void dll_crt0__FP11per_process (struct per_process *) __declspec (dllimport) __attribute ((noreturn));
/* for main module */ /* for main module */