Ensure we use gnulib mktime rather than glibc's mktime, on hosts
[gnulib.git] / lib / strcasecmp.c
index 0ae9627..cf4ab88 100644 (file)
@@ -29,7 +29,7 @@
 # define LENGTH_LIMIT_EXPR(Expr) 0
 #endif
 
-#include <sys/types.h>
+#include <stddef.h>
 #include <ctype.h>
 
 #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
@@ -51,11 +51,14 @@ STRXCASECMP_FUNCTION (const char *s1, const char *s2 STRXCASECMP_DECLARE_N)
 
   do
     {
-      c1 = TOLOWER (*p1++);
-      c2 = TOLOWER (*p2++);
+      c1 = TOLOWER (*p1);
+      c2 = TOLOWER (*p2);
 
       if (LENGTH_LIMIT_EXPR (--n == 0) || c1 == '\0')
        break;
+
+      ++p1;
+      ++p2;
     }
   while (c1 == c2);