Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Remove code for CITRUS!=yes.
details: https://anonhg.NetBSD.org/src/rev/559979e4a596
branches: trunk
changeset: 772897:559979e4a596
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Jan 20 16:31:29 2012 +0000
description:
Remove code for CITRUS!=yes.
diffstat:
lib/libc/Makefile | 6 +-
lib/libc/Makefile.inc | 4 +-
lib/libc/iconv/Makefile.inc | 8 +-
lib/libc/iconv/iconv.c | 41 +----
lib/libc/locale/Makefile.inc | 11 +-
lib/libc/locale/aliasname.c | 129 ----------------
lib/libc/locale/bsdctype.c | 146 ------------------
lib/libc/locale/bsdctype_file.h | 45 -----
lib/libc/locale/bsdctype_local.h | 48 -----
lib/libc/locale/global_locale.c | 14 +-
lib/libc/locale/iswctype_sb.c | 199 ------------------------
lib/libc/locale/localeio.c | 177 ----------------------
lib/libc/locale/localeio_lc_ctype.c | 122 ---------------
lib/libc/locale/localeio_lc_messages.c | 83 ----------
lib/libc/locale/localeio_lc_monetary.c | 95 -----------
lib/libc/locale/localeio_lc_numeric.c | 90 -----------
lib/libc/locale/localeio_lc_time.c | 84 ----------
lib/libc/locale/multibyte_sb.c | 265 ---------------------------------
lib/libc/locale/rune.c | 3 +-
lib/libc/locale/setlocale.c | 20 +--
lib/libc/nls/Makefile.inc | 8 +-
lib/libc/nls/catopen.c | 8 +-
usr.bin/locale/Makefile | 7 +-
usr.bin/locale/locale.c | 25 +--
24 files changed, 21 insertions(+), 1617 deletions(-)
diffs (truncated from 1964 to 300 lines):
diff -r 4313d5472d67 -r 559979e4a596 lib/libc/Makefile
--- a/lib/libc/Makefile Fri Jan 20 15:06:47 2012 +0000
+++ b/lib/libc/Makefile Fri Jan 20 16:31:29 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.148 2011/08/17 09:53:53 christos Exp $
+# $NetBSD: Makefile,v 1.149 2012/01/20 16:31:29 joerg Exp $
# @(#)Makefile 8.2 (Berkeley) 2/3/94
#
# All library objects contain sccsid strings by default; they may be
@@ -57,9 +57,7 @@
.include "${.CURDIR}/atomic/Makefile.inc"
.include "${.CURDIR}/cdb/Makefile.inc"
.include "${.CURDIR}/db/Makefile.inc"
-.if (${CITRUS} == "yes")
.include "${.CURDIR}/citrus/Makefile.inc"
-.endif
.include "${.CURDIR}/compat-43/Makefile.inc"
.include "${.CURDIR}/dlfcn/Makefile.inc"
.include "${.CURDIR}/gdtoa/Makefile.inc"
@@ -138,9 +136,7 @@
# workaround for I18N stuffs: build singlebyte setlocale() for libc.a,
# multibyte for libc.so. the quirk should be removed when we support
# dlopen() from within statically linked binaries.
-.if (${CITRUS} == "yes")
CSHLIBFLAGS+= -D_I18N_DYNAMIC
-.endif
.include <bsd.lib.mk>
diff -r 4313d5472d67 -r 559979e4a596 lib/libc/Makefile.inc
--- a/lib/libc/Makefile.inc Fri Jan 20 15:06:47 2012 +0000
+++ b/lib/libc/Makefile.inc Fri Jan 20 16:31:29 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.7 2011/11/10 00:36:54 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.8 2012/01/20 16:31:29 joerg Exp $
# @(#)Makefile 8.2 (Berkeley) 2/3/94
#
# All library objects contain sccsid strings by default; they may be
@@ -21,8 +21,6 @@
USE_SHLIBDIR= yes
-CITRUS?= yes
-
.include <bsd.own.mk>
WARNS=4
diff -r 4313d5472d67 -r 559979e4a596 lib/libc/iconv/Makefile.inc
--- a/lib/libc/iconv/Makefile.inc Fri Jan 20 15:06:47 2012 +0000
+++ b/lib/libc/iconv/Makefile.inc Fri Jan 20 16:31:29 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.4 2009/01/11 02:46:28 christos Exp $
+# $NetBSD: Makefile.inc,v 1.5 2012/01/20 16:31:29 joerg Exp $
.PATH: ${ARCHDIR}/iconv ${.CURDIR}/iconv
@@ -6,8 +6,4 @@
MAN+= iconv.3
MLINKS+=iconv.3 iconv_open.3 iconv.3 iconv_close.3
-.if ${CITRUS} == "yes"
-CPPFLAGS.iconv.c+= -DHAVE_CITRUS -I${LIBCDIR}/citrus
-.else
-CPPFLAGS.iconv.c+= -UHAVE_CITRUS
-.endif
+CPPFLAGS.iconv.c+= -I${LIBCDIR}/citrus
diff -r 4313d5472d67 -r 559979e4a596 lib/libc/iconv/iconv.c
--- a/lib/libc/iconv/iconv.c Fri Jan 20 15:06:47 2012 +0000
+++ b/lib/libc/iconv/iconv.c Fri Jan 20 16:31:29 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iconv.c,v 1.12 2009/08/05 15:17:02 joerg Exp $ */
+/* $NetBSD: iconv.c,v 1.13 2012/01/20 16:31:29 joerg Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: iconv.c,v 1.12 2009/08/05 15:17:02 joerg Exp $");
+__RCSID("$NetBSD: iconv.c,v 1.13 2012/01/20 16:31:29 joerg Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -45,7 +45,6 @@
__weak_alias(iconv_close, _iconv_close)
#endif
-#ifdef HAVE_CITRUS
#include <sys/types.h>
#include "citrus_types.h"
#include "citrus_module.h"
@@ -150,39 +149,3 @@
{
_citrus_esdb_free_list(list, sz);
}
-
-#else
-iconv_t
-/*ARGSUSED*/
-iconv_open(const char *in, const char *out)
-{
- errno = EINVAL;
- return ((iconv_t)-1);
-}
-int
-/*ARGSUSED*/
-iconv_close(iconv_t handle)
-{
- errno = EBADF;
- return (-1);
-}
-size_t
-/*ARGSUSED*/
-iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout)
-{
- errno = EBADF;
- return ((size_t)-1);
-}
-int
-/*ARGSUSED*/
-__iconv_get_list(char ***rlist, size_t *rsz)
-{
- errno = EINVAL;
- return -1;
-}
-void
-/*ARGSUSED*/
-__iconv_free_list(char **list, size_t sz)
-{
-}
-#endif
diff -r 4313d5472d67 -r 559979e4a596 lib/libc/locale/Makefile.inc
--- a/lib/libc/locale/Makefile.inc Fri Jan 20 15:06:47 2012 +0000
+++ b/lib/libc/locale/Makefile.inc Fri Jan 20 16:31:29 2012 +0000
@@ -1,5 +1,5 @@
# from: @(#)Makefile.inc 5.1 (Berkeley) 2/18/91
-# $NetBSD: Makefile.inc,v 1.59 2011/08/14 09:07:37 christos Exp $
+# $NetBSD: Makefile.inc,v 1.60 2012/01/20 16:31:29 joerg Exp $
# locale sources
.PATH: ${ARCHDIR}/locale ${.CURDIR}/locale
@@ -12,7 +12,6 @@
wcstol.c wcstoll.c wcstoimax.c wcstoul.c wcstoull.c wcstoumax.c \
wcstod.c wcstof.c wcstold.c wcscoll.c wcsxfrm.c wcsftime.c
-.if (${CITRUS} == "yes")
# citrus multibyte locale support
# we have quirk for libc.a - see the last part of lib/libc/Makefile
CPPFLAGS+= -DWITH_RUNE -I${.CURDIR}
@@ -22,14 +21,6 @@
CPPFLAGS.runetable.c+= -I${LIBCDIR}/citrus
CPPFLAGS.multibyte_c90.c+= -I${LIBCDIR}/citrus
CPPFLAGS.multibyte_amd1.c+= -I${LIBCDIR}/citrus
-.else
-# singlebyte locale - dummy
-CPPFLAGS+= -UWITH_RUNE
-SRCS+= aliasname.c bsdctype.c localeio.c \
- multibyte_sb.c iswctype_sb.c \
- localeio_lc_ctype.c localeio_lc_monetary.c \
- localeio_lc_numeric.c localeio_lc_time.c localeio_lc_messages.c
-.endif
MAN+= setlocale.3 nl_langinfo.3
diff -r 4313d5472d67 -r 559979e4a596 lib/libc/locale/aliasname.c
--- a/lib/libc/locale/aliasname.c Fri Jan 20 15:06:47 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/* $NetBSD: aliasname.c,v 1.4 2009/01/11 02:46:28 christos Exp $ */
-
-/*-
- * Copyright (c)2002 YAMAMOTO Takashi,
- * 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.
- */
-
-#include <sys/cdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: aliasname.c,v 1.4 2009/01/11 02:46:28 christos Exp $");
-#endif /* LIBC_SCCS and not lint */
-
-#include "namespace.h"
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "aliasname_local.h"
-
-__inline int __is_ws(char);
-
-__inline int __is_ws(char ch)
-{
-
- return (ch == ' ' || ch == '\t');
-}
-
-const char *
-__unaliasname(const char *dbname, const char *alias, void *buf, size_t bufsize)
-{
- FILE *fp = NULL;
- const char *result = NULL;
- size_t resultlen;
- size_t aliaslen;
- const char *p;
- size_t len;
-
- _DIAGASSERT(dbname != NULL);
- _DIAGASSERT(alias != NULL);
- _DIAGASSERT(buf != NULL);
-
- fp = fopen(dbname, "r");
- if (fp == NULL)
- goto quit;
-
- aliaslen = strlen(alias);
-
- while (/*CONSTCOND*/ 1) {
- p = fgetln(fp, &len);
- if (p == NULL)
- goto quit; /* eof or error */
-
- _DIAGASSERT(len != 0);
-
- /* ignore terminating NL */
- if (p[len - 1] == '\n')
- len--;
-
- /* ignore null line and comment */
- if (len == 0 || p[0] == '#')
- continue;
-
- if (aliaslen > len)
- continue;
-
- if (memcmp(alias, p, aliaslen))
- continue;
-
- p += aliaslen;
- len -= aliaslen;
-
- if (len == 0 || !__is_ws(*p))
- continue;
-
- /* entry was found here */
- break;
-
- /* NOTREACHED */
- }
-
- /* skip white spaces */
- do {
- p++;
- len--;
- } while (len != 0 && __is_ws(*p));
-
- if (len == 0)
- goto quit;
-
- /* count length of result */
- resultlen = 0;
- while (resultlen < len && !__is_ws(*p))
- resultlen++;
-
- /* check if space is enough */
- if (bufsize < resultlen + 1)
- goto quit;
-
- memcpy(buf, p, resultlen);
- ((char *)buf)[resultlen] = 0;
- result = buf;
-
-quit:
- if (fp)
- fclose(fp);
-
- return result;
-}
diff -r 4313d5472d67 -r 559979e4a596 lib/libc/locale/bsdctype.c
--- a/lib/libc/locale/bsdctype.c Fri Jan 20 15:06:47 2012 +0000
Home |
Main Index |
Thread Index |
Old Index