From 928cb4444d0a7a7e58c7ebd3d4f5b47b85ee4f65 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 2 Feb 2007 13:06:04 +0100 Subject: [PATCH] Replaced %L by %ll, the former is obsolete and specific to Linux libc5. --- images/sig-seg.c | 2 +- lib/mainloop.c | 12 ++++++------ lib/partmap.c | 2 +- lib/profile.c | 6 +++--- lib/shell/config.c | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/images/sig-seg.c b/images/sig-seg.c index cdcb71c8..933a784b 100644 --- a/images/sig-seg.c +++ b/images/sig-seg.c @@ -202,7 +202,7 @@ prequant(struct image_sig_block *blocks, uns blocks_count, struct image_sig_regi split_val = val[k]; } } - DBG("split_val=%u best_err=%Lu b[axis]=%u c[axis]=%u", split_val, (long long)best_err, region->b[axis], region->c[axis]); + DBG("split_val=%u best_err=%llu b[axis]=%u c[axis]=%u", split_val, (long long)best_err, region->b[axis], region->c[axis]); /* Split region */ block = region->blocks; diff --git a/lib/mainloop.c b/lib/mainloop.c index affc4aec..5344dcad 100644 --- a/lib/mainloop.c +++ b/lib/mainloop.c @@ -40,7 +40,7 @@ main_get_time(void) gettimeofday(&tv, NULL); main_now_seconds = tv.tv_sec; main_now = (timestamp_t)tv.tv_sec * 1000 + tv.tv_usec / 1000; - // DBG("It's %Ld o'clock", (long long) main_now); + // DBG("It's %lld o'clock", (long long) main_now); } void @@ -60,7 +60,7 @@ void timer_add(struct main_timer *tm, timestamp_t expires) { if (expires) - DBG("MAIN: Setting timer %p (expire at now+%Ld)", tm, (long long)(expires-main_now)); + DBG("MAIN: Setting timer %p (expire at now+%lld)", tm, (long long)(expires-main_now)); else DBG("MAIN: Clearing timer %p", tm); if (tm->expires) @@ -307,15 +307,15 @@ void main_debug(void) { #ifdef CONFIG_DEBUG - log(L_DEBUG, "### Main loop status on %Ld", (long long)main_now); + log(L_DEBUG, "### Main loop status on %lld", (long long)main_now); log(L_DEBUG, "\tActive timers:"); struct main_timer *tm; CLIST_WALK(tm, main_timer_list) - log(L_DEBUG, "\t\t%p (expires %Ld, data %p)", tm, (long long)(tm->expires ? tm->expires-main_now : 999999), tm->data); + log(L_DEBUG, "\t\t%p (expires %lld, data %p)", tm, (long long)(tm->expires ? tm->expires-main_now : 999999), tm->data); struct main_file *fi; log(L_DEBUG, "\tActive files:"); CLIST_WALK(fi, main_file_list) - log(L_DEBUG, "\t\t%p (fd %d, rh %p, wh %p, eh %p, expires %Ld, data %p)", + log(L_DEBUG, "\t\t%p (fd %d, rh %p, wh %p, eh %p, expires %lld, data %p)", fi, fi->fd, fi->read_handler, fi->write_handler, fi->error_handler, (long long)(fi->timer.expires ? fi->timer.expires-main_now : 999999), fi->data); log(L_DEBUG, "\tActive hooks:"); @@ -372,7 +372,7 @@ main_loop(void) timestamp_t wake = main_now + 1000000000; while ((tm = clist_head(&main_timer_list)) && tm->expires <= main_now) { - DBG("MAIN: Timer %p expired at now-%Ld", tm, (long long)(main_now - tm->expires)); + DBG("MAIN: Timer %p expired at now-%lld", tm, (long long)(main_now - tm->expires)); tm->handler(tm); } int hook_min = HOOK_RETRY; diff --git a/lib/partmap.c b/lib/partmap.c index 3b32bc90..baaef9c2 100644 --- a/lib/partmap.c +++ b/lib/partmap.c @@ -75,7 +75,7 @@ partmap_load(struct partmap *p, sh_off_t start, uns size) die("partmap_map: Window is too small for mapping %d bytes", size); p->start_map = sh_mmap(NULL, win_len, p->writeable ? (PROT_READ | PROT_WRITE) : PROT_READ, MAP_SHARED, p->fd, win_start); if (p->start_map == MAP_FAILED) - die("mmap failed at position %Ld: %m", (long long)win_start); + die("mmap failed at position %lld: %m", (long long)win_start); p->start_off = win_start; p->end_off = win_start+win_len; madvise(p->start_map, win_len, MADV_SEQUENTIAL); diff --git a/lib/profile.c b/lib/profile.c index 0bd25aa9..83ff77c2 100644 --- a/lib/profile.c +++ b/lib/profile.c @@ -68,7 +68,7 @@ prof_tsc_init(struct prof_tsc *c) int prof_tsc_format(char *buf, struct prof_tsc *c) { - return sprintf(buf, "%Ld", c->ticks); + return sprintf(buf, "%lld", c->ticks); } #endif @@ -103,7 +103,7 @@ prof_ktsc_switch(struct prof_ktsc *o, struct prof_ktsc *n) int l = pread(self_prof_fd, buf, sizeof(buf)-1, 0); ASSERT(l > 0 && l < (int)sizeof(buf)-1); buf[l] = 0; - l = sscanf(buf, "%Ld%Ld", &u, &s); + l = sscanf(buf, "%lld%lld", &u, &s); ASSERT(l == 2); if (n) @@ -123,7 +123,7 @@ prof_ktsc_switch(struct prof_ktsc *o, struct prof_ktsc *n) int prof_ktsc_format(char *buf, struct prof_ktsc *c) { - return sprintf(buf, "%Ld+%Ld", (long long) c->ticks_user, (long long) c->ticks_sys); + return sprintf(buf, "%lld+%lld", (long long) c->ticks_user, (long long) c->ticks_sys); } #endif diff --git a/lib/shell/config.c b/lib/shell/config.c index e1bcc052..ba60f035 100644 --- a/lib/shell/config.c +++ b/lib/shell/config.c @@ -346,7 +346,7 @@ dump_value(uns array, struct item *item, void *v) sprintf(buf, "%d", *(int *)v); break; case CT_U64: - sprintf(buf, "%Lu", (long long) *(u64 *)v); + sprintf(buf, "%llu", (long long) *(u64 *)v); break; case CT_DOUBLE: sprintf(buf, "%g", *(double *)v); -- 2.39.5