Date: Sat, 26 Feb 2011 18:54:54 +0000 (UTC) From: Hajimu UMEMOTO <ume@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219061 - head/bin/csh Message-ID: <201102261854.p1QIssPQ088883@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ume Date: Sat Feb 26 18:54:54 2011 New Revision: 219061 URL: http://svn.freebsd.org/changeset/base/219061 Log: When WITH_ICONV is set, use our in-tree iconv. Added: head/bin/csh/iconv_stub.h - copied unchanged from r219060, head/bin/csh/iconv.h Deleted: head/bin/csh/iconv.h Modified: head/bin/csh/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Sat Feb 26 17:28:09 2011 (r219060) +++ head/bin/csh/Makefile Sat Feb 26 18:54:54 2011 (r219061) @@ -76,18 +76,26 @@ NLSLINKS_es_ES.ISO8859-1= es_ES.ISO8859- CFLAGS+= -DNO_NLS_CATALOGS .else CFLAGS+= -DHAVE_ICONV +.if ${MK_ICONV} != "no" +NLSLINKS_de_DE.ISO8859-1 += de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8 +NLSLINKS_el_GR.ISO8859-7 = el_GR.UTF-8 +NLSLINKS_es_ES.ISO8859-1 += es_ES.UTF-8 +NLSLINKS_et_EE.ISO8859-15 = et_EE.UTF-8 +NLSLINKS_fi_FI.ISO8859-1 += fi_FI.UTF-8 +NLSLINKS_fr_FR.ISO8859-1 += fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 fr_FR.UTF-8 +NLSLINKS_it_IT.ISO8859-1 += it_CH.UTF-8 it_IT.UTF-8 +NLSLINKS_ja_JP.eucJP = ja_JP.SJIS ja_JP.UTF-8 +NLSLINKS_ru_RU.KOI8-R = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.UTF-8 +NLSLINKS_uk_UA.KOI8-U = uk_UA.ISO8859-5 uk_UA.UTF-8 +.else +# Above links can be installed from ports/shells/tcsh_nls + +GENHDRS+= iconv.h SRCS+= iconv_stub.c -# Following links can be installed from ports/shells/tcsh_nls: -# NLSLINKS_de_DE.ISO8859-1 += de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8 -# NLSLINKS_el_GR.ISO8859-7 = el_GR.UTF-8 -# NLSLINKS_es_ES.ISO8859-1 += es_ES.UTF-8 -# NLSLINKS_et_EE.ISO8859-15 = et_EE.UTF-8 -# NLSLINKS_fi_FI.ISO8859-1 += fi_FI.UTF-8 -# NLSLINKS_fr_FR.ISO8859-1 += fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 fr_FR.UTF-8 -# NLSLINKS_it_IT.ISO8859-1 += it_CH.UTF-8 it_IT.UTF-8 -# NLSLINKS_ja_JP.eucJP = ja_JP.SJIS ja_JP.UTF-8 -# NLSLINKS_ru_RU.KOI8-R = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.UTF-8 -# NLSLINKS_uk_UA.KOI8-U = uk_UA.ISO8859-5 uk_UA.UTF-8 + +iconv.h: ${.CURDIR}/iconv_stub.h + cp ${.CURDIR}/iconv_stub.h ${.TARGET} +.endif .endif NLSNAME= tcsh @@ -105,7 +113,8 @@ build-tools: gethost gethost: gethost.c sh.err.h tc.const.h sh.h @rm -f ${.TARGET} - ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c + ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ + ${TCSHDIR}/gethost.c tc.defs.c: gethost ${.CURDIR}/host.defs @rm -f ${.TARGET} @@ -133,7 +142,8 @@ tc.const.h: tc.const.c sh.char.h config. @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} @echo '#ifndef _h_tc_const' >> ${.TARGET} @echo '#define _h_tc_const' >> ${.TARGET} - ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | grep 'Char STR' | \ + ${CC} -E ${CFLAGS:C/-DHAVE_ICONV//} ${.ALLSRC} -D_h_tc_const | \ + grep 'Char STR' | \ sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ sort >> ${.TARGET} @echo '#endif /* _h_tc_const */' >> ${.TARGET} Copied: head/bin/csh/iconv_stub.h (from r219060, head/bin/csh/iconv.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/csh/iconv_stub.h Sat Feb 26 18:54:54 2011 (r219061, copy of r219060, head/bin/csh/iconv.h) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2006 Hajimu UMEMOTO <ume@FreeBSD.org> + * 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. + * + * $FreeBSD$ + */ + +#ifndef _ICONV_H_ +#define _ICONV_H_ + +typedef void *iconv_t; +typedef size_t dl_iconv_t(iconv_t, const char **, size_t *, char **, size_t *); +typedef int dl_iconv_close_t(iconv_t); + +extern iconv_t dl_iconv_open(const char *, const char *); +extern dl_iconv_t *dl_iconv; +extern dl_iconv_close_t *dl_iconv_close; + +#define iconv_open dl_iconv_open +#define iconv dl_iconv +#define iconv_close dl_iconv_close + +#endif /* !_ICONV_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102261854.p1QIssPQ088883>