aboutsummaryrefslogtreecommitdiffhomepage
path: root/cbits/HsUnix.c
Commit message (Collapse)AuthorAge
* Fix segfault from inconsistent macro use.Gravatar Edward Z. Yang2016-09-07
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Don't use readdir_r if deprecatedGravatar Erik de Castro Lopo2016-09-07
| | | | | | | | | | | | | | | 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
* Use `#const` rather than FFI wrapper for PATH_MAXGravatar Herbert Valerio Riedel2016-01-31
| | | | This has the side-effect of making two more modules `Safe`-inferred
* Replace `__hsunix_unsetenv` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-31
|
* Use CApiFFI for `ptsname(3)` et al for GHC>=8.0Gravatar Herbert Valerio Riedel2016-01-31
| | | | This improves on 2ddf4b2b7bf41f878bc7d8a1afa49126710f524c
* Merge dirUtils.c into HsUnix.cGravatar Herbert Valerio Riedel2016-01-31
|
* Replace `__hsunix_getpw{nam,uid_r}` wrappers with CApiFFIGravatar Herbert Valerio Riedel2016-01-31
|
* Replace `__hscore_mk{dtemp,stemp,stemps}` wrappers with CApiFFIGravatar Herbert Valerio Riedel2016-01-31
|
* Replace `__hscore_{set,get}rlimit` wrappers with CApiFFIGravatar Herbert Valerio Riedel2016-01-31
|
* Avoid redundant prototypes for ptsname(3) et alGravatar Herbert Valerio Riedel2016-01-31
| | | | | This is now possible since we now use `AC_USE_SYSTEM_EXTENSIONS`, which indirectly enables _XOPEN_SOURCE
* Replace `__hsunix_nanosleep` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-31
|
* Remove obsolete windows-related #ifdefsGravatar Herbert Valerio Riedel2016-01-31
| | | | | | 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.
* Replace `__hsunix_getpwent` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-30
|
* Replace `__hsunix_mknod` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-30
|
* Replace `__hsunix_lstat` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-30
|
* Move WCOREDUMP(s) compat `#define` to `HsUnix.h`Gravatar Herbert Valerio Riedel2016-01-30
| | | | Follow-up to 11eb5aabcc3c98eddf1b375c4184fe0df58d7eab
* Replace `<sys/wait.h>` macro wrappers with CApiFFIGravatar Herbert Valerio Riedel2016-01-30
|
* Replace `__hsunix_times` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-30
|
* Replace `__hsunix_time` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-30
|
* Replace `__hsunix_opendir` wrapper with CApiFFIGravatar Herbert Valerio Riedel2016-01-30
|
* Don't assume non-POSIX `WCOREDUMP(x)` macro existsGravatar Herbert Valerio Riedel2015-11-16
| | | | This fixes #50
* Fix SIGINFO and SIGWINCH.Gravatar Erik de Castro Lopo2014-12-19
| | | | | | | | | | | | 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
* Indicate whether a process dumped core in the ProcessStatusGravatar Simon Marlow2013-01-25
| | | | | | | | | | | | | | | The Bool field of Terminated is new, as is the documentation: data ProcessStatus = Exited ExitCode -- ^ the process exited by calling -- @exit()@ or returning from @main@ | Terminated Signal Bool -- ^ the process was terminated by a -- signal, the @Bool@ is @True@ if a core -- dump was produced | Stopped Signal -- ^ the process was stopped by a signal deriving (Eq, Ord, Show) This is an API change, hence will need a major version bump.
* Only use unsetenv if HAVE_UNSETENV is defined (fixes #7343)Gravatar Simon Hengel2012-10-20
|
* System.Posix.Temp complianceGravatar Deian Stefan2012-01-09
|
* mkstempsGravatar Deian Stefan2012-01-09
|
* forgot to add to previous commitGravatar Deian Stefan2012-01-05
|
* Remove some antiquated C constructsGravatar Ian Lynagh2011-08-01
| | | | | | | | Fixes validate on amd64/Linux with: SRC_CC_OPTS += -Wmissing-parameter-type SRC_CC_OPTS += -Wold-style-declaration SRC_CC_OPTS += -Wold-style-definition
* NetBSD does not have support for symbol versioning, so updated systenGravatar Simon Marlow2009-07-23
| | | | | | | | | | | | | | | | | | 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>
* Don't put inline'd functions in HsUnix.h; fixes trac #2969Gravatar Ian Lynagh2009-02-11
| | | | | | 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).
* move some stuff here from System.Directory, now the dependencies are reversedGravatar Simon Marlow2008-08-21
|
* [project @ 2002-09-12 16:38:21 by simonmar]Gravatar simonmar2002-09-12
More POSIX bits... we're getting there.