summaryrefslogtreecommitdiff
path: root/libraries/base/cbits
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove bits left over from the old build systemIan Lynagh2007-08-111-20/+0
|
* bytestring is now in its own packageIan Lynagh2007-07-291-82/+0
|
* Split off process packageIan Lynagh2007-05-232-636/+0
|
* Split off directory, random and old-time packagesIan Lynagh2007-05-192-59/+0
|
* FIX: #724 (tee complains if used in a process started by ghc)Simon Marlow2007-05-071-4/+9
| | | | | | | | | | | | | | | | Now, we only set O_NONBLOCK on file descriptors that we create ourselves. File descriptors that we inherit (stdin, stdout, stderr) are kept in blocking mode. The way we deal with this differs between the threaded and non-threaded runtimes: - with -threaded, we just make a safe foreign call to read(), which may block, but this is ok. - without -threaded, we test the descriptor with select() before attempting any I/O. This isn't completely safe - someone else might read the data between the select() and the read() - but it's a reasonable compromise and doesn't seem to measurably affect performance.
* HsByteArray doesn't existIan Lynagh2007-04-041-2/+2
|
* Fix C/Haskell type mismatchesIan Lynagh2007-04-033-64/+64
|
* Fix type mismatches between foreign imports and HsBase.hIan Lynagh2007-04-031-4/+6
| | | | Merge to stable, checking for interface changes.
* 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-012-100/+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).
* C regex library bits have moved to the regex-posix packageSimon Marlow2006-08-2413-4323/+0
|
* Sync Data.ByteString with current stable branch, 0.7Don Stewart2006-08-231-18/+18
|
* reduce dependency on ghcconfig.hRoss Paterson2006-08-117-16/+16
| | | | | | | 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)
* Import Data.ByteString.Lazy, improve ByteString Fusion, and resync with FPS headDon Stewart2006-07-011-5/+5
| | | | | | | | | This patch imports the Data.ByteString.Lazy module, and its helpers, providing a ByteString implemented as a lazy list of strict cache-sized chunks. This type allows the usual lazy operations to be written on bytestrings, including lazy IO, with much improved space and time over the [Char] equivalents.
* Sync with FPS headdons@cse.unsw.edu.au2006-05-031-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | This patch brings Data.ByteString into sync with the FPS head. The most significant of which is the new Haskell counting sort. Changes: Sun Apr 30 18:16:29 EST 2006 sjanssen@cse.unl.edu * Fix foldr1 in Data.ByteString and Data.ByteString.Char8 Mon May 1 11:51:16 EST 2006 Don Stewart <dons@cse.unsw.edu.au> * Add group and groupBy. Suggested by conversation between sjanssen and petekaz on #haskell Mon May 1 16:42:04 EST 2006 sjanssen@cse.unl.edu * Fix groupBy to match Data.List.groupBy. Wed May 3 15:01:07 EST 2006 sjanssen@cse.unl.edu * Migrate to counting sort. Data.ByteString.sort used C's qsort(), which is O(n log n). The new algorithm is O(n), and is faster for strings larger than approximately thirty bytes. We also reduce our dependency on cbits!
* Merge in Data.ByteString head. Fixes ByteString+cbits in hugsDon Stewart2006-04-291-12/+16
|
* Import Data.ByteString from fps 0.5.Don Stewart2006-04-281-0/+88
| | | | | Fast, packed byte vectors, providing a better PackedString.
* Track the GHC source tree reorganisationSimon Marlow2006-04-072-2/+2
|
* declare blkcmp() staticSimon Marlow2006-02-231-1/+1
|
* [project @ 2005-12-02 12:26:22 by simonmar]simonmar2005-12-021-1/+2
| | | | | | | | | | | | | | | Apply rev 1.24 from FreeBSD's copy of this file. Commit message from FreeBSD: The algorithm that computes the tables used in the BM search algorithm sometimes access an array beyond it's length. This only happens in the last iteration of a loop, and the value fetched is not used then, so the bug is a relatively innocent one. Fix this by not fetching any value on the last iteration of said loop. Submitted by: MKI <mki@mozone.net> This is the cause of bug #1194393 (crash in darcs on Windows).
* [project @ 2005-11-11 14:41:01 by simonmar]simonmar2005-11-111-1/+1
| | | | | | | | | | waitForProcess: if the process died with a signal, just return the exit status rather than EINTR. This means a segfault shows up as (ExitFailure 139) rather than an exception complaining about system call interruption. If the client wants a more unix-ish interpretation, they probably should be using System.Posix.Process anyway.
* [project @ 2005-11-11 12:01:58 by simonmar]simonmar2005-11-111-6/+0
| | | | | | | | On Windows, attach a finalizer to the ProcessHandle so that we can call CloseHandle() when the handle is no longer in use. Previously we were calling CloseHandle() in waitForProcess and terminateProcess, which prevented making multiple calls to these functions on the same handle.
* [project @ 2005-08-01 13:23:22 by simonmar]simonmar2005-08-011-6/+14
| | | | | | Fix [ ghc-Bugs-1249226 ] runInteractiveProcess and closed stdin.
* [project @ 2005-07-22 10:18:51 by simonmar]simonmar2005-07-221-2/+6
| | | | | | check the return value of chdir() [ 1242598 ] runProcess uses cwd for bad working directory argument
* [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-03-27 13:41:19 by panne]panne2005-03-271-555/+555
| | | | | | | | | | * Some preprocessors don't like the C99/C++ '//' comments after a directive, so use '/* */' instead. For consistency, a lot of '//' in the include files were converted, too. * UnDOSified libraries/base/cbits/runProcess.c. * My favourite sport: Killed $Id$s.
* [project @ 2005-03-21 18:04:48 by sof]sof2005-03-211-11/+13
| | | | | | | __hscore_getFolderPath(): Don't limit ourselves to shell32.dll, look up shfolder.dll too. Merge to STABLE.
* [project @ 2005-03-19 02:03:26 by sof]sof2005-03-191-0/+42
| | | | | | | | | | | | [Windows only] for System.Directory / Compat.Directory functionality that probes the OS for local details re: misc user directories, perform late binding of SHGetFolderPath() from shell32.dll, as it may not be present. (cf. ghc-6.4's failure to operate on Win9x / NT boxes.) If the API isn't there, fail with UnsupportedOperation. Packages.readPackageConfigs: gracefully handle excns from getAppUserDataDirectory. Merge to STABLE.
* [project @ 2005-03-18 17:28:08 by krasimir]krasimir2005-03-181-3/+14
| | | | | | | | HACK: The redirection of standard handles under Windows is a little bit tricky because we have to take in account that the application can be GUI. The commit affects only Windows GUI applications. MERGE TO STABLE
* [project @ 2005-03-16 10:55:04 by simonmar]simonmar2005-03-161-1/+6
| | | | Back-port changes from WCsubst.c:iswprint()
* [project @ 2005-03-15 13:38:27 by simonmar]simonmar2005-03-151-1/+6
| | | | patch for iswprint() from Dimitry.
* [project @ 2005-03-14 15:57:57 by simonmar]simonmar2005-03-141-0/+339
| | | | Add the script used to generate WCsubst.c
* [project @ 2005-03-14 15:22:51 by simonmar]simonmar2005-03-141-1/+0
| | | | | - isDigit only returns True for ASCII digits - Export the new predicates from Data.Char
* [project @ 2005-03-14 12:18:05 by simonmar]simonmar2005-03-141-0/+3095
| | | | | | | Add Dimitry Golubovsky <dimitry@golubovsky.org>'s Unicode character class implementation. This will remove the dependency on libc's locale code and give us much more consistent support for Unicode across platforms.
* [project @ 2005-03-07 10:40:44 by simonmar]simonmar2005-03-071-3/+11
| | | | merge rev. 1.4.2.1 to HEAD
* [project @ 2005-02-01 00:52:20 by ross]ross2005-02-011-1/+2
| | | | more regex test down to libraries/base
* [project @ 2005-01-31 13:51:22 by simonmar]simonmar2005-01-311-19/+12
| | | | | | | | | | Some improvements to System.Cmd.{system,rawSystem} on Un*x systems: these commands now do the appropriate signal handling, namely ignoring SIGINT/SIGQUIT in the parent but allowing these signals in the child. This behaviour matches the Un*x system(). What this means is that when System.Cmd.system is executing, ^C only kills the child process, the parent will see an exception.
* [project @ 2005-01-28 23:33:57 by krasimir]krasimir2005-01-281-42/+0
| | | | | | | | - The output from uncaught exceptions handler is redirected to RTS's errorBelch. - The output from Debug.Trace is redirected to RTS's debugBelch - Usually errorBelch and debugBelch messages go to stderr except for Windows GUI applications. For GUI applications the Debug.Trace output is redirected to debug console and the exceptions message is displayed in message box.
* [project @ 2005-01-28 13:36:25 by simonmar]simonmar2005-01-287-14/+14
| | | | | | | 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 @ 2005-01-18 15:08:39 by simonmar]simonmar2005-01-181-1/+26
| | | | | Win32: attempt to make inputReady() work on pipes too. Fixes bug #995658.
* [project @ 2005-01-01 23:59:58 by krasimir]krasimir2005-01-021-44/+13
| | | | | | | | According to the documentation, the Haskell implementation of Handle should implement single writer/multiple readers locking but the current implementation doesn't work under Windows. This commit fixes this using '_sopen' function instead of 'open'. The former allows to implement system level locking on Windows. The changes doesn't affect other platforms.
* [project @ 2004-11-10 11:27:54 by simonmar]simonmar2004-11-102-152/+1
| | | | | Move the compatibility code for rawSystem from libraries/base into ghc/lib/compat.
* [project @ 2004-10-14 14:58:50 by simonmar]simonmar2004-10-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Threaded RTS improvements: - Unix only: implement waitRead#, waitWrite# and delay# in Haskell, by having a single Haskell thread (the IO manager) performing a blocking select() operation. Threads communicate with the IO manager via channels. This is faster than doing the select() in the RTS, because we only restart the select() when a new request arrives, rather than each time around the scheduler. On Windows we just make blocking IO calls, we don't have a fancy IO manager (yet). - Simplify the scheduler for the threaded RTS, now that we don't have to wait for IO in the scheduler loop. - Remove detectBlackHoles(), which isn't used now (not sure how long this has been unused for... perhaps it was needed back when main threads used to be GC roots, so we had to check for blackholes manually rather than relying on the GC.) Signals aren't quite right in the threaded RTS. In fact, they're slightly worse than before, because the thread receiving signals might be blocked in a C call - previously there always be another thread stuck in awaitEvent() that would notice the signal, but that's not true now. I can't see an easy fix yet.
* [project @ 2004-10-07 13:13:22 by stolz]stolz2004-10-071-1/+1
| | | | | Bring declaration of runProcess back in line with prototype: pid_t (ProcHandle) isn't compatible with int on SunOS.
* [project @ 2004-09-30 08:54:00 by simonmar]simonmar2004-09-301-2/+2
| | | | Update the signature of execvpe() to match the one in HsBase.
* [project @ 2004-09-29 22:48:06 by krasimir]krasimir2004-09-291-2/+7
| | | | | compile execvpe only under Unix. The mingw's process.h header also contains definition for execvpe which conflicts with our definition.
* [project @ 2004-09-29 15:50:51 by simonmar]simonmar2004-09-295-82/+720
| | | | | | | | | | | | | | Process reorganisation: the System.Process library moves into base, and System.Cmd is re-implemented in terms of it. Thanks to Krasimir Angelov, we have a version of System.Process that doesn't rely on the unix or Win32 libraries. Normally using unix/Win32 would be the right thing, but since we want to implement System.Cmd on top of this, and GHC uses System.Cmd, we can't introduce a bunch of .hsc dependencies into GHC's bootstrap libraries. So, the new version is larger, but has fewer dependencies. I imagine it shouldn't be too hard to port to other compilers.