patch applied (ghc-6.6/packages/unix): Handle sysconf(3) return
value -1 when checking _SC_GETGR_R_SIZE_MAX and
_SC_GETPW_R_SIZE_MAX.
Ian Lynagh
igloo at earth.li
Sun Apr 22 12:42:48 EDT 2007
Mon Apr 16 14:48:37 PDT 2007 bjorn at bringert.net
* Handle sysconf(3) return value -1 when checking _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX.
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.
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.
M ./System/Posix/User.hsc -4 +11
More information about the Cvs-libraries
mailing list