aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/types.h
diff options
context:
space:
mode:
authorJeffrey Hsu <hsu@FreeBSD.org>1996-03-11 02:19:02 +0000
committerJeffrey Hsu <hsu@FreeBSD.org>1996-03-11 02:19:02 +0000
commit01af853dcf8f4194c9bcb418659743e55bea4e13 (patch)
tree5b97fafea19767d27ba1d33c8fe676c05856b61c /sys/sys/types.h
parent04d41bbeb7bd12ac681fe6543266ffc6e1c78077 (diff)
downloadsrc-01af853dcf8f4194c9bcb418659743e55bea4e13.tar.gz
src-01af853dcf8f4194c9bcb418659743e55bea4e13.zip
Merge in Lite2: use fixed-width types.
Did not accept changes to types of off_t and pid_t. See <machine/ansi.h> for explanation. Did not accept changes to major and minor macros upon bde's review. These changes are unnecessary. Did not accept type change to fd_mask upon bde's review. This change is unnecessary as long as sizeof(fd_mask) divides FD_SETSIZE. Reviewed by: davidg & bde
Notes
Notes: svn path=/head/; revision=14500
Diffstat (limited to 'sys/sys/types.h')
-rw-r--r--sys/sys/types.h42
1 files changed, 22 insertions, 20 deletions
diff --git a/sys/sys/types.h b/sys/sys/types.h
index dd2ae2d9bb60..219fc2520ce1 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 1982, 1986, 1991, 1993
+ * Copyright (c) 1982, 1986, 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
@@ -35,8 +35,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)types.h 8.4 (Berkeley) 1/21/94
- * $Id: types.h,v 1.7 1995/12/10 02:34:14 bde Exp $
+ * @(#)types.h 8.6 (Berkeley) 2/19/95
+ * $Id: types.h,v 1.11 1996/03/10 23:35:09 hsu Exp $
*/
#ifndef _SYS_TYPES_H_
@@ -46,7 +46,8 @@
#include <machine/ansi.h>
/* Machine type dependent parameters. */
-#include <machine/endian.h>
+#include <machine/ansi.h>
+#include <machine/types.h>
#ifndef _POSIX_SOURCE
typedef unsigned char u_char;
@@ -57,24 +58,25 @@ typedef unsigned short ushort; /* Sys V compatibility */
typedef unsigned int uint; /* Sys V compatibility */
#endif
-typedef unsigned long long u_quad_t; /* quads */
-typedef long long quad_t;
+typedef u_int64_t u_quad_t; /* quads */
+typedef int64_t quad_t;
typedef quad_t * qaddr_t;
typedef char * caddr_t; /* core address */
-typedef long daddr_t; /* disk address */
-typedef unsigned long dev_t; /* device number */
-typedef unsigned long fixpt_t; /* fixed point number */
-typedef unsigned long gid_t; /* group id */
-typedef unsigned long ino_t; /* inode number */
-typedef long key_t; /* SYSV IPC Key */
-typedef unsigned short mode_t; /* permissions */
-typedef unsigned short nlink_t; /* link count */
+
+typedef int32_t daddr_t; /* disk address */
+typedef u_int32_t dev_t; /* device number */
+typedef u_int32_t fixpt_t; /* fixed point number */
+typedef u_int32_t gid_t; /* group id */
+typedef u_int32_t ino_t; /* inode number */
+typedef long key_t; /* IPC key (for Sys V IPC) */
+typedef u_int16_t mode_t; /* permissions */
+typedef u_int16_t nlink_t; /* link count */
typedef _BSD_OFF_T_ off_t; /* file offset */
typedef _BSD_PID_T_ pid_t; /* process id */
-typedef long segsz_t; /* segment size */
-typedef long swblk_t; /* swap offset */
-typedef unsigned long uid_t; /* user id */
+typedef int32_t segsz_t; /* segment size */
+typedef int32_t swblk_t; /* swap offset */
+typedef u_int32_t uid_t; /* user id */
#ifdef KERNEL
typedef int boolean_t;
@@ -101,10 +103,10 @@ __END_DECLS
*/
#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */
-#define makedev(x,y) ((dev_t)(((x)<<8) | (y))) /* create dev_t */
+#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */
#endif
-#include <machine/types.h>
+#include <machine/endian.h>
#ifdef _BSD_CLOCK_T_
typedef _BSD_CLOCK_T_ clock_t;
@@ -143,7 +145,7 @@ typedef long fd_mask;
#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
#ifndef howmany
-#define howmany(x, y) (((x)+((y)-1))/(y))
+#define howmany(x, y) (((x) + ((y) - 1)) / (y))
#endif
typedef struct fd_set {