about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/bug1.c4
-rw-r--r--stdio-common/bug5.c2
-rw-r--r--stdio-common/printf.h12
-rw-r--r--stdio-common/test_rdwr.c10
-rw-r--r--stdio-common/tstgetln.c4
5 files changed, 16 insertions, 16 deletions
diff --git a/stdio-common/bug1.c b/stdio-common/bug1.c
index 455b14d7cf..51639d3476 100644
--- a/stdio-common/bug1.c
+++ b/stdio-common/bug1.c
@@ -12,12 +12,12 @@ main (void)
   stream = open_memstream (&bp, &size);
   fprintf (stream, "hello");
   fflush (stream);
-  printf ("buf = %s, size = %d\n", bp, size);
+  printf ("buf = %s, size = %Zu\n", bp, size);
   lose |= size != 5;
   lose |= strncmp (bp, "hello", size);
   fprintf (stream, ", world");
   fclose (stream);
-  printf ("buf = %s, size = %d\n", bp, size);
+  printf ("buf = %s, size = %Zu\n", bp, size);
   lose |= size != 12;
   lose |= strncmp (bp, "hello, world", 12);
 
diff --git a/stdio-common/bug5.c b/stdio-common/bug5.c
index 8c3d0e3bc7..f655845891 100644
--- a/stdio-common/bug5.c
+++ b/stdio-common/bug5.c
@@ -28,7 +28,7 @@ main (void)
       return 1;
     }
   for (i = 0; i < 1000; ++i)
-    fprintf (in, "%u\n", i);
+    fprintf (in, "%Zu\n", i);
 
   out = fopen (outname, "w");
   if (out == NULL)
diff --git a/stdio-common/printf.h b/stdio-common/printf.h
index 8b3b4eb967..852027ce21 100644
--- a/stdio-common/printf.h
+++ b/stdio-common/printf.h
@@ -59,17 +59,17 @@ struct printf_info
    The function should return the number of characters written,
    or -1 for errors.  */
 
-typedef int printf_function __P ((FILE *__stream,
-				  __const struct printf_info *__info,
-				  __const void *__const *__args));
+typedef int printf_function __PMT ((FILE *__stream,
+				    __const struct printf_info *__info,
+				    __const void *__const *__args));
 
 /* Type of a printf specifier-arginfo function.
    INFO gives information about the format specification.
    N, ARGTYPES, and return value are as for printf_parse_format.  */
 
-typedef int printf_arginfo_function __P ((__const struct printf_info *__info,
-					  size_t __n,
-					  int *__argtypes));
+typedef int printf_arginfo_function __PMT ((__const struct printf_info *__info,
+					    size_t __n,
+					    int *__argtypes));
 
 
 /* Register FUNC to be called to format SPEC specifiers; ARGINFO must be
diff --git a/stdio-common/test_rdwr.c b/stdio-common/test_rdwr.c
index 32bce5b77a..e274dcc665 100644
--- a/stdio-common/test_rdwr.c
+++ b/stdio-common/test_rdwr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -61,13 +61,13 @@ main (int argc, char **argv)
 	int c = getc (f);
 	if (c == EOF)
 	  {
-	    printf ("EOF at %u.\n", i);
+	    printf ("EOF at %Zu.\n", i);
 	    lose = 1;
 	    break;
 	  }
 	else if (c != hello[i])
 	  {
-	    printf ("Got '%c' instead of '%c' at %u.\n",
+	    printf ("Got '%c' instead of '%c' at %Zu.\n",
 		    (unsigned char) c, hello[i], i);
 	    lose = 1;
 	    break;
@@ -83,7 +83,7 @@ main (int argc, char **argv)
 	for (i = replace_from; i < replace_to; ++i)
 	  if (putc(replace[i], f) == EOF)
 	    {
-	      printf ("putc('%c') got %s at %u.\n",
+	      printf ("putc('%c') got %s at %Zu.\n",
 		      replace[i], strerror (errno), i);
 	      lose = 1;
 	      break;
@@ -97,7 +97,7 @@ main (int argc, char **argv)
       }
     else
       {
-	printf ("ftell returns %lu; should be %u.\n", where, replace_from);
+	printf ("ftell returns %lu; should be %Zu.\n", where, replace_from);
 	lose = 1;
       }
   }
diff --git a/stdio-common/tstgetln.c b/stdio-common/tstgetln.c
index fe37672703..d6ff2c139d 100644
--- a/stdio-common/tstgetln.c
+++ b/stdio-common/tstgetln.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ main (int argc, char *argv[])
 
   while ((len = getline (&buf, &size, stdin)) != -1)
     {
-      printf ("bufsize %u; read %d: ", size, len);
+      printf ("bufsize %Zu; read %Zd: ", size, len);
       if (fwrite (buf, len, 1, stdout) != 1)
 	{
 	  perror ("fwrite");