summaryrefslogtreecommitdiff
path: root/ghc/lib/std/cbits/stgio.h
Commit message (Collapse)AuthorAgeFilesLines
* [project @ 2001-05-18 21:19:11 by qrczak]qrczak2001-05-181-175/+0
| | | | Remove and don't install: stgio.h, stgerror.h, fileObject.h.
* [project @ 2001-05-08 08:55:17 by simonmar]simonmar2001-05-081-5/+1
| | | | | Drop in CPUTime library replacement. Still needs to be ported to Win32.
* [project @ 2001-04-02 16:10:32 by rrt]rrt2001-04-021-14/+2
| | | | | Remove old mingwin kludgery; using the latest version of mingwin from CVS, things now work.
* [project @ 2001-03-01 12:25:32 by rrt]rrt2001-03-011-1/+12
| | | | | Apply stat fix for mingw. It's ugly, it's implausible, but it seems to work. Unlike Cygwin...(missing no. 3).
* [project @ 2001-02-28 14:24:46 by sewardj]sewardj2001-02-281-2/+2
| | | | Don't do a prototype for tcSetAttr if !HAVE_TERMIOS_H.
* [project @ 2001-01-16 14:06:14 by simonmar]simonmar2001-01-161-74/+7
| | | | | | | | | Fix a problem with our use of tcsetattr() which caused background processes to stop when the buffering mode, or the echo status, was changed. tcSetAttr() is a wrapper around tcsetattr() that temporarily blocks SIGTTOU around the call.
* [project @ 2000-11-07 10:42:55 by simonmar]simonmar2000-11-071-4/+6
| | | | | merge before-ghci -> before-ghci-branch-merged into the ghc (non-compiler) parts of the tree.
* [project @ 2000-08-24 10:27:01 by simonmar]simonmar2000-08-241-2/+5
| | | | | | | Change implementation of Directory.getPermissions to use access(2) rather than stat(2). This is rather more sensible as the permissions returned will be relevant to the current user rather than the owner of the file.
* [project @ 2000-06-19 13:28:35 by simonmar]simonmar2000-06-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time fixes from Michael Weber <michael.weber@post.rwth-aachen.de>: * `toClockTime' previously didn't honor the `tz' field of a `CalendarTime', which led to time warping when applying => (toUTCTime (toClockTime ... (toUTCTime (toClockTime someTime) ... ))) continuously. Now it accepts at least <local>- and UTC-encoded `CalendarTime's (TODO: test, whether all timezones work) and converts them correctly to <secs from epoch>-format (which is always UTC, as one might have guessed). * `addToClockTime' now works. Previously, `tz' seconds were added(!) when used like: => addToClockTime noTimeDiff someTime which is clearly wrong. Now, the following (hopefully) always holds => someTime == (addToClockTime noTimeDiff someTime) * `diffClockTimes' works correctly, and is the dual to `addToClockTime', i.e. => diff == ((addToClockTime diff someTime) `diffClockTimes` someTime) should now hold for all diff, someTime Previously, it reports ugly diffs at {min,hour,day,...}-breaks, for example: => "2000/06/18 01:00 UTC" `diffClockTimes` "2000/06/17 23:00 UTC" == 1 day, -22 hours whereas now it emits "7200 secs". This number can be converted with `normalizeTimeDiff' to "2 hours". * added `normalizeTimeDiff', which calculates year, month, days, etc. out of an unnormalized `TimeDiff' (generated by `diffClockTimes', for example) * `formatTimeDiff': added the missing "%c" case. The format is proprietary, though... Is there a nicer one?
* [project @ 2000-05-28 17:47:27 by panne]panne2000-05-281-3/+3
| | | | | | | | | The C functions toLocalTime and toUTCTime now return an StgInt, not a rather useless StgAddr. This fixes two gcc warnings during the compilation of Time. In the course of this, toLocalTime.c and toUTCTime.c are synched a little bit more. (*please merge*)
* [project @ 2000-05-18 11:33:21 by panne]panne2000-05-181-1/+3
| | | | Add addrOf_ErrorHdrHook prototype
* [project @ 2000-04-12 17:33:16 by simonmar]simonmar2000-04-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This commit fixes the trace/stderr problem, and also fixes some other problems with the I/O library. - handles now contain a list of free buffers, which are guaranteed to be the same size as the primary handle buffer. - hPutStr now doesn't evaluate any part of the input string with the handle locked. Instead, it acquires a buffer from the handle copies characters into it, then commits the buffer. This is better for concurrency too, because the handle is only locked while we're actually reading/writing, not while evaluating. - there were an even number of off-by-one errors in the I/O system which compensated for each other. This has been fixed. - made the I/O subsystem a little more exception-safe. It still isn't totally exception-safe, but I can't face doing that without a complete rewrite of this thing in Haskell. - add hPutBufFull and hGetBufFull. The compiler probably needs to be updated to use these too.
* [project @ 2000-04-11 20:44:17 by panne]panne2000-04-111-5/+4
| | | | | | | | | | | | | | | | | | Cleaning up the foreign object naming mess: * Renamed the primop from makeForeignObj# to mkForeignObj#, this is more consistent with the old Foreign.mkForeignObj. * PrelForeign now exports makeForeignObj with the new signature. * freeFile.c now uses StgAddr instead of StgForeignObj, this removes the need for some fixIOs. * Lots of import tweaking to prepare The Big Foreign Renamer, which will move most of Foreign to ForeignObj, and FFI to Foreign. Note: I've tried to track the changes in the interpreter sources, but didn't test them.
* [project @ 2000-03-10 15:23:40 by simonmar]simonmar2000-03-101-4/+4
| | | | | | Fix h{Fill,Put}Buf(BA)?. They now work in the presence of partial/blocking reads and writes, and hPutBuf now doesn't hold on to the handle while it's blocking.
* [project @ 1999-12-08 15:47:06 by simonmar]simonmar1999-12-081-17/+17
| | | | misc ansification and -Wall cleanup
* [project @ 1999-11-26 16:25:55 by simonmar]simonmar1999-11-261-10/+7
| | | | Rename error.h to stgerror.h
* [project @ 1999-09-30 15:50:02 by sof]sof1999-09-301-2/+2
| | | | Simplified the interface between CPUTime.getCPUTime and getCPUTime()
* [project @ 1999-09-30 12:42:25 by sof]sof1999-09-301-2/+2
| | | | primGetClockTime was incorrectly calling prim_getClockTime; fixed dormant bug in Show instance for ClockTime
* [project @ 1999-09-19 19:26:57 by sof]sof1999-09-191-6/+8
| | | | updates
* [project @ 1999-09-12 14:26:32 by sof]sof1999-09-121-1/+2
| | | | | | Let's try again - added get_ZONE(), which retrieves current timezone string. Need to do this since cygwin doesn't initialise its tzname[] properly (=> need to call tzset() explicitly.)
* [project @ 1999-02-04 12:13:15 by sof]sof1999-02-041-2/+2
| | | | | | | | | | | | - relax the restriction that just the one open writeable handle on *the same file* may exist when dealing with the standard handles, stdout and stderr. Reason: the following invocation of a Haskell program, foo >log 2>&1 should be acceptable.
* [project @ 1999-01-15 17:54:20 by sof]sof1999-01-151-1/+2
| | | | | | | | | | | | | | | | | | | | Re-integrated mod. that seems to have been dropped on the floor when new-rts moved back onto the main trunk. Here's the commit msg. that was originally used: Extend hConnectTo to also allow output handles to be connected, i.e., h1 <- openFile "foo" WriteMode h2 <- openFile "bar" WriteMode hConnectTo h1 h2 will cause h1's buffer to be flushed when h2's buffer overflows (and it is just about to be flushed.) The implementation is currently not as lazy as that, it flushes h1's buffer regardless of whether a write to h2 causes h2's buffer to overflow or not. This is used to connect 'stderr' and 'stdout', i.e., output on 'stderr' will now cause 'stdout' output to (first) be flushed.
* [project @ 1998-12-02 13:17:09 by simonm]simonm1998-12-021-168/+224
| | | | Move 4.01 onto the main trunk.
* [project @ 1998-11-23 15:44:21 by sof]sof1998-11-231-0/+1
| | | | | | | | | | | | | | | | Extend hConnectTo to also allow output handles to be connected, i.e., h1 <- openFile "foo" WriteMode h2 <- openFile "bar" WriteMode hConnectTo h1 h2 will cause h1's buffer to be flushed when h2's buffer overflows (and it is just about to be flushed.) The implementation is currently not as lazy as that, it flushes h1's buffer regardless of whether h2's buffer overflows or not. This is used to connect 'stderr' and 'stdout', i.e., output on 'stderr' will now cause 'stdout' output to (first) be flushed.
* [project @ 1998-11-11 17:40:07 by sof]sof1998-11-111-2/+2
| | | | Fixed endian bug that struck when outputting on non-buffered handles
* [project @ 1998-08-14 12:42:01 by sof]sof1998-08-141-6/+48
| | | | Beefed up IO stub functions to not have to rely on stdio any longer
* [project @ 1998-06-29 14:53:00 by sof]sof1998-06-291-0/+5
| | | | New functions for getting/setting terminal echo via handles; allow non-std setting/getting of buffering on semi-closed handles
* [project @ 1998-05-12 16:40:09 by sof]sof1998-05-121-0/+1
| | | | | | | | - closeFile: make sure that (FILE*)s pointing to non-regular, unlocked files (sockets, FDs etc.) are closed. - new function: openFd, which implements process local file locking for files that are initially opened by the Posix Fd-based ops before being converted into a Haskell handle by Posix.fdToHandle
* [project @ 1998-04-22 12:44:36 by sof]sof1998-04-221-3/+4
| | | | Simplified C stubs used to implement Directory.getDirectoryContents
* [project @ 1998-02-02 17:27:26 by simonm]simonm1998-02-021-0/+133
Library re-organisation: All libraries now live under ghc/lib, which has the following structure: ghc/lib/std -- all prelude files (libHS.a) ghc/lib/std/cbits ghc/lib/exts -- standard Hugs/GHC extensions (libHSexts.a) -- available with '-fglasgow-exts' ghc/lib/posix -- POSIX library (libHSposix.a) ghc/lib/posix/cbits -- available with '-syslib posix' ghc/lib/misc -- used to be hslibs/ghc (libHSmisc.a) ghc/lib/misc/cbits -- available with '-syslib misc' ghc/lib/concurrent -- Concurrent libraries (libHSconc.a) -- available with '-concurrent' Also, several non-standard prelude modules had their names changed to begin with 'Prel' to reduce namespace pollution. Addr ==> PrelAddr (Addr interface available in 'exts') ArrBase ==> PrelArr CCall ==> PrelCCall (CCall interface available in 'exts') ConcBase ==> PrelConc GHCerr ==> PrelErr Foreign ==> PrelForeign (Foreign interface available in 'exts') GHC ==> PrelGHC IOHandle ==> PrelHandle IOBase ==> PrelIOBase GHCmain ==> PrelMain STBase ==> PrelST Unsafe ==> PrelUnsafe UnsafeST ==> PrelUnsafeST