Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src pull up the following changes (approved by thorpej):
details: https://anonhg.NetBSD.org/src/rev/195a7b5bb2e4
branches: netbsd-1-5
changeset: 488997:195a7b5bb2e4
user: tshiozak <tshiozak%NetBSD.org@localhost>
date: Wed Aug 09 17:41:51 2000 +0000
description:
pull up the following changes (approved by thorpej):
> cvs rdiff -r1.9 -r1.10 basesrc/include/locale.h
> cvs rdiff -r1.45 -r1.46 basesrc/include/stdlib.h
> cvs rdiff -r1.16 -r1.17 basesrc/lib/libc/locale/Makefile.inc
> cvs rdiff -r1.17 -r1.18 basesrc/lib/libc/locale/setlocale.c
> cvs rdiff -r0 -r1.2 basesrc/lib/libc/locale/setlocale_sb.c
> cvs rdiff -r1.6 -r1.7 syssrc/sys/arch/alpha/include/limits.h
> cvs rdiff -r1.1 -r1.2 syssrc/sys/arch/arm26/include/limits.h
> cvs rdiff -r1.7 -r1.8 syssrc/sys/arch/arm32/include/limits.h
> cvs rdiff -r1.14 -r1.15 syssrc/sys/arch/i386/include/limits.h
> cvs rdiff -r1.12 -r1.13 syssrc/sys/arch/m68k/include/limits.h
> cvs rdiff -r1.13 -r1.14 syssrc/sys/arch/mips/include/limits.h
> cvs rdiff -r1.10 -r1.11 syssrc/sys/arch/pc532/include/limits.h
> cvs rdiff -r1.6 -r1.7 syssrc/sys/arch/powerpc/include/limits.h
> cvs rdiff -r1.2 -r1.3 syssrc/sys/arch/sh3/include/limits.h
> cvs rdiff -r1.11 -r1.12 syssrc/sys/arch/sparc/include/limits.h
> cvs rdiff -r1.7 -r1.8 syssrc/sys/arch/sparc64/include/limits.h
> cvs rdiff -r1.9 -r1.10 syssrc/sys/arch/vax/include/limits.h
>
> Outline:
>
> Preparation for the future introduction of multibyte locale.
> - MB_LEN_MAX is increased to 32.
> - To ensure binary compatibility for old executables
> under multibyte locale, versioned setlocale is added.
> - __mb_len_cur definision is added in setlocale.c
> and enable it in stdlib.h .
> It is also important for multibyte locale stuffs,
> but I just forgot.
diffstat:
include/locale.h | 7 ++++-
include/stdlib.h | 6 +----
lib/libc/locale/Makefile.inc | 4 +-
lib/libc/locale/setlocale.c | 8 ++++--
lib/libc/locale/setlocale_sb.c | 48 +++++++++++++++++++++++++++++++++++++++
sys/arch/alpha/include/limits.h | 4 +-
sys/arch/arm26/include/limits.h | 4 +-
sys/arch/arm32/include/limits.h | 4 +-
sys/arch/i386/include/limits.h | 4 +-
sys/arch/m68k/include/limits.h | 4 +-
sys/arch/mips/include/limits.h | 4 +-
sys/arch/pc532/include/limits.h | 4 +-
sys/arch/powerpc/include/limits.h | 4 +-
sys/arch/sh3/include/limits.h | 4 +-
sys/arch/sparc/include/limits.h | 4 +-
sys/arch/sparc64/include/limits.h | 4 +-
sys/arch/vax/include/limits.h | 4 +-
17 files changed, 86 insertions(+), 35 deletions(-)
diffs (truncated from 372 to 300 lines):
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 include/locale.h
--- a/include/locale.h Wed Aug 09 14:52:15 2000 +0000
+++ b/include/locale.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locale.h,v 1.9 2000/01/10 16:58:37 kleink Exp $ */
+/* $NetBSD: locale.h,v 1.9.4.1 2000/08/09 17:42:18 tshiozak Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -75,7 +75,12 @@
__BEGIN_DECLS
struct lconv *localeconv __P((void));
+#ifdef __SETLOCALE_SOURCE__
char *setlocale __P((int, const char *));
+char *__setlocale_mb_len_max_32 __P((int, const char *));
+#else /* !__SETLOCALE_SOURCE__ */
+char *setlocale __P((int, const char *)) __RENAME(__setlocale_mb_len_max_32);
+#endif /* !__SETLOCALE_SOURCE__ */
__END_DECLS
#endif /* _LOCALE_H_ */
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 include/stdlib.h
--- a/include/stdlib.h Wed Aug 09 14:52:15 2000 +0000
+++ b/include/stdlib.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: stdlib.h,v 1.45 2000/03/06 18:32:23 kleink Exp $ */
+/* $NetBSD: stdlib.h,v 1.45.4.1 2000/08/09 17:42:21 tshiozak Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -95,12 +95,8 @@
#define RAND_MAX 0x7fffffff
-#if 0 /* no wide char stuff (yet) */
extern int __mb_cur_max;
#define MB_CUR_MAX __mb_cur_max
-#else
-#define MB_CUR_MAX 1 /* XXX */
-#endif
__BEGIN_DECLS
__dead void abort __P((void)) __attribute__((__noreturn__));
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 lib/libc/locale/Makefile.inc
--- a/lib/libc/locale/Makefile.inc Wed Aug 09 14:52:15 2000 +0000
+++ b/lib/libc/locale/Makefile.inc Wed Aug 09 17:41:51 2000 +0000
@@ -1,11 +1,11 @@
# from: @(#)Makefile.inc 5.1 (Berkeley) 2/18/91
-# $NetBSD: Makefile.inc,v 1.16 1999/02/24 15:05:20 drochner Exp $
+# $NetBSD: Makefile.inc,v 1.16.10.1 2000/08/09 17:42:22 tshiozak Exp $
# locale sources
.PATH: ${ARCHDIR}/locale ${.CURDIR}/locale
SRCS+= _def_messages.c _def_monetary.c _def_numeric.c _def_time.c \
- ctypeio.c localeconv.c nl_langinfo.c setlocale.c
+ ctypeio.c localeconv.c nl_langinfo.c setlocale.c setlocale_sb.c
MAN+= nl_langinfo.3 setlocale.3
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 lib/libc/locale/setlocale.c
--- a/lib/libc/locale/setlocale.c Wed Aug 09 14:52:15 2000 +0000
+++ b/lib/libc/locale/setlocale.c Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setlocale.c,v 1.17 1999/10/15 17:17:07 jdolecek Exp $ */
+/* $NetBSD: setlocale.c,v 1.17.6.1 2000/08/09 17:42:24 tshiozak Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)setlocale.c 8.1 (Berkeley) 7/4/93";
#else
-__RCSID("$NetBSD: setlocale.c,v 1.17 1999/10/15 17:17:07 jdolecek Exp $");
+__RCSID("$NetBSD: setlocale.c,v 1.17.6.1 2000/08/09 17:42:24 tshiozak Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -51,6 +51,7 @@
#include <sys/localedef.h>
#include <ctype.h>
#include <limits.h>
+#define __SETLOCALE_SOURCE__
#include <locale.h>
#include <paths.h>
#include <stdio.h>
@@ -83,6 +84,7 @@
"C",
"C"
};
+int __mb_cur_max = 1;
/*
* The locales we are going to try and load
@@ -96,7 +98,7 @@
static char *loadlocale __P((int));
char *
-setlocale(category, locale)
+__setlocale_mb_len_max_32(category, locale)
int category;
const char *locale;
{
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 lib/libc/locale/setlocale_sb.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/locale/setlocale_sb.c Wed Aug 09 17:41:51 2000 +0000
@@ -0,0 +1,48 @@
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: setlocale_sb.c,v 1.2.2.2 2000/08/09 17:42:26 tshiozak Exp $
+ */
+
+
+#include <sys/cdefs.h>
+#include "namespace.h"
+#define __SETLOCALE_SOURCE__
+#include <locale.h>
+
+__warn_references(setlocale,
+ "warning: reference to compatibility setlocale(); include <locale.h> for correct reference")
+
+/*
+ * Preparation for the future import of multibyte locale.
+ * This function will ensure binary compatibility for old executables.
+ */
+char *
+setlocale(category, locale)
+ int category;
+ const char *locale;
+{
+ return __setlocale_mb_len_max_32(category, locale);
+}
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 sys/arch/alpha/include/limits.h
--- a/sys/arch/alpha/include/limits.h Wed Aug 09 14:52:15 2000 +0000
+++ b/sys/arch/alpha/include/limits.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.6 2000/03/07 19:31:49 kleink Exp $ */
+/* $NetBSD: limits.h,v 1.6.4.1 2000/08/09 17:41:51 tshiozak Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
#define _MACHINE_LIMITS_H_
#define CHAR_BIT 8 /* number of bits in a char */
-#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
+#define MB_LEN_MAX 32 /* Allow 31 bit UTF2 */
/*
* According to ANSI (section 2.2.4.2), the values below must be usable by
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 sys/arch/arm26/include/limits.h
--- a/sys/arch/arm26/include/limits.h Wed Aug 09 14:52:15 2000 +0000
+++ b/sys/arch/arm26/include/limits.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.1 2000/05/09 21:56:00 bjh21 Exp $ */
+/* $NetBSD: limits.h,v 1.1.4.1 2000/08/09 17:41:55 tshiozak Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -39,7 +39,7 @@
#define _ARM32_LIMITS_H_
#define CHAR_BIT 8 /* number of bits in a char */
-#define MB_LEN_MAX 1 /* no multibyte characters */
+#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 */
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 sys/arch/arm32/include/limits.h
--- a/sys/arch/arm32/include/limits.h Wed Aug 09 14:52:15 2000 +0000
+++ b/sys/arch/arm32/include/limits.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.7 2000/03/07 19:31:50 kleink Exp $ */
+/* $NetBSD: limits.h,v 1.7.4.1 2000/08/09 17:41:56 tshiozak Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -39,7 +39,7 @@
#define _ARM32_LIMITS_H_
#define CHAR_BIT 8 /* number of bits in a char */
-#define MB_LEN_MAX 1 /* no multibyte characters */
+#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 */
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 sys/arch/i386/include/limits.h
--- a/sys/arch/i386/include/limits.h Wed Aug 09 14:52:15 2000 +0000
+++ b/sys/arch/i386/include/limits.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.14 2000/03/07 19:31:50 kleink Exp $ */
+/* $NetBSD: limits.h,v 1.14.6.1 2000/08/09 17:41:58 tshiozak Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -39,7 +39,7 @@
#define _MACHINE_LIMITS_H_
#define CHAR_BIT 8 /* number of bits in a char */
-#define MB_LEN_MAX 1 /* no multibyte characters */
+#define MB_LEN_MAX 32 /* no multibyte characters */
#define SCHAR_MAX 0x7f /* max value for a signed char */
#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 sys/arch/m68k/include/limits.h
--- a/sys/arch/m68k/include/limits.h Wed Aug 09 14:52:15 2000 +0000
+++ b/sys/arch/m68k/include/limits.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.12 2000/03/07 19:31:50 kleink Exp $ */
+/* $NetBSD: limits.h,v 1.12.4.1 2000/08/09 17:42:01 tshiozak Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -39,7 +39,7 @@
#define _M68K_MACHINE_LIMITS_H_
#define CHAR_BIT 8 /* number of bits in a char */
-#define MB_LEN_MAX 1 /* no multibyte characters */
+#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 */
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 sys/arch/mips/include/limits.h
--- a/sys/arch/mips/include/limits.h Wed Aug 09 14:52:15 2000 +0000
+++ b/sys/arch/mips/include/limits.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.13 2000/03/07 19:31:50 kleink Exp $ */
+/* $NetBSD: limits.h,v 1.13.4.1 2000/08/09 17:42:04 tshiozak Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
#define _MIPS_MACHINE_LIMITS_H_
#define CHAR_BIT 8 /* number of bits in a char */
-#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
+#define MB_LEN_MAX 32 /* Allow 31 bit UTF2 */
/*
* According to ANSI (section 2.2.4.2), the values below must be usable by
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 sys/arch/pc532/include/limits.h
--- a/sys/arch/pc532/include/limits.h Wed Aug 09 14:52:15 2000 +0000
+++ b/sys/arch/pc532/include/limits.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.10 2000/03/07 19:31:50 kleink Exp $ */
+/* $NetBSD: limits.h,v 1.10.4.1 2000/08/09 17:42:04 tshiozak Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -39,7 +39,7 @@
#define _MACHINE_LIMITS_H_
#define CHAR_BIT 8 /* number of bits in a char */
-#define MB_LEN_MAX 1 /* no multibyte characters */
+#define MB_LEN_MAX 32 /* no multibyte characters */
#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */
#define SCHAR_MAX 0x7f /* max value for a signed char */
diff -r 8ad1e26326c9 -r 195a7b5bb2e4 sys/arch/powerpc/include/limits.h
--- a/sys/arch/powerpc/include/limits.h Wed Aug 09 14:52:15 2000 +0000
+++ b/sys/arch/powerpc/include/limits.h Wed Aug 09 17:41:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: limits.h,v 1.6 2000/03/07 19:33:00 kleink Exp $ */
+/* $NetBSD: limits.h,v 1.6.4.1 2000/08/09 17:42:06 tshiozak Exp $ */
/*-
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -35,7 +35,7 @@
#define _MACHINE_LIMITS_H_
#define CHAR_BIT 8 /* bits per char */
-#define MB_LEN_MAX 1 /* no multibyte characters */
+#define MB_LEN_MAX 32 /* 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 */
Home |
Main Index |
Thread Index |
Old Index