From e2bbfa26bd6b867d5539caccc88606aaaaed5d94 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 6 Oct 1996 19:13:37 +0000 Subject: [PATCH] Cleaned up vm types. Cosmetic. The main change is from unsigned long unsigned int. It just needs to be a 32-bit type and unsigned int is most natural. Using a non-long type has the "advantage" of hiding bugs in the "machine-independent" code where it prints foo_t's using %d or %x. These bugs are currently hidden bug not compiling with -Wformat. I tried changing vm_ooffset_t from long long to unsigned long long, but that was wrong because vm_ooffset_t needs to be long to match off_t, although file offsets are never negative. Reviewed by: dyson --- sys/i386/include/types.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/i386/include/types.h b/sys/i386/include/types.h index 4cd13ca69a7..7b0d80033b5 100644 --- a/sys/i386/include/types.h +++ b/sys/i386/include/types.h @@ -31,11 +31,11 @@ * SUCH DAMAGE. * * @(#)types.h 8.3 (Berkeley) 1/5/94 - * $Id: types.h,v 1.6 1996/02/25 09:15:03 hsu Exp $ + * $Id: types.h,v 1.6 1996/03/11 02:23:56 hsu Exp $ */ -#ifndef _MACHTYPES_H_ -#define _MACHTYPES_H_ +#ifndef _MACHINE_TYPES_H_ +#define _MACHINE_TYPES_H_ #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) typedef struct _physadr { @@ -47,10 +47,10 @@ typedef struct label_t { } label_t; #endif -typedef unsigned long vm_offset_t; -typedef unsigned long vm_size_t; +typedef unsigned int vm_offset_t; typedef long long vm_ooffset_t; -typedef unsigned long vm_pindex_t; +typedef unsigned int vm_pindex_t; +typedef unsigned int vm_size_t; /* * Basic integral types. Omit the typedef if @@ -67,4 +67,4 @@ typedef unsigned long long u_int64_t; typedef int32_t register_t; -#endif /* _MACHTYPES_H_ */ +#endif /* !_MACHINE_TYPES_H_ */