summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2006-01-16 15:52:26 +0000
committerMarc Espie <espie@cvs.openbsd.org>2006-01-16 15:52:26 +0000
commitfaff3a497a1d7aea1f2e65f3e27c8c6aeadb3d06 (patch)
treea6553a1cd788cd9cf26d5a7ae4824acac2abef57 /lib/libc
parent5131c0036d7d2582fd928abfc656b6d78ed8ee77 (diff)
use standard type uint32_t, instead of BSD-specific u_int32_t
tell user to get it through stdint.h (note old sys/types.h still works, for now). okay millert@, jmc@
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/ohash/ohash_init.38
-rw-r--r--lib/libc/ohash/ohash_int.h4
-rw-r--r--lib/libc/ohash/ohash_interval.34
-rw-r--r--lib/libc/ohash/ohash_interval.c6
-rw-r--r--lib/libc/ohash/ohash_lookup_interval.c4
-rw-r--r--lib/libc/ohash/ohash_lookup_memory.c4
6 files changed, 15 insertions, 15 deletions
diff --git a/lib/libc/ohash/ohash_init.3 b/lib/libc/ohash/ohash_init.3
index 1a65f8f8403..161db6d0e08 100644
--- a/lib/libc/ohash/ohash_init.3
+++ b/lib/libc/ohash/ohash_init.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ohash_init.3,v 1.12 2005/07/29 08:51:13 jmc Exp $
+.\" $OpenBSD: ohash_init.3,v 1.13 2006/01/16 15:52:25 espie Exp $
.\" Copyright (c) 1999 Marc Espie <espie@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
@@ -29,7 +29,7 @@
.Nm ohash_entries
.Nd light-weight open hashing
.Sh SYNOPSIS
-.Fd #include <sys/types.h>
+.Fd #include <stdint.h>
.Fd #include <stddef.h>
.Fd #include <ohash.h>
.Ft void
@@ -37,9 +37,9 @@
.Ft void
.Fn ohash_delete "struct ohash *h"
.Ft "unsigned int"
-.Fn ohash_lookup_interval "struct ohash *h" "const char *start" "const char *end" "u_int32_t hv"
+.Fn ohash_lookup_interval "struct ohash *h" "const char *start" "const char *end" "uint32_t hv"
.Ft "unsigned int"
-.Fn ohash_lookup_memory "struct ohash *h" "const char *k" "size_t s" "u_int32_t hv"
+.Fn ohash_lookup_memory "struct ohash *h" "const char *k" "size_t s" "uint32_t hv"
.Ft void *
.Fn ohash_find "struct ohash *h" "unsigned int i"
.Ft void *
diff --git a/lib/libc/ohash/ohash_int.h b/lib/libc/ohash/ohash_int.h
index 16e64fd1b46..4a3eec4b7ee 100644
--- a/lib/libc/ohash/ohash_int.h
+++ b/lib/libc/ohash/ohash_int.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: ohash_int.h,v 1.2 2004/06/22 20:00:16 espie Exp $ */
+/* $OpenBSD: ohash_int.h,v 1.3 2006/01/16 15:52:25 espie Exp $ */
-#include <sys/types.h>
#include <stddef.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "ohash.h"
diff --git a/lib/libc/ohash/ohash_interval.3 b/lib/libc/ohash/ohash_interval.3
index 0f84760e5f3..8df48c4d823 100644
--- a/lib/libc/ohash/ohash_interval.3
+++ b/lib/libc/ohash/ohash_interval.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ohash_interval.3,v 1.9 2005/02/25 03:12:43 cloder Exp $
+.\" $OpenBSD: ohash_interval.3,v 1.10 2006/01/16 15:52:25 espie Exp $
.\" Copyright (c) 2001 Marc Espie <espie@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
@@ -23,7 +23,7 @@
.Nm ohash_qlookupi
.Nd helper functions for open hashing
.Sh SYNOPSIS
-.Fd #include <sys/types.h>
+.Fd #include <stdint.h>
.Fd #include <stddef.h>
.Fd #include <ohash.h>
.Ft u_int32_t
diff --git a/lib/libc/ohash/ohash_interval.c b/lib/libc/ohash/ohash_interval.c
index 93e1e0b6f01..2434d3b0561 100644
--- a/lib/libc/ohash/ohash_interval.c
+++ b/lib/libc/ohash/ohash_interval.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohash_interval.c,v 1.2 2004/06/22 20:00:17 espie Exp $ */
+/* $OpenBSD: ohash_interval.c,v 1.3 2006/01/16 15:52:25 espie Exp $ */
/* ex:ts=8 sw=4:
*/
@@ -19,10 +19,10 @@
#include "ohash_int.h"
-u_int32_t
+uint32_t
ohash_interval(const char *s, const char **e)
{
- u_int32_t k;
+ uint32_t k;
if (!*e)
*e = s + strlen(s);
diff --git a/lib/libc/ohash/ohash_lookup_interval.c b/lib/libc/ohash/ohash_lookup_interval.c
index 4358b5acbbd..e49780168ba 100644
--- a/lib/libc/ohash/ohash_lookup_interval.c
+++ b/lib/libc/ohash/ohash_lookup_interval.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohash_lookup_interval.c,v 1.2 2004/06/22 20:00:17 espie Exp $ */
+/* $OpenBSD: ohash_lookup_interval.c,v 1.3 2006/01/16 15:52:25 espie Exp $ */
/* ex:ts=8 sw=4:
*/
@@ -21,7 +21,7 @@
unsigned int
ohash_lookup_interval(struct ohash *h, const char *start, const char *end,
- u_int32_t hv)
+ uint32_t hv)
{
unsigned int i, incr;
unsigned int empty;
diff --git a/lib/libc/ohash/ohash_lookup_memory.c b/lib/libc/ohash/ohash_lookup_memory.c
index 64deb50b167..93ded5ae728 100644
--- a/lib/libc/ohash/ohash_lookup_memory.c
+++ b/lib/libc/ohash/ohash_lookup_memory.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohash_lookup_memory.c,v 1.2 2004/06/22 20:00:17 espie Exp $ */
+/* $OpenBSD: ohash_lookup_memory.c,v 1.3 2006/01/16 15:52:25 espie Exp $ */
/* ex:ts=8 sw=4:
*/
@@ -20,7 +20,7 @@
#include "ohash_int.h"
unsigned int
-ohash_lookup_memory(struct ohash *h, const char *k, size_t size, u_int32_t hv)
+ohash_lookup_memory(struct ohash *h, const char *k, size_t size, uint32_t hv)
{
unsigned int i, incr;
unsigned int empty;