| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It's very unlikely the current `unix` code stands any chance of even
remotely work with Hugs...
|
| |
|
|
|
|
|
|
| |
We haven't properly supported Windows for some time now, and we wouldn't
have any way to test anyway, since GHC doesn't support Cygwin anymore
either.
|
|
|
|
|
| |
This avoids incompatible-pointer warnings from the c-compiler when using
`CApiFFI`
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Since the primary purpose of `tcdrain(3)` is to block it makes much more
sense to use a `safe` FFI import.
|
|
|
|
|
|
| |
This follows the scheme suggested in #24
This fixes #55
|
|
|
|
|
|
|
|
|
| |
This all started in e968172cb0c9f4fc653c775faf3ecb661f5b1948 which tried
to get rid of redundant import warnings. But we should rather err on
having to tolerate a few warnings on exotic configurations rather than
breaking a build...
This hopefully fixes #36
|
|
|
|
|
|
|
|
|
|
| |
This patch does not modify the `BaudRate` structure but rather causes
some functions taking a `BaudRate` to throw exceptions on systems which
don't provide `B57600` and/or `B115200`. I'm not totally happy with this
patch yet, but this unbreaks compilation on platforms which don't define
at least of these constants.
This fixes #51
|
| |
|
| |
|
|
|
|
| |
This was forgotten in e14fbe2cb3bbd604dadcc3847882ca37edf548b3
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems these two signals have not been working since at least
2009. Detection of these signals seems to have never been added to
the configure.ac script and the code guarded by #ifdef then bit-rotted
(the idiom used to handle these signals seems to have been abandoned
for something simpler/better in 2009). This fix simply handles these
signals the same way the other signals are handled in
System/Posix/Signals.hsc.
Closes #30 and #31
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds two new functions in `System.Posix.Unistd`
- `fileAdvise` (aka `posix_fadvise(2)`), and
- `fileAllocate` (aka `posix_fallocate(2)`)
This is based in part on #7 and has been heavily refactored from its
original patch submission by Ricardo Catalinas Jiménez.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds two new functions in `System.Posix.Unistd`
- `fileSynchronise` (aka `fsync(2)`), and
- `fileSynchroniseDataOnly` (aka `fdatasync(2)`)
This is based on part of #7 and has been heavily refactored from its
original patch submission by Ricardo Catalinas Jiménez.
This also bumps version to 2.7.1.0 as a minor version bump is now needed.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous code was prone to conflicts with when the platform happens
to expose a `execvpe(3)` implementation in its libc.
This commit renames the internal implementation to `__hsunix_execvpe` as
well as adding an autoconf-detection for the presence of `execvpe(3)`,
in which case `__hsunix_execvpe()` forwards the call to `execvpe(3)`.
Moreover, the code has been cleaned up to remove likely bitrotted CPP
conditionals.
This should fix #22
(This also partially addresses #11 on platforms which have a
libc-provided `execvpe(3)`)
|
|
|
|
| |
Closes #27
|
|\
| |
| | |
`System.Posix.Files.fileAccess` fails inside OS X sandbox
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The issue is that sys/types.h header on Solaris includes somehow
/usr/include/sys/feature_tests.h which tests if _FILE_OFFSET_BITS
is defined and if not, then it defines it to 32 if we're compiling
32 bit code (x86). This is simply wrong since we'd like to have it
defined to 64. The issue is solved by including HsUnixConfig.h first
which defines _FILE_OFFSET_BITS to 64 and feature_tests.h is later
OK with that.
|
| |
| |
| |
| |
| | |
This makes sure we pick up the LFS version of `truncate` in case `off_t`
is affected by CPP defines such as `_FILE_OFFSET_BITS`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes the FFI imports to use the proper `CLong` type over the
previous incorrect `COff` type, as using the wrong argument type can
cause problems when the `long` and `off_t` types have different size.
Historic note from the manual page:
In glibc up to version 2.1.1, the return type of telldir() was off_t.
POSIX.1-2001 specifies long, and this is the type used since glibc
2.1.2 (released in 1999).
|
| |
| |
| |
| |
| |
| |
| | |
This is useful on OS X when its sandboxing mechanism is used, because
that will set errno = EPERM when a file can't be written due to
sandboxing (as opposed to setting it to EACCES when file permissions
deny writing).
|
| |
| |
| |
| |
| |
| |
| | |
The ByteString variant of the access function didn't accept the same
flags as the non-ByteString one, but it makes sense that the OS doesn't
care about which one is being used and returns all error codes for both
variants.
|
|/ |
|
|
|
|
|
| |
This makes it more obvious why `unix` depends on `time` in the first
place, i.e. for the sole purpose of reusing the `POSIXTime` type.
|
|
|
|
|
|
|
|
|
| |
This patch fixes getGroupEntryForID and getGroupEntryForName on Solaris
The issue on Solaris is that it defines both required getgrgid_r
and getgrnam_r functions as CPP macros which depending on configuration
are mapped to real function implementations with different names.
The issue is solved by using C API calling convention instead of platform
C ABI calling convention.
|
|
|
|
|
|
|
|
| |
The function haveRtldLocal was introduced for compatibility with Cygwin
on Mar 28 2002 in GHC commit 4740cf56c774b92e02d31b4666158d70c2e85a8f.
According to https://cygwin.com/viewvc/src/winsup/cygwin/include/dlfcn.h
RTLD_LOCAL has been available on Cygwin since Revision 1.4 (August 9 2010).
|
|
|
|
|
|
|
|
|
|
|
| |
These checks were introduced for OpenBSD on July 16 2002 in GHC commit
03e9edb3094fd3bb38ed886b96ee9f61f39e9b53.
According to http://www.openbsd.org/cgi-bin/cvsweb/src/include/dlfcn.h
RTLD_NOW, RTLD_GLOBAL and RTLD_LOCAL have been available on OpenBSD
since Revision 1.8 (September 2 2003).
This is merely code cleanup.
|
|
|
|
| |
Related ticket: #8902.
|
| |
|
|
|
|
|
|
|
|
|
| |
Solaris
Patch provided by Christian Maeder <Christian.Maeder@dfki.de>
Signed-off-by: Karel Gardas <karel.gardas@centrum.cz>
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
| |
This extends `System.Posix.Files.`access` to map EROFS & ETXTBSY to
mean permission denied just like EACCESS.
Based on a patch by Alain O'Dea and comments by Duncan Coutts
Authored-by: Alain O'Dea <alain.odea@verafin.com>
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|