summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/include/internal_types.h8
-rw-r--r--sys/arch/alpha/include/limits.h51
-rw-r--r--sys/arch/amiga/include/internal_types.h3
-rw-r--r--sys/arch/hp300/include/internal_types.h3
-rw-r--r--sys/arch/hppa/include/internal_types.h6
-rw-r--r--sys/arch/hppa/include/limits.h51
-rw-r--r--sys/arch/i386/include/internal_types.h6
-rw-r--r--sys/arch/i386/include/limits.h41
-rw-r--r--sys/arch/m68k/include/internal_types.h6
-rw-r--r--sys/arch/m68k/include/limits.h40
-rw-r--r--sys/arch/mac68k/include/internal_types.h3
-rw-r--r--sys/arch/mac68k/mac68k/clock.c4
-rw-r--r--sys/arch/macppc/include/internal_types.h3
-rw-r--r--sys/arch/mvme68k/include/internal_types.h3
-rw-r--r--sys/arch/mvme88k/include/internal_types.h6
-rw-r--r--sys/arch/mvme88k/include/limits.h54
-rw-r--r--sys/arch/mvmeppc/include/internal_types.h3
-rw-r--r--sys/arch/powerpc/include/internal_types.h8
-rw-r--r--sys/arch/powerpc/include/limits.h38
-rw-r--r--sys/arch/sparc/include/internal_types.h6
-rw-r--r--sys/arch/sparc/include/limits.h40
-rw-r--r--sys/arch/sparc64/include/internal_types.h8
-rw-r--r--sys/arch/sparc64/include/limits.h45
-rw-r--r--sys/arch/sun3/include/internal_types.h3
-rw-r--r--sys/arch/vax/include/internal_types.h14
-rw-r--r--sys/arch/vax/include/limits.h41
26 files changed, 101 insertions, 393 deletions
diff --git a/sys/arch/alpha/include/internal_types.h b/sys/arch/alpha/include/internal_types.h
new file mode 100644
index 00000000000..076d2a5ee3c
--- /dev/null
+++ b/sys/arch/alpha/include/internal_types.h
@@ -0,0 +1,8 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#define __machine_is_64_bits
+
+#endif
diff --git a/sys/arch/alpha/include/limits.h b/sys/arch/alpha/include/limits.h
index 3ae9bae45cc..71f75a01b34 100644
--- a/sys/arch/alpha/include/limits.h
+++ b/sys/arch/alpha/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.7 2000/07/31 20:06:01 millert Exp $ */
+/* $OpenBSD: limits.h,v 1.8 2002/04/24 21:53:11 espie Exp $ */
/* $NetBSD: limits.h,v 1.2 1996/04/12 01:38:25 cgd Exp $ */
/*
@@ -39,69 +39,20 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
-#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
-/*
- * According to ANSI (section 2.2.4.2), the values below must be usable by
- * #if preprocessing directives. Additionally, the expression must have the
- * same type as would an expression that is an object of the corresponding
- * type converted according to the integral promotions. The subtraction for
- * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an
- * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
- * These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values
- * are written as hex so that GCC will be quiet about large integer constants.
- */
-#define SCHAR_MAX 0x7f /* max value for a signed char */
-#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
-
-#define UCHAR_MAX 0xffU /* max value for an unsigned char */
-#define CHAR_MAX 0x7f /* max value for a char */
-#define CHAR_MIN (-0x7f-1) /* min value for a char */
-
-#define USHRT_MAX 0xffffU /* max value for an unsigned short */
-#define SHRT_MAX 0x7fff /* max value for a short */
-#define SHRT_MIN (-0x7fff-1) /* min value for a short */
-
-#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
-#define INT_MAX 0x7fffffff /* max value for an int */
-#define INT_MIN (-0x7fffffff-1) /* min value for an int */
-
-#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */
-#define LONG_MAX 0x7fffffffffffffffL /* max for a long */
-#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */
-
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-#define GID_MAX UINT_MAX /* max value for a gid_t */
-
/* Quads and longs are the same on the alpha */
#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */
#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */
#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */
-#define ULLONG_MAX (ULONG_MAX) /* max value for unsigned long long */
-#define LLONG_MAX (LONG_MAX) /* max value for a long long */
-#define LLONG_MIN (LONG_MIN) /* min value for a long long */
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define LONG_BIT 64
-#define WORD_BIT 32
-
-#define DBL_DIG 15
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MIN 2.2250738585072014E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
-
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/amiga/include/internal_types.h b/sys/arch/amiga/include/internal_types.h
new file mode 100644
index 00000000000..61dd1740f08
--- /dev/null
+++ b/sys/arch/amiga/include/internal_types.h
@@ -0,0 +1,3 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#include <m68k/internal_types.h>
diff --git a/sys/arch/hp300/include/internal_types.h b/sys/arch/hp300/include/internal_types.h
new file mode 100644
index 00000000000..61dd1740f08
--- /dev/null
+++ b/sys/arch/hp300/include/internal_types.h
@@ -0,0 +1,3 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#include <m68k/internal_types.h>
diff --git a/sys/arch/hppa/include/internal_types.h b/sys/arch/hppa/include/internal_types.h
new file mode 100644
index 00000000000..4d1833cf8a0
--- /dev/null
+++ b/sys/arch/hppa/include/internal_types.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#endif
diff --git a/sys/arch/hppa/include/limits.h b/sys/arch/hppa/include/limits.h
index e8f263ef10d..4bf5a3261bb 100644
--- a/sys/arch/hppa/include/limits.h
+++ b/sys/arch/hppa/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.5 2002/04/20 22:25:29 mickey Exp $ */
+/* $OpenBSD: limits.h,v 1.6 2002/04/24 21:53:11 espie Exp $ */
/*
* Copyright (c) 1992-1994, The University of Utah and
@@ -61,70 +61,21 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
-#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
-/*
- * According to ANSI (section 2.2.4.2), the values below must be usable by
- * #if preprocessing directives. Additionally, the expression must have the
- * same type as would an expression that is an object of the corresponding
- * type converted according to the integral promotions. The subtraction for
- * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an
- * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
- * These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values
- * are written as hex so that GCC will be quiet about large integer constants.
- */
-#define SCHAR_MAX 127 /* min value for a signed char */
-#define SCHAR_MIN (-128) /* max value for a signed char */
-
-#define UCHAR_MAX 255 /* max value for an unsigned char */
-#define CHAR_MAX 127 /* max value for a char */
-#define CHAR_MIN (-128) /* min value for a char */
-
-#define USHRT_MAX 65535 /* max value for an unsigned short */
-#define SHRT_MAX 32767 /* max value for a short */
-#define SHRT_MIN (-32768) /* min value for a short */
-
-#define UINT_MAX 0xffffffff /* max value for an unsigned int */
-#define INT_MAX 2147483647 /* max value for an int */
-#define INT_MIN (-2147483647-1) /* min value for an int */
-
-#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
-#define LONG_MAX 2147483647L /* max value for a long */
-#define LONG_MIN (-2147483647-1) /* min value for a long */
-
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-#define GID_MAX UINT_MAX /* max value for a gid_t */
-
/* GCC requires that quad constants be written as expressions. */
#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
/* max value for a quad_t */
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
-#define ULLONG_MAX (UQUAD_MAX) /* max value for unsigned long long */
-#define LLONG_MAX (QUAD_MAX) /* max value for a signed long long */
-#define LLONG_MIN (QUAD_MIN) /* min value for a signed long long */
#endif /* !_POSIX_SOURCE */
#endif /* !_ANSI_SOURCE */
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define LONG_BIT 32
-#define WORD_BIT 32
-
-#define DBL_DIG 15
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MIN 2.2250738585072014E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
-
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/i386/include/internal_types.h b/sys/arch/i386/include/internal_types.h
new file mode 100644
index 00000000000..4d1833cf8a0
--- /dev/null
+++ b/sys/arch/i386/include/internal_types.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#endif
diff --git a/sys/arch/i386/include/limits.h b/sys/arch/i386/include/limits.h
index 3b7ea840a7f..8e3ceec04e4 100644
--- a/sys/arch/i386/include/limits.h
+++ b/sys/arch/i386/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.6 2000/08/05 22:07:31 niklas Exp $ */
+/* $OpenBSD: limits.h,v 1.7 2002/04/24 21:53:11 espie Exp $ */
/* $NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft Exp $ */
/*
@@ -39,58 +39,19 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
-#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 1 /* no multibyte characters */
-#define SCHAR_MAX 0x7f /* max value for a signed char */
-#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
-
-#define UCHAR_MAX 0xffU /* max value for an unsigned char */
-#define CHAR_MAX 0x7f /* max value for a char */
-#define CHAR_MIN (-0x7f-1) /* min value for a char */
-
-#define USHRT_MAX 0xffffU /* max value for an unsigned short */
-#define SHRT_MAX 0x7fff /* max value for a short */
-#define SHRT_MIN (-0x7fff-1) /* min value for a short */
-
-#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
-#define INT_MAX 0x7fffffff /* max value for an int */
-#define INT_MIN (-0x7fffffff-1) /* min value for an int */
-
-#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
-#define LONG_MAX 0x7fffffffL /* max value for a long */
-#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
-
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-#define GID_MAX UINT_MAX /* max value for a gid_t */
-
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
-#define ULLONG_MAX (UQUAD_MAX) /* max value for unsigned long long */
-#define LLONG_MAX (QUAD_MAX) /* max value for a signed long long */
-#define LLONG_MIN (QUAD_MIN) /* min value for a signed long long */
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define LONG_BIT 32
-#define WORD_BIT 32
-
-#define DBL_DIG 15
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MIN 2.2250738585072014E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
-
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/m68k/include/internal_types.h b/sys/arch/m68k/include/internal_types.h
new file mode 100644
index 00000000000..4d1833cf8a0
--- /dev/null
+++ b/sys/arch/m68k/include/internal_types.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#endif
diff --git a/sys/arch/m68k/include/limits.h b/sys/arch/m68k/include/limits.h
index b4f7cdc6ad1..d337cde7917 100644
--- a/sys/arch/m68k/include/limits.h
+++ b/sys/arch/m68k/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.4 2000/07/31 20:06:02 millert Exp $ */
+/* $OpenBSD: limits.h,v 1.5 2002/04/24 21:53:11 espie Exp $ */
/* $NetBSD: limits.h,v 1.9 1994/10/26 07:50:48 cgd Exp $ */
/*
@@ -36,56 +36,18 @@
* @(#)limits.h 7.2 (Berkeley) 6/28/90
*/
-#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 1 /* no multibyte characters */
-#define SCHAR_MIN (-0x7f-1) /* max value for a signed char */
-#define SCHAR_MAX 0x7f /* min value for a signed char */
-
-#define UCHAR_MAX 0xff /* max value for an unsigned char */
-#define CHAR_MAX 0x7f /* max value for a char */
-#define CHAR_MIN (-0x7f-1) /* min value for a char */
-
-#define USHRT_MAX 0xffff /* max value for an unsigned short */
-#define SHRT_MAX 0x7fff /* max value for a short */
-#define SHRT_MIN (-0x7fff-1) /* min value for a short */
-
-#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
-#define INT_MAX 0x7fffffff /* max value for an int */
-#define INT_MIN (-0x7fffffff-1) /* min value for an int */
-
-#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
-#define LONG_MAX 0x7fffffffL /* max value for a long */
-#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
-
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-#define GID_MAX UINT_MAX /* max value for a gid_t */
-
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
-#define ULLONG_MAX (UQUAD_MAX) /* max value for unsigned long long */
-#define LLONG_MAX (QUAD_MAX) /* max value for a signed long long */
-#define LLONG_MIN (QUAD_MIN) /* min value for a signed long long */
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define LONG_BIT 32
-#define WORD_BIT 32
-
-#define DBL_DIG 15
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MIN 2.2250738585072014E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
diff --git a/sys/arch/mac68k/include/internal_types.h b/sys/arch/mac68k/include/internal_types.h
new file mode 100644
index 00000000000..61dd1740f08
--- /dev/null
+++ b/sys/arch/mac68k/include/internal_types.h
@@ -0,0 +1,3 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#include <m68k/internal_types.h>
diff --git a/sys/arch/mac68k/mac68k/clock.c b/sys/arch/mac68k/mac68k/clock.c
index 4a2d070925d..fc085e0e798 100644
--- a/sys/arch/mac68k/mac68k/clock.c
+++ b/sys/arch/mac68k/mac68k/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.13 2002/03/14 01:26:35 millert Exp $ */
+/* $OpenBSD: clock.c,v 1.14 2002/04/24 21:53:11 espie Exp $ */
/* $NetBSD: clock.c,v 1.36 1997/10/07 03:04:55 scottr Exp $ */
/*
@@ -80,13 +80,13 @@
#include <sys/param.h>
#include <sys/device.h>
+#include <sys/limits.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <machine/autoconf.h>
#include <machine/psl.h>
#include <machine/cpu.h>
-#include <machine/limits.h>
#if defined(GPROF) && defined(PROFTIMER)
#include <sys/gprof.h>
diff --git a/sys/arch/macppc/include/internal_types.h b/sys/arch/macppc/include/internal_types.h
new file mode 100644
index 00000000000..9622f58539c
--- /dev/null
+++ b/sys/arch/macppc/include/internal_types.h
@@ -0,0 +1,3 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#include <powerpc/internal_types.h>
diff --git a/sys/arch/mvme68k/include/internal_types.h b/sys/arch/mvme68k/include/internal_types.h
new file mode 100644
index 00000000000..61dd1740f08
--- /dev/null
+++ b/sys/arch/mvme68k/include/internal_types.h
@@ -0,0 +1,3 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#include <m68k/internal_types.h>
diff --git a/sys/arch/mvme88k/include/internal_types.h b/sys/arch/mvme88k/include/internal_types.h
new file mode 100644
index 00000000000..4d1833cf8a0
--- /dev/null
+++ b/sys/arch/mvme88k/include/internal_types.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#endif
diff --git a/sys/arch/mvme88k/include/limits.h b/sys/arch/mvme88k/include/limits.h
index b6c7e8908c2..b7a1be8da87 100644
--- a/sys/arch/mvme88k/include/limits.h
+++ b/sys/arch/mvme88k/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.8 2000/07/31 20:06:03 millert Exp $ */
+/* $OpenBSD: limits.h,v 1.9 2002/04/24 21:53:11 espie Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -32,76 +32,26 @@
* SUCH DAMAGE.
*
* from: @(#)limits.h 8.3 (Berkeley) 1/4/94
- * $Id: limits.h,v 1.8 2000/07/31 20:06:03 millert Exp $
+ * $Id: limits.h,v 1.9 2002/04/24 21:53:11 espie Exp $
*/
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
-#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
-/*
- * According to ANSI (section 2.2.4.2), the values below must be usable by
- * #if preprocessing directives. Additionally, the expression must have the
- * same type as would an expression that is an object of the corresponding
- * type converted according to the integral promotions. The subtraction for
- * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an
- * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
- * These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values
- * are written as hex so that GCC will be quiet about large integer constants.
- */
-#define SCHAR_MAX 127 /* min value for a signed char */
-#define SCHAR_MIN (-128) /* max value for a signed char */
-
-#define UCHAR_MAX 255 /* max value for an unsigned char */
-#define CHAR_MAX 127 /* max value for a char */
-#define CHAR_MIN (-128) /* min value for a char */
-
-#define USHRT_MAX 65535 /* max value for an unsigned short */
-#define SHRT_MAX 32767 /* max value for a short */
-#define SHRT_MIN (-32768) /* min value for a short */
-
-#define UINT_MAX 0xffffffff /* max value for an unsigned int */
-#define INT_MAX 2147483647 /* max value for an int */
-#define INT_MIN (-2147483647-1) /* min value for an int */
-
-#define ULONG_MAX 0xffffffff /* max value for an unsigned long */
-#define LONG_MAX 2147483647 /* max value for a long */
-#define LONG_MIN (-2147483647-1) /* min value for a long */
-
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-#define GID_MAX UINT_MAX /* max value for a gid_t */
-
/* GCC requires that quad constants be written as expressions. */
#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
/* max value for a quad_t */
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
-#define ULLONG_MAX (UQUAD_MAX) /* max value for unsigned long long */
-#define LLONG_MAX (QUAD_MAX) /* max value for a signed long long */
-#define LLONG_MIN (QUAD_MIN) /* min value for a signed long long */
-
#endif /* !_POSIX_SOURCE */
#endif /* !_ANSI_SOURCE */
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define LONG_BIT 32
-#define WORD_BIT 32
-
-#define DBL_DIG 15
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MIN 2.2250738585072014E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
-
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/mvmeppc/include/internal_types.h b/sys/arch/mvmeppc/include/internal_types.h
new file mode 100644
index 00000000000..9622f58539c
--- /dev/null
+++ b/sys/arch/mvmeppc/include/internal_types.h
@@ -0,0 +1,3 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#include <powerpc/internal_types.h>
diff --git a/sys/arch/powerpc/include/internal_types.h b/sys/arch/powerpc/include/internal_types.h
new file mode 100644
index 00000000000..1079a9af700
--- /dev/null
+++ b/sys/arch/powerpc/include/internal_types.h
@@ -0,0 +1,8 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:12 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#define __machine_has_unsigned_chars
+
+#endif
diff --git a/sys/arch/powerpc/include/limits.h b/sys/arch/powerpc/include/limits.h
index 8b7a8659981..02890d1f280 100644
--- a/sys/arch/powerpc/include/limits.h
+++ b/sys/arch/powerpc/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.9 2001/09/01 15:49:05 drahn Exp $ */
+/* $OpenBSD: limits.h,v 1.10 2002/04/24 21:53:12 espie Exp $ */
/* $NetBSD: limits.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */
/*-
@@ -35,25 +35,7 @@
#ifndef _POWERPC_LIMITS_H_
#define _POWERPC_LIMITS_H_
-#define CHAR_BIT 8 /* bits per char */
#define MB_LEN_MAX 1 /* no multibyte characters */
-#define CHAR_MIN 0 /* min value in char */
-#define CHAR_MAX 0xff /* max value in char */
-#define UCHAR_MAX 0xff /* max value in unsigned char */
-#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
-#define SCHAR_MAX 0x7f /* max value for a signed char */
-
-#define SHRT_MIN (-0x7fff-1) /* min value in short */
-#define SHRT_MAX 0x7fff /* max value in short */
-#define USHRT_MAX 0xffff /* max value in unsigned short */
-
-#define INT_MIN (-0x7fffffff-1) /* min value in int */
-#define INT_MAX 0x7fffffff /* max value in int */
-#define UINT_MAX 0xffffffff /* max value in unsigned int */
-
-#define LONG_MIN (-0x7fffffff-1) /* min value in long */
-#define LONG_MAX 0x7fffffff /* max value in long */
-#define ULONG_MAX 0xffffffff /* max value in unsigned long */
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
@@ -61,28 +43,10 @@
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-#define GID_MAX UINT_MAX /* max value for a gid_t */
-
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
-#define ULLONG_MAX (UQUAD_MAX) /* max value for unsigned long long */
-#define LLONG_MAX (QUAD_MAX) /* max value for a signed long long */
-#define LLONG_MIN (QUAD_MIN) /* min value for a signed long long */
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define LONG_BIT 32
-#define WORD_BIT 32
-
-#define DBL_DIG 15
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MIN 2.2250738585072014E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
#endif /* _POWERPC_LIMITS_H_ */
diff --git a/sys/arch/sparc/include/internal_types.h b/sys/arch/sparc/include/internal_types.h
new file mode 100644
index 00000000000..9280b667b82
--- /dev/null
+++ b/sys/arch/sparc/include/internal_types.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:12 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#endif
diff --git a/sys/arch/sparc/include/limits.h b/sys/arch/sparc/include/limits.h
index a8aa46777e0..9aab3e5048b 100644
--- a/sys/arch/sparc/include/limits.h
+++ b/sys/arch/sparc/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.6 2000/07/31 20:06:03 millert Exp $ */
+/* $OpenBSD: limits.h,v 1.7 2002/04/24 21:53:12 espie Exp $ */
/* $NetBSD: limits.h,v 1.7 1996/01/05 18:10:57 pk Exp $ */
/*
@@ -36,58 +36,20 @@
* @(#)limits.h 8.3 (Berkeley) 1/4/94
*/
-#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 1 /* no multibyte characters */
-#define SCHAR_MIN (-0x7f-1) /* max value for a signed char */
-#define SCHAR_MAX 0x7f /* min value for a signed char */
-
-#define UCHAR_MAX 0xffU /* max value for an unsigned char */
-#define CHAR_MAX 0x7f /* max value for a char */
-#define CHAR_MIN (-0x7f-1) /* min value for a char */
-
-#define USHRT_MAX 0xffffU /* max value for an unsigned short */
-#define SHRT_MAX 0x7fff /* max value for a short */
-#define SHRT_MIN (-0x7fff-1) /* min value for a short */
-
-#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
-#define INT_MAX 0x7fffffff /* max value for an int */
-#define INT_MIN (-0x7fffffff-1) /* min value for an int */
-
-#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
-#define LONG_MAX 0x7fffffffL /* max value for a long */
-#define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
-
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-#define GID_MAX UINT_MAX /* max value for a gid_t */
-
/* GCC requires that quad constants be written as expressions. */
#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
/* max value for a quad_t */
#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
-#define ULLONG_MAX (UQUAD_MAX) /* max value for unsigned long long */
-#define LLONG_MAX (QUAD_MAX) /* max value for a signed long long */
-#define LLONG_MIN (QUAD_MIN) /* min value for a signed long long */
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define LONG_BIT 32
-#define WORD_BIT 32
-
-#define DBL_DIG 15
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MIN 2.2250738585072014E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
diff --git a/sys/arch/sparc64/include/internal_types.h b/sys/arch/sparc64/include/internal_types.h
new file mode 100644
index 00000000000..a7d0101a8ba
--- /dev/null
+++ b/sys/arch/sparc64/include/internal_types.h
@@ -0,0 +1,8 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:12 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#define __machine_is_64_bits
+
+#endif
diff --git a/sys/arch/sparc64/include/limits.h b/sys/arch/sparc64/include/limits.h
index aedaf48bb5d..3d10be3b2a9 100644
--- a/sys/arch/sparc64/include/limits.h
+++ b/sys/arch/sparc64/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.3 2002/04/19 11:04:24 espie Exp $ */
+/* $OpenBSD: limits.h,v 1.4 2002/04/24 21:53:12 espie Exp $ */
/* $NetBSD: limits.h,v 1.8 2000/08/08 22:31:14 tshiozak Exp $ */
/*
@@ -39,45 +39,16 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
-#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 32 /* no multibyte characters */
-#define SCHAR_MIN (-0x7f-1) /* max value for a signed char */
-#define SCHAR_MAX 0x7f /* min value for a signed char */
-
-#define UCHAR_MAX 0xffU /* max value for an unsigned char */
-#define CHAR_MAX 0x7f /* max value for a char */
-#define CHAR_MIN (-0x7f-1) /* min value for a char */
-
-#define USHRT_MAX 0xffffU /* max value for an unsigned short */
-#define SHRT_MAX 0x7fff /* max value for a short */
-#define SHRT_MIN (-0x7fff-1) /* min value for a short */
-
-#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
-#define INT_MAX 0x7fffffff /* max value for an int */
-#define INT_MIN (-0x7fffffff-1) /* min value for an int */
-
/* Make sure _LP64 is defined if we have a 64-bit compiler */
#ifndef _LP64
#define _LP64
#endif
-#define ULONG_MAX 0xffffffffffffffffUL /* max value for an unsigned long */
-#define LONG_MAX 0x7fffffffffffffffL /* max value for a long */
-#define LONG_MIN (-0x7fffffffffffffffL-1) /* min value for a long */
-
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
-#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
- defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
-#define UID_MAX UINT_MAX /* max value for uid_t */
-#define GID_MAX UINT_MAX /* max value for gid_t */
-#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
-#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
-#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
-#endif
-
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
@@ -90,18 +61,4 @@
#endif /* !_POSIX_C_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) || \
- defined(_XOPEN_SOURCE)
-#define LONG_BIT 64
-#define WORD_BIT 32
-
-#define DBL_DIG 15
-#define DBL_MAX 1.7976931348623157E+308
-#define DBL_MIN 2.2250738585072014E-308
-
-#define FLT_DIG 6
-#define FLT_MAX 3.40282347E+38F
-#define FLT_MIN 1.17549435E-38F
-#endif
-
#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/sun3/include/internal_types.h b/sys/arch/sun3/include/internal_types.h
new file mode 100644
index 00000000000..02ee993a212
--- /dev/null
+++ b/sys/arch/sun3/include/internal_types.h
@@ -0,0 +1,3 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:12 espie Exp $ */
+/* Public domain */
+#include <m68k/internal_types.h>
diff --git a/sys/arch/vax/include/internal_types.h b/sys/arch/vax/include/internal_types.h
new file mode 100644
index 00000000000..3cf344f2df9
--- /dev/null
+++ b/sys/arch/vax/include/internal_types.h
@@ -0,0 +1,14 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:12 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#define __DBL_DIG 16
+#define __DBL_MAX 1.701411834604692294E+38
+#define __DBL_MIN 2.938735877055718770E-39
+
+#define __FLT_DIG 6
+#define __FLT_MAX 1.70141173E+38F
+#define __FLT_MIN 2.93873588E-39F
+
+#endif
diff --git a/sys/arch/vax/include/limits.h b/sys/arch/vax/include/limits.h
index a81107da79e..36887664e92 100644
--- a/sys/arch/vax/include/limits.h
+++ b/sys/arch/vax/include/limits.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: limits.h,v 1.8 2001/01/27 21:31:41 hugh Exp $ */
+/* $OpenBSD: limits.h,v 1.9 2002/04/24 21:53:12 espie Exp $ */
/* $NetBSD: limits.h,v 1.9 2000/03/07 19:33:01 kleink Exp $ */
/*
@@ -39,58 +39,19 @@
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
-#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 1 /* no multibyte characters */
-#define SCHAR_MAX 0x7f /* max value for a signed char */
-#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
-
-#define UCHAR_MAX 0xffU /* max value for an unsigned char */
-#define CHAR_MAX 0x7f /* max value for a char */
-#define CHAR_MIN (-0x7f-1) /* min value for a char */
-
-#define USHRT_MAX 0xffffU /* max value for an unsigned short */
-#define SHRT_MAX 0x7fff /* max value for a short */
-#define SHRT_MIN (-0x7fff-1) /* min value for a short */
-
-#define UINT_MAX 0xffffffffU /* max value for an unsigned int */
-#define INT_MAX 0x7fffffff /* max value for an int */
-#define INT_MIN (-0x7fffffff-1) /* min value for an int */
-
-#define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
-#define LONG_MAX 0x7fffffffL /* max value for a long */
-#define LONG_MIN (-0x7fffffffL-1)/* min value for a long */
-
#if !defined(_ANSI_SOURCE)
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
-#define UID_MAX UINT_MAX /* max value for a uid_t */
-#define GID_MAX UINT_MAX /* max value for a gid_t */
-
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */
#define QUAD_MIN (-0x7fffffffffffffffLL-1) /* min signed quad */
-#define ULLONG_MAX (UQUAD_MAX) /* max value for unsigned long long */
-#define LLONG_MAX (QUAD_MAX) /* max value for a signed long long */
-#define LLONG_MIN (QUAD_MIN) /* min value for a signed long long */
#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */
#endif /* !_ANSI_SOURCE */
-#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE)
-#define LONG_BIT 32
-#define WORD_BIT 32
-
-#define DBL_DIG 16
-#define DBL_MAX 1.701411834604692294E+38
-#define DBL_MIN 2.938735877055718770E-39
-
-#define FLT_DIG 6
-#define FLT_MAX 1.70141173E+38F
-#define FLT_MIN 2.93873588E-39F
-#endif
-
#endif /* _MACHINE_LIMITS_H_ */