Ticket #1279: User.hsc.patch
| File User.hsc.patch, 0.8 KB (added by guest, 6 years ago) |
|---|
-
User.hsc
old new 332 332 getAllUserEntries :: IO [UserEntry] 333 333 #ifdef HAVE_GETPWENT 334 334 getAllUserEntries = 335 withMVar lock $ \_ -> worker [] 335 withMVar lock $ \_ -> do c_setpwent 336 l <- worker [] 337 c_endpwent 338 return l 336 339 where worker accum = 337 340 do resetErrno 338 341 ppw <- throwErrnoIfNullAndError "getAllUserEntries" $ … … 344 347 345 348 foreign import ccall unsafe "getpwent" 346 349 c_getpwent :: IO (Ptr CPasswd) 350 foreign import ccall unsafe "setpwent" 351 c_setpwent :: IO () 352 foreign import ccall unsafe "endpwent" 353 c_endpwent :: IO () 347 354 #else 348 355 getAllUserEntries = error "System.Posix.User.getAllUserEntries: not supported" 349 356 #endif
