1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-26 21:20:30 +02:00

Windows 11: for fport input from the console, ignore terminal returns

There is an apparent bug in Windows 11 (not Windows 10) where,
when reading from an fd backed by the Console, a single
return character will always be available.

* libguile/posix-w32.c (console_has_return_keyevent_w32): new procedure
* libguile/posix-w32.h: declare console_has_return_keyevent_w32
* libguile/fports.c [__MINGW32__](fport_input_waiting): ignore return keyevent
This commit is contained in:
Michael Gran 2023-06-20 16:04:59 -07:00
parent adbf2156ab
commit af96820e07
3 changed files with 63 additions and 1 deletions

View file

@ -74,6 +74,7 @@ SCM_INTERNAL void *dlopen_w32 (const char *name, int flags);
SCM_INTERNAL void *dlsym_w32 (void *handle, const char *name);
SCM_INTERNAL int dlclose_w32 (void *handle);
SCM_INTERNAL char *dlerror_w32 (void);
SCM_INTERNAL int console_has_return_keyevent_w32 (int fdes);
SCM_INTERNAL int getpagesize_w32 (void);
#define HAVE_UNAME 1