Paul Eggert <[EMAIL PROTECTED]> writes: |> Andreas Schwab <[EMAIL PROTECTED]> writes: |> |> > 2003-07-18 Andreas Schwab <[EMAIL PROTECTED]> |> > |> > * memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno. |> > |> > --- coreutils-5.0.1/lib/memcoll.c.~1~ 2003-06-06 22:11:58.000000000 +0200 |> > +++ coreutils-5.0.1/lib/memcoll.c 2003-07-18 11:58:37.000000000 +0200 |> > @@ -83,6 +83,7 @@ memcoll (char *s1, size_t s1len, char *s |> > diff = memcmp (s1, s2, s1len < s2len ? s1len : s2len); |> > if (! diff) |> > diff = s1len < s2len ? -1 : s1len != s2len; |> > + errno = 0; |> > |> > #endif |> > |> |> Thanks for that fix. I checked it into gnulib. (Wow, your memcmp |> implementation sets errno? It's allowed to, but out of curiosity why |> does it do that?)
It doesn't do that, errno was already non-zero before the call. Originally I put the assignment before the memcmp, but then I thought that a sufficiently perverse implementation might fail here. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 N�rnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils
