packages/unix.git
2 years agoBump upper bound on time to allow 1.9 bgamari-patch-1
Ben Gamari [Thu, 19 Jan 2017 21:19:32 +0000 (16:19 -0500)] 
Bump upper bound on time to allow 1.9

2 years agoFix posix005 test
Ben Gamari [Thu, 15 Dec 2016 19:06:36 +0000 (14:06 -0500)] 
Fix posix005 test

Needed import of sort and updated expected output

2 years agoRelax upper bound on `time` to allow time-1.7
Herbert Valerio Riedel [Sun, 20 Nov 2016 08:23:45 +0000 (09:23 +0100)] 
Relax upper bound on `time` to allow time-1.7

...after having convincing myself that the changes in time-1.7 are confined
to parts not used by `unix`

c.f. http://hdiff.luite.com/cgit/time/diff?id=1.7&id2=1.6.0.1

fixes #80

2 years agotestsuite: Ensure that posix005 output is normalized
Ben Gamari [Thu, 17 Nov 2016 21:37:41 +0000 (16:37 -0500)] 
testsuite: Ensure that posix005 output is normalized

The order in which getEnvironment returns its result is platform dependent. Sort
the output to ensure consistent output across platforms.

2 years agoBump upper bound on base
Ben Gamari [Tue, 15 Nov 2016 17:52:33 +0000 (12:52 -0500)] 
Bump upper bound on base

2 years agoPrepare for 2.7.2.1 release
Herbert Valerio Riedel [Fri, 11 Nov 2016 23:15:04 +0000 (00:15 +0100)] 
Prepare for 2.7.2.1 release

2 years agoMerge pull request #77 from glguy/patch-76
Eric Mertens [Sun, 16 Oct 2016 02:40:25 +0000 (19:40 -0700)] 
Merge pull request #77 from glguy/patch-76

Add argument documentation for Env modules

2 years agoAdd argument documentation for Env modules
Eric Mertens [Thu, 13 Oct 2016 15:56:08 +0000 (08:56 -0700)] 
Add argument documentation for Env modules

Fixes #76

2 years agoMerge pull request #73 from ezyang/pr/fix-segfault
Edward Z. Yang [Thu, 8 Sep 2016 19:04:24 +0000 (12:04 -0700)] 
Merge pull request #73 from ezyang/pr/fix-segfault

Fix segfault from inconsistent macro use.

2 years agoFix segfault from inconsistent macro use.
Edward Z. Yang [Thu, 8 Sep 2016 00:31:02 +0000 (17:31 -0700)] 
Fix segfault from inconsistent macro use.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2 years agoMerge pull request #72 from erikd/topic/readdir-deprecated
Erik de Castro Lopo [Tue, 6 Sep 2016 22:21:25 +0000 (08:21 +1000)] 
Merge pull request #72 from erikd/topic/readdir-deprecated

Don't use readdir_r if deprecated

2 years agoDon't use readdir_r if deprecated
Erik de Castro Lopo [Tue, 6 Sep 2016 09:34:40 +0000 (19:34 +1000)] 
Don't use readdir_r if deprecated

GNU glibc 2.23 and later deprecate `readdir_r` in favour of plain old
`readdir` which in some upcoming POSIX standard is going to required to be
re-entrant.

Eventually we want to drop `readder_r` all together, but want to be
compatible with older unixen which may not have a re-entrant `readdir`.

Solution is to make systems with *known* re-entrant `readir` use that and
use `readdir_r` whereever we have it and don't *know* that `readdir` is
re-entrant.

Closes: https://github.com/haskell/unix/issues/70

2 years agoMerge pull request #71 from erikd/topic/travis
Erik de Castro Lopo [Tue, 6 Sep 2016 11:10:55 +0000 (21:10 +1000)] 
Merge pull request #71 from erikd/topic/travis

Fix travis build

2 years agoFix travis build
Erik de Castro Lopo [Tue, 6 Sep 2016 09:54:36 +0000 (19:54 +1000)] 
Fix travis build

2 years agoTestsuite: remove no_stdin
Thomas Miedema [Fri, 24 Jun 2016 15:19:37 +0000 (17:19 +0200)] 
Testsuite: remove no_stdin

`no_stdin` is no longer necessary, and has been removed from the
testsuite driver

3 years agoAdd GHC 7.10.2/3 and 8.0.1 to travis.yml
Eric Mertens [Thu, 2 Jun 2016 15:15:28 +0000 (08:15 -0700)] 
Add GHC 7.10.2/3 and 8.0.1 to travis.yml

3 years agoUpdate changelog for 2.7.2.0 release v2.7.2.0
Herbert Valerio Riedel [Tue, 19 Apr 2016 17:32:05 +0000 (19:32 +0200)] 
Update changelog for 2.7.2.0 release

3 years agoConvert /since/ to @since syntax
Herbert Valerio Riedel [Tue, 19 Apr 2016 17:37:41 +0000 (19:37 +0200)] 
Convert /since/ to @since syntax

3 years agoCleanup one more test
Thomas Miedema [Tue, 16 Feb 2016 12:17:13 +0000 (13:17 +0100)] 
Cleanup one more test

3 years agoTestsuite: don't use only_compiler_types, assume ghc
Thomas Miedema [Tue, 16 Feb 2016 10:59:02 +0000 (11:59 +0100)] 
Testsuite: don't use only_compiler_types, assume ghc

3 years agoAdd comment regarding genericRaise use
Herbert Valerio Riedel [Sun, 31 Jan 2016 16:04:25 +0000 (17:04 +0100)] 
Add comment regarding genericRaise use

3 years agoHave Autoconf test for _NSGetEnviron presence
Herbert Valerio Riedel [Sun, 31 Jan 2016 15:54:04 +0000 (16:54 +0100)] 
Have Autoconf test for _NSGetEnviron presence

3 years agoFix Haddock markup
Herbert Valerio Riedel [Sun, 31 Jan 2016 13:10:59 +0000 (14:10 +0100)] 
Fix Haddock markup

3 years agoMinor tweaks to HsUnix.h
Herbert Valerio Riedel [Sun, 31 Jan 2016 12:36:47 +0000 (13:36 +0100)] 
Minor tweaks to HsUnix.h

3 years agoUse `#const` rather than FFI wrapper for PATH_MAX
Herbert Valerio Riedel [Sun, 31 Jan 2016 12:30:15 +0000 (13:30 +0100)] 
Use `#const` rather than FFI wrapper for PATH_MAX

This has the side-effect of making two more modules `Safe`-inferred

3 years agoReplace `__hsunix_unsetenv` wrapper with CApiFFI
Herbert Valerio Riedel [Sun, 31 Jan 2016 11:57:23 +0000 (12:57 +0100)] 
Replace `__hsunix_unsetenv` wrapper with CApiFFI

3 years agoUse CApiFFI for `ptsname(3)` et al for GHC>=8.0
Herbert Valerio Riedel [Sun, 31 Jan 2016 11:34:59 +0000 (12:34 +0100)] 
Use CApiFFI for `ptsname(3)` et al for GHC>=8.0

This improves on 2ddf4b2b7bf41f878bc7d8a1afa49126710f524c

3 years agoUse `open(2)` directly rather than via `__hscore_open()`
Herbert Valerio Riedel [Sun, 31 Jan 2016 10:32:01 +0000 (11:32 +0100)] 
Use `open(2)` directly rather than via `__hscore_open()`

As we don't support Windows, there's no benefit in going via
`__hscore_open()`

3 years agoMerge dirUtils.c into HsUnix.c
Herbert Valerio Riedel [Sun, 31 Jan 2016 10:31:14 +0000 (11:31 +0100)] 
Merge dirUtils.c into HsUnix.c

3 years agoUse more direct CApiFFI for pPrPr_disableITimers
Herbert Valerio Riedel [Sun, 31 Jan 2016 09:51:58 +0000 (10:51 +0100)] 
Use more direct CApiFFI for pPrPr_disableITimers

3 years agoProvide execvpe prototype if missing
Herbert Valerio Riedel [Sun, 31 Jan 2016 09:03:46 +0000 (10:03 +0100)] 
Provide execvpe prototype if missing

3 years agoAdd links to Opengroup's latest POSIX.1-2008 spec
Herbert Valerio Riedel [Sun, 31 Jan 2016 08:44:47 +0000 (09:44 +0100)] 
Add links to Opengroup's latest POSIX.1-2008 spec

3 years agogitignore
Herbert Valerio Riedel [Sun, 31 Jan 2016 08:34:03 +0000 (09:34 +0100)] 
gitignore

3 years agoDelete some trailing whitespaces
Herbert Valerio Riedel [Sun, 31 Jan 2016 08:31:09 +0000 (09:31 +0100)] 
Delete some trailing whitespaces

3 years agoBump to 2.7.2.0
Herbert Valerio Riedel [Sun, 31 Jan 2016 08:26:26 +0000 (09:26 +0100)] 
Bump to 2.7.2.0

There's been some subtle API changes that may be useful to detect via
`MIN_VERSION_unix(2,7,2)`, consequently perform a minor version bump
relative to the last release.

3 years agoMinor cleanups to unix.cabal file
Herbert Valerio Riedel [Sun, 31 Jan 2016 08:21:10 +0000 (09:21 +0100)] 
Minor cleanups to unix.cabal file

3 years agoReplace `__hsunix_getpw{nam,uid_r}` wrappers with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 23:43:21 +0000 (00:43 +0100)] 
Replace `__hsunix_getpw{nam,uid_r}` wrappers with CApiFFI

3 years agoReplace `__hscore_mk{dtemp,stemp,stemps}` wrappers with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 23:15:23 +0000 (00:15 +0100)] 
Replace `__hscore_mk{dtemp,stemp,stemps}` wrappers with CApiFFI

3 years agoReplace `__hscore_{set,get}rlimit` wrappers with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 23:09:09 +0000 (00:09 +0100)] 
Replace `__hscore_{set,get}rlimit` wrappers with CApiFFI

3 years agoAvoid redundant prototypes for ptsname(3) et al
Herbert Valerio Riedel [Sat, 30 Jan 2016 23:01:18 +0000 (00:01 +0100)] 
Avoid redundant prototypes for ptsname(3) et al

This is now possible since we now use `AC_USE_SYSTEM_EXTENSIONS`, which
indirectly enables _XOPEN_SOURCE

3 years agoDrop redundant __GLASGOW_HASKELL__ conditionals for GHC>=7.4
Herbert Valerio Riedel [Sat, 30 Jan 2016 22:14:23 +0000 (23:14 +0100)] 
Drop redundant __GLASGOW_HASKELL__ conditionals for GHC>=7.4

3 years agoDrop bitrotting HUGS support
Herbert Valerio Riedel [Sat, 30 Jan 2016 21:55:06 +0000 (22:55 +0100)] 
Drop bitrotting HUGS support

It's very unlikely the current `unix` code stands any chance of even
remotely work with Hugs...

3 years agoReplace `__hsunix_nanosleep` wrapper with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 21:42:23 +0000 (22:42 +0100)] 
Replace `__hsunix_nanosleep` wrapper with CApiFFI

3 years agoRemove obsolete windows-related #ifdefs
Herbert Valerio Riedel [Sat, 30 Jan 2016 21:38:28 +0000 (22:38 +0100)] 
Remove obsolete windows-related #ifdefs

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.

3 years agoAdd CTYPE annotations to ptr types used for FFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 18:44:58 +0000 (19:44 +0100)] 
Add CTYPE annotations to ptr types used for FFI

This avoids incompatible-pointer warnings from the c-compiler when using
`CApiFFI`

3 years agoReplace `__hsunix_getpwent` wrapper with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 17:23:15 +0000 (18:23 +0100)] 
Replace `__hsunix_getpwent` wrapper with CApiFFI

3 years agoReplace `__hsunix_mknod` wrapper with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 17:17:00 +0000 (18:17 +0100)] 
Replace `__hsunix_mknod` wrapper with CApiFFI

3 years agoReplace `__hsunix_lstat` wrapper with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 17:13:39 +0000 (18:13 +0100)] 
Replace `__hsunix_lstat` wrapper with CApiFFI

3 years agoMove WCOREDUMP(s) compat `#define` to `HsUnix.h`
Herbert Valerio Riedel [Sat, 30 Jan 2016 17:02:43 +0000 (18:02 +0100)] 
Move WCOREDUMP(s) compat `#define` to `HsUnix.h`

Follow-up to 11eb5aabcc3c98eddf1b375c4184fe0df58d7eab

3 years agoReplace `<sys/wait.h>` macro wrappers with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 16:47:32 +0000 (17:47 +0100)] 
Replace `<sys/wait.h>` macro wrappers with CApiFFI

3 years agoReplace `__hsunix_times` wrapper with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 16:31:48 +0000 (17:31 +0100)] 
Replace `__hsunix_times` wrapper with CApiFFI

3 years agoReplace `__hsunix_time` wrapper with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 16:25:01 +0000 (17:25 +0100)] 
Replace `__hsunix_time` wrapper with CApiFFI

3 years agoReplace `__hsunix_opendir` wrapper with CApiFFI
Herbert Valerio Riedel [Sat, 30 Jan 2016 16:16:28 +0000 (17:16 +0100)] 
Replace `__hsunix_opendir` wrapper with CApiFFI

3 years agoChange `drainOutput`'s `tcdrain(3)` into a `safe` FFI call
Herbert Valerio Riedel [Sat, 30 Jan 2016 15:58:31 +0000 (16:58 +0100)] 
Change `drainOutput`'s `tcdrain(3)` into a `safe` FFI call

Since the primary purpose of `tcdrain(3)` is to block it makes much more
sense to use a `safe` FFI import.

3 years agoDon't assume `tcdrain` and `ctermid` exist always
Herbert Valerio Riedel [Sat, 30 Jan 2016 15:46:56 +0000 (16:46 +0100)] 
Don't assume `tcdrain` and `ctermid` exist always

This follows the scheme suggested in #24

This fixes #55

3 years agoRelax upper bound to allow time-1.6 release
Herbert Valerio Riedel [Sun, 20 Dec 2015 09:17:48 +0000 (10:17 +0100)] 
Relax upper bound to allow time-1.6 release

3 years agoImprove detection of `fdatasync(2)`
Herbert Valerio Riedel [Wed, 16 Dec 2015 16:28:40 +0000 (17:28 +0100)] 
Improve detection of `fdatasync(2)`

This attempts a simpler and hopefully more robust test for `fdatasync(2)`

See 94d8824bae10c9d91f56c1aee9c45a90136a1770 / #42 for the previous attempt.

This hopefully addresses #52 in a better way than #53

3 years agoRemove obsolete `--with-cc` flag from configure.ac
Herbert Valerio Riedel [Mon, 14 Dec 2015 07:01:31 +0000 (08:01 +0100)] 
Remove obsolete `--with-cc` flag from configure.ac

This non-standard flag was used previously by GHC's build-system to set the `CC` variable.

See https://phabricator.haskell.org/D1608 for more details

3 years agoTweak use of AC_USE_SYSTEM_EXTENSIONS
Herbert Valerio Riedel [Sun, 6 Dec 2015 16:06:41 +0000 (17:06 +0100)] 
Tweak use of AC_USE_SYSTEM_EXTENSIONS

This is a follow-up tweak to
5740003e06f0c585460501514f3352f5e105c98c

It's better to move AC_USE_SYSTEM_EXTENSIONS
after `AC_PROG_CC` as this avoids triggering
edundant tests

3 years agoSimplify code via AC_USE_SYSTEM_EXTENSIONS
Herbert Valerio Riedel [Thu, 3 Dec 2015 21:25:13 +0000 (22:25 +0100)] 
Simplify code via AC_USE_SYSTEM_EXTENSIONS

`AC_USE_SYSTEM_EXTENSIONS` takes care of defining feature_test_macros(7)
thereby allowing us to remove a few manual `#define`s

3 years agoKill `-fwarn-unused-imports`-induced silliness
Herbert Valerio Riedel [Mon, 16 Nov 2015 18:37:56 +0000 (19:37 +0100)] 
Kill `-fwarn-unused-imports`-induced silliness

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

3 years agoDon't assume existence of termios constants beyond `B38400`
Herbert Valerio Riedel [Mon, 16 Nov 2015 18:03:12 +0000 (19:03 +0100)] 
Don't assume existence of termios constants beyond `B38400`

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

3 years agoDon't assume non-POSIX `WCOREDUMP(x)` macro exists
Herbert Valerio Riedel [Mon, 16 Nov 2015 17:49:46 +0000 (18:49 +0100)] 
Don't assume non-POSIX `WCOREDUMP(x)` macro exists

This fixes #50

3 years agoRelax upper bound on `base` for base-4.9
Herbert Valerio Riedel [Wed, 28 Oct 2015 21:34:34 +0000 (22:34 +0100)] 
Relax upper bound on `base` for base-4.9

4 years agoMerge pull request #42 from argiopetech/master
Elliot Robinson [Mon, 9 Mar 2015 08:09:37 +0000 (04:09 -0400)] 
Merge pull request #42 from argiopetech/master

Adds a more comprehensive check for fdatasync

4 years agoAdds a more comprehensive check for fdatasync
Elliot Robinson [Sun, 8 Mar 2015 19:55:05 +0000 (15:55 -0400)] 
Adds a more comprehensive check for fdatasync

Some versions of OS X have fdatasync in the headers but don't include implementations in the standard library. This leads to a compile failure in configure.ac when using AC_CHECK_FUNCS.

This change explicitly attempts to compile a file containing a call to fdatasync and properly sets the AC_CHECK_FUNCS flags depending on the result of compilation.

4 years agoAdd GHC 7.8.4 to test-matrix
Herbert Valerio Riedel [Sat, 27 Dec 2014 18:18:50 +0000 (19:18 +0100)] 
Add GHC 7.8.4 to test-matrix

4 years agoMerge pull request #32 from redneb/getcwd-exn-safe
Gregory Collins [Wed, 24 Dec 2014 00:51:17 +0000 (19:51 -0500)] 
Merge pull request #32 from redneb/getcwd-exn-safe

rewrite getWorkingDirectory to use allocaBytes for exception safety

4 years agoAdd GHC 7.10.1 to test-matrix
Herbert Valerio Riedel [Tue, 23 Dec 2014 10:17:22 +0000 (11:17 +0100)] 
Add GHC 7.10.1 to test-matrix

4 years agorewrite getWorkingDirectory to use allocaBytes for exception safety
Marios Titas [Tue, 23 Dec 2014 06:21:57 +0000 (06:21 +0000)] 
rewrite getWorkingDirectory to use allocaBytes for exception safety

4 years agoAdd /Since/ annotation to System.Posix.Fcntl v2.7.1.0
Herbert Valerio Riedel [Fri, 19 Dec 2014 09:51:27 +0000 (10:51 +0100)] 
Add /Since/ annotation to System.Posix.Fcntl

4 years agoPrepare for 2.7.1.0 release
Herbert Valerio Riedel [Fri, 19 Dec 2014 09:02:18 +0000 (10:02 +0100)] 
Prepare for 2.7.1.0 release

4 years agoTweak markdown markup again [skip ci]
Herbert Valerio Riedel [Fri, 19 Dec 2014 09:01:32 +0000 (10:01 +0100)] 
Tweak markdown markup again [skip ci]

4 years agoFix markdown markup [skip ci]
Herbert Valerio Riedel [Fri, 19 Dec 2014 08:59:44 +0000 (09:59 +0100)] 
Fix markdown markup [skip ci]

4 years agoTighten SafeHaskell
Herbert Valerio Riedel [Fri, 19 Dec 2014 08:57:00 +0000 (09:57 +0100)] 
Tighten SafeHaskell

This was forgotten in e14fbe2cb3bbd604dadcc3847882ca37edf548b3

4 years agoFix SIGINFO and SIGWINCH.
Erik de Castro Lopo [Fri, 19 Dec 2014 03:47:43 +0000 (14:47 +1100)] 
Fix SIGINFO and SIGWINCH.

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

4 years agoBe more explicit in WARNING what will be thrown
Herbert Valerio Riedel [Mon, 15 Dec 2014 22:33:15 +0000 (23:33 +0100)] 
Be more explicit in WARNING what will be thrown

4 years agoAdd since-annotations to new fileSync ops
Herbert Valerio Riedel [Mon, 15 Dec 2014 22:28:20 +0000 (23:28 +0100)] 
Add since-annotations to new fileSync ops

4 years agoWrap posix_fadvise(2) and posix_fallocate(2)
Herbert Valerio Riedel [Mon, 15 Dec 2014 22:25:26 +0000 (23:25 +0100)] 
Wrap posix_fadvise(2) and posix_fallocate(2)

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>
4 years agoMerge pull request #29 from haskell/safefixes710again
Herbert Valerio Riedel [Tue, 9 Dec 2014 16:46:41 +0000 (17:46 +0100)] 
Merge pull request #29 from haskell/safefixes710again

More fixes for Safe Haskell bounds under GHC 7.10

4 years agoMore fixes for Safe Haskell bounds under GHC 7.10 safefixes710again
David Terei [Tue, 9 Dec 2014 06:03:15 +0000 (22:03 -0800)] 
More fixes for Safe Haskell bounds under GHC 7.10

4 years agoTweak execvpe.h hack (see 256b19184bcb) some more
Herbert Valerio Riedel [Sun, 7 Dec 2014 15:01:51 +0000 (16:01 +0100)] 
Tweak execvpe.h hack (see 256b19184bcb) some more

4 years agoWrap fsync(2) and fdatasync(2)
Herbert Valerio Riedel [Sun, 7 Dec 2014 14:29:10 +0000 (15:29 +0100)] 
Wrap fsync(2) and fdatasync(2)

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>
4 years agoRepeat execvpe(3) prototype (fup to 7bad9d7d52d)
Herbert Valerio Riedel [Sat, 6 Dec 2014 21:29:51 +0000 (22:29 +0100)] 
Repeat execvpe(3) prototype (fup to 7bad9d7d52d)

This is needed in case `<unistd.h>` was included before "execvpe.h"
w/o `_GNU_SOURCE` set (on Glibc systems)

4 years agoHave "execvpe.h" provide execvpe() again
Herbert Valerio Riedel [Sat, 6 Dec 2014 20:11:59 +0000 (21:11 +0100)] 
Have "execvpe.h" provide execvpe() again

Turns out `process` reuses `unix`'s execvpe() implementation,
and the refactoring in f24ba78f68b2cbc4f4afadc8dd60fc2935357255
broke process.

4 years ago`M-x untabify` && `M-x delete-trailing-whitespace`
Herbert Valerio Riedel [Sat, 6 Dec 2014 16:08:06 +0000 (17:08 +0100)] 
`M-x untabify` && `M-x delete-trailing-whitespace`

4 years agoRetry process execution in case of ENOTDIR
Iku Iwasa [Sat, 2 Aug 2014 13:02:23 +0000 (22:02 +0900)] 
Retry process execution in case of ENOTDIR

If `PATH` environment variable contains non directory component,
`__hsunix_execvpe()` failed by `ENOTDIR`.

This fixes #11 for all platforms.

4 years agoRefactor local `execvpe(3)` implementation
Herbert Valerio Riedel [Sat, 6 Dec 2014 14:39:12 +0000 (15:39 +0100)] 
Refactor local `execvpe(3)` implementation

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)`)

4 years agoDo not blindly add libdl to extra libraries
Igor Pashev [Tue, 19 Aug 2014 12:23:35 +0000 (16:23 +0400)] 
Do not blindly add libdl to extra libraries

On some systems dlopen() is available without libdl (illumos, solaris).
Sometimes libdl.so cannot be loaded by runtime linker, see
https://ghc.haskell.org/trac/ghc/ticket/8713

Closes #8

4 years agoTighten Safe Haskell bounds, fixes new warning in GHC 7.10.
David Terei [Thu, 13 Nov 2014 02:12:18 +0000 (18:12 -0800)] 
Tighten Safe Haskell bounds, fixes new warning in GHC 7.10.

Closes #27

4 years agoKill spurious line from changelog
Herbert Valerio Riedel [Sat, 6 Dec 2014 12:50:30 +0000 (13:50 +0100)] 
Kill spurious line from changelog

[skip ci]

4 years agofixup Travis CI job
Herbert Valerio Riedel [Sat, 6 Dec 2014 12:48:10 +0000 (13:48 +0100)] 
fixup Travis CI job

4 years agoUpdate Travis CI Job
Herbert Valerio Riedel [Sat, 6 Dec 2014 12:19:20 +0000 (13:19 +0100)] 
Update Travis CI Job

4 years agoMerge pull request #18 from neverpanic/master
Herbert Valerio Riedel [Fri, 7 Nov 2014 10:16:25 +0000 (11:16 +0100)] 
Merge pull request #18 from neverpanic/master

`System.Posix.Files.fileAccess` fails inside OS X sandbox

4 years agoAdd hackage-shield to README.md
Herbert Valerio Riedel [Thu, 23 Oct 2014 07:36:57 +0000 (09:36 +0200)] 
Add hackage-shield to README.md

4 years agoMerge pull request #5 from hvr/pr-LFS
Herbert Valerio Riedel [Sat, 18 Oct 2014 15:08:52 +0000 (17:08 +0200)] 
Merge pull request #5 from hvr/pr-LFS

Fix potential LFS related issues

4 years agofix _FILE_OFFSET_BITS redefined warning on Solaris/x86
Karel Gardas [Fri, 25 Jul 2014 21:42:00 +0000 (23:42 +0200)] 
fix _FILE_OFFSET_BITS redefined warning on Solaris/x86

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.

4 years agoUse CAPI FFI imports for `truncate`
Herbert Valerio Riedel [Thu, 7 Aug 2014 10:33:51 +0000 (12:33 +0200)] 
Use CAPI FFI imports for `truncate`

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`.

4 years agoUse correct POSIX offset-type for tell/seekdir
Herbert Valerio Riedel [Thu, 7 Aug 2014 10:23:07 +0000 (12:23 +0200)] 
Use correct POSIX offset-type for tell/seekdir

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).

4 years agoReplace obsolete `defaultUserHooks` by `autoconfUserHooks`
Herbert Valerio Riedel [Sat, 27 Sep 2014 07:52:28 +0000 (09:52 +0200)] 
Replace obsolete `defaultUserHooks` by `autoconfUserHooks`