| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
| |
This should make my openbsd build slave happy when SplitObjs=NO.
May be useful for other BSDs and even Linux, regardless wether you
need -pthread or -lpthread. Time will tell...
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
We were defining, but not using, sigPOLL
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes, and patch from donn in, trac #2352.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is for #2038: macros are used in the Linux .h includes to redirect
to a 64-bit version when large file support is enabled.
|
|
|
|
|
| |
This is for #2038: macros are used in the Linux .h includes to redirect
to a 64-bit version when large file support is enabled.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As explained in this thread:
http://www.haskell.org/pipermail/haskell-cafe/2008-February/039549.html
getSymbolicLinkStatus (and possibly other functions) return completely
bogus results. This is because hsc2hs returns the offsets for stat64,
but the library is built such that it calls the 32 bit lstat call.
I copied the AC_SYS_LARGEFILE from ghc's configure.ac. So, I believe
the library should now properly autodetect whether your system has
large file support and do the right thing more often. I suspect that
this would still be buggy if ghc was built without large file support,
but the library was built with it enabled. However, as long as
AC_SYS_LARGEFILE returns the same results for 'ghc' and 'unix', things
should be ok ?
|
|
|
|
| |
Fixes trac #2033.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
We used to get
*** Exception: getGroupEntryForName: failed (Success)
Fixes trac #1655
|
| |
|