--- trunk/mkinitrd-magellan/busybox/editors/cmp.c 2010/04/29 20:38:48 983 +++ trunk/mkinitrd-magellan/busybox/editors/cmp.c 2010/05/30 11:32:42 984 @@ -24,9 +24,9 @@ #include "libbb.h" static const char fmt_eof[] ALIGN1 = "cmp: EOF on %s\n"; -static const char fmt_differ[] ALIGN1 = "%s %s differ: char %"OFF_FMT"d, line %d\n"; -// This fmt_l_opt uses gnu-isms. SUSv3 would be "%.0s%.0s%"OFF_FMT"d %o %o\n" -static const char fmt_l_opt[] ALIGN1 = "%.0s%.0s%"OFF_FMT"d %3o %3o\n"; +static const char fmt_differ[] ALIGN1 = "%s %s differ: char %"OFF_FMT"u, line %u\n"; +// This fmt_l_opt uses gnu-isms. SUSv3 would be "%.0s%.0s%"OFF_FMT"u %o %o\n" +static const char fmt_l_opt[] ALIGN1 = "%.0s%.0s%"OFF_FMT"u %3o %3o\n"; static const char opt_chars[] ALIGN1 = "sl"; #define CMP_OPT_s (1<<0) @@ -37,7 +37,7 @@ { FILE *fp1, *fp2, *outfile = stdout; const char *filename1, *filename2 = "-"; - USE_DESKTOP(off_t skip1 = 0, skip2 = 0;) + IF_DESKTOP(off_t skip1 = 0, skip2 = 0;) off_t char_pos = 0; int line_pos = 1; /* Hopefully won't overflow... */ const char *fmt; @@ -48,8 +48,8 @@ xfunc_error_retval = 2; /* 1 is returned if files are different. */ opt_complementary = "-1" - USE_DESKTOP(":?4") - SKIP_DESKTOP(":?2") + IF_DESKTOP(":?4") + IF_NOT_DESKTOP(":?2") ":l--s:s--l"; opt = getopt32(argv, opt_chars); argv += optind; @@ -108,7 +108,7 @@ outfile = stderr; /* There may have been output to stdout (option -l), so * make sure we fflush before writing to stderr. */ - xfflush_stdout(); + fflush_all(); } if (!(opt & CMP_OPT_s)) { if (opt & CMP_OPT_l) {