[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117783: * sysdep.c (str_collate): Clear errno just
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] trunk r117783: * sysdep.c (str_collate): Clear errno just before wcscoll(_l). |
Date: |
Sat, 30 Aug 2014 16:47:24 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117783
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sat 2014-08-30 09:47:19 -0700
message:
* sysdep.c (str_collate): Clear errno just before wcscoll(_l).
One can't hoist this out of the 'if', because intervening calls to
newlocale, twolower, etc. can change errno.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/sysdep.c sysdep.c-20091113204419-o5vbwnq5f7feedwu-448
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-08-30 09:21:16 +0000
+++ b/src/ChangeLog 2014-08-30 16:47:19 +0000
@@ -1,3 +1,9 @@
+2014-08-30 Paul Eggert <address@hidden>
+
+ * sysdep.c (str_collate): Clear errno just before wcscoll(_l).
+ One can't hoist this out of the 'if', because intervening calls to
+ newlocale, twolower, etc. can change errno.
+
2014-08-30 Eli Zaretskii <address@hidden>
* sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the
=== modified file 'src/sysdep.c'
--- a/src/sysdep.c 2014-08-30 08:19:24 +0000
+++ b/src/sysdep.c 2014-08-30 16:47:19 +0000
@@ -3740,8 +3740,6 @@
FETCH_STRING_CHAR_ADVANCE (*(p2+i-1), s2, i, i_byte);
*(p2+len) = 0;
- errno = 0;
-
if (STRINGP (locale))
{
locale_t loc = newlocale (LC_COLLATE_MASK | LC_CTYPE_MASK,
@@ -3757,6 +3755,7 @@
*p = towlower_l (*p, loc);
}
+ errno = 0;
res = wcscoll_l (p1, p2, loc);
err = errno;
freelocale (loc);
@@ -3771,6 +3770,7 @@
*p = towlower (*p);
}
+ errno = 0;
res = wcscoll (p1, p2);
err = errno;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117783: * sysdep.c (str_collate): Clear errno just before wcscoll(_l).,
Paul Eggert <=