* lisp.h (str_collate):

* sysdep.c (str_collate): Return int.
(str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
This commit is contained in:
Michael Albinus 2014-08-27 13:22:37 +02:00
parent 28e0124dd0
commit 17d94f1ba4
3 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2014-08-27 Michael Albinus <michael.albinus@gmx.de>
* lisp.h (str_collate):
* sysdep.c (str_collate): Return int.
(str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
2014-08-27 Dmitry Antipov <dmantipov@yandex.ru>
Fix some glitches in previous change.

View file

@ -4298,7 +4298,7 @@ extern void lock_file (Lisp_Object);
extern void unlock_file (Lisp_Object);
extern void unlock_buffer (struct buffer *);
extern void syms_of_filelock (void);
extern ptrdiff_t str_collate (Lisp_Object, Lisp_Object);
extern int str_collate (Lisp_Object, Lisp_Object);
/* Defined in sound.c. */
extern void syms_of_sound (void);

View file

@ -3606,7 +3606,7 @@ system_process_attributes (Lisp_Object pid)
# define setlocale(category, locale) ((char *) 0)
# endif
ptrdiff_t
int
str_collate (Lisp_Object s1, Lisp_Object s2)
{
ptrdiff_t res, len, i, i_byte;
@ -3653,7 +3653,10 @@ str_collate (Lisp_Object s1, Lisp_Object s2)
#endif
}
errno = 0;
res = wcscoll (p1, p2);
if (errno)
error ("Wrong argument: %s", strerror (errno));
#ifdef HAVE_USELOCALE
/* Free the locale object, and reset. */
@ -3674,7 +3677,7 @@ str_collate (Lisp_Object s1, Lisp_Object s2)
#endif /* __STDC_ISO_10646__ */
#ifdef WINDOWSNT
ptrdiff_t
int
str_collate (Lisp_Object s1, Lisp_Object s2)
{
Lisp_Object lc_collate =