summaryrefslogtreecommitdiff
path: root/src/dd.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-11-27 00:51:00 +0000
committerPádraig Brady <P@draigBrady.com>2014-11-27 14:25:00 +0000
commit7d1fe8868e29ae2644831685df4a29638721d6ba (patch)
treedca250b9dd338b191879afd36e115eba244db1ae /src/dd.c
parenta78d85386bf4a55d7ccbd7c03c0075615b3f61d2 (diff)
downloadcoreutils-7d1fe8868e29ae2644831685df4a29638721d6ba.tar.xz
rm: fix prompted number of arguments to remove on some platforms
"zu" was output on solaris 8 for example rather than the number, since coreutils-8.22. * cfg.mk: Disallow %z, since we don't currently use the gnulib fprintf module, so any usage with it is non portable. Also our usage with error() currently works only through an ancillary dependency on the vfprintf gnulib module. * src/rm.c (main): Use %PRIuMAX rather than %zu for portability. * src/dd.c (alloc_[io]buf): Likewise for consistency. * src/od.c (main): Likewise. * src/split.c (set_suffix_length): Likewise. * NEWS: Mention the rm bug fix. Reported in http://bugs.gnu.org/19184
Diffstat (limited to 'src/dd.c')
-rw-r--r--src/dd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dd.c b/src/dd.c
index 78433ff58..0b5a4b20a 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -696,7 +696,7 @@ alloc_ibuf (void)
char *real_buf = malloc (input_blocksize + INPUT_BLOCK_SLOP);
if (!real_buf)
error (EXIT_FAILURE, 0,
- _("memory exhausted by input buffer of size %zu bytes (%s)"),
+ _("memory exhausted by input buffer of size %"PRIuMAX" bytes (%s)"),
input_blocksize, human_size (input_blocksize));
real_buf += SWAB_ALIGN_OFFSET; /* allow space for swab */
@@ -718,7 +718,8 @@ alloc_obuf (void)
char *real_obuf = malloc (output_blocksize + OUTPUT_BLOCK_SLOP);
if (!real_obuf)
error (EXIT_FAILURE, 0,
- _("memory exhausted by output buffer of size %zu bytes (%s)"),
+ _("memory exhausted by output buffer of size %"PRIuMAX
+ " bytes (%s)"),
output_blocksize, human_size (output_blocksize));
obuf = ptr_align (real_obuf, page_size);
}