summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-04-13 15:27:12 +0000
committerbde <bde@FreeBSD.org>1997-04-13 15:27:12 +0000
commitb9d8e9106dd254df3090edad75501f9c3d28e12d (patch)
tree9d3fb13d784a66b17789afae534b886c8581723f
parent72d3bcd80ba0db521609fe29360624dad85b1e17 (diff)
downloadFreeBSD-src-b9d8e9106dd254df3090edad75501f9c3d28e12d.zip
FreeBSD-src-b9d8e9106dd254df3090edad75501f9c3d28e12d.tar.gz
Moved #include of <sys/cdefs.h> earlier so that __signed in
<machine/types.h> gets redefined in the non-GNU and non-ANSI cases. Since this hasn't caused problems, there must be no one actually benefitting from the obfuscations supported by <sys/cdefs.h>. `make CC="cc -traditional"' in /usr/src/bin shows the same. Almost everything is broken in essentially the same way - `const' is used in strings before <sys/cdefs.h> is included, so `const' is not #defined away until after it is used. Fixed some style bugs.
-rw-r--r--sys/sys/types.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/sys/types.h b/sys/sys/types.h
index 1dc5d7c..dd9e4df 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -36,13 +36,14 @@
* SUCH DAMAGE.
*
* @(#)types.h 8.6 (Berkeley) 2/19/95
- * $Id$
+ * $Id: types.h,v 1.18 1997/02/22 09:46:18 peter Exp $
*/
#ifndef _SYS_TYPES_H_
#define _SYS_TYPES_H_
/* Machine type dependent parameters. */
+#include <sys/cdefs.h> /* XXX for __signed in machine/ansi.h */
#include <machine/ansi.h>
#include <machine/types.h>
@@ -62,7 +63,7 @@ typedef quad_t * qaddr_t;
typedef char * caddr_t; /* core address */
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 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) */
@@ -70,12 +71,11 @@ 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 quad_t rlim_t; /* resource limit */
typedef int32_t segsz_t; /* segment size */
typedef int32_t swblk_t; /* swap offset */
typedef u_int32_t uid_t; /* user id */
-typedef quad_t rlim_t; /* resource limits */
-
#ifdef KERNEL
typedef int boolean_t;
typedef struct vm_page *vm_page_t;
@@ -87,7 +87,6 @@ typedef struct vm_page *vm_page_t;
* version of lseek.
*/
#ifndef KERNEL
-#include <sys/cdefs.h>
__BEGIN_DECLS
off_t lseek __P((int, off_t, int));
__END_DECLS
@@ -139,8 +138,8 @@ typedef _BSD_TIME_T_ time_t;
#define FD_SETSIZE 1024
#endif
-typedef long fd_mask;
-#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
+typedef long fd_mask;
+#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
#ifndef howmany
#define howmany(x, y) (((x) + ((y) - 1)) / (y))
OpenPOWER on IntegriCloud