summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2006-01-20 23:10:20 +0000
committerMarc Espie <espie@cvs.openbsd.org>2006-01-20 23:10:20 +0000
commitbb73845798cff57670d538da76e8d33d95a83c96 (patch)
tree9e05f9d8f0f4336731a34377fb78a85d6a5d7312 /usr.bin/make
parentf0d48f87e2fca677ee8cf862dadddda3c3dd47ee (diff)
use stdint.h where appropriate. okay millert@
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/arch.c4
-rw-r--r--usr.bin/make/cond.c5
-rw-r--r--usr.bin/make/dir.c10
-rw-r--r--usr.bin/make/generate.c11
-rw-r--r--usr.bin/make/targ.c4
-rw-r--r--usr.bin/make/var.c34
6 files changed, 35 insertions, 33 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index ed6d6e7c94b..01bd80600d4 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: arch.c,v 1.54 2004/04/07 13:11:35 espie Exp $ */
+/* $OpenBSD: arch.c,v 1.55 2006/01/20 23:10:19 espie Exp $ */
/* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */
/*
@@ -72,7 +72,6 @@
*/
#include <sys/param.h>
-#include <sys/types.h>
#include <ar.h>
#include <assert.h>
#include <ctype.h>
@@ -80,6 +79,7 @@
#include <limits.h>
#include <stddef.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 500057da0c4..62944e6c519 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: cond.c,v 1.30 2004/04/07 13:11:35 espie Exp $ */
+/* $OpenBSD: cond.c,v 1.31 2006/01/20 23:10:19 espie Exp $ */
/* $NetBSD: cond.c,v 1.7 1996/11/06 17:59:02 christos Exp $ */
/*
@@ -39,6 +39,7 @@
#include <ctype.h>
#include <stddef.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
@@ -850,7 +851,7 @@ Cond_Eval(const char *line)
{
/* find end of keyword */
const char *end;
- u_int32_t k;
+ uint32_t k;
size_t len;
struct If *ifp;
bool value = false;
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index a5e4250cbb8..7efba0a230a 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: dir.c,v 1.43 2005/06/26 15:19:12 mickey Exp $ */
+/* $OpenBSD: dir.c,v 1.44 2006/01/20 23:10:19 espie Exp $ */
/* $NetBSD: dir.c,v 1.14 1997/03/29 16:51:26 christos Exp $ */
/*
@@ -63,12 +63,12 @@
*/
#include <sys/param.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <limits.h>
#include <stddef.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
@@ -209,7 +209,7 @@ static struct ohash_info dir_info = { offsetof(Path, name),
static void add_file(Path *, const char *);
/* n = find_file_hashi(p, name, end, hv): retrieve name in a path hash
* structure. */
-static char *find_file_hashi(Path *, const char *, const char *, u_int32_t);
+static char *find_file_hashi(Path *, const char *, const char *, uint32_t);
/* stamp = find_stampi(name, end): look for (name, end) in the global
* cache. */
@@ -280,7 +280,7 @@ add_file(Path *p, const char *file)
}
static char *
-find_file_hashi(Path *p, const char *file, const char *efile, u_int32_t hv)
+find_file_hashi(Path *p, const char *file, const char *efile, uint32_t hv)
{
struct ohash *h = &p->files;
@@ -646,7 +646,7 @@ Dir_FindFilei(const char *name, const char *ename, Lst path)
bool hasSlash;
struct stat stb; /* Buffer for stat, if necessary */
struct file_stamp *entry; /* Entry for mtimes table */
- u_int32_t hv; /* hash value for last component in file name */
+ uint32_t hv; /* hash value for last component in file name */
char *q; /* Str_dupi(name, ename) */
/* Find the final component of the name and note whether name has a
diff --git a/usr.bin/make/generate.c b/usr.bin/make/generate.c
index 4e5494d2041..4ff6f29fda7 100644
--- a/usr.bin/make/generate.c
+++ b/usr.bin/make/generate.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: generate.c,v 1.5 2002/06/11 21:12:11 espie Exp $ */
+/* $OpenBSD: generate.c,v 1.6 2006/01/20 23:10:19 espie Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
@@ -28,6 +28,7 @@
#include <stddef.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include "stats.h"
@@ -91,10 +92,10 @@ char **table[] = {
int
main(int argc, char *argv[])
{
- u_int32_t i;
- u_int32_t v;
- u_int32_t h;
- u_int32_t slots;
+ uint32_t i;
+ uint32_t v;
+ uint32_t h;
+ uint32_t slots;
const char *e;
char **occupied;
char **t;
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c
index 027bac2f811..e8595bda924 100644
--- a/usr.bin/make/targ.c
+++ b/usr.bin/make/targ.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: targ.c,v 1.39 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: targ.c,v 1.40 2006/01/20 23:10:19 espie Exp $ */
/* $NetBSD: targ.c,v 1.11 1997/02/20 16:51:50 christos Exp $ */
/*
@@ -98,10 +98,10 @@
* print something for suffixes, too, but...
*/
-#include <sys/types.h>
#include <limits.h>
#include <stddef.h>
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
#include "config.h"
#include "defines.h"
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index 114c429bdad..4e3c84fd838 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: var.c,v 1.59 2004/04/07 13:11:36 espie Exp $ */
+/* $OpenBSD: var.c,v 1.60 2006/01/20 23:10:19 espie Exp $ */
/* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */
/*
@@ -62,10 +62,10 @@
* SUCH DAMAGE.
*/
-#include <sys/types.h>
#include <assert.h>
#include <stddef.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@@ -171,18 +171,18 @@ typedef struct Var_ {
static struct ohash_info var_info = {
offsetof(Var, name),
NULL, hash_alloc, hash_free, element_alloc };
-static int quick_lookup(const char *, const char **, u_int32_t *);
+static int quick_lookup(const char *, const char **, uint32_t *);
#define VarValue(v) Buf_Retrieve(&((v)->val))
-static Var *varfind(const char *, const char *, SymTable *, int, int, u_int32_t);
+static Var *varfind(const char *, const char *, SymTable *, int, int, uint32_t);
static Var *VarFindi(const char *, const char *, SymTable *, int);
-static Var *VarAdd(const char *, const char *, u_int32_t, const char *, GSymT *);
+static Var *VarAdd(const char *, const char *, uint32_t, const char *, GSymT *);
static void VarDelete(void *);
static void VarPrintVar(Var *);
static const char *context_name(GSymT *);
static Var *new_var(const char *, const char *, const char *);
-static Var *getvar(GSymT *, const char *, const char *, u_int32_t);
+static Var *getvar(GSymT *, const char *, const char *, uint32_t);
static Var *create_var(const char *, const char *);
-static Var *var_from_env(const char *, const char *, u_int32_t);
+static Var *var_from_env(const char *, const char *, uint32_t);
static void var_init_string(Var *, const char *);
static const char *find_0(const char *);
@@ -214,7 +214,7 @@ SymTable_Destroy(SymTable *ctxt)
#endif
static int
-quick_lookup(const char *name, const char **enamePtr, u_int32_t *pk)
+quick_lookup(const char *name, const char **enamePtr, uint32_t *pk)
{
size_t len;
@@ -423,7 +423,7 @@ new_var(const char *name, const char *ename, const char *val)
}
static Var *
-var_from_env(const char *name, const char *ename, u_int32_t k)
+var_from_env(const char *name, const char *ename, uint32_t k)
{
char *env;
Var *v;
@@ -451,7 +451,7 @@ var_from_env(const char *name, const char *ename, u_int32_t k)
}
static Var *
-getvar(GSymT *ctxt, const char *name, const char *ename, u_int32_t k)
+getvar(GSymT *ctxt, const char *name, const char *ename, uint32_t k)
{
return ohash_find(ctxt, ohash_lookup_interval(ctxt, name, ename, k));
}
@@ -477,7 +477,7 @@ VarFindi(const char *name, /* name to find */
* FIND_ENV set means to look in the
* environment */
{
- u_int32_t k;
+ uint32_t k;
int idx;
#ifdef STATS_VAR_LOOKUP
@@ -490,7 +490,7 @@ VarFindi(const char *name, /* name to find */
static Var *
varfind(const char *name, const char *ename, SymTable *ctxt, int flags,
- int idx, u_int32_t k)
+ int idx, uint32_t k)
{
Var *v;
@@ -566,7 +566,7 @@ varfind(const char *name, const char *ename, SymTable *ctxt, int flags,
*-----------------------------------------------------------------------
*/
static Var *
-VarAdd(const char *name, const char *ename, u_int32_t k, const char *val,
+VarAdd(const char *name, const char *ename, uint32_t k, const char *val,
GSymT *ctxt)
{
Var *v;
@@ -603,7 +603,7 @@ void
Var_Delete(const char *name)
{
Var *v;
- u_int32_t k;
+ uint32_t k;
unsigned int slot;
const char *ename = NULL;
int idx;
@@ -632,7 +632,7 @@ void
Var_Seti(const char *name, const char *ename, const char *val, GSymT *ctxt)
{
Var *v;
- u_int32_t k;
+ uint32_t k;
int idx;
idx = quick_lookup(name, &ename, &k);
@@ -670,7 +670,7 @@ void
Var_Appendi(const char *name, const char *ename, const char *val, GSymT *ctxt)
{
Var *v;
- u_int32_t k;
+ uint32_t k;
int idx;
assert(ctxt == VAR_GLOBAL || ctxt == VAR_CMD);
@@ -823,7 +823,7 @@ Var_Parse(const char *str, /* The string to parse */
struct Name name;
const char *start;
char *val; /* Variable value */
- u_int32_t k;
+ uint32_t k;
int idx;
*freePtr = false;