From owner-freebsd-arch@FreeBSD.ORG Fri Feb 17 19:42:44 2012 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE01910656D6; Fri, 17 Feb 2012 19:42:44 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 4D1808FC0A; Fri, 17 Feb 2012 19:42:44 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 6A82814E6D7C; Fri, 17 Feb 2012 20:42:43 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rGJoW8ZYMHvk; Fri, 17 Feb 2012 20:42:41 +0100 (CET) Received: from [84.224.127.230] (netacc-gpn-4-127-230.pool.telenor.hu [84.224.127.230]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id A8F0014E6D3C; Fri, 17 Feb 2012 20:42:40 +0100 (CET) Message-ID: <4F3EADB5.7060008@FreeBSD.org> Date: Fri, 17 Feb 2012 20:42:45 +0100 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <4F3C28DD.1020003@FreeBSD.org> <4F3C2D2D.5000402@FreeBSD.org> <4F3E78BA.4060203@FreeBSD.org> <864nupcuvl.fsf@ds4.des.no> <4F3E7B5A.20103@FreeBSD.org> <86zkchbff6.fsf@ds4.des.no> In-Reply-To: <86zkchbff6.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Andriy Gapon , freebsd-arch@FreeBSD.org Subject: Re: bsd/citrus iconv X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2012 19:42:44 -0000 Em 17-02-2012 17:19, Dag-Erling Smørgrav escreveu: > Andriy Gapon writes: >> But nothing precludes it from being a separate library in principle? >> There is even src/lib/libiconv, it's just not connected to the build. > You're right - for some reason, I thought src/lib/libiconv was just a > Makefile for GNU libiconv. POSIX requires iconv() to be in libc. However, a glue Makefile was provided there for testing purposes. > > However, it would be a lot of work for relatively little gain, which > would then have to be backed out when citrus went "live". Not that much work, I think. We have to just enable to build that library and install the header with a different name. The base iconv.h is designed to support builds for GNU libiconv but in practice there may be problems with that. > > Gabor, do you have a list of known issues? 1, iconv() does not correctly return the number of non-identical conversions. 2, lang/gcc* build problems (potentially related to iconv.h including stdbool.h and iconv() being defined as a macro) 3, mutt-devel fails to build. It uses the above check where bsd iconv returns 1, while GNU returns 0: | #include | int main() | { | iconv_t cd; | char buf[4]; | char *ob; | size_t obl; | ob = buf, obl = sizeof(buf); | return ((cd = iconv_open("UTF-8", "UTF-8")) != (iconv_t)(-1)&& | (iconv(cd, 0, 0,&ob,&obl) || | !(ob == buf&& obl == sizeof(buf)) || | iconv_close(cd))); | } 4, Check and fix locking in citrus_mapper.c. 5, (not strictly a problem) Citrus iconv has been designed to be modular and extensible. So it uses dynamically loadable modules extensively, at two abstraction levels. However, it is not that practically useful because (1) probably it won't be further extended as Unicode is becoming standard and probably there won't be shiny new encodings and (2) even if it is extended, it is totally fine to require a complete rebuild. So it would be probably better to just link all of that stuff to libc. It would spare the overhead of modularity and clean up a bunch of .so files that are installed currently if iconv is enabled. Gabor