From 4efe3992f9694f44aa949ce016182d3ac20ce08d Mon Sep 17 00:00:00 2001 From: gson Date: Wed, 6 Apr 2016 09:57:00 +0000 Subject: [PATCH] Fully avoid the nonstandard types u_char, u_int, and u_long, which were only used inconsistently in a few places anyway. --- usr.bin/make/arch.c | 10 +++++----- usr.bin/make/parse.c | 12 ++++++------ usr.bin/make/str.c | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c index 045fca8b8b37..a27d053dc4fa 100644 --- a/usr.bin/make/arch.c +++ b/usr.bin/make/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.68 2016/02/18 18:29:14 christos Exp $ */ +/* $NetBSD: arch.c,v 1.69 2016/04/06 09:57:00 gson Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: arch.c,v 1.68 2016/02/18 18:29:14 christos Exp $"; +static char rcsid[] = "$NetBSD: arch.c,v 1.69 2016/04/06 09:57:00 gson Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: arch.c,v 1.68 2016/02/18 18:29:14 christos Exp $"); +__RCSID("$NetBSD: arch.c,v 1.69 2016/04/06 09:57:00 gson Exp $"); #endif #endif /* not lint */ #endif @@ -785,7 +785,7 @@ ArchSVR4Entry(Arch *ar, char *name, size_t size, FILE *arch) } if (DEBUG(ARCH)) { fprintf(debug_file, "Found svr4 archive name table with %lu entries\n", - (u_long)entry); + (unsigned long)entry); } return 0; } @@ -803,7 +803,7 @@ ArchSVR4Entry(Arch *ar, char *name, size_t size, FILE *arch) if (entry >= ar->fnamesize) { if (DEBUG(ARCH)) { fprintf(debug_file, "SVR4 entry offset %s is greater than %lu\n", - name, (u_long)ar->fnamesize); + name, (unsigned long)ar->fnamesize); } return 2; } diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 8c09a430e1f0..6513dc3cf0f1 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $ */ +/* $NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.213 2016/03/11 13:54:47 matthias Exp $"); +__RCSID("$NetBSD: parse.c,v 1.214 2016/04/06 09:57:00 gson Exp $"); #endif #endif /* not lint */ #endif @@ -795,11 +795,11 @@ ParseMessage(char *line) return FALSE; } - while (isalpha((u_char)*line)) + while (isalpha((unsigned char)*line)) line++; - if (!isspace((u_char)*line)) + if (!isspace((unsigned char)*line)) return FALSE; /* not for us */ - while (isspace((u_char)*line)) + while (isspace((unsigned char)*line)) line++; line = Var_Subst(NULL, line, VAR_CMD, VARF_WANTRES); diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c index 0260447f8178..5e4e8f6cc1c9 100644 --- a/usr.bin/make/str.c +++ b/usr.bin/make/str.c @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.35 2014/02/12 01:35:56 sjg Exp $ */ +/* $NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $ */ /*- * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: str.c,v 1.35 2014/02/12 01:35:56 sjg Exp $"; +static char rcsid[] = "$NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)str.c 5.8 (Berkeley) 6/1/90"; #else -__RCSID("$NetBSD: str.c,v 1.35 2014/02/12 01:35:56 sjg Exp $"); +__RCSID("$NetBSD: str.c,v 1.36 2016/04/06 09:57:00 gson Exp $"); #endif #endif /* not lint */ #endif @@ -102,7 +102,7 @@ str_concat(const char *s1, const char *s2, int flags) len2 = strlen(s2); /* allocate length plus separator plus EOS */ - result = bmake_malloc((u_int)(len1 + len2 + 2)); + result = bmake_malloc((unsigned int)(len1 + len2 + 2)); /* copy first string into place */ memcpy(result, s1, len1);