Support for bitwise comparison of floating-point numbers.
[gnulib.git] / lib / memcoll.c
index 7f61a6b..e5ef363 100644 (file)
@@ -1,5 +1,6 @@
 /* Locale-specific memory comparison.
-   Copyright (C) 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+   Copyright (C) 1999, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,9 +18,7 @@
 
 /* Contributed by Paul Eggert <eggert@twinsun.com>.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "memcoll.h"
 
@@ -43,7 +42,10 @@ memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
      the buffers using strcoll on each substring.  */
 
   if (s1len == s2len && memcmp (s1, s2, s1len) == 0)
-    diff = 0;
+    {
+      errno = 0;
+      diff = 0;
+    }
   else
     {
       char n1 = s1[s1len];