diff options
author | joerg <joerg> | 2008-01-15 22:14:30 +0000 |
---|---|---|
committer | joerg <joerg> | 2008-01-15 22:14:30 +0000 |
commit | 862f785414e1324f1c46e11b18c2198bd1c7931e (patch) | |
tree | edb7be2b14b928cd05433804fa1e7b18a26c8e60 /pkgtools/pbulk | |
parent | b7cd300459d890219de7362d068f512f9b10806f (diff) | |
download | pkgsrc-862f785414e1324f1c46e11b18c2198bd1c7931e.tar.gz |
Use %lu + casts instead of depending on size_t's %z. Some Operating
Systems like Solaris don't implement %z.
Diffstat (limited to 'pkgtools/pbulk')
-rw-r--r-- | pkgtools/pbulk/files/pbulk/pbuild/stat.c | 26 | ||||
-rw-r--r-- | pkgtools/pbulk/files/pbulk/pscan/jobs.c | 9 |
2 files changed, 23 insertions, 12 deletions
diff --git a/pkgtools/pbulk/files/pbulk/pbuild/stat.c b/pkgtools/pbulk/files/pbulk/pbuild/stat.c index 7e6d19a0b79..a1b90d8e566 100644 --- a/pkgtools/pbulk/files/pbulk/pbuild/stat.c +++ b/pkgtools/pbulk/files/pbulk/pbuild/stat.c @@ -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>. @@ -99,14 +99,22 @@ stat_mode(const char *client_port) (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 --git a/pkgtools/pbulk/files/pbulk/pscan/jobs.c b/pkgtools/pbulk/files/pbulk/pscan/jobs.c index 398ad594aa5..a422ed6415f 100644 --- a/pkgtools/pbulk/files/pbulk/pscan/jobs.c +++ b/pkgtools/pbulk/files/pbulk/pscan/jobs.c @@ -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>. @@ -113,7 +113,9 @@ process_job(struct scan_job *job, enum job_state state) 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 @@ write_jobs(const char *output_file) 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); } |