summaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-08-25 08:44:43 +0000
committerUlrich Drepper <drepper@redhat.com>2002-08-25 08:44:43 +0000
commit6d497bbef7f18e37f862c2eaa1820f87546936e1 (patch)
tree534e2ec81ac34ec866783d811a0124da1867366c /libio
parent5a47e7f2a85ecc103175095c0f4104065fd4d8db (diff)
Update.
* libio/tst-freopen.c (main): Use correct formats for __LINE__. * libio/tst-mmap-setvbuf.c (main): Likewise. * libio/tst-widetext.c (main): Likewise. * libio/tst-mmap-eofsync.c (do_test): Use correct format in error message. * libio/tst-mmap-fflushsync.c (do_test): Likewise. * libio/tst-mmap2-eofsync.c (do_test): Likewise.
Diffstat (limited to 'libio')
-rw-r--r--libio/tst-freopen.c18
-rw-r--r--libio/tst-mmap-eofsync.c2
-rw-r--r--libio/tst-mmap-fflushsync.c2
-rw-r--r--libio/tst-mmap-setvbuf.c12
-rw-r--r--libio/tst-mmap2-eofsync.c2
-rw-r--r--libio/tst-widetext.c68
6 files changed, 52 insertions, 52 deletions
diff --git a/libio/tst-freopen.c b/libio/tst-freopen.c
index 8228951071..2b71b1f492 100644
--- a/libio/tst-freopen.c
+++ b/libio/tst-freopen.c
@@ -34,14 +34,14 @@ main (void)
if (fd == -1)
{
- printf ("%Zd: cannot open temporary file: %m\n", __LINE__);
+ printf ("%u: cannot open temporary file: %m\n", __LINE__);
exit (1);
}
f = fdopen (fd, "w");
if (f == NULL)
{
- printf ("%Zd: cannot fdopen temporary file: %m\n", __LINE__);
+ printf ("%u: cannot fdopen temporary file: %m\n", __LINE__);
exit (1);
}
@@ -51,20 +51,20 @@ main (void)
f = fopen (name, "r");
if (f == NULL)
{
- printf ("%Zd: cannot fopen temporary file: %m\n", __LINE__);
+ printf ("%u: cannot fopen temporary file: %m\n", __LINE__);
exit (1);
}
if (fread (temp, 1, strlen (test), f) != strlen (test))
{
- printf ("%Zd: couldn't read the file back: %m\n", __LINE__);
+ printf ("%u: couldn't read the file back: %m\n", __LINE__);
exit (1);
}
temp [strlen (test)] = '\0';
if (strcmp (test, temp))
{
- printf ("%Zd: read different string than was written:\n%s%s",
+ printf ("%u: read different string than was written:\n%s%s",
__LINE__, test, temp);
exit (1);
}
@@ -72,26 +72,26 @@ main (void)
f = freopen (name, "r+", f);
if (f == NULL)
{
- printf ("%Zd: cannot freopen temporary file: %m\n", __LINE__);
+ printf ("%u: cannot freopen temporary file: %m\n", __LINE__);
exit (1);
}
if (fseek (f, 0, SEEK_SET) != 0)
{
- printf ("%Zd: couldn't fseek to start: %m\n", __LINE__);
+ printf ("%u: couldn't fseek to start: %m\n", __LINE__);
exit (1);
}
if (fread (temp, 1, strlen (test), f) != strlen (test))
{
- printf ("%Zd: couldn't read the file back: %m\n", __LINE__);
+ printf ("%u: couldn't read the file back: %m\n", __LINE__);
exit (1);
}
temp [strlen (test)] = '\0';
if (strcmp (test, temp))
{
- printf ("%Zd: read different string than was written:\n%s%s",
+ printf ("%u: read different string than was written:\n%s%s",
__LINE__, test, temp);
exit (1);
}
diff --git a/libio/tst-mmap-eofsync.c b/libio/tst-mmap-eofsync.c
index 909e868f7b..73748369ad 100644
--- a/libio/tst-mmap-eofsync.c
+++ b/libio/tst-mmap-eofsync.c
@@ -78,7 +78,7 @@ do_test (void)
printf ("wrote more to file\n");
else
{
- printf ("wrote %d != %d (%m)\n", c, sizeof text2 - 1);
+ printf ("wrote %d != %zd (%m)\n", c, sizeof text2 - 1);
result = 1;
}
diff --git a/libio/tst-mmap-fflushsync.c b/libio/tst-mmap-fflushsync.c
index f4d688f568..a4580e980b 100644
--- a/libio/tst-mmap-fflushsync.c
+++ b/libio/tst-mmap-fflushsync.c
@@ -71,7 +71,7 @@ do_test (void)
printf ("wrote more to file\n");
else
{
- printf ("wrote %d != %d (%m)\n", c, sizeof text2 - 1);
+ printf ("wrote %d != %zd (%m)\n", c, sizeof text2 - 1);
result = 1;
}
diff --git a/libio/tst-mmap-setvbuf.c b/libio/tst-mmap-setvbuf.c
index 6fe9ce3482..47854b714e 100644
--- a/libio/tst-mmap-setvbuf.c
+++ b/libio/tst-mmap-setvbuf.c
@@ -34,14 +34,14 @@ int main (void)
if (fd == -1)
{
- printf ("%Zd: cannot open temporary file: %m\n", __LINE__);
+ printf ("%u: cannot open temporary file: %m\n", __LINE__);
exit (1);
}
f = fdopen (fd, "w");
if (f == NULL)
{
- printf ("%Zd: cannot fdopen temporary file: %m\n", __LINE__);
+ printf ("%u: cannot fdopen temporary file: %m\n", __LINE__);
exit (1);
}
@@ -51,26 +51,26 @@ int main (void)
f = fopen (name, "r");
if (f == NULL)
{
- printf ("%Zd: cannot fopen temporary file: %m\n", __LINE__);
+ printf ("%u: cannot fopen temporary file: %m\n", __LINE__);
exit (1);
}
if (setvbuf (f, buf, _IOFBF, sizeof buf))
{
- printf ("%Zd: setvbuf failed: %m\n", __LINE__);
+ printf ("%u: setvbuf failed: %m\n", __LINE__);
exit (1);
}
if (fread (temp, 1, strlen (test), f) != strlen (test))
{
- printf ("%Zd: couldn't read the file back: %m\n", __LINE__);
+ printf ("%u: couldn't read the file back: %m\n", __LINE__);
exit (1);
}
temp [strlen (test)] = '\0';
if (strcmp (test, temp))
{
- printf ("%Zd: read different string than was written:\n%s%s",
+ printf ("%u: read different string than was written:\n%s%s",
__LINE__, test, temp);
exit (1);
}
diff --git a/libio/tst-mmap2-eofsync.c b/libio/tst-mmap2-eofsync.c
index 4275d4ac51..aefe472564 100644
--- a/libio/tst-mmap2-eofsync.c
+++ b/libio/tst-mmap2-eofsync.c
@@ -82,7 +82,7 @@ do_test (void)
printf ("wrote more to file\n");
else
{
- printf ("wrote %d != %d (%m)\n", c, pagesize);
+ printf ("wrote %d != %zd (%m)\n", c, pagesize);
result = 1;
}
diff --git a/libio/tst-widetext.c b/libio/tst-widetext.c
index 7a98f641be..ed196317a9 100644
--- a/libio/tst-widetext.c
+++ b/libio/tst-widetext.c
@@ -56,7 +56,7 @@ main (void)
mbsize = fread (mbbuf, 1, SIZE, stdin);
if (mbsize == 0)
{
- printf ("%Zd: cannot read input file from standard input: %m\n",
+ printf ("%u: cannot read input file from standard input: %m\n",
__LINE__);
exit (1);
}
@@ -75,7 +75,7 @@ main (void)
cd = iconv_open ("WCHAR_T", "UTF-8");
if (cd == (iconv_t) -1)
{
- printf ("%Zd: cannot get iconv descriptor for conversion to UCS4\n",
+ printf ("%u: cannot get iconv descriptor for conversion to UCS4\n",
__LINE__);
exit (1);
}
@@ -84,7 +84,7 @@ main (void)
nonr = iconv (cd, &inbuf, &inleft, &outbuf, &outleft);
if (nonr != 0 && nonr != (size_t) -1)
{
- printf ("%Zd: iconv performed %Zd nonreversible conversions\n",
+ printf ("%u: iconv performed %Zd nonreversible conversions\n",
__LINE__, nonr);
exit (1);
}
@@ -92,14 +92,14 @@ main (void)
if ((size_t) nonr == -1 )
{
printf ("\
-%Zd: iconv returned with %Zd and errno = %m (inleft: %Zd, outleft: %Zd)\n",
+%u: iconv returned with %Zd and errno = %m (inleft: %Zd, outleft: %Zd)\n",
__LINE__, nonr, inleft, outleft);
exit (1);
}
if (inleft != 0)
{
- printf ("%Zd: iconv didn't convert all input\n", __LINE__);
+ printf ("%u: iconv didn't convert all input\n", __LINE__);
exit (1);
}
@@ -107,7 +107,7 @@ main (void)
if ((sizeof (wcbuf) - outleft) % sizeof (wchar_t) != 0)
{
- printf ("%Zd: iconv converted not complete wchar_t\n", __LINE__);
+ printf ("%u: iconv converted not complete wchar_t\n", __LINE__);
exit (1);
}
@@ -122,7 +122,7 @@ main (void)
fd = mkstemp (name);
if (fd == -1)
{
- printf ("%Zd: cannot open temporary file: %m\n", __LINE__);
+ printf ("%u: cannot open temporary file: %m\n", __LINE__);
exit (1);
}
@@ -131,7 +131,7 @@ main (void)
fp = fdopen (dup (fd), "w");
if (fp == NULL)
{
- printf ("%Zd: fdopen of temp file for writing failed: %m\n", __LINE__);
+ printf ("%u: fdopen of temp file for writing failed: %m\n", __LINE__);
exit (1);
}
@@ -139,7 +139,7 @@ main (void)
{
if (fputwc (wcbuf[n], fp) == WEOF)
{
- printf ("%Zd: fputwc failed: %m\n", __LINE__);
+ printf ("%u: fputwc failed: %m\n", __LINE__);
exit (1);
}
}
@@ -147,7 +147,7 @@ main (void)
res = fclose (fp);
if (res != 0)
{
- printf ("%Zd: fclose after single-character writing failed (%d): %m\n",
+ printf ("%u: fclose after single-character writing failed (%d): %m\n",
__LINE__, res);
exit (1);
}
@@ -156,7 +156,7 @@ main (void)
fp = fdopen (dup (fd), "r");
if (fp == NULL)
{
- printf ("%Zd: fdopen of temp file for reading failed: %m\n", __LINE__);
+ printf ("%u: fdopen of temp file for reading failed: %m\n", __LINE__);
exit (1);
}
@@ -165,7 +165,7 @@ main (void)
wint_t wch = fgetwc (fp);
if (wch == WEOF)
{
- printf ("%Zd: fgetwc failed (idx %Zd): %m\n", __LINE__, n);
+ printf ("%u: fgetwc failed (idx %Zd): %m\n", __LINE__, n);
exit (1);
}
wc2buf[n] = wch;
@@ -174,19 +174,19 @@ main (void)
/* There should be nothing else. */
if (fgetwc (fp) != WEOF)
{
- printf ("%Zd: too many characters available with fgetwc\n", __LINE__);
+ printf ("%u: too many characters available with fgetwc\n", __LINE__);
status = 1;
}
else if (wmemcmp (wcbuf, wc2buf, wcsize) != 0)
{
- printf ("%Zd: buffer read with fgetwc differs\n", __LINE__);
+ printf ("%u: buffer read with fgetwc differs\n", __LINE__);
status = 1;
}
res = fclose (fp);
if (res != 0)
{
- printf ("%Zd: fclose after single-character reading failed (%d): %m\n",
+ printf ("%u: fclose after single-character reading failed (%d): %m\n",
__LINE__, res);
exit (1);
}
@@ -198,13 +198,13 @@ main (void)
fp = fdopen (fd, "r");
if (fp == NULL)
{
- printf ("%Zd: fdopen of temp file for reading failed: %m\n", __LINE__);
+ printf ("%u: fdopen of temp file for reading failed: %m\n", __LINE__);
exit (1);
}
if (fread (mb2buf, 1, mbsize, fp) != mbsize)
{
- printf ("%Zd: cannot read all of the temp file\n", __LINE__);
+ printf ("%u: cannot read all of the temp file\n", __LINE__);
status = 1;
}
else
@@ -212,13 +212,13 @@ main (void)
/* Make sure there is nothing left. */
if (fgetc (fp) != EOF)
{
- printf ("%Zd: more input available\n", __LINE__);
+ printf ("%u: more input available\n", __LINE__);
status = 1;
}
if (memcmp (mb2buf, mbbuf, mbsize) != 0)
{
- printf ("%Zd: buffer written with fputwc differs\n", __LINE__);
+ printf ("%u: buffer written with fputwc differs\n", __LINE__);
status = 1;
}
}
@@ -226,7 +226,7 @@ main (void)
res = fclose (fp);
if (res != 0)
{
- printf ("%Zd: fclose after single-character reading failed (%d): %m\n",
+ printf ("%u: fclose after single-character reading failed (%d): %m\n",
__LINE__, res);
exit (1);
}
@@ -236,7 +236,7 @@ main (void)
fd = mkstemp (strcpy (name, "/tmp/widetext.out.XXXXXX"));
if (fd == -1)
{
- printf ("%Zd: cannot open temporary file: %m\n", __LINE__);
+ printf ("%u: cannot open temporary file: %m\n", __LINE__);
exit (1);
}
@@ -245,7 +245,7 @@ main (void)
fp = fdopen (dup (fd), "w");
if (fp == NULL)
{
- printf ("%Zd: fdopen of temp file for writing failed: %m\n", __LINE__);
+ printf ("%u: fdopen of temp file for writing failed: %m\n", __LINE__);
exit (1);
}
@@ -275,7 +275,7 @@ main (void)
res = fclose (fp);
if (res != 0)
{
- printf ("%Zd: fclose after line-wise writing failed (%d): %m\n",
+ printf ("%u: fclose after line-wise writing failed (%d): %m\n",
__LINE__, res);
exit (1);
}
@@ -284,7 +284,7 @@ main (void)
fp = fdopen (dup (fd), "r");
if (fp == NULL)
{
- printf ("%Zd: fdopen of temp file for reading failed: %m\n", __LINE__);
+ printf ("%u: fdopen of temp file for reading failed: %m\n", __LINE__);
exit (1);
}
@@ -292,7 +292,7 @@ main (void)
{
if (fgetws (wcp, &wc2buf[wcsize] - wcp + 1, fp) == NULL)
{
- printf ("%Zd: short read using fgetws (only %Zd of %Zd)\n",
+ printf ("%u: short read using fgetws (only %Zd of %Zd)\n",
__LINE__, wcp - wc2buf, wcsize);
status = 1;
break;
@@ -302,26 +302,26 @@ main (void)
if (wcp > &wc2buf[wcsize])
{
- printf ("%Zd: fgetws read too much\n", __LINE__);
+ printf ("%u: fgetws read too much\n", __LINE__);
status = 1;
}
else if (fgetwc (fp) != WEOF)
{
/* There should be nothing else. */
- printf ("%Zd: too many characters available with fgetws\n", __LINE__);
+ printf ("%u: too many characters available with fgetws\n", __LINE__);
status = 1;
}
if (wcp >= &wc2buf[wcsize] && wmemcmp (wcbuf, wc2buf, wcsize) != 0)
{
- printf ("%Zd: buffer read with fgetws differs\n", __LINE__);
+ printf ("%u: buffer read with fgetws differs\n", __LINE__);
status = 1;
}
res = fclose (fp);
if (res != 0)
{
- printf ("%Zd: fclose after single-character reading failed (%d): %m\n",
+ printf ("%u: fclose after single-character reading failed (%d): %m\n",
__LINE__, res);
exit (1);
}
@@ -333,13 +333,13 @@ main (void)
fp = fdopen (fd, "r");
if (fp == NULL)
{
- printf ("%Zd: fdopen of temp file for reading failed: %m\n", __LINE__);
+ printf ("%u: fdopen of temp file for reading failed: %m\n", __LINE__);
exit (1);
}
if (fread (mb2buf, 1, mbsize, fp) != mbsize)
{
- printf ("%Zd: cannot read all of the temp file\n", __LINE__);
+ printf ("%u: cannot read all of the temp file\n", __LINE__);
status = 1;
}
else
@@ -347,13 +347,13 @@ main (void)
/* Make sure there is nothing left. */
if (fgetc (fp) != EOF)
{
- printf ("%Zd: more input available\n", __LINE__);
+ printf ("%u: more input available\n", __LINE__);
status = 1;
}
if (memcmp (mb2buf, mbbuf, mbsize) != 0)
{
- printf ("%Zd: buffer written with fputws differs\n", __LINE__);
+ printf ("%u: buffer written with fputws differs\n", __LINE__);
status = 1;
}
}
@@ -361,7 +361,7 @@ main (void)
res = fclose (fp);
if (res != 0)
{
- printf ("%Zd: fclose after single-character reading failed (%d): %m\n",
+ printf ("%u: fclose after single-character reading failed (%d): %m\n",
__LINE__, res);
exit (1);
}