Ticket #1566: mv_throw_error_unix.patch

File mv_throw_error_unix.patch, 4.9 KB (added by igloo, 7 years ago)
Line 
1
2New patches:
3
4[Move throwErrnoPath* functions to base:Foreign.C.Error
5Ian Lynagh <igloo@earth.li>**20070722002956] {
6hunk ./System/Posix/Error.hs 25
7-import Foreign.Ptr
8-import Foreign.Marshal.Error   ( void )
9hunk ./System/Posix/Error.hs 26
10-throwErrnoPath :: String -> FilePath -> IO a
11-throwErrnoPath loc path =
12-  do
13-    errno <- getErrno
14-    ioError (errnoToIOError loc errno Nothing (Just path))
15-
16-throwErrnoPathIf :: (a -> Bool) -> String -> FilePath -> IO a -> IO a
17-throwErrnoPathIf pred loc path f  =
18-  do
19-    res <- f
20-    if pred res then throwErrnoPath loc path else return res
21-
22-throwErrnoPathIf_ :: (a -> Bool) -> String -> FilePath -> IO a -> IO ()
23-throwErrnoPathIf_ pred loc path f  = void $ throwErrnoPathIf pred loc path f
24-
25-throwErrnoPathIfNull :: String -> FilePath -> IO (Ptr a) -> IO (Ptr a)
26-throwErrnoPathIfNull  = throwErrnoPathIf (== nullPtr)
27-
28-throwErrnoPathIfMinus1 :: Num a => String -> FilePath -> IO a -> IO a
29-throwErrnoPathIfMinus1 = throwErrnoPathIf (== -1)
30-
31-throwErrnoPathIfMinus1_ :: Num a => String -> FilePath -> IO a -> IO ()
32-throwErrnoPathIfMinus1_  = throwErrnoPathIf_ (== -1)
33}
34
35Context:
36
37[disable the getLoginName test, see #1487
38Simon Marlow <simonmar@microsoft.com>**20070703105224]
39[Don't do "< /dev/null" when running the user001 test
40Ian Lynagh <igloo@earth.li>**20070623205408
41 It can cause the test to fail.
42]
43[--configure-option and --ghc-option are now provided by Cabal
44Ross Paterson <ross@soi.city.ac.uk>**20070604115617]
45[Add support for named semaphores and shared memory objects
46Daniel Franke <df@dfranke.us>**20070503220003]
47[Remove Makefile and package.conf.in (used in the old build system)
48Ian Lynagh <igloo@earth.li>**20070524142637]
49[We now depend on process
50Ian Lynagh <igloo@earth.li>**20070523181544]
51[We now depend on directory
52Ian Lynagh <igloo@earth.li>**20070519160513]
53[add includes: field
54Simon Marlow <simonmar@microsoft.com>**20070517095025]
55[Fix calling getAllUserEntries twice (trac #1279).
56Ian Lynagh <igloo@earth.li>**20070504104956
57 It used to return [] on all but the first call.
58 Patch from an unidentified guest.
59]
60[Make it more obvious that the forkprocess01 test is really working
61Ian Lynagh <igloo@earth.li>**20070418114542]
62[Follow Cabal changes in Setup.hs
63Ian Lynagh <igloo@earth.li>**20070418114510]
64[Handle sysconf(3) return value -1 when checking _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX.
65bjorn@bringert.net**20070416214837
66 sysconf(3) returns -1 on failure, but this was not handled when checking _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX in System.Posix.User. This made getUserEntryForID, getUserEntryForName, getGroupEntryForID and getGroupEntryForName fail on OS X 10.4.9 on i386. Just checking that unistd.h defines _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX as was done before does not guarantee that sysconf(3) will succeed.
67 
68 sysconf(3) failure is now handled by using the same default values as were already used when sysconf(3) is not available, or the parameter names are not defined.
69]
70[Added tests/user001.hs which tests all the get* functions in System.Posix.User.
71bjorn@bringert.net**20070416220012
72 I added this since I noticed that getUserEntryForID, getUserEntryForName,
73 getGroupEntryForID and getGroupEntryForName failed on OS X 10.4.9 on i386.
74]
75[Fix -Wall warnings
76Ian Lynagh <igloo@earth.li>**20070411005028]
77[Add missing case in removePrefix
78Ian Lynagh <igloo@earth.li>**20070411002604]
79[parse (but don't pass on) options for ./configure
80Ian Lynagh <igloo@earth.li>**20070406153756]
81[make Setup suitable for building the libraries with GHC
82Ian Lynagh <igloo@earth.li>**20061112214741]
83[Don't use Fd/FD in foreign decls
84Ian Lynagh <igloo@earth.li>**20070404155930
85 Using CInt makes it much easier to verify that it is right, and we won't
86 get caught out by possible newtype switches between CInt/Int.
87]
88[Fix C/Haskell type mismatches
89Ian Lynagh <igloo@earth.li>**20070404003625]
90[Follow type changes in base
91Ian Lynagh <igloo@earth.li>**20070403195237
92 (of the dubiously exported c_access and c_fcntl_write)
93]
94[fix cut-and-pasto in error message
95Simon Marlow <simonmar@microsoft.com>**20070308134418]
96[add tests from GHC testsuite
97Simon Marlow <simonmar@microsoft.com>**20070305145258]
98[export the file-type modes, so that createDevice can be used
99Simon Marlow <simonmar@microsoft.com>**20070305113316]
100[Provide nanosleep if we have it, and use it to implement usleep
101Simon Marlow <simonmar@microsoft.com>**20070302132818
102 Fixes #1156
103]
104[don't retry usleep() on EINTR (see #850/#1156)
105Simon Marlow <simonmar@microsoft.com>**20070302114118]
106[expand docs for forkProcess
107Simon Marlow <simonmar@microsoft.com>**20070301151220]
108[add C wrappers for lstat() and mknod().  Fixes #1086.
109Simon Marlow <simonmar@microsoft.com>**20070226110311]
110[README about building from darcs
111Ross Paterson <ross@soi.city.ac.uk>**20070218110201]
112[TAG 6.6 release
113Ian Lynagh <igloo@earth.li>**20061011124740]
114Patch bundle hash:
1153170f8c1ce33fe81def41cfe4986d508941c2a7a