svn commit: trunk/busybox/coreutils

aldot at busybox.net aldot at busybox.net
Wed Apr 5 14:58:01 UTC 2006


Author: aldot
Date: 2006-04-05 07:57:59 -0700 (Wed, 05 Apr 2006)
New Revision: 14755

Log:
- use proper macros to print intmax_t.
  PRIuMAX and PRIxMAX are defined in inttypes depending on the wordsize.


Modified:
   trunk/busybox/coreutils/stat.c


Changeset:
Modified: trunk/busybox/coreutils/stat.c
===================================================================
--- trunk/busybox/coreutils/stat.c	2006-04-05 14:17:24 UTC (rev 14754)
+++ trunk/busybox/coreutils/stat.c	2006-04-05 14:57:59 UTC (rev 14755)
@@ -466,7 +466,7 @@
 	print_it(format, filename, print_stat, &statbuf);
 #else
 	if (flags & OPT_TERSE) {
-		printf("%s %lu %lu %lx %lu %lu %lx %lu %lu %lx %lx %lu %lu %lu %lu\n",
+		printf("%s %"PRIuMAX" %"PRIuMAX" %lx %lu %lu %"PRIxMAX" %"PRIuMAX" %lu %lx %lx %lu %lu %lu %lu\n",
 		       filename,
 		       (uintmax_t) (statbuf.st_size),
 		       (uintmax_t) statbuf.st_blocks,
@@ -500,8 +500,8 @@
 		else
 			printf("  File: \"%s\"\n", filename);
 
-		printf("  Size: %-10lu\tBlocks: %-10lu IO Block: %-6lu %s\n"
-		       "Device: %lxh/%lud\tInode: %-10lu  Links: %-5lu",
+		printf("  Size: %-10"PRIuMAX"\tBlocks: %-10"PRIuMAX" IO Block: %-6lu %s\n"
+		       "Device: %"PRIxMAX"h/%"PRIuMAX"d\tInode: %-10"PRIuMAX"  Links: %-5lu",
 		       (uintmax_t) (statbuf.st_size),
 		       (uintmax_t) statbuf.st_blocks,
 		       (unsigned long int) statbuf.st_blksize,




More information about the busybox-cvs mailing list