This project is mirrored from https://github.com/haskell/unix. Pull mirroring updated .
  1. 30 Jul, 2022 1 commit
    • sheaf's avatar
      Avoid redundant pattern warning in Resource.hsc · 2a6079a2
      sheaf authored and Bodigrim's avatar Bodigrim committed
      With GHC MR !8478, GHC is able to spot a redundant pattern match
      when RLIM_SAVED_CUR == RLIM_SAVED_MAX, which it wasn't able to
      detect before. So we use considerAccessible to avoid a pattern match
      check. This unfortunately means we must change the SafeHaskell status
      of that module to TrustWorth, as considerAccessible is from GHC.Exts,
      which isn't safe.
      
      Alternatives:
      
        - we can't perform the equality test RLIM_SAVED_CUR == RLIM_SAVED_MAX
          using CPP macros, because one of the values might expand out to
          have casts;
        - turning off pattern match warnings impacts warnings across the whole
          module, instead of the single affected function,
        - adding a dummy equation such as "id True" to the first pattern match
          would work, but seems more ad-hoc.
      2a6079a2
  2. 20 Jul, 2022 1 commit
    • Julian Ospald's avatar
      Backports for 2.7.3 (#235) · 70369061
      Julian Ospald authored
      * Add regression test for #218
      
      https://github.com/haskell/unix/issues/218
      
      
      
      Error was:
      
      uncaught exception: IOException of type InvalidArgument
      semTrywait: invalid argument (Bad file descriptor)
      
      * Fix 'semTrywait: invalid argument (Bad file descriptor)' wrt #218
      
      * Add regression test for putEnv wrt #68
      
      * Synchronize ByteString and String modules
      
      And fix free-bug in 'putEnv'. Fixes #68
      
      * Add cabal.project
      
      * Fix the error handling of posix_fallocate other than FreeBSD
      
      This commit introduces a CPP guard to take care of the difference
      between OSes of the errors of posix_fallocate.
      
      On Linux and NetBSD, posix_fallocate reports error by returning an error
      number. errno is not set.
      On the other hand, on FreeBSD, posix_fallocate returns -1 and sets
      errno.
      
      The existing code could handle FreeBSD-style errors only.
      
      * Remove obsolete FreeBSD-style error handling
      
      The FreeBSD-style error (return -1, set errno) is obsolete as of
      FreeBSD 11.0; it now reports errors as same as the other OSes.
      
      * Future-proof glibc version check
      
      * Resource: Fix warning in case of no RLIM_SAVED_{CUR,MAX}
      
      This previously failed to build with a warning on FreeBSD 11.2
      
      * Bump to 2.7.3
      
      * Add Eq and Show instance to BaudRate
      
      Needed for test suite
      
      * Add CI
      
      * Tighten lower base bound to only allow GHC-8.2+
      Co-authored-by: default avatarmatil019 <yohashi1991@gmail.com>
      Co-authored-by: vdukhovni's avatarViktor Dukhovni <ietf-dane@dukhovni.org>
      Co-authored-by: Ben Gamari's avatarBen Gamari <ben@smart-cactus.org>
      70369061
  3. 16 Jul, 2022 1 commit
  4. 30 May, 2022 1 commit
  5. 29 Apr, 2022 1 commit
  6. 17 Dec, 2021 1 commit
  7. 10 Dec, 2021 1 commit
  8. 23 Dec, 2020 1 commit
  9. 13 Nov, 2020 2 commits
  10. 15 Oct, 2020 1 commit
  11. 17 Jun, 2020 1 commit
  12. 23 May, 2020 1 commit
  13. 26 Feb, 2020 1 commit
  14. 15 Nov, 2019 1 commit
  15. 12 Nov, 2019 1 commit
  16. 09 Nov, 2019 2 commits
  17. 08 Nov, 2019 1 commit
  18. 07 Nov, 2019 1 commit
  19. 09 Jul, 2019 1 commit
  20. 14 Jun, 2019 1 commit
  21. 10 Jun, 2019 1 commit
  22. 18 Dec, 2018 1 commit
  23. 01 Nov, 2018 1 commit
  24. 31 Jul, 2018 1 commit
  25. 23 Feb, 2018 1 commit
  26. 01 Aug, 2017 1 commit
  27. 23 Jun, 2017 2 commits
  28. 22 Jun, 2017 2 commits
  29. 11 May, 2017 3 commits
    • Moritz Angermann's avatar
      Update configure.ac · eb5fc942
      Moritz Angermann authored and Herbert Valerio Riedel's avatar Herbert Valerio Riedel committed
      Add Comment
      eb5fc942
    • Moritz Angermann's avatar
      Android doesn’t have mkstemps · b5b62536
      Moritz Angermann authored and Herbert Valerio Riedel's avatar Herbert Valerio Riedel committed
      However the check similarly to tell and seekdir succeeds. However we will generate the following error down the line:
      ```
      /var/folders/fv/xqjrpfj516n5xq_m_ljpsjx00000gn/T/ghc13524_0/ghc_2.c:11:104: error:
           warning: implicit declaration of function 'mkstemps' is invalid in C99 [-Wimplicit-function-declaration]
         |
      11 | HsInt32 ghczuwrapperZC1ZCunixzm2zi7zi2zi1ZCSystemziPosixziTempZCmkstemps(void* a1, HsInt32 a2) {return mkstemps(a1, a2);}
         |                                                                                                        ^
      HsInt32 ghczuwrapperZC1ZCunixzm2zi7zi2zi1ZCSystemziPosixziTempZCmkstemps(void* a1, HsInt32 a2) {return mkstemps(a1, a2);}
                                                                                                             ^
      ```
      b5b62536
    • Moritz Angermann's avatar
      Update config.{guess,sub} · 9c2df120
      Moritz Angermann authored and Herbert Valerio Riedel's avatar Herbert Valerio Riedel committed
      Autoconf hasn’t had an update since 2014, and it doesn’t look like it will soon[1]
      This updates config.{guess,sub}
      
      It basically does exactly what the config.guess script says:
      > It is advised that you download the most up to date version of the config scripts from
      
      It adds support for e.g. `-ios`, which allows to have targets like `aarch64-apple-ios`.
      
      —
      [1]: http://lists.gnu.org/archive/html/autoconf/2016-07/msg00017.html
      9c2df120
  30. 30 Apr, 2017 1 commit
  31. 20 Mar, 2017 2 commits
    • Herbert Valerio Riedel's avatar
      Merge pull request #92 from zw3rk/feature/seekdir · 19aaa0fc
      Herbert Valerio Riedel authored
      Android doesn’t have telldir/seekdir in bionic
      19aaa0fc
    • Moritz Angermann's avatar
      Android doesn’t have telldir/seekdir in bionic · 540a317a
      Moritz Angermann authored
      The isse here is that while we try to use `AC_CHECK_FUNCS`, this will generate test code
      that tries to link an object and check for linking errors.  However  GNU gold at least version
      (binutils-2.25-0666073 2.25.51.20141117) 1.11, considers seekdir/telldir as part of the
      default libs. Thus we would actually want to pass `-nodefaultlibs` to the linker. Doing so,
      would result in erros due to not finding `-ldl`.
      
      Fixes #91
      540a317a
  32. 15 Mar, 2017 2 commits