diff --git a/string/stratcliff.c b/string/stratcliff.c
index e28b0c5058..ae780379cb 100644
--- a/string/stratcliff.c
+++ b/string/stratcliff.c
@@ -58,8 +58,8 @@
 int
 do_test (void)
 {
-  int size = sysconf (_SC_PAGESIZE);
-  int nchars = size / sizeof (CHAR);
+  size_t size = sysconf (_SC_PAGESIZE);
+  size_t nchars = size / sizeof (CHAR);
   CHAR *adr;
   CHAR *dest;
   int result = 0;
@@ -80,7 +80,7 @@ do_test (void)
     }
   else
     {
-      int inner, middle, outer;
+      size_t inner, middle, outer;
 
       mprotect (adr, size, PROT_NONE);
       mprotect (adr + 2 * nchars, size, PROT_NONE);
@@ -101,7 +101,7 @@ do_test (void)
 
 	      if (STRLEN (&adr[outer]) != (size_t) (inner - outer))
 		{
-		  printf ("%s flunked for outer = %d, inner = %d\n",
+		  printf ("%s flunked for outer = %Zd, inner = %Zd\n",
 			  STRINGIFY (STRLEN), outer, inner);
 		  result = 1;
 		}
@@ -120,7 +120,7 @@ do_test (void)
 	      if (STRNLEN (&adr[outer], inner - outer + 1)
 		  != (size_t) (inner - outer))
 		{
-		  printf ("%s flunked for outer = %d, inner = %d\n",
+		  printf ("%s flunked for outer = %Zd, inner = %Zd\n",
 			  STRINGIFY (STRNLEN), outer, inner);
 		  result = 1;
 		}
@@ -135,7 +135,7 @@ do_test (void)
 	      if (STRNLEN (&adr[outer], inner - outer)
 		  != (size_t) (inner - outer))
 		{
-		  printf ("%s flunked bounded for outer = %d, inner = %d\n",
+		  printf ("%s flunked bounded for outer = %Zd, inner = %Zd\n",
 			  STRINGIFY (STRNLEN), outer, inner);
 		  result = 1;
 		}
@@ -158,8 +158,8 @@ do_test (void)
 		      || (inner != middle
 			  && (cp - &adr[outer]) != middle - outer))
 		    {
-		      printf ("%s flunked for outer = %d, middle = %d, "
-			      "inner = %d\n",
+		      printf ("%s flunked for outer = %Zd, middle = %Zd, "
+			      "inner = %Zd\n",
 			      STRINGIFY (STRCHR), outer, middle, inner);
 		      result = 1;
 		    }
@@ -195,8 +195,8 @@ do_test (void)
 		      || (inner != middle
 			  && (cp - &adr[outer]) != middle - outer))
 		    {
-		      printf ("%s flunked for outer = %d, middle = %d, "
-			      "inner = %d\n",
+		      printf ("%s flunked for outer = %Zd, middle = %Zd, "
+			      "inner = %Zd\n",
 			      STRINGIFY (STRRCHR), outer, middle, inner);
 		      result = 1;
 		    }
@@ -218,7 +218,7 @@ do_test (void)
 
 	      if (cp - &adr[outer] != middle - outer)
 		{
-		  printf ("%s flunked for outer = %d, middle = %d\n",
+		  printf ("%s flunked for outer = %Zd, middle = %Zd\n",
 			  STRINGIFY (MEMCHR), outer, middle);
 		  result = 1;
 		}
@@ -232,7 +232,7 @@ do_test (void)
 
 	  if (cp != NULL)
 	    {
-	      printf ("%s flunked for outer = %d\n",
+	      printf ("%s flunked for outer = %Zd\n",
 		      STRINGIFY (MEMCHR), outer);
 	      result = 1;
 	    }
@@ -251,7 +251,7 @@ do_test (void)
 
 	      if (cp - &adr[outer] != middle - outer)
 		{
-		  printf ("%s flunked for outer = %d, middle = %d\n",
+		  printf ("%s flunked for outer = %Zd, middle = %Zd\n",
 			  STRINGIFY (rawmemchr), outer, middle);
 		  result = 1;
 		}
@@ -271,7 +271,7 @@ do_test (void)
 
 	      if (cp - &adr[outer] != middle - outer)
 		{
-		  printf ("%s flunked for outer = %d, middle = %d\n",
+		  printf ("%s flunked for outer = %Zd, middle = %Zd\n",
 			  STRINGIFY (memrchr), outer, middle);
 		  result = 1;
 		}
@@ -285,7 +285,7 @@ do_test (void)
 
 	  if (cp != NULL)
 	    {
-	      printf ("%s flunked for outer = %d\n",
+	      printf ("%s flunked for outer = %Zd\n",
 		      STRINGIFY (memrchr), outer);
 	      result = 1;
 	    }
@@ -302,7 +302,7 @@ do_test (void)
 	      if (STRCPY (dest, &adr[outer]) != dest
 		  || STRLEN (dest) != (size_t) (inner - outer))
 		{
-		  printf ("%s flunked for outer = %d, inner = %d\n",
+		  printf ("%s flunked for outer = %Zd, inner = %Zd\n",
 			  STRINGIFY (STRCPY), outer, inner);
 		  result = 1;
 		}
@@ -322,14 +322,14 @@ do_test (void)
 
 	    if (STRCMP (adr + middle, dest + nchars - outer) <= 0)
 	      {
-		printf ("%s 1 flunked for outer = %d, middle = %d\n",
+		printf ("%s 1 flunked for outer = %Zd, middle = %Zd\n",
 			STRINGIFY (STRCMP), outer, middle);
 		result = 1;
 	      }
 
 	    if (STRCMP (dest + nchars - outer, adr + middle) >= 0)
 	      {
-		printf ("%s 2 flunked for outer = %d, middle = %d\n",
+		printf ("%s 2 flunked for outer = %Zd, middle = %Zd\n",
 			STRINGIFY (STRCMP), outer, middle);
 		result = 1;
 	      }
@@ -348,16 +348,16 @@ do_test (void)
 	      {
 		if (STRNCMP (adr + middle, dest + nchars - outer, inner) != 0)
 		  {
-		    printf ("%s 1 flunked for outer = %d, middle = %d, "
-			    "inner = %d\n",
+		    printf ("%s 1 flunked for outer = %Zd, middle = %Zd, "
+			    "inner = %Zd\n",
 			    STRINGIFY (STRNCMP), outer, middle, inner);
 		    result = 1;
 		  }
 
 		if (STRNCMP (dest + nchars - outer, adr + middle, inner) != 0)
 		  {
-		    printf ("%s 2 flunked for outer = %d, middle = %d, "
-			    "inner = %d\n",
+		    printf ("%s 2 flunked for outer = %Zd, middle = %Zd, "
+			    "inner = %Zd\n",
 			    STRINGIFY (STRNCMP), outer, middle, inner);
 		    result = 1;
 		  }
@@ -365,14 +365,14 @@ do_test (void)
 
 	    if (STRNCMP (adr + middle, dest + nchars - outer, outer) >= 0)
 	      {
-		printf ("%s 1 flunked for outer = %d, middle = %d, full\n",
+		printf ("%s 1 flunked for outer = %Zd, middle = %Zd, full\n",
 			STRINGIFY (STRNCMP), outer, middle);
 		result = 1;
 	      }
 
 	    if (STRNCMP (dest + nchars - outer, adr + middle, outer) <= 0)
 	      {
-		printf ("%s 2 flunked for outer = %d, middle = %d, full\n",
+		printf ("%s 2 flunked for outer = %Zd, middle = %Zd, full\n",
 			STRINGIFY (STRNCMP), outer, middle);
 		result = 1;
 	      }
@@ -389,7 +389,7 @@ do_test (void)
 	      if (STRNCPY (dest, &adr[outer], len) != dest
 		  || MEMCMP (dest, &adr[outer], len) != 0)
 		{
-		  printf ("outer %s flunked for outer = %d, len = %Zd\n",
+		  printf ("outer %s flunked for outer = %Zd, len = %Zd\n",
 			  STRINGIFY (STRNCPY), outer, len);
 		  result = 1;
 		}
@@ -413,7 +413,7 @@ do_test (void)
 		      || (inner - outer < len
 			  && STRLEN (dest) != (inner - outer)))
 		    {
-		      printf ("%s flunked for outer = %d, inner = %d, "
+		      printf ("%s flunked for outer = %Zd, inner = %Zd, "
 			      "len = %Zd\n",
 			      STRINGIFY (STRNCPY), outer, inner, len);
 		      result = 1;
@@ -424,7 +424,7 @@ do_test (void)
 		      || (inner - outer < len
 			  && STRLEN (dest + 1) != (inner - outer)))
 		    {
-		      printf ("%s+1 flunked for outer = %d, inner = %d, "
+		      printf ("%s+1 flunked for outer = %Zd, inner = %Zd, "
 			      "len = %Zd\n",
 			      STRINGIFY (STRNCPY), outer, inner, len);
 		      result = 1;
@@ -444,7 +444,7 @@ do_test (void)
 
 	      if ((STPCPY (dest, &adr[outer]) - dest) != inner - outer)
 		{
-		  printf ("%s flunked for outer = %d, inner = %d\n",
+		  printf ("%s flunked for outer = %Zd, inner = %Zd\n",
 			  STRINGIFY (STPCPY), outer, inner);
 		  result = 1;
 		}
@@ -464,7 +464,7 @@ do_test (void)
 	      if (STPNCPY (dest, &adr[outer], len) != dest + len
 		  || MEMCMP (dest, &adr[outer], len) != 0)
 		{
-		  printf ("outer %s flunked for outer = %d, len = %Zd\n",
+		  printf ("outer %s flunked for outer = %Zd, len = %Zd\n",
 			  STRINGIFY (STPNCPY), outer, len);
 		  result = 1;
 		}
@@ -483,8 +483,8 @@ do_test (void)
 		  if ((STPNCPY (dest, &adr[outer], inner) - dest)
 		      != MIN (inner, middle - outer))
 		    {
-		      printf ("%s flunked for outer = %d, middle = %d, "
-			      "inner = %d\n",
+		      printf ("%s flunked for outer = %Zd, middle = %Zd, "
+			      "inner = %Zd\n",
 			      STRINGIFY (STPNCPY), outer, middle, inner);
 		      result = 1;
 		    }
@@ -499,7 +499,7 @@ do_test (void)
 	for (inner = 0; inner < nchars - outer; ++inner)
 	  if (MEMCPY (dest, &adr[outer], inner) !=  dest)
 	    {
-	      printf ("%s flunked for outer = %d, inner = %d\n",
+	      printf ("%s flunked for outer = %Zd, inner = %Zd\n",
 		      STRINGIFY (MEMCPY), outer, inner);
 	      result = 1;
 	    }
@@ -509,7 +509,7 @@ do_test (void)
 	for (inner = 0; inner < nchars - outer; ++inner)
 	  if (MEMPCPY (dest, &adr[outer], inner) !=  dest + inner)
 	    {
-	      printf ("%s flunked for outer = %d, inner = %d\n",
+	      printf ("%s flunked for outer = %Zd, inner = %Zd\n",
 		      STRINGIFY (MEMPCPY), outer, inner);
 	      result = 1;
 	    }
@@ -522,7 +522,7 @@ do_test (void)
 	for (inner = 0; inner < nchars - outer; ++inner)
 	  if (memccpy (dest, &adr[outer], L('\1'), inner) != NULL)
 	    {
-	      printf ("memccpy flunked full copy for outer = %d, inner = %d\n",
+	      printf ("memccpy flunked full copy for outer = %Zd, inner = %Zd\n",
 		      outer, inner);
 	      result = 1;
 	    }
@@ -538,14 +538,14 @@ do_test (void)
 		    !=  dest + inner + 1)
 		  {
 		    printf ("\
-memccpy flunked partial copy for outer = %d, middle = %d, inner = %d\n",
+memccpy flunked partial copy for outer = %Zd, middle = %Zd, inner = %Zd\n",
 			    outer, middle, inner);
 		    result = 1;
 		  }
 		else if (dest[inner + 1] != L('\2'))
 		  {
 		    printf ("\
-memccpy copied too much for outer = %d, middle = %d, inner = %d\n",
+memccpy copied too much for outer = %Zd, middle = %Zd, inner = %Zd\n",
 			    outer, middle, inner);
 		    result = 1;
 		  }
