summaryrefslogtreecommitdiff
path: root/libraries/base/cbits/consUtils.c
Commit message (Collapse)AuthorAgeFilesLines
* winio: core threaded I/O managerTamar Christina2020-07-151-2/+2
|
* winio: Multiple refactorings and support changes.Tamar Christina2020-07-151-25/+3
|
* Delete _MSC_VER when not necessary, fix #10511Bernard Desmyter2015-06-121-1/+1
| | | | | | | Simplify some preprocessor expressions involving `_MSC_VER` because `_WIN32` is always defined when `_MSC_VER` is. Differential Revision: https://phabricator.haskell.org/D981
* Removes all occurrences of __MINGW32__ (#10485)Thomas Miedema2015-06-111-2/+2
| | | | | | | | | | In Haskell files, replace `__MINGW32__` by `mingw32_HOST_OS`. In .c and .h files, delete `__MINGW32__` when `_WIN32` is also tested because `_WIN32` is always defined when `__MINGW32__` is. Also replace `__MINGW32__` by `_WIN32` when used standalone for consistency. Differential Revision: https://phabricator.haskell.org/D971
* Fix Windows build; patches frmo ezyangIan Lynagh2010-09-081-2/+2
|
* More accurate isatty test for MinGW.Edward Z. Yang2010-09-071-0/+23
|
* FIX #2189: re-enabled cooked mode for Console-connected Handles on WindowsSimon Marlow2009-03-051-5/+2
| | | | Patch from Sigbjorn Finne <sof@galois.com>
* FIX #2189: re-enabled cooked mode for Console-connected Handles on WindowsSimon Marlow2009-03-051-2/+5
| | | | Patch from Sigbjorn Finne <sof@galois.com>
* reduce dependency on ghcconfig.hRoss Paterson2006-08-111-4/+3
| | | | | | | The only remaining use is in cbits/dirUtils.h, which tests solaris2_HOST_OS (Also System.Info uses ghcplatform.h and several modules import MachDeps.h to get SIZEOF_* and ALIGNMENT_* from ghcautoconf.h)
* [project @ 2005-05-13 16:58:02 by sof]sof2005-05-131-2/+11
| | | | flush_input_console__(): if the fd isn't connected to a console, treat flush as a NOP. Merge to STABLE.
* [project @ 2005-05-06 00:30:56 by sof]sof2005-05-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [mingw only] Work around bug in win32 Console API which showed up in the GHCi UI: if the user typed in characters prior to the appearance of the prompt, the first of these characters always came out as a 'g'. The GHCi UI does for good reasons one-character reads from 'stdin', which causes the underlying APIs to become confused. A simple repro case is the following piece of C code: /*----------------------*/ #include <stdio.h> #include <windows.h> int main() { char ch1,ch2; HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE); DWORD dw; /* Type in some characters before the prompt appears and be amused.. */ sleep(1000); printf("? "); ReadConsoleA(hStdIn,&ch1,1,&dw,NULL); ReadConsoleA(hStdIn,&ch2,1,&dw,NULL); /* or, if you want to use libc: read(0,&ch1,1); read(0,&ch2,1); */ printf("%c%c\n", ch1,ch2); return 0; } /*----------------------*/ This happens across win32 OSes, and I can't see anything untoward as far as API usage goes (the GHC IO implementation uses read(), but that reduces to ReadConsoleA() calls.) People inside the Behemoth might want to have a closer look at this.. Not much we can do about this except work around the problem by flushing the input buffer prior to reading from stdin. Not ideal, as type-ahead is a useful feature. Flushing is handled by GHC.ConsoleHandler.flushConsole Merge to STABLE.
* [project @ 2005-01-28 13:36:25 by simonmar]simonmar2005-01-281-3/+3
| | | | | | | Catch up with updates to platform #defines. Generally: use _HOST_ rather than _TARGET_ (except in Cabal where we have to retain compatibility with previous GHC versions).
* [project @ 2004-08-13 13:29:00 by simonmar]simonmar2004-08-131-1/+1
| | | | | Changes required be merge of backend-hacking-branch. Mostly config.h ==> ghcconfig.h.
* [project @ 2003-10-13 05:21:37 by sof]sof2003-10-131-2/+2
| | | | more mind-numbing CPP tweaking
* [project @ 2002-07-18 22:01:07 by sof]sof2002-07-181-0/+67
helper functions for mucking about with Win32 consoles