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
This commit is contained in:
parent
f7d6dab2fd
commit
e2bbfa26bd
|
@ -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_ */
|
||||
|
|
Loading…
Reference in New Issue