]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp.h (str_collate):
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 27 Aug 2014 11:22:37 +0000 (13:22 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 27 Aug 2014 11:22:37 +0000 (13:22 +0200)
* sysdep.c (str_collate): Return int.
(str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.

src/ChangeLog
src/lisp.h
src/sysdep.c

index 33fea805898c746798549b35165011695fe71365..d7066b823b969f63f62af55d7d8ab87f2c8c055c 100644 (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.
index 012e5fad18de7f1f8281dec5107a3f60c9156e44..b9f456b37453185d5251e4529f06ffb7ecaac21a 100644 (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);
index 7b93cb93b85678a11d7d191fccea61ba3dbb5536..4b0f54ebe6e7ee60149bc910a73477f4534de217 100644 (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 =