Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/unix. Pull mirroring updated .
  1. Jul 30, 2022
    • 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. Jul 20, 2022
    • 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: default avatarViktor Dukhovni <ietf-dane@dukhovni.org>
      Co-authored-by: default avatarBen Gamari <ben@smart-cactus.org>
  3. Jul 16, 2022
  4. May 30, 2022
  5. Apr 29, 2022
  6. Dec 17, 2021
  7. Dec 10, 2021
  8. Dec 23, 2020
  9. Nov 13, 2020
  10. Oct 15, 2020
  11. Jun 17, 2020
  12. May 23, 2020
  13. Feb 26, 2020
  14. Nov 15, 2019
  15. Nov 12, 2019
  16. Nov 09, 2019
  17. Nov 08, 2019
  18. Nov 07, 2019
  19. Jul 09, 2019
  20. Jun 14, 2019
  21. Jun 10, 2019
  22. Dec 18, 2018
  23. Nov 01, 2018
  24. Jul 31, 2018
  25. Feb 23, 2018
  26. Aug 01, 2017
  27. Jun 23, 2017
  28. Jun 22, 2017
  29. May 11, 2017
    • 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. Apr 30, 2017
  31. Mar 20, 2017
    • 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. Mar 15, 2017
Loading