diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2009-11-27 19:54:36 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2009-11-27 19:54:36 +0000 |
commit | 5f41f0b935b257c09b4ba9e02f6200ebe5ded15f (patch) | |
tree | 2c11b50e73818c1a5fdced20785a1b6d82d7ebb3 /sys | |
parent | 7fd2c499074a7f0b6adb702b617d57e09581d5f5 (diff) |
Move MB_LEN_MAX into the machine-independent sys/limits.h header,
rather than defining it separately for each architecture.
Also set it to 4, to accommodate for future UTF-8 support (rfc3629).
Diff by stsp, committing to catch the libc major bump
ok kettenis@, guenther@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/amd64/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/arm/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/hppa/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/hppa64/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/i386/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/m68k/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/m88k/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/mips64/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/powerpc/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/sh/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/sparc/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/include/limits.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/include/limits.h | 4 | ||||
-rw-r--r-- | sys/sys/limits.h | 4 |
15 files changed, 17 insertions, 43 deletions
diff --git a/sys/arch/alpha/include/limits.h b/sys/arch/alpha/include/limits.h index b625a640454..c99c830a3d4 100644 --- a/sys/arch/alpha/include/limits.h +++ b/sys/arch/alpha/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.12 2006/01/06 22:48:46 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.13 2009/11/27 19:54:35 guenther Exp $ */ /* $NetBSD: limits.h,v 1.2 1996/04/12 01:38:25 cgd Exp $ */ /* @@ -37,8 +37,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX ULONG_MAX /* max value for a size_t */ diff --git a/sys/arch/amd64/include/limits.h b/sys/arch/amd64/include/limits.h index 0f45207eb37..a8c4a88db1b 100644 --- a/sys/arch/amd64/include/limits.h +++ b/sys/arch/amd64/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.4 2006/01/06 22:48:46 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.5 2009/11/27 19:54:35 guenther Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -36,8 +36,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 1 /* no multibyte characters */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX ULONG_MAX /* max value for a size_t */ diff --git a/sys/arch/arm/include/limits.h b/sys/arch/arm/include/limits.h index 3afc95fcf81..d6cfb8b94de 100644 --- a/sys/arch/arm/include/limits.h +++ b/sys/arch/arm/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.3 2006/01/06 22:48:46 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.4 2009/11/27 19:54:35 guenther Exp $ */ /* $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 Exp $ */ /* @@ -37,8 +37,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 1 /* no multibyte characters */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX UINT_MAX /* max value for a size_t */ diff --git a/sys/arch/hppa/include/limits.h b/sys/arch/hppa/include/limits.h index 6e4eb39566d..2addf98b443 100644 --- a/sys/arch/hppa/include/limits.h +++ b/sys/arch/hppa/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.11 2006/01/06 22:48:46 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.12 2009/11/27 19:54:35 guenther Exp $ */ /* * Copyright (c) 1988, 1993 @@ -36,8 +36,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX UINT_MAX /* max value for a size_t */ diff --git a/sys/arch/hppa64/include/limits.h b/sys/arch/hppa64/include/limits.h index feef45a69e9..2ebfe59521f 100644 --- a/sys/arch/hppa64/include/limits.h +++ b/sys/arch/hppa64/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.3 2006/01/06 22:48:46 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.4 2009/11/27 19:54:35 guenther Exp $ */ /* * Copyright (c) 1988, 1993 @@ -36,8 +36,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 32 /* Allow 31 bit UTF2 */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX UINT_MAX /* max value for a size_t */ diff --git a/sys/arch/i386/include/limits.h b/sys/arch/i386/include/limits.h index ad8e016558d..4000751a458 100644 --- a/sys/arch/i386/include/limits.h +++ b/sys/arch/i386/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.11 2006/01/06 22:48:47 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.12 2009/11/27 19:54:35 guenther Exp $ */ /* $NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft Exp $ */ /* @@ -37,8 +37,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 1 /* no multibyte characters */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX UINT_MAX /* max value for a size_t */ diff --git a/sys/arch/m68k/include/limits.h b/sys/arch/m68k/include/limits.h index 1717ed40ce1..f32b00ee420 100644 --- a/sys/arch/m68k/include/limits.h +++ b/sys/arch/m68k/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.9 2006/01/06 22:48:47 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.10 2009/11/27 19:54:35 guenther Exp $ */ /* $NetBSD: limits.h,v 1.9 1994/10/26 07:50:48 cgd Exp $ */ /* @@ -32,8 +32,6 @@ * @(#)limits.h 7.2 (Berkeley) 6/28/90 */ -#define MB_LEN_MAX 1 /* no multibyte characters */ - #include <sys/cdefs.h> #if __POSIX_VISIBLE || __XPG_VISIBLE diff --git a/sys/arch/m88k/include/limits.h b/sys/arch/m88k/include/limits.h index e071b720c15..e650c2f04db 100644 --- a/sys/arch/m88k/include/limits.h +++ b/sys/arch/m88k/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.3 2006/01/06 22:48:47 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.4 2009/11/27 19:54:35 guenther Exp $ */ /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -35,8 +35,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX UINT_MAX /* max value for a size_t */ diff --git a/sys/arch/mips64/include/limits.h b/sys/arch/mips64/include/limits.h index 82ee7cff804..71e839360f6 100644 --- a/sys/arch/mips64/include/limits.h +++ b/sys/arch/mips64/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.5 2007/05/07 20:51:07 kettenis Exp $ */ +/* $OpenBSD: limits.h,v 1.6 2009/11/27 19:54:35 guenther Exp $ */ /* * Copyright (c) 1988, 1993 @@ -36,8 +36,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX ULONG_MAX /* max value for a size_t */ diff --git a/sys/arch/powerpc/include/limits.h b/sys/arch/powerpc/include/limits.h index f19af01fa59..4acbab0c5e4 100644 --- a/sys/arch/powerpc/include/limits.h +++ b/sys/arch/powerpc/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.15 2006/01/06 22:48:47 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.16 2009/11/27 19:54:35 guenther Exp $ */ /* $NetBSD: limits.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -37,8 +37,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 1 /* no multibyte characters */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX UINT_MAX /* max value for a size_t */ diff --git a/sys/arch/sh/include/limits.h b/sys/arch/sh/include/limits.h index e8ceb6d29f5..618bb24f828 100644 --- a/sys/arch/sh/include/limits.h +++ b/sys/arch/sh/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.1 2006/10/06 21:02:55 miod Exp $ */ +/* $OpenBSD: limits.h,v 1.2 2009/11/27 19:54:35 guenther Exp $ */ /* $NetBSD: limits.h,v 1.1 1996/09/30 16:34:28 ws Exp $ */ /*- @@ -37,8 +37,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 1 /* no multibyte characters */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX UINT_MAX /* max value for a size_t */ diff --git a/sys/arch/sparc/include/limits.h b/sys/arch/sparc/include/limits.h index d71b3a74ea8..ea9cf0b2de6 100644 --- a/sys/arch/sparc/include/limits.h +++ b/sys/arch/sparc/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.11 2006/01/06 22:48:47 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.12 2009/11/27 19:54:35 guenther Exp $ */ /* $NetBSD: limits.h,v 1.7 1996/01/05 18:10:57 pk Exp $ */ /* @@ -32,8 +32,6 @@ * @(#)limits.h 8.3 (Berkeley) 1/4/94 */ -#define MB_LEN_MAX 1 /* no multibyte characters */ - #include <sys/cdefs.h> #if __POSIX_VISIBLE || __XPG_VISIBLE diff --git a/sys/arch/sparc64/include/limits.h b/sys/arch/sparc64/include/limits.h index 2fb2418df35..c980840cc78 100644 --- a/sys/arch/sparc64/include/limits.h +++ b/sys/arch/sparc64/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.9 2006/01/06 22:48:47 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.10 2009/11/27 19:54:35 guenther Exp $ */ /* $NetBSD: limits.h,v 1.8 2000/08/08 22:31:14 tshiozak Exp $ */ /* @@ -37,8 +37,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 32 /* no multibyte characters */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX ULONG_MAX /* max value for a size_t */ diff --git a/sys/arch/vax/include/limits.h b/sys/arch/vax/include/limits.h index e6d9a94aff4..49d84a43cb4 100644 --- a/sys/arch/vax/include/limits.h +++ b/sys/arch/vax/include/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.13 2006/01/06 22:48:47 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.14 2009/11/27 19:54:35 guenther Exp $ */ /* $NetBSD: limits.h,v 1.9 2000/03/07 19:33:01 kleink Exp $ */ /* @@ -37,8 +37,6 @@ #include <sys/cdefs.h> -#define MB_LEN_MAX 1 /* no multibyte characters */ - #if __POSIX_VISIBLE || __XPG_VISIBLE #ifndef SIZE_MAX #define SIZE_MAX UINT_MAX /* max value for a size_t */ diff --git a/sys/sys/limits.h b/sys/sys/limits.h index 66361dee9d0..c390c4fd6d1 100644 --- a/sys/sys/limits.h +++ b/sys/sys/limits.h @@ -1,4 +1,4 @@ -/* $OpenBSD: limits.h,v 1.7 2007/05/07 15:29:44 millert Exp $ */ +/* $OpenBSD: limits.h,v 1.8 2009/11/27 19:54:35 guenther Exp $ */ /* * Copyright (c) 2002 Marc Espie. * @@ -59,6 +59,8 @@ # define CHAR_MIN (-0x7f-1) #endif +#define MB_LEN_MAX 4 /* Allow UTF-8 (RFC 3629) */ + #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 */ |