[Mono-bugs] [Bug 72292][Nor] Changed - getpwent in libMonoPosixHelper fails on Solaris 8

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 7 Feb 2005 15:55:20 -0500 (EST)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jonpryor@vt.edu.


--- shadow/72292	2005-02-07 13:17:35.000000000 -0500
+++ shadow/72292.tmp.23670	2005-02-07 15:55:20.000000000 -0500
@@ -44,6 +44,20 @@
 ------- Additional Comments From vargaz@gmail.com  2005-02-07 13:17 -------
 Attached a patch which fixes some issues with getpwnam_r as well.
+------- Additional Comments From jonpryor@vt.edu  2005-02-07 15:55 -------
+I'm not fond of this solution as it clobbers errno, potentially hiding
+other error conditions.
+As an aside, is Solaris 8 the same as SunOS 5.8?  I can't keep the
+relationship between them strait.
+As an alternative fix, could you instead set errno = 0 before calling
+getpwent()?  I suspect errno is being set by setpwent() or some other
+code, and clearing out errno before getpwent() should remove the error
+At least that's what happens on SunOS 5.8.