Replace {u_,}longlong_t usage with {u,}int64_t, as the former has

"issues" and really shouldn't be used outside of the Sun XDR stuff.
Thanks again to Chuck Silvers for reminding me.
This commit is contained in:
lukem 2001-11-26 00:13:23 +00:00
parent c13612f8dd
commit 301fb81a16
6 changed files with 41 additions and 43 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: conv.c,v 1.13 2001/11/25 10:50:06 lukem Exp $ */
/* $NetBSD: conv.c,v 1.14 2001/11/26 00:13:23 lukem Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)conv.c 8.3 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: conv.c,v 1.13 2001/11/25 10:50:06 lukem Exp $");
__RCSID("$NetBSD: conv.c,v 1.14 2001/11/26 00:13:23 lukem Exp $");
#endif
#endif /* not lint */
@ -64,7 +64,7 @@ __RCSID("$NetBSD: conv.c,v 1.13 2001/11/25 10:50:06 lukem Exp $");
void
def(void)
{
u_longlong_t cnt;
uint64_t cnt;
u_char *inp;
const u_char *t;
@ -121,7 +121,7 @@ block(void)
{
static int intrunc;
int ch = 0; /* pacify gcc */
u_longlong_t cnt, maxlen;
uint64_t cnt, maxlen;
u_char *inp, *outp;
const u_char *t;
@ -232,7 +232,7 @@ block_close(void)
void
unblock(void)
{
u_longlong_t cnt;
uint64_t cnt;
u_char *inp;
const u_char *t;
@ -266,7 +266,7 @@ unblock(void)
void
unblock_close(void)
{
u_longlong_t cnt;
uint64_t cnt;
u_char *t;
if (in.dbcnt) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: dd.c,v 1.23 2001/11/25 10:50:06 lukem Exp $ */
/* $NetBSD: dd.c,v 1.24 2001/11/26 00:13:24 lukem Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)dd.c 8.5 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: dd.c,v 1.23 2001/11/25 10:50:06 lukem Exp $");
__RCSID("$NetBSD: dd.c,v 1.24 2001/11/26 00:13:24 lukem Exp $");
#endif
#endif /* not lint */
@ -80,9 +80,9 @@ int main(int, char *[]);
IO in, out; /* input/output state */
STAT st; /* statistics */
void (*cfunc)(void); /* conversion function */
u_longlong_t cpy_cnt; /* # of blocks to copy */
uint64_t cpy_cnt; /* # of blocks to copy */
u_int ddflags; /* conversion options */
u_longlong_t cbsz; /* conversion block size */
uint64_t cbsz; /* conversion block size */
u_int files_cnt = 1; /* # of files to copy */
int progress = 0; /* display sign of life */
const u_char *ctab; /* conversion table */
@ -244,7 +244,7 @@ static void
dd_in(void)
{
int flags;
u_longlong_t n;
uint64_t n;
for (flags = ddflags;;) {
if (cpy_cnt && (st.in_full + st.in_part) >= cpy_cnt)
@ -365,7 +365,7 @@ void
dd_out(int force)
{
static int warned;
u_longlong_t cnt, n, nw;
uint64_t cnt, n, nw;
u_char *outp;
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: dd.h,v 1.8 2001/11/25 10:50:06 lukem Exp $ */
/* $NetBSD: dd.h,v 1.9 2001/11/26 00:13:24 lukem Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -43,9 +43,9 @@
typedef struct {
u_char *db; /* buffer address */
u_char *dbp; /* current buffer I/O address */
u_longlong_t dbcnt; /* current buffer byte count */
u_longlong_t dbrcnt; /* last read byte count */
u_longlong_t dbsz; /* buffer size */
uint64_t dbcnt; /* current buffer byte count */
uint64_t dbrcnt; /* last read byte count */
uint64_t dbsz; /* buffer size */
#define ISCHR 0x01 /* character device (warn on short) */
#define ISPIPE 0x02 /* pipe (not truncatable) */
@ -55,17 +55,17 @@ typedef struct {
const char *name; /* name */
int fd; /* file descriptor */
u_longlong_t offset; /* # of blocks to skip */
uint64_t offset; /* # of blocks to skip */
} IO;
typedef struct {
u_longlong_t in_full; /* # of full input blocks */
u_longlong_t in_part; /* # of partial input blocks */
u_longlong_t out_full; /* # of full output blocks */
u_longlong_t out_part; /* # of partial output blocks */
u_longlong_t trunc; /* # of truncated records */
u_longlong_t swab; /* # of odd-length swab blocks */
u_longlong_t bytes; /* # of bytes written */
uint64_t in_full; /* # of full input blocks */
uint64_t in_part; /* # of partial input blocks */
uint64_t out_full; /* # of full output blocks */
uint64_t out_part; /* # of partial output blocks */
uint64_t trunc; /* # of truncated records */
uint64_t swab; /* # of odd-length swab blocks */
uint64_t bytes; /* # of bytes written */
struct timeval start; /* start time of dd */
} STAT;

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.12 2001/11/25 10:50:06 lukem Exp $ */
/* $NetBSD: extern.h,v 1.13 2001/11/26 00:13:24 lukem Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -59,8 +59,8 @@ ssize_t bwrite(int, const void *, size_t);
extern IO in, out;
extern STAT st;
extern void (*cfunc)(void);
extern u_longlong_t cpy_cnt;
extern u_longlong_t cbsz;
extern uint64_t cpy_cnt;
extern uint64_t cbsz;
extern u_int ddflags;
extern u_int files_cnt;
extern int progress;

View File

@ -1,4 +1,4 @@
/* $NetBSD: strsuftoull.c,v 1.1 2001/11/25 10:50:06 lukem Exp $ */
/* $NetBSD: strsuftoull.c,v 1.2 2001/11/26 00:13:24 lukem Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -75,7 +75,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: strsuftoull.c,v 1.1 2001/11/25 10:50:06 lukem Exp $");
__RCSID("$NetBSD: strsuftoull.c,v 1.2 2001/11/26 00:13:24 lukem Exp $");
#endif /* not lint */
#include <sys/types.h>
@ -93,7 +93,7 @@ __RCSID("$NetBSD: strsuftoull.c,v 1.1 2001/11/25 10:50:06 lukem Exp $");
/*
* Convert an expression of the following forms to a u_longlong_t.
* Convert an expression of the following forms to a uint64_t.
* 1) A positive decimal number.
* 2) A positive decimal number followed by a b (mult by 512).
* 3) A positive decimal number followed by a k (mult by 1024).
@ -106,11 +106,10 @@ __RCSID("$NetBSD: strsuftoull.c,v 1.1 2001/11/25 10:50:06 lukem Exp $");
* appropriate error.
*
*/
u_longlong_t
strsuftoull(const char *desc, const char *val,
u_longlong_t min, u_longlong_t max)
uint64_t
strsuftoull(const char *desc, const char *val, uint64_t min, uint64_t max)
{
u_longlong_t result;
uint64_t result;
char errbuf[100];
result = strsuftoullx(desc, val, min, max, errbuf, sizeof(errbuf));
@ -123,11 +122,11 @@ strsuftoull(const char *desc, const char *val,
* As strsuftoull(), but returns the error message into the provided buffer
* rather than exiting with it.
*/
u_longlong_t
strsuftoullx(const char *desc, const char *val,
u_longlong_t min, u_longlong_t max, char *ebuf, size_t ebuflen)
uint64_t
strsuftoullx(const char *desc, const char *val, uint64_t min, uint64_t max,
char *ebuf, size_t ebuflen)
{
u_longlong_t num, t;
uint64_t num, t;
char *expr;
assert(desc != NULL);

View File

@ -1,7 +1,6 @@
/* $NetBSD: strsuftoull.h,v 1.1 2001/11/25 10:50:06 lukem Exp $ */
/* $NetBSD: strsuftoull.h,v 1.2 2001/11/26 00:13:24 lukem Exp $ */
u_longlong_t strsuftoull(const char *, const char *,
u_longlong_t, u_longlong_t);
uint64_t strsuftoull(const char *, const char *, uint64_t, uint64_t);
u_longlong_t strsuftoullx(const char *, const char *,
u_longlong_t, u_longlong_t, char *, size_t);
uint64_t strsuftoullx(const char *, const char *, uint64_t, uint64_t,
char *, size_t);