summaryrefslogtreecommitdiff
path: root/libraries/base/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Use "-- //" (2 spaces) rather than "-- //" (1) to avoid tripping haddock upIan Lynagh2007-06-272-4/+4
| | | | Are we nearly there yet?
* Use a combination of Haskell/C comments to ensure robustness.Malcolm.Wallace@cs.york.ac.uk2007-06-262-25/+27
| | | | | e.g. -- // ensures that _no_ preprocessor will try to tokenise the rest of the line.
* Change C-style comments to Haskell-style.Malcolm.Wallace@cs.york.ac.uk2007-06-252-11/+11
| | | | | | | | | | These two headers are only ever used for pre-processing Haskell code, and are never seen by any C tools except cpp. Using the Haskell comment convention means that cpphs no longer needs to be given the --strip option to remove C comments from open code. This is a Good Thing, because all of /* */ and // are valid Haskell operator names, and there is no compelling reason to forbid using them in files which also happen to have C-preprocessor directives.
* update prototype following inputReady->fdReady changeSimon Marlow2007-06-141-1/+1
|
* Split off process packageIan Lynagh2007-05-232-58/+0
|
* Split off directory, random and old-time packagesIan Lynagh2007-05-193-77/+0
|
* HsByteArray doesn't existIan Lynagh2007-04-041-2/+2
|
* Fix C/Haskell type mismatchesIan Lynagh2007-04-033-51/+51
|
* Fix type mismatches between foreign imports and HsBase.hIan Lynagh2007-04-031-47/+46
| | | | Merge to stable, checking for interface changes.
* fix to getUSecOfDay(): arithmetic was overflowingSimon Marlow2007-02-141-1/+4
|
* The Windows counterpart to 'wrapround of thread delays'Ian Lynagh2007-02-091-1/+1
|
* wrapround of thread delaysNeil Davies2007-01-291-8/+6
| | | | | | | | | * made the wrapround of the underlying O/S occur before the wrapround of the delayed threads by making threads delay in microseconds since O/S epoch (1970 - Unix, 1601 - Windows) stored in Word64. * removed redundant calls reading O/S realtime clock * removed rounding to 1/50th of sec for timers * Only for Unix version of scheduler.
* Use static inline rather than extern inline/inlineIan Lynagh2007-02-051-3/+1
| | | | | | I understand this is more portable, and it also fixes warnings when C things we are wrapping are themselves static inlines (which FD_ISSET is on ppc OS X).
* Add support for the IO manager thread on WindowsSimon Marlow2006-12-011-0/+6
| | | | | | 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-242-117/+0
|
* Sync Data.ByteString with current stable branch, 0.7Don Stewart2006-08-231-5/+5
|
* eliminate more HOST_OS testsRoss Paterson2006-08-154-25/+27
|
* reduce dependency on ghcconfig.hRoss Paterson2006-08-111-2/+0
| | | | | | | 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)
* remove spurious 'extern "C" {'Simon Marlow2006-07-241-1/+0
|
* 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.
* remove dead codeSimon Marlow2006-06-221-8/+0
|
* #define _REENTRANT 1 (needed to get the right errno on some OSs)Simon Marlow2006-05-181-0/+5
| | | | | Part 2 of the fix for threaded RTS problems on Solaris and possibly *BSD (Part 1 was the same change in ghc/includes/Rts.h).
* portable implementation of WordPtr/IntPtr for non-GHCRoss Paterson2006-05-101-0/+11
| | | | plus much tweaking of imports to avoid cycles
* Sync with FPS headdons@cse.unsw.edu.au2006-05-031-2/+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-3/+2
|
* Import Data.ByteString from fps 0.5.Don Stewart2006-04-281-0/+9
| | | | | Fast, packed byte vectors, providing a better PackedString.
* [project @ 2005-11-30 16:56:24 by simonmar]simonmar2005-11-301-0/+1
| | | | | | | | | | - move forkIO into GHC.Conc, so that the I/O manager can use proper forkIO with an exception handler. This required TopHandler.lhs-boot. It's the right thing, though, since the forkIO implementation is GHC-specific. - check for out-of-range file descriptors in the I/O manager, rather than just exploding. The I/O manager will exit ungracefully, but at least there will be an error message.
* [project @ 2005-09-19 23:24:31 by ross]ross2005-09-191-3/+3
| | | | For compilers other than MSVC and GCC, assume inline has the C99 semantics.
* [project @ 2005-07-26 09:37:27 by ross]ross2005-07-261-0/+4
| | | | PrelHandle functions are only needed by GHC
* [project @ 2005-05-06 00:30:56 by sof]sof2005-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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-04-05 08:38:24 by simonmar]simonmar2005-04-051-0/+4
| | | | | Determine the location of CMD.EXE (or COMMAND.COM) using the same algorithm as system() from msvcrt.
* [project @ 2005-03-27 13:41:19 by panne]panne2005-03-271-1/+1
| | | | | | | | | | * 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-19 02:03:26 by sof]sof2005-03-191-0/+8
| | | | | | | | | | | | [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-14 12:18:05 by simonmar]simonmar2005-03-142-0/+25
| | | | | | | 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-02 16:39:56 by ross]ross2005-03-021-1/+3
| | | | *Config.h files are in include/ (MERGE to STABLE)
* [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-312-39/+3
| | | | | | | | | | 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-3/+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-283-24/+24
| | | | | | | 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-05 21:30:05 by krasimir]krasimir2005-01-051-0/+12
| | | | | | Added implementation for hSetFileSize. The configure script checks for _chsize (usially Windows) and ftruncate (Linux) C functions and the package uses one of them to implement hSetFileSize.
* [project @ 2005-01-01 23:59:58 by krasimir]krasimir2005-01-022-7/+19
| | | | | | | | 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-06 16:34:25 by panne]panne2004-11-061-4/+0
| | | | | | | | | | | | | 'd->d_name' (where d is of type 'struct dirent*') should always return a pointer to the directory entry's name, regardless if dirent is defined as struct dirent { ... ; char d_name[...]; } or struct dirent { ... ; char* d_name; } No need for autoconf trickery here.
* [project @ 2004-11-06 13:01:18 by panne]panne2004-11-062-3/+11
| | | | | | | | | | | * Changed some '#include "ghcconfig.h"' to '#include "HsBaseConfig.h"' (or added the latter), tracking the recent autoconf-related changes. * Continued my crusade against CVS keywords. * Made CTypes.h self-contained. * Protected headers against multiple inclusions.
* [project @ 2004-10-14 14:58:50 by simonmar]simonmar2004-10-141-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-08 12:04:48 by ross]ross2004-10-081-3/+3
| | | | revert previous change, so now these includes don't define PACKAGE_*
* [project @ 2004-10-06 23:45:37 by dons]dons2004-10-061-3/+3
| | | | Fix order of PACKAGE_* #undefs. They must appear before HsBaseConfig.h
* [project @ 2004-10-06 11:11:34 by ross]ross2004-10-061-0/+5
| | | | | Add getEnvironment from hslibs/lang/SystemExts. This differs from the System.Posix.Env version in not failing if an entry lacks an '=' sign.
* [project @ 2004-10-06 10:13:07 by ross]ross2004-10-061-14/+8
| | | | make the evil PACKAGE_* hacks consistent
* [project @ 2004-10-05 07:43:07 by mthomas]mthomas2004-10-051-2/+2
| | | | Nonexistent file stopped entire install for libraries.
* [project @ 2004-10-02 07:14:38 by dons]dons2004-10-021-0/+15
| | | | | | Undef PACKAGE_NAME PACKAGE_STRING PACKAGE_BUGREPORT PACKAGE_TARNAME coming in from ghcconfig.h, so that we can use HsBaseConfig.h versions without screenfulls of cpp warnings.