summaryrefslogtreecommitdiff
path: root/libraries/base/cbits/Win32Utils.c
Commit message (Collapse)AuthorAgeFilesLines
* Windows: make openTempFile fully atomic.Tamar Christina2019-09-111-29/+45
|
* Various Windows / Cross Compile to Windows fixesMoritz Angermann2018-03-021-0/+2
| | | | | | | | | | | | | | | - Adds quick-cross-ncg flavour. - Fix windows wchar with `_s` for mingw - Lookup windres, dllwrap and objdump - Fix type. Reviewers: bgamari, hvr, Phyx, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd, carter Differential Revision: https://phabricator.haskell.org/D4430
* Make System.IO.openTempFile thread-safe on WindowsTamar Christina2018-01-021-1/+44
| | | | | | | | | | | | | | | | | | | | | | | This calls out to the Win32 API `GetTempFileName` to generate a temporary file. Using `uUnique = 0` guarantees that the file we get back is unique and the file is "reserved" by creating it. Test Plan: ./validate I can't think of any sensible tests that shouldn't run for a while to verify. So the example in #10731 was ran for a while and no collisions in new code Reviewers: hvr, bgamari, erikd Reviewed By: bgamari Subscribers: RyanGlScott, rwbarton, thomie, carter GHC Trac Issues: #10731 Differential Revision: https://phabricator.haskell.org/D4278
* 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-1/+1
| | | | | | | | | | 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
* GHC.Windows: more error support (guards, system error strings)Joey Adams2012-11-171-27/+42
| | | | | | | | | | | | | | | This changes the output of throwGetLastError to include the system error message, rather than the message of our fictitious errno. It also adds several definitions to GHC.Windows, mostly from the Win32 package. The exceptions are: * getErrorMessage: returns a String, unlike in System.Win32.Types, where it returns an LPWSTR. * errCodeToIOError: new * c_maperrno_func: new
* Allow openTempFile to retry when it hits a directory (#4968).Paolo Capriotti2012-06-071-0/+6
| | | | | | Windows returns an EACCES error instead of EEXIST when a call to `open` fails due to an existing directory, so add a special case for this situation.
* Use in-process file locking on Windows (#4363)Paolo Capriotti2012-05-081-0/+17
|
* Use RTS version of getMonotonicNSec on Windows (#6061)Paolo Capriotti2012-05-081-46/+0
|
* Replace getUSecOfDay with monotonic timer (#5865)Paolo Capriotti2012-04-171-10/+43
|
* Windows: map ERROR_NO_DATA to EPIPE, rather than EINVALSimon Marlow2010-09-151-1/+4
| | | | | | | | | | | | | | | WriteFile() returns ERROR_NO_DATA when writing to a pipe that is "closing", however by default the write() wrapper in the CRT maps this to EINVAL so we get confusing things like hPutChar: invalid argument (Invalid Argumnet) when piping the output of a Haskell program into something that closes the pipe early. This was happening in the testsuite in a few place. The solution is to map ERROR_NO_DATA to EPIPE correctly, as we explicitly check for EPIPE on stdout (in GHC.TopHandler) so we can exit without an error in this case.
* The Windows counterpart to 'wrapround of thread delays'Ian Lynagh2007-02-091-9/+7
|
* dos2unixSimon Marlow2006-12-041-125/+125
|
* don't try to compile this on UnixSimon Marlow2006-12-041-0/+4
|
* Add support for the IO manager thread on WindowsSimon Marlow2006-12-011-0/+121
Fixes #637. The test program in that report now works for me with -threaded, but it doesn't work without -threaded (I don't know if that's new behaviour or not, though).