mtree: use POSIX type uint32_t instead of u_int32_t

This commit is contained in:
cheusov 2021-03-18 20:02:18 +00:00
parent 37e902b261
commit 6e95ab06dc
4 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $ */
/* $NetBSD: compare.c,v 1.59 2021/03/18 20:02:18 cheusov Exp $ */
/*-
* Copyright (c) 1989, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $");
__RCSID("$NetBSD: compare.c,v 1.59 2021/03/18 20:02:18 cheusov Exp $");
#endif
#endif /* not lint */
@ -135,7 +135,7 @@ do { \
int
compare(NODE *s, FTSENT *p)
{
u_int32_t len, val, flags;
uint32_t len, val, flags;
int fd, label;
const char *cp, *tab;
#if !defined(NO_MD5) || !defined(NO_RMD160) || !defined(NO_SHA1) || !defined(NO_SHA2)

View File

@ -1,4 +1,4 @@
/* $NetBSD: crc.c,v 1.9 2012/10/05 00:40:51 christos Exp $ */
/* $NetBSD: crc.c,v 1.10 2021/03/18 20:02:18 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 6/17/93";
#else
__RCSID("$NetBSD: crc.c,v 1.9 2012/10/05 00:40:51 christos Exp $");
__RCSID("$NetBSD: crc.c,v 1.10 2021/03/18 20:02:18 cheusov Exp $");
#endif
#endif /* not lint */
@ -53,7 +53,7 @@ __RCSID("$NetBSD: crc.c,v 1.9 2012/10/05 00:40:51 christos Exp $");
#include "extern.h"
static const u_int32_t crctab[] = {
static const uint32_t crctab[] = {
0x0,
0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6,
@ -114,15 +114,15 @@ static const u_int32_t crctab[] = {
* locations to store the crc and the number of bytes read. It returns 0 on
* success and 1 on failure. Errno is set on failure.
*/
u_int32_t crc_total = ~0; /* The crc over a number of files. */
uint32_t crc_total = ~0; /* The crc over a number of files. */
int
crc(int fd, u_int32_t *cval, u_int32_t *clen)
crc(int fd, uint32_t *cval, uint32_t *clen)
{
u_char *p;
int nr;
u_int32_t thecrc, len;
u_int32_t crctot;
uint32_t thecrc, len;
uint32_t crctot;
u_char buf[16 * 1024];
#define COMPUTE(var, ch) (var) = (var) << 8 ^ crctab[(var) >> 24 ^ (ch)]

View File

@ -1,4 +1,4 @@
/* $NetBSD: extern.h,v 1.39 2014/04/24 17:22:41 christos Exp $ */
/* $NetBSD: extern.h,v 1.40 2021/03/18 20:02:18 cheusov Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -62,7 +62,7 @@ enum flavor {
void addtag(slist_t *, char *);
int check_excludes(const char *, const char *);
int compare(NODE *, FTSENT *);
int crc(int, u_int32_t *, u_int32_t *);
int crc(int, uint32_t *, uint32_t *);
void cwalk(FILE *);
void dump_nodes(FILE *, const char *, NODE *, int);
void init_excludes(void);
@ -83,7 +83,7 @@ extern int bflag, dflag, eflag, iflag, jflag, lflag, mflag,
extern int mtree_Mflag, mtree_Sflag, mtree_Wflag;
extern size_t mtree_lineno;
extern enum flavor flavor;
extern u_int32_t crc_total;
extern uint32_t crc_total;
extern int ftsoptions, keys;
extern char fullpath[];
extern slist_t includetags, excludetags;

View File

@ -1,4 +1,4 @@
/* $NetBSD: verify.c,v 1.46 2015/01/23 20:28:24 christos Exp $ */
/* $NetBSD: verify.c,v 1.47 2021/03/18 20:02:18 cheusov Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: verify.c,v 1.46 2015/01/23 20:28:24 christos Exp $");
__RCSID("$NetBSD: verify.c,v 1.47 2021/03/18 20:02:18 cheusov Exp $");
#endif
#endif /* not lint */
@ -178,7 +178,7 @@ miss(NODE *p, char *tail)
int create;
char *tp;
const char *type;
u_int32_t flags;
uint32_t flags;
for (; p; p = p->next) {
if (p->flags & F_OPT && !(p->flags & F_VISIT))