| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
If the argument doesn't terminate in capital Xs, the C mkstemp will simply bomb out
with zero warning. This was not documented.
By arbitrarily sticking a bunch of Xes at the end of all arguments, we guarantee that
this exception will not be thrown, the type signature will not change, and no existing
code can break (since if it was manually avoiding the exception by adding "XXX" itself,
the temp files will now be simply 3 random characters longer, nothing worse).
|
|
|
|
| |
returned String actually is
|
| |
|
| |
|
|
|
|
| |
Not sure where this patch came from, I found it in my validate tree.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Or at least, it works well enough to run this test. The main GHCi
thread is gone after forking, but the current evaluation continues to
run.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466647
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functions need to be given a new name, and the header files contain
some __asm hackery in order to let the program call the correct function.
This mean that you need to use the header files in order to call the
correct system functions, which prevents things like "foreign import ccall" from working.
Ghc solves this with wrapper functions for some of the renamed functions,
but it has not been updated for newer versions of NetBSD that has recently
versioned some more functions.
The attached patches introduces wrapper functions for all currently
NetBSD-versioned functions used in libraries/unix. Solves ~20 testsuite
failures.
Contributed by: Krister Walfridsson <krister.walfridsson@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
leaving out Windows-specific hacks
|
| |
|
|
|
|
| |
by copying foreign imports here from System.Posix.Internals
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-- | Read data from an 'Fd' into memory. This is exactly equivalent
-- to the POSIX @read@ function.
fdReadBuf :: Fd
-> Ptr Word8 -- ^ Memory in which to put the data
-> ByteCount -- ^ Maximum number of bytes to read
-> IO Bytecount -- ^ Number of bytes read (zero for EOF)
-- | Write data from memory to an 'Fd'. This is exactly equivalent
-- to the POSIX @write@ function.
fdWriteBuf :: Fd
-> Ptr Word8 -- ^ Memory containing the data to write
-> ByteCount -- ^ Maximum number of bytes to write
-> IO ByteCount -- ^ Number of bytes written
|
| |
|
|
|
|
|
|
|
|
| |
Retry with a larger buffer whenever getgrgid_r(3), getgrnam_r(3),
getpwuid_r(3) or getpwnam_r(3) return ERANGE. Suggested in the
examples sections of IEEE Std 1003.1-2008.
While here, change the default for grBufSize back to 1024.
|
| |
|
| |
|
|
|
|
|
|
| |
We now use an EmptyDataDecl rather than recursive newtype as an
argument to Ptr. As well as being prettier, this also avoids an infinite
loop bug in haddock (trac #3066).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The API is the same (for now). The new implementation has the
capability to define signal handlers that have access to the siginfo
of the signal (#592), but this functionality is not exposed in this
patch.
#2451 is the ticket for the new API.
The main purpose of bringing this in now is to fix race conditions in
the old signal handling code (#2858). Later we can enable the new
API in the HEAD.
Implementation differences:
- More of the signal-handling is moved into Haskell. We store the
table of signal handlers in an MVar, rather than having a table of
StablePtrs in the RTS.
- In the threaded RTS, the siginfo of the signal is passed down the
pipe to the IO manager thread, which manages the business of
starting up new signal handler threads. In the non-threaded RTS,
the siginfo of caught signals is stored in the RTS, and the
scheduler starts new signal handler threads.
|
|
|
|
|
|
| |
If they are included into a C file which also has certain symbols
defined, then the behaviour of the HsUnix.h functions can change
(e.g. lstat can become the 32bit, rather than 64bit, version).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also switched to the modern Cabal file format
|