From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: hjl@varesearch.com Cc: libc-hacker@sourceware.cygnus.com Subject: Re: A getxxx_r version patch Date: Sat, 10 Jul 1999 05:43:00 -0000 Message-id: <199907101211.OAA00568@delius.kettenis.nl> References: <19990709232852.2F64C3FC1@varesearch.com> X-SW-Source: 1999-07/msg00015.html Date: Fri, 9 Jul 1999 16:28:52 -0700 (PDT) From: hjl@varesearch.com (H.J. Lu) Since we changed the return value of getxxx_r, I added a new version for each function and kept the old one. I think you should also set errno since the new functions do not necessarily do this. The whole point of having getXXbyYY_r returning the error value is avoiding the use of thread-specific data. So instead of: if (ret != 0) ret = -1; we should use if (ret != 0) { __set_errno (ret); ret = -1; } Mark