Print quads with (long long).

This commit is contained in:
veego 1999-12-11 23:33:07 +00:00
parent ff39c2bbab
commit cde8d7627b
4 changed files with 23 additions and 14 deletions

13
dist/ipf/fils.c vendored
View File

@ -1,4 +1,4 @@
/* $NetBSD: fils.c,v 1.1.1.1 1999/12/11 22:23:58 veego Exp $ */
/* $NetBSD: fils.c,v 1.2 1999/12/11 23:33:07 veego Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
@ -302,13 +302,13 @@ frentry_t *fp;
fp->fr_flags |= FR_OUTQUE;
if (opts & (OPT_HITS|OPT_VERBOSE))
#ifdef USE_QUAD_T
PRINTF("%qd ", fp->fr_hits);
PRINTF("%qd ", (long long)fp->fr_hits);
#else
PRINTF("%ld ", fp->fr_hits);
#endif
if (opts & (OPT_ACCNT|OPT_VERBOSE))
#ifdef USE_QUAD_T
PRINTF("%qd ", fp->fr_bytes);
PRINTF("%qd ", (long long)fp->fr_bytes);
#else
PRINTF("%ld ", fp->fr_bytes);
#endif
@ -396,7 +396,8 @@ ips_stat_t *ipsp;
ips.is_state[1]);
#ifdef USE_QUAD_T
PRINTF("\tpkts %qd bytes %qd",
ips.is_pkts, ips.is_bytes);
(long long)ips.is_pkts,
(long long)ips.is_bytes);
#else
PRINTF("\tpkts %ld bytes %ld",
ips.is_pkts, ips.is_bytes);
@ -534,8 +535,8 @@ fr_authstat_t *asp;
frauthent_t *frap, fra;
#ifdef USE_QUAD_T
printf("Authorisation hits: %qd\tmisses %qd\n", asp->fas_hits,
asp->fas_miss);
printf("Authorisation hits: %qd\tmisses %qd\n",
(long long)asp->fas_hits, (long long)asp->fas_miss);
#else
printf("Authorisation hits: %ld\tmisses %ld\n", asp->fas_hits,
asp->fas_miss);

6
dist/ipf/ipf.c vendored
View File

@ -1,4 +1,4 @@
/* $NetBSD: ipf.c,v 1.1.1.1 1999/12/11 22:23:58 veego Exp $ */
/* $NetBSD: ipf.c,v 1.2 1999/12/11 23:33:07 veego Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
@ -290,10 +290,12 @@ char *name, *file;
else {
#ifdef USE_QUAD_T
printf("hits %qd bytes %qd ",
(long long)fr->fr_hits,
(long long)fr->fr_bytes);
#else
printf("hits %ld bytes %ld ",
#endif
fr->fr_hits, fr->fr_bytes);
#endif
printfr(fr);
}
} else if ((opts & OPT_REMOVE) &&

10
dist/ipf/ipmon.c vendored
View File

@ -1,4 +1,4 @@
/* $NetBSD: ipmon.c,v 1.1.1.1 1999/12/11 22:23:58 veego Exp $ */
/* $NetBSD: ipmon.c,v 1.2 1999/12/11 23:33:07 veego Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
@ -401,10 +401,12 @@ int blen;
if (nl->nl_type == NL_EXPIRE) {
#ifdef USE_QUAD_T
(void) sprintf(t, " Pkts %qd Bytes %qd",
(long long)nl->nl_pkts,
(long long)nl->nl_bytes);
#else
(void) sprintf(t, " Pkts %ld Bytes %ld",
#endif
nl->nl_pkts, nl->nl_bytes);
#endif
t += strlen(t);
}
@ -478,10 +480,12 @@ int blen;
if (sl->isl_type != ISL_NEW) {
#ifdef USE_QUAD_T
(void) sprintf(t, " Pkts %qd Bytes %qd",
(long long)sl->isl_pkts,
(long long)sl->isl_bytes);
#else
(void) sprintf(t, " Pkts %ld Bytes %ld",
#endif
sl->isl_pkts, sl->isl_bytes);
#endif
t += strlen(t);
}

8
dist/ipf/ipnat.c vendored
View File

@ -1,4 +1,4 @@
/* $NetBSD: ipnat.c,v 1.1.1.1 1999/12/11 22:23:59 veego Exp $ */
/* $NetBSD: ipnat.c,v 1.2 1999/12/11 23:33:07 veego Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
@ -215,7 +215,8 @@ int opts;
apr.apr_p, apr.apr_ref, apr.apr_flags);
printf("\t\tproto %d flags %#x bytes ", ap.aps_p, ap.aps_flags);
#ifdef USE_QUAD_T
printf("%qu pkts %qu", ap.aps_bytes, ap.aps_pkts);
printf("%qu pkts %qu", (unsigned long long)ap.aps_bytes,
(unsigned long long)ap.aps_pkts);
#else
printf("%lu pkts %lu", ap.aps_bytes, ap.aps_pkts);
#endif
@ -356,7 +357,8 @@ int fd, opts;
i, nat.nat_flags);
#ifdef USE_QUAD_T
printf("bytes %qu pkts %qu",
nat.nat_bytes, nat.nat_pkts);
(unsigned long long)nat.nat_bytes,
(unsigned long long)nat.nat_pkts);
#else
printf("bytes %lu pkts %lu",
nat.nat_bytes, nat.nat_pkts);