pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pbulk/files/pbulk Use %lu + casts instead of ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/dfac6d963430
branches: trunk
changeset: 537756:dfac6d963430
user: joerg <joerg%pkgsrc.org@localhost>
date: Tue Jan 15 22:14:30 2008 +0000
description:
Use %lu + casts instead of depending on size_t's %z. Some Operating
Systems like Solaris don't implement %z.
diffstat:
pkgtools/pbulk/files/pbulk/pbuild/stat.c | 26 +++++++++++++++++---------
pkgtools/pbulk/files/pbulk/pscan/jobs.c | 9 ++++++---
2 files changed, 23 insertions(+), 12 deletions(-)
diffs (70 lines):
diff -r dc0043aa6dfb -r dfac6d963430 pkgtools/pbulk/files/pbulk/pbuild/stat.c
--- a/pkgtools/pbulk/files/pbulk/pbuild/stat.c Tue Jan 15 22:04:57 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/pbuild/stat.c Tue Jan 15 22:14:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: stat.c,v 1.2 2007/06/25 21:38:45 joerg Exp $ */
+/* $NetBSD: stat.c,v 1.3 2008/01/15 22:14:30 joerg Exp $ */
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -99,14 +99,22 @@
(void)memcpy(&tmp, buf + 24, 4);
st.done = ntohl(tmp);
- (void)printf("Jobs not yet processed: %zu\n", st.open_jobs);
- (void)printf("Jobs currently in processing: %zu\n", st.in_processing);
- (void)printf("Successful builds: %zu\n", st.done);
- (void)printf("Failing builds: %zu\n", st.failed + st.prefailed + st.indirect_failed + st.indirect_prefailed);
- (void)printf(" Directly broken: %zu\n", st.failed);
- (void)printf(" Broken due to a broken dependency: %zu\n", st.indirect_failed);
- (void)printf(" Not build as explicitly marked broken: %zu\n", st.prefailed);
- (void)printf(" Broken due to an explicitly broken dependency: %zu\n", st.indirect_prefailed);
+ (void)printf("Jobs not yet processed: %lu\n",
+ (unsigned long)st.open_jobs);
+ (void)printf("Jobs currently in processing: %lu\n",
+ (unsigned long)st.in_processing);
+ (void)printf("Successful builds: %lu\n",
+ (unsigned long)st.done);
+ (void)printf("Failing builds: %lu\n",
+ (unsigned long)(st.failed + st.prefailed + st.indirect_failed + st.indirect_prefailed));
+ (void)printf(" Directly broken: %lu\n",
+ (unsigned long)st.failed);
+ (void)printf(" Broken due to a broken dependency: %lu\n",
+ (unsigned long)st.indirect_failed);
+ (void)printf(" Not build as explicitly marked broken: %lu\n",
+ (unsigned long)st.prefailed);
+ (void)printf(" Broken due to an explicitly broken dependency: %lu\n",
+ (unsigned long)st.indirect_prefailed);
exit(0);
}
diff -r dc0043aa6dfb -r dfac6d963430 pkgtools/pbulk/files/pbulk/pscan/jobs.c
--- a/pkgtools/pbulk/files/pbulk/pscan/jobs.c Tue Jan 15 22:04:57 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/pscan/jobs.c Tue Jan 15 22:14:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: jobs.c,v 1.4 2007/08/14 13:15:58 joerg Exp $ */
+/* $NetBSD: jobs.c,v 1.5 2008/01/15 22:14:30 joerg Exp $ */
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -113,7 +113,9 @@
if (done_jobs % 50)
(void)putchar('.');
else
- (void)printf(". %zd/%zd\n", done_jobs, len_jobs);
+ (void)printf(". %lu/%lu\n",
+ (unsigned long)done_jobs,
+ (unsigned long)len_jobs);
(void)fflush(stdout);
}
}
@@ -253,7 +255,8 @@
if (verbosity >= 1) {
if (done_jobs % 50)
- (void)printf(" %zd/%zd\n", done_jobs, len_jobs);
+ (void)printf(" %lu/%lu\n", (unsigned long)done_jobs,
+ (unsigned long)len_jobs);
(void)fflush(stdout);
}
Home |
Main Index |
Thread Index |
Old Index