diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-07-30 01:22:01 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-07-30 01:22:01 +0000 |
commit | e3ef842646596e163c60e292f288af0cdfa72e81 (patch) | |
tree | ee1ba66edc50d4fa1fc0becc4e970e72b451d718 /sys | |
parent | db2494bd1fc703f7febbe11cad2faa2e292eca62 (diff) |
Add SIZE_MAX define. This is the same as SIZE_T_MAX but more portable.
The only OSes I've seen that use SIZE_T_MAX are 4.4BSD-derived whereas
SYSV things seem to use SIZE_MAX. It is also consistent with SSIZE_MAX
(which we already have). deraadt@ OK
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/include/limits.h | 3 | ||||
-rw-r--r-- | sys/arch/hppa/include/limits.h | 3 | ||||
-rw-r--r-- | sys/arch/i386/include/limits.h | 3 | ||||
-rw-r--r-- | sys/arch/m68k/include/limits.h | 3 | ||||
-rw-r--r-- | sys/arch/mvme88k/include/limits.h | 5 | ||||
-rw-r--r-- | sys/arch/powerpc/include/limits.h | 3 | ||||
-rw-r--r-- | sys/arch/sparc/include/limits.h | 3 | ||||
-rw-r--r-- | sys/arch/sparc64/include/limits.h | 3 | ||||
-rw-r--r-- | sys/arch/vax/include/limits.h | 3 |
9 files changed, 19 insertions, 10 deletions
diff --git a/sys/arch/alpha/include/limits.h b/sys/arch/alpha/include/limits.h index 71f75a01b34..aad0841dfeb 100644 --- a/sys/arch/alpha/include/limits.h +++ b/sys/arch/alpha/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.8 2002/04/24 21:53:11 espie Exp $ */ +/* $OpenBSD: limits.h,v 1.9 2002/07/30 01:21:59 millert Exp $ */ /* $NetBSD: limits.h,v 1.2 1996/04/12 01:38:25 cgd Exp $ */ /* @@ -42,6 +42,7 @@ #define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ #if !defined(_ANSI_SOURCE) +#define SIZE_MAX ULONG_MAX /* max value for a size_t */ #define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) diff --git a/sys/arch/hppa/include/limits.h b/sys/arch/hppa/include/limits.h index 4bf5a3261bb..61734179424 100644 --- a/sys/arch/hppa/include/limits.h +++ b/sys/arch/hppa/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.6 2002/04/24 21:53:11 espie Exp $ */ +/* $OpenBSD: limits.h,v 1.7 2002/07/30 01:22:00 millert Exp $ */ /* * Copyright (c) 1992-1994, The University of Utah and @@ -64,6 +64,7 @@ #define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ #if !defined(_ANSI_SOURCE) +#define SIZE_MAX UINT_MAX /* max value for a size_t */ #define SSIZE_MAX INT_MAX /* max value for a ssize_t */ #if !defined(_POSIX_SOURCE) diff --git a/sys/arch/i386/include/limits.h b/sys/arch/i386/include/limits.h index 8e3ceec04e4..c8e5de39ec1 100644 --- a/sys/arch/i386/include/limits.h +++ b/sys/arch/i386/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.7 2002/04/24 21:53:11 espie Exp $ */ +/* $OpenBSD: limits.h,v 1.8 2002/07/30 01:22:00 millert Exp $ */ /* $NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft Exp $ */ /* @@ -42,6 +42,7 @@ #define MB_LEN_MAX 1 /* no multibyte characters */ #if !defined(_ANSI_SOURCE) +#define SIZE_MAX UINT_MAX /* max value for a size_t */ #define SSIZE_MAX INT_MAX /* max value for a ssize_t */ #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) diff --git a/sys/arch/m68k/include/limits.h b/sys/arch/m68k/include/limits.h index d337cde7917..2a32e7870a7 100644 --- a/sys/arch/m68k/include/limits.h +++ b/sys/arch/m68k/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.5 2002/04/24 21:53:11 espie Exp $ */ +/* $OpenBSD: limits.h,v 1.6 2002/07/30 01:22:00 millert Exp $ */ /* $NetBSD: limits.h,v 1.9 1994/10/26 07:50:48 cgd Exp $ */ /* @@ -39,6 +39,7 @@ #define MB_LEN_MAX 1 /* no multibyte characters */ #if !defined(_ANSI_SOURCE) +#define SIZE_MAX UINT_MAX /* max value for a size_t */ #define SSIZE_MAX INT_MAX /* max value for a ssize_t */ #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) diff --git a/sys/arch/mvme88k/include/limits.h b/sys/arch/mvme88k/include/limits.h index b7a1be8da87..7cb7cbe44f9 100644 --- a/sys/arch/mvme88k/include/limits.h +++ b/sys/arch/mvme88k/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.9 2002/04/24 21:53:11 espie Exp $ */ +/* $OpenBSD: limits.h,v 1.10 2002/07/30 01:22:00 millert Exp $ */ /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)limits.h 8.3 (Berkeley) 1/4/94 - * $Id: limits.h,v 1.9 2002/04/24 21:53:11 espie Exp $ + * $Id: limits.h,v 1.10 2002/07/30 01:22:00 millert Exp $ */ #ifndef _MACHINE_LIMITS_H_ @@ -41,6 +41,7 @@ #define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ #if !defined(_ANSI_SOURCE) +#define SIZE_MAX UINT_MAX /* max value for a size_t */ #define SSIZE_MAX INT_MAX /* max value for a ssize_t */ #if !defined(_POSIX_SOURCE) diff --git a/sys/arch/powerpc/include/limits.h b/sys/arch/powerpc/include/limits.h index 02890d1f280..33466095a4d 100644 --- a/sys/arch/powerpc/include/limits.h +++ b/sys/arch/powerpc/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.10 2002/04/24 21:53:12 espie Exp $ */ +/* $OpenBSD: limits.h,v 1.11 2002/07/30 01:22:00 millert Exp $ */ /* $NetBSD: limits.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -38,6 +38,7 @@ #define MB_LEN_MAX 1 /* no multibyte characters */ #if !defined(_ANSI_SOURCE) +#define SIZE_MAX UINT_MAX /* max value for a size_t */ #define SSIZE_MAX INT_MAX /* max value for a ssize_t */ #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) diff --git a/sys/arch/sparc/include/limits.h b/sys/arch/sparc/include/limits.h index 9aab3e5048b..4bfbd5ba62a 100644 --- a/sys/arch/sparc/include/limits.h +++ b/sys/arch/sparc/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.7 2002/04/24 21:53:12 espie Exp $ */ +/* $OpenBSD: limits.h,v 1.8 2002/07/30 01:22:00 millert Exp $ */ /* $NetBSD: limits.h,v 1.7 1996/01/05 18:10:57 pk Exp $ */ /* @@ -39,6 +39,7 @@ #define MB_LEN_MAX 1 /* no multibyte characters */ #if !defined(_ANSI_SOURCE) +#define SIZE_MAX UINT_MAX /* max value for a size_t */ #define SSIZE_MAX INT_MAX /* max value for a ssize_t */ #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) diff --git a/sys/arch/sparc64/include/limits.h b/sys/arch/sparc64/include/limits.h index 3d10be3b2a9..451087fd1b0 100644 --- a/sys/arch/sparc64/include/limits.h +++ b/sys/arch/sparc64/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.4 2002/04/24 21:53:12 espie Exp $ */ +/* $OpenBSD: limits.h,v 1.5 2002/07/30 01:22:00 millert Exp $ */ /* $NetBSD: limits.h,v 1.8 2000/08/08 22:31:14 tshiozak Exp $ */ /* @@ -47,6 +47,7 @@ #endif #if !defined(_ANSI_SOURCE) +#define SIZE_MAX ULONG_MAX /* max value for a size_t */ #define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ #if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) diff --git a/sys/arch/vax/include/limits.h b/sys/arch/vax/include/limits.h index 36887664e92..6276c2f0f77 100644 --- a/sys/arch/vax/include/limits.h +++ b/sys/arch/vax/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.9 2002/04/24 21:53:12 espie Exp $ */ +/* $OpenBSD: limits.h,v 1.10 2002/07/30 01:22:00 millert Exp $ */ /* $NetBSD: limits.h,v 1.9 2000/03/07 19:33:01 kleink Exp $ */ /* @@ -42,6 +42,7 @@ #define MB_LEN_MAX 1 /* no multibyte characters */ #if !defined(_ANSI_SOURCE) +#define SIZE_MAX UINT_MAX /* max value for a size_t */ #define SSIZE_MAX INT_MAX /* max value for a ssize_t */ #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) |