summaryrefslogtreecommitdiff
path: root/pkgtools/libnbcompat
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-07-31 13:17:33 +0000
committerjoerg <joerg@pkgsrc.org>2007-07-31 13:17:33 +0000
commit0e17f7149786b572721f94161f2057c90293591e (patch)
treece62056637c39b10be196f28d6817ed470683dd7 /pkgtools/libnbcompat
parent15e10f42f7400128f2f6c57072a62c9b9d5bc5ef (diff)
downloadpkgsrc-0e17f7149786b572721f94161f2057c90293591e.tar.gz
Don't use u_{char,short,int,long} as they are non-standard.
Bump version to 20070731.
Diffstat (limited to 'pkgtools/libnbcompat')
-rw-r--r--pkgtools/libnbcompat/Makefile4
-rw-r--r--pkgtools/libnbcompat/files/__fts13.c12
-rw-r--r--pkgtools/libnbcompat/files/__glob13.c14
-rw-r--r--pkgtools/libnbcompat/files/gettemp.c6
-rw-r--r--pkgtools/libnbcompat/files/lchflags.c4
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/fts.h16
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/rmd160.h10
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/sha1.h12
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/sha2.h4
-rw-r--r--pkgtools/libnbcompat/files/pwcache.c10
-rw-r--r--pkgtools/libnbcompat/files/rmd160.c10
-rw-r--r--pkgtools/libnbcompat/files/rmd160hl.c10
-rw-r--r--pkgtools/libnbcompat/files/setmode.c10
-rw-r--r--pkgtools/libnbcompat/files/sha1.c28
-rw-r--r--pkgtools/libnbcompat/files/sha1hl.c10
-rw-r--r--pkgtools/libnbcompat/files/sha2hl.c24
-rw-r--r--pkgtools/libnbcompat/files/unvis.c6
-rw-r--r--pkgtools/libnbcompat/files/vis.c10
18 files changed, 100 insertions, 100 deletions
diff --git a/pkgtools/libnbcompat/Makefile b/pkgtools/libnbcompat/Makefile
index cf83f507929..cc0c16ef8a0 100644
--- a/pkgtools/libnbcompat/Makefile
+++ b/pkgtools/libnbcompat/Makefile
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.54 2007/07/21 14:39:25 tnn Exp $
+# $NetBSD: Makefile,v 1.55 2007/07/31 13:17:33 joerg Exp $
#
# NOTE: If you update this package, it is *mandatory* that you update
# pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual
# list of tested and supported platforms.
#
-DISTNAME= libnbcompat-20070721
+DISTNAME= libnbcompat-20070731
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/libnbcompat/files/__fts13.c b/pkgtools/libnbcompat/files/__fts13.c
index 2d1bcff73cf..f6f8150364c 100644
--- a/pkgtools/libnbcompat/files/__fts13.c
+++ b/pkgtools/libnbcompat/files/__fts13.c
@@ -1,4 +1,4 @@
-/* $NetBSD: __fts13.c,v 1.7 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: __fts13.c,v 1.8 2007/07/31 13:17:33 joerg Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#else
-__RCSID("$NetBSD: __fts13.c,v 1.7 2004/08/23 03:32:12 jlam Exp $");
+__RCSID("$NetBSD: __fts13.c,v 1.8 2007/07/31 13:17:33 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -115,7 +115,7 @@ static size_t fts_pow2 __P((size_t));
static int fts_palloc __P((FTS *, size_t));
static void fts_padjust __P((FTS *, FTSENT *));
static FTSENT *fts_sort __P((FTS *, FTSENT *, size_t));
-static u_short fts_stat __P((FTS *, FTSENT *, int));
+static unsigned short fts_stat __P((FTS *, FTSENT *, int));
static int fts_safe_changedir __P((const FTS *, const FTSENT *, int,
const char *));
@@ -158,7 +158,7 @@ fts_open(argv, options, compar)
}
/* Allocate/initialize the stream */
- if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
+ if ((sp = malloc((unsigned int)sizeof(FTS))) == NULL)
return (NULL);
memset(sp, 0, sizeof(FTS));
sp->fts_compar = compar;
@@ -883,7 +883,7 @@ mem1: saved_errno = errno;
return (head);
}
-static u_short
+static unsigned short
fts_stat(sp, p, follow)
FTS *sp;
FTSENT *p;
@@ -1035,7 +1035,7 @@ fts_alloc(sp, name, namelen)
if (!ISSET(FTS_NOSTAT))
p->fts_statp =
- (struct STAT *)ALIGN((u_long)(p->fts_name + namelen + 2));
+ (struct STAT *)ALIGN((unsigned long)(p->fts_name + namelen + 2));
#else
if ((p = malloc(sizeof(FTSENT) + namelen)) == NULL)
return (NULL);
diff --git a/pkgtools/libnbcompat/files/__glob13.c b/pkgtools/libnbcompat/files/__glob13.c
index 43f7d3414c8..8cb00880388 100644
--- a/pkgtools/libnbcompat/files/__glob13.c
+++ b/pkgtools/libnbcompat/files/__glob13.c
@@ -1,4 +1,4 @@
-/* $NetBSD: __glob13.c,v 1.1 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: __glob13.c,v 1.2 2007/07/31 13:17:33 joerg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
#else
-__RCSID("$NetBSD: __glob13.c,v 1.1 2004/08/23 03:32:12 jlam Exp $");
+__RCSID("$NetBSD: __glob13.c,v 1.2 2007/07/31 13:17:33 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -137,7 +137,7 @@ __warn_references(globfree,
#define M_MASK 0xffff
#define M_ASCII 0x00ff
-typedef u_short Char;
+typedef unsigned short Char;
#else
@@ -189,13 +189,13 @@ glob(pattern, flags, errfunc, pglob)
int flags, (*errfunc) __P((const char *, int));
glob_t *pglob;
{
- const u_char *patnext;
+ const unsigned char *patnext;
int c;
Char *bufnext, *bufend, patbuf[MAXPATHLEN+1];
_DIAGASSERT(pattern != NULL);
- patnext = (const u_char *) pattern;
+ patnext = (const unsigned char *) pattern;
if (!(flags & GLOB_APPEND)) {
pglob->gl_pathc = 0;
pglob->gl_pathv = NULL;
@@ -720,7 +720,7 @@ glob3(pathbuf, pathend, pathlim, pattern, restpattern, pglob, limit)
else
readdirfunc = (struct dirent *(*)__P((void *))) readdir;
while ((dp = (*readdirfunc)(dirp)) != NULL) {
- u_char *sc;
+ unsigned char *sc;
Char *dc;
/* Initial DOT must be matched literally. */
@@ -730,7 +730,7 @@ glob3(pathbuf, pathend, pathlim, pattern, restpattern, pglob, limit)
* The resulting string contains EOS, so we can
* use the pathlim character, if it is the nul
*/
- for (sc = (u_char *) dp->d_name, dc = pathend;
+ for (sc = (unsigned char *) dp->d_name, dc = pathend;
dc <= pathlim && (*dc++ = *sc++) != EOS;)
continue;
diff --git a/pkgtools/libnbcompat/files/gettemp.c b/pkgtools/libnbcompat/files/gettemp.c
index 2500a7114a0..ddd8d803e0c 100644
--- a/pkgtools/libnbcompat/files/gettemp.c
+++ b/pkgtools/libnbcompat/files/gettemp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: gettemp.c,v 1.1 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: gettemp.c,v 1.2 2007/07/31 13:17:33 joerg Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: gettemp.c,v 1.1 2004/08/23 03:32:12 jlam Exp $");
+__RCSID("$NetBSD: gettemp.c,v 1.2 2007/07/31 13:17:33 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -81,7 +81,7 @@ GETTEMP(path, doopen, domkdir)
{
char *start, *trv;
struct stat sbuf;
- u_int pid;
+ unsigned int pid;
/* To guarantee multiple calls generate unique names even if
the file is not created. 676 different possibilities with 7
diff --git a/pkgtools/libnbcompat/files/lchflags.c b/pkgtools/libnbcompat/files/lchflags.c
index 70f44003848..ee2d0628ee9 100644
--- a/pkgtools/libnbcompat/files/lchflags.c
+++ b/pkgtools/libnbcompat/files/lchflags.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lchflags.c,v 1.2 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: lchflags.c,v 1.3 2007/07/31 13:17:33 joerg Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
#include <nbcompat/unistd.h>
int
-lchflags(const char *path, u_long flags)
+lchflags(const char *path, unsigned long flags)
{
struct stat psb;
diff --git a/pkgtools/libnbcompat/files/nbcompat/fts.h b/pkgtools/libnbcompat/files/nbcompat/fts.h
index 7f0ba15e6dd..21449aacb9f 100644
--- a/pkgtools/libnbcompat/files/nbcompat/fts.h
+++ b/pkgtools/libnbcompat/files/nbcompat/fts.h
@@ -1,4 +1,4 @@
-/* $NetBSD: fts.h,v 1.4 2004/08/16 17:24:57 jlam Exp $ */
+/* $NetBSD: fts.h,v 1.5 2007/07/31 13:17:34 joerg Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -41,8 +41,8 @@ typedef struct {
dev_t fts_dev; /* starting device # */
char *fts_path; /* path for this descent */
int fts_rfd; /* fd for root */
- u_int fts_pathlen; /* sizeof(path) */
- u_int fts_nitems; /* elements in the sort array */
+ unsigned int fts_pathlen; /* sizeof(path) */
+ unsigned int fts_nitems; /* elements in the sort array */
int (*fts_compar) /* compare function */
(const struct _ftsent **, const struct _ftsent **);
@@ -71,8 +71,8 @@ typedef struct _ftsent {
char *fts_path; /* root path */
int fts_errno; /* errno for this node */
int fts_symfd; /* fd for symlink */
- u_short fts_pathlen; /* strlen(fts_path) */
- u_short fts_namelen; /* strlen(fts_name) */
+ unsigned short fts_pathlen; /* strlen(fts_path) */
+ unsigned short fts_namelen; /* strlen(fts_name) */
ino_t fts_ino; /* inode */
dev_t fts_dev; /* device */
@@ -100,18 +100,18 @@ typedef struct _ftsent {
#define FTS_SL 12 /* symbolic link */
#define FTS_SLNONE 13 /* symbolic link without target */
#define FTS_W 14 /* whiteout object */
- u_short fts_info; /* user flags for FTSENT structure */
+ unsigned short fts_info; /* user flags for FTSENT structure */
#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
#define FTS_ISW 0x04 /* this is a whiteout object */
- u_short fts_flags; /* private flags for FTSENT structure */
+ unsigned short fts_flags; /* private flags for FTSENT structure */
#define FTS_AGAIN 1 /* read node again */
#define FTS_FOLLOW 2 /* follow symbolic link */
#define FTS_NOINSTR 3 /* no instructions */
#define FTS_SKIP 4 /* discard node */
- u_short fts_instr; /* fts_set() instructions */
+ unsigned short fts_instr; /* fts_set() instructions */
struct stat *fts_statp; /* stat(2) information */
char fts_name[1]; /* file name */
diff --git a/pkgtools/libnbcompat/files/nbcompat/rmd160.h b/pkgtools/libnbcompat/files/nbcompat/rmd160.h
index f2e1ecc8571..6ada7aa6ae2 100644
--- a/pkgtools/libnbcompat/files/nbcompat/rmd160.h
+++ b/pkgtools/libnbcompat/files/nbcompat/rmd160.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rmd160.h,v 1.2 2004/08/16 17:24:57 jlam Exp $ */
+/* $NetBSD: rmd160.h,v 1.3 2007/07/31 13:17:34 joerg Exp $ */
/********************************************************************\
*
@@ -27,19 +27,19 @@
typedef struct {
u_int32_t state[5]; /* state (ABCDE) */
u_int32_t length[2]; /* number of bits */
- u_char bbuffer[64]; /* overflow buffer */
+ unsigned char bbuffer[64]; /* overflow buffer */
u_int32_t buflen; /* number of chars in bbuffer */
} RMD160_CTX;
__BEGIN_DECLS
void RMD160Init(RMD160_CTX *);
void RMD160Transform(u_int32_t[5], const u_int32_t[16]);
-void RMD160Update(RMD160_CTX *, const u_char *, u_int32_t);
-void RMD160Final(u_char[20], RMD160_CTX *);
+void RMD160Update(RMD160_CTX *, const unsigned char *, u_int32_t);
+void RMD160Final(unsigned char[20], RMD160_CTX *);
#ifndef _KERNEL
char *RMD160End(RMD160_CTX *, char *);
char *RMD160File(char *, char *);
-char *RMD160Data(const u_char *, size_t, char *);
+char *RMD160Data(const unsigned char *, size_t, char *);
#endif /* _KERNEL */
__END_DECLS
diff --git a/pkgtools/libnbcompat/files/nbcompat/sha1.h b/pkgtools/libnbcompat/files/nbcompat/sha1.h
index 7c0fe101548..b17bd05cda1 100644
--- a/pkgtools/libnbcompat/files/nbcompat/sha1.h
+++ b/pkgtools/libnbcompat/files/nbcompat/sha1.h
@@ -1,4 +1,4 @@
-/* $NetBSD: sha1.h,v 1.2 2004/08/16 17:24:57 jlam Exp $ */
+/* $NetBSD: sha1.h,v 1.3 2007/07/31 13:17:34 joerg Exp $ */
/*
* SHA-1 in C
@@ -12,17 +12,17 @@
typedef struct {
u_int32_t state[5];
u_int32_t count[2];
- u_char buffer[64];
+ unsigned char buffer[64];
} SHA1_CTX;
-void SHA1Transform __P((u_int32_t state[5], const u_char buffer[64]));
+void SHA1Transform __P((u_int32_t state[5], const unsigned char buffer[64]));
void SHA1Init __P((SHA1_CTX *context));
-void SHA1Update __P((SHA1_CTX *context, const u_char *data, u_int len));
-void SHA1Final __P((u_char digest[20], SHA1_CTX *context));
+void SHA1Update __P((SHA1_CTX *context, const unsigned char *data, unsigned int len));
+void SHA1Final __P((unsigned char digest[20], SHA1_CTX *context));
#ifndef _KERNEL
char *SHA1End __P((SHA1_CTX *, char *));
char *SHA1File __P((char *, char *));
-char *SHA1Data __P((const u_char *, size_t, char *));
+char *SHA1Data __P((const unsigned char *, size_t, char *));
#endif /* _KERNEL */
#endif /* _NBCOMPAT_SYS_SHA1_H_ */
diff --git a/pkgtools/libnbcompat/files/nbcompat/sha2.h b/pkgtools/libnbcompat/files/nbcompat/sha2.h
index 85e4480b859..e675858237c 100644
--- a/pkgtools/libnbcompat/files/nbcompat/sha2.h
+++ b/pkgtools/libnbcompat/files/nbcompat/sha2.h
@@ -97,8 +97,8 @@ char *SHA512_File(char *, char *);
void SHA256_Init(SHA256_CTX *);
void SHA256_Update(SHA256_CTX*, const u_int8_t*, size_t);
void SHA256_Final(u_int8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*);
-char* SHA256_End(SHA256_CTX*, u_char *);
-char* SHA256_Data(const u_int8_t*, size_t, u_char *);
+char* SHA256_End(SHA256_CTX*, unsigned char *);
+char* SHA256_Data(const u_int8_t*, size_t, unsigned char *);
char *SHA256_File(char *, char *);
void SHA384_Init(SHA384_CTX*);
diff --git a/pkgtools/libnbcompat/files/pwcache.c b/pkgtools/libnbcompat/files/pwcache.c
index 493de4a4b65..8d21d02d33e 100644
--- a/pkgtools/libnbcompat/files/pwcache.c
+++ b/pkgtools/libnbcompat/files/pwcache.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pwcache.c,v 1.8 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: pwcache.c,v 1.9 2007/07/31 13:17:33 joerg Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -82,7 +82,7 @@
#if 0
static char sccsid[] = "@(#)cache.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pwcache.c,v 1.8 2004/08/23 03:32:12 jlam Exp $");
+__RCSID("$NetBSD: pwcache.c,v 1.9 2007/07/31 13:17:33 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -155,17 +155,17 @@ static int usrtb_fail; /* usrtb_start() failed ? */
static int grptb_fail; /* grptb_start() failed ? */
-static u_int st_hash(const char *, size_t, int);
+static unsigned int st_hash(const char *, size_t, int);
static int uidtb_start(void);
static int gidtb_start(void);
static int usrtb_start(void);
static int grptb_start(void);
-static u_int
+static unsigned int
st_hash(const char *name, size_t len, int tabsz)
{
- u_int key = 0;
+ unsigned int key = 0;
_DIAGASSERT(name != NULL);
diff --git a/pkgtools/libnbcompat/files/rmd160.c b/pkgtools/libnbcompat/files/rmd160.c
index e8a34533f97..86ad4cce884 100644
--- a/pkgtools/libnbcompat/files/rmd160.c
+++ b/pkgtools/libnbcompat/files/rmd160.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rmd160.c,v 1.6 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: rmd160.c,v 1.7 2007/07/31 13:17:33 joerg Exp $ */
/********************************************************************\
*
@@ -25,7 +25,7 @@
#include <nbcompat.h>
#include <nbcompat/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rmd160.c,v 1.6 2004/08/23 03:32:12 jlam Exp $");
+__RCSID("$NetBSD: rmd160.c,v 1.7 2007/07/31 13:17:33 joerg Exp $");
#endif /* not lint */
/* header files */
@@ -364,7 +364,7 @@ RMD160Transform(u_int32_t state[5], const u_int32_t block[16])
/********************************************************************/
void
-RMD160Update(RMD160_CTX *context, const u_char *data, u_int32_t nbytes)
+RMD160Update(RMD160_CTX *context, const unsigned char *data, u_int32_t nbytes)
{
u_int32_t X[16];
u_int32_t ofs = 0;
@@ -424,7 +424,7 @@ RMD160Update(RMD160_CTX *context, const u_char *data, u_int32_t nbytes)
/********************************************************************/
void
-RMD160Final(u_char digest[20], RMD160_CTX *context)
+RMD160Final(unsigned char digest[20], RMD160_CTX *context)
{
u_int32_t i;
u_int32_t X[16];
@@ -436,7 +436,7 @@ RMD160Final(u_char digest[20], RMD160_CTX *context)
_DIAGASSERT(context != NULL);
/* append the bit m_n == 1 */
- context->bbuffer[context->buflen] = (u_char)'\200';
+ context->bbuffer[context->buflen] = (unsigned char)'\200';
ZEROIZE(context->bbuffer + context->buflen + 1,
63 - context->buflen);
diff --git a/pkgtools/libnbcompat/files/rmd160hl.c b/pkgtools/libnbcompat/files/rmd160hl.c
index aa2d002f07e..a2841eaa158 100644
--- a/pkgtools/libnbcompat/files/rmd160hl.c
+++ b/pkgtools/libnbcompat/files/rmd160hl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rmd160hl.c,v 1.6 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: rmd160hl.c,v 1.7 2007/07/31 13:17:33 joerg Exp $ */
/* rmd160hl.c
* ----------------------------------------------------------------------------
@@ -18,7 +18,7 @@
#include <nbcompat.h>
#include <nbcompat/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: rmd160hl.c,v 1.6 2004/08/23 03:32:12 jlam Exp $");
+__RCSID("$NetBSD: rmd160hl.c,v 1.7 2007/07/31 13:17:33 joerg Exp $");
#endif /* not lint */
#include <nbcompat/types.h>
@@ -54,7 +54,7 @@ RMD160End(RMD160_CTX *ctx, char *buf)
{
int i;
char *p = buf;
- u_char digest[20];
+ unsigned char digest[20];
static const char hex[]="0123456789abcdef";
_DIAGASSERT(ctx != NULL);
@@ -75,7 +75,7 @@ RMD160End(RMD160_CTX *ctx, char *buf)
char *
RMD160File(char *filename, char *buf)
{
- u_char buffer[BUFSIZ];
+ unsigned char buffer[BUFSIZ];
RMD160_CTX ctx;
int fd, num, oerrno;
@@ -97,7 +97,7 @@ RMD160File(char *filename, char *buf)
}
char *
-RMD160Data(const u_char *data, size_t len, char *buf)
+RMD160Data(const unsigned char *data, size_t len, char *buf)
{
RMD160_CTX ctx;
diff --git a/pkgtools/libnbcompat/files/setmode.c b/pkgtools/libnbcompat/files/setmode.c
index e6fb53d2581..265785b5fe0 100644
--- a/pkgtools/libnbcompat/files/setmode.c
+++ b/pkgtools/libnbcompat/files/setmode.c
@@ -1,4 +1,4 @@
-/* $NetBSD: setmode.c,v 1.9 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: setmode.c,v 1.10 2007/07/31 13:17:33 joerg Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)setmode.c 8.2 (Berkeley) 3/25/94";
#else
-__RCSID("$NetBSD: setmode.c,v 1.9 2004/08/23 03:32:12 jlam Exp $");
+__RCSID("$NetBSD: setmode.c,v 1.10 2007/07/31 13:17:33 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -85,7 +85,7 @@ typedef struct bitcmd {
#define CMD2_OBITS 0x08
#define CMD2_UBITS 0x10
-static BITCMD *addcmd __P((BITCMD *, int, int, int, u_int));
+static BITCMD *addcmd __P((BITCMD *, int, int, int, unsigned int));
static void compress_mode __P((BITCMD *));
#ifdef SETMODE_DEBUG
static void dumpmode __P((BITCMD *));
@@ -219,7 +219,7 @@ setmode(p)
setlen = SET_LEN + 2;
- if ((set = malloc((u_int)(sizeof(BITCMD) * setlen))) == NULL)
+ if ((set = malloc((unsigned int)(sizeof(BITCMD) * setlen))) == NULL)
return (NULL);
saveset = set;
endset = set + (setlen - 2);
@@ -369,7 +369,7 @@ addcmd(set, op, who, oparg, mask)
BITCMD *set;
int oparg, who;
int op;
- u_int mask;
+ unsigned int mask;
{
_DIAGASSERT(set != NULL);
diff --git a/pkgtools/libnbcompat/files/sha1.c b/pkgtools/libnbcompat/files/sha1.c
index e72ca8e5673..4698a827d78 100644
--- a/pkgtools/libnbcompat/files/sha1.c
+++ b/pkgtools/libnbcompat/files/sha1.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sha1.c,v 1.6 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: sha1.c,v 1.7 2007/07/31 13:17:33 joerg Exp $ */
/* $OpenBSD: sha1.c,v 1.9 1997/07/23 21:12:32 kstailey Exp $ */
/*
@@ -82,8 +82,8 @@ __weak_alias(SHA1Final,_SHA1Final)
#endif
typedef union {
- u_char c[64];
- u_int l[16];
+ unsigned char c[64];
+ unsigned int l[16];
} CHAR64LONG16;
/* old sparc64 gcc could not compile this */
@@ -150,7 +150,7 @@ do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR
*/
void SHA1Transform(state, buffer)
u_int32_t state[5];
- const u_char buffer[64];
+ const unsigned char buffer[64];
{
u_int32_t a, b, c, d, e;
CHAR64LONG16 *block;
@@ -241,10 +241,10 @@ void SHA1Init(context)
*/
void SHA1Update(context, data, len)
SHA1_CTX *context;
- const u_char *data;
- u_int len;
+ const unsigned char *data;
+ unsigned int len;
{
- u_int i, j;
+ unsigned int i, j;
_DIAGASSERT(context != 0);
_DIAGASSERT(data != 0);
@@ -270,27 +270,27 @@ void SHA1Update(context, data, len)
* Add padding and return the message digest.
*/
void SHA1Final(digest, context)
- u_char digest[20];
+ unsigned char digest[20];
SHA1_CTX* context;
{
- u_int i;
- u_char finalcount[8];
+ unsigned int i;
+ unsigned char finalcount[8];
_DIAGASSERT(digest != 0);
_DIAGASSERT(context != 0);
for (i = 0; i < 8; i++) {
- finalcount[i] = (u_char)((context->count[(i >= 4 ? 0 : 1)]
+ finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
>> ((3-(i & 3)) * 8) ) & 255); /* Endian independent */
}
- SHA1Update(context, (u_char *)"\200", 1);
+ SHA1Update(context, (unsigned char *)"\200", 1);
while ((context->count[0] & 504) != 448)
- SHA1Update(context, (u_char *)"\0", 1);
+ SHA1Update(context, (unsigned char *)"\0", 1);
SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
if (digest) {
for (i = 0; i < 20; i++)
- digest[i] = (u_char)
+ digest[i] = (unsigned char)
((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
}
}
diff --git a/pkgtools/libnbcompat/files/sha1hl.c b/pkgtools/libnbcompat/files/sha1hl.c
index 26591a187a3..f8fc2533766 100644
--- a/pkgtools/libnbcompat/files/sha1hl.c
+++ b/pkgtools/libnbcompat/files/sha1hl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sha1hl.c,v 1.6 2004/08/23 03:32:12 jlam Exp $ */
+/* $NetBSD: sha1hl.c,v 1.7 2007/07/31 13:17:33 joerg Exp $ */
/* sha1hl.c
* ----------------------------------------------------------------------------
@@ -42,7 +42,7 @@
#if !HAVE_SHA1_H
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: sha1hl.c,v 1.6 2004/08/23 03:32:12 jlam Exp $");
+__RCSID("$NetBSD: sha1hl.c,v 1.7 2007/07/31 13:17:33 joerg Exp $");
#endif /* LIBC_SCCS and not lint */
#if 0
@@ -61,7 +61,7 @@ SHA1End(ctx, buf)
{
int i;
char *p = buf;
- u_char digest[20];
+ unsigned char digest[20];
static const char hex[]="0123456789abcdef";
_DIAGASSERT(ctx != NULL);
@@ -84,7 +84,7 @@ SHA1File (filename, buf)
char *filename;
char *buf;
{
- u_char buffer[BUFSIZ];
+ unsigned char buffer[BUFSIZ];
SHA1_CTX ctx;
int fd, num, oerrno;
@@ -107,7 +107,7 @@ SHA1File (filename, buf)
char *
SHA1Data (data, len, buf)
- const u_char *data;
+ const unsigned char *data;
size_t len;
char *buf;
{
diff --git a/pkgtools/libnbcompat/files/sha2hl.c b/pkgtools/libnbcompat/files/sha2hl.c
index d1f36602570..ce6c053422b 100644
--- a/pkgtools/libnbcompat/files/sha2hl.c
+++ b/pkgtools/libnbcompat/files/sha2hl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sha2hl.c,v 1.6 2007/05/07 16:38:47 joerg Exp $ */
+/* $NetBSD: sha2hl.c,v 1.7 2007/07/31 13:17:34 joerg Exp $ */
/*
* sha2hl.c
@@ -71,7 +71,7 @@ static const char sha2_hex_digits[] = "0123456789abcdef";
char *
SHA256_File(char *filename, char *buf)
{
- u_char buffer[BUFSIZ * 20];
+ unsigned char buffer[BUFSIZ * 20];
SHA256_CTX ctx;
int fd, num, oerrno;
@@ -94,10 +94,10 @@ SHA256_File(char *filename, char *buf)
char *
-SHA256_End(SHA256_CTX *ctx, u_char *buffer)
+SHA256_End(SHA256_CTX *ctx, unsigned char *buffer)
{
- u_char digest[SHA256_DIGEST_LENGTH], *d = digest;
- u_char *ret;
+ unsigned char digest[SHA256_DIGEST_LENGTH], *d = digest;
+ unsigned char *ret;
int i;
/* Sanity check: */
@@ -120,7 +120,7 @@ SHA256_End(SHA256_CTX *ctx, u_char *buffer)
}
char *
-SHA256_Data(const uint8_t * data, size_t len, u_char *digest)
+SHA256_Data(const uint8_t * data, size_t len, unsigned char *digest)
{
SHA256_CTX ctx;
@@ -133,7 +133,7 @@ char *
SHA384_File(char *filename, char *buf)
{
SHA384_CTX ctx;
- u_char buffer[BUFSIZ * 20];
+ unsigned char buffer[BUFSIZ * 20];
int fd, num, oerrno;
_DIAGASSERT(filename != NULL);
@@ -156,8 +156,8 @@ SHA384_File(char *filename, char *buf)
char *
SHA384_End(SHA384_CTX * ctx, char buffer[])
{
- u_char digest[SHA384_DIGEST_LENGTH], *d = digest;
- u_char *ret;
+ unsigned char digest[SHA384_DIGEST_LENGTH], *d = digest;
+ unsigned char *ret;
int i;
/* Sanity check: */
@@ -193,7 +193,7 @@ char *
SHA512_File(char *filename, char *buf)
{
SHA512_CTX ctx;
- u_char buffer[BUFSIZ * 20];
+ unsigned char buffer[BUFSIZ * 20];
int fd, num, oerrno;
_DIAGASSERT(filename != NULL);
@@ -216,8 +216,8 @@ SHA512_File(char *filename, char *buf)
char *
SHA512_End(SHA512_CTX * ctx, char buffer[])
{
- u_char digest[SHA512_DIGEST_LENGTH], *d = digest;
- u_char *ret;
+ unsigned char digest[SHA512_DIGEST_LENGTH], *d = digest;
+ unsigned char *ret;
int i;
/* Sanity check: */
diff --git a/pkgtools/libnbcompat/files/unvis.c b/pkgtools/libnbcompat/files/unvis.c
index b392309e995..95dd3df5a4c 100644
--- a/pkgtools/libnbcompat/files/unvis.c
+++ b/pkgtools/libnbcompat/files/unvis.c
@@ -1,4 +1,4 @@
-/* $NetBSD: unvis.c,v 1.11 2004/12/04 23:31:40 grant Exp $ */
+/* $NetBSD: unvis.c,v 1.12 2007/07/31 13:17:34 joerg Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
#if 0
static char sccsid[] = "@(#)unvis.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: unvis.c,v 1.11 2004/12/04 23:31:40 grant Exp $");
+__RCSID("$NetBSD: unvis.c,v 1.12 2007/07/31 13:17:34 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -80,7 +80,7 @@ __warn_references(unvis,
#define S_HEX1 7 /* hex digit */
#define S_HEX2 8 /* hex digit 2 */
-#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
+#define isoctal(c) (((unsigned char)(c)) >= '0' && ((unsigned char)(c)) <= '7')
#define xtod(c) (isdigit(c) ? (c - '0') : ((tolower(c) - 'a') + 10))
int
diff --git a/pkgtools/libnbcompat/files/vis.c b/pkgtools/libnbcompat/files/vis.c
index f3b852f6d9c..bc31f3652ce 100644
--- a/pkgtools/libnbcompat/files/vis.c
+++ b/pkgtools/libnbcompat/files/vis.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vis.c,v 1.9 2005/11/18 09:03:06 grant Exp $ */
+/* $NetBSD: vis.c,v 1.10 2007/07/31 13:17:34 joerg Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -68,7 +68,7 @@
#include <nbcompat.h>
#include <nbcompat/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.9 2005/11/18 09:03:06 grant Exp $");
+__RCSID("$NetBSD: vis.c,v 1.10 2007/07/31 13:17:34 joerg Exp $");
#endif /* LIBC_SCCS and not lint */
#if 0
@@ -99,7 +99,7 @@ __weak_alias(vis,_vis)
#undef BELL
#define BELL '\a'
-#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
+#define isoctal(c) (((unsigned char)(c)) >= '0' && ((unsigned char)(c)) <= '7')
#define iswhite(c) (c == ' ' || c == '\t' || c == '\n')
#define issafe(c) (c == '\b' || c == BELL || c == '\r')
#define xtoa(c) "0123456789abcdef"[c]
@@ -200,8 +200,8 @@ do { \
} \
if (isextra || ((c & 0177) == ' ') || (flag & VIS_OCTAL)) { \
*dst++ = '\\'; \
- *dst++ = (u_char)(((u_int32_t)(u_char)c >> 6) & 03) + '0'; \
- *dst++ = (u_char)(((u_int32_t)(u_char)c >> 3) & 07) + '0'; \
+ *dst++ = (unsigned char)(((u_int32_t)(unsigned char)c >> 6) & 03) + '0'; \
+ *dst++ = (unsigned char)(((u_int32_t)(unsigned char)c >> 3) & 07) + '0'; \
*dst++ = (c & 07) + '0'; \
} else { \
if ((flag & VIS_NOSLASH) == 0) *dst++ = '\\'; \