From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1104 invoked by alias); 24 Jan 2010 00:08:49 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27631 Received: (qmail 11566 invoked from network); 24 Jan 2010 00:08:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at alpenstock.jp designates 220.156.141.210 as permitted sender) Message-ID: <4B5B8DFC.6030106@pep.ne.jp> Date: Sun, 24 Jan 2010 09:02:04 +0900 From: minish User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: zsh-workers@zsh.org Subject: PATCH: Tru64 UNIX 5.1B porting X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit I tried to compile zsh-4.3.10 on Tru64 UNIX 5.1B(BL28) with OS bundled cc. Here are some fixes for Tru64 UNIX with "__digital__" and "__unix__" macro. 1. exec.c compile error [error message] cc -c -I. -DHAVE_CONFIG_H -O -o exec.o exec.c cc: Error: exec.c, line 259: In this declaration, "dummy_tz" has no linkage and is of an incomplete type. (incompnolink) struct timezone dummy_tz; --------------------^ dummy_tz is defined in /usr/include/sys/time.h line 176 - 179 of Tru64 UNIX. But that is enabled when _OSF_SOURCE macro is defined. add -D_OSF_SOURCE to --enable-cflags when run configure script. 2. init.c compile error patch [error message] cc -c -I. -DHAVE_CONFIG_H -D_OSF_SOURCE -o init.o init.c cc: Error: init.c, line 921: In this statement, "NSIG" is not declared. (undeclared) for (i=0; i' printf '%s\n' $'<\u0042>' print '<\u0043>' printf '%s\n' $'<\u0044>' Error output: (eval):1: cannot do charset conversion (iconv failed) Was testing: \u in both print and printf Tru64 UNIX does not have UCS-4BE converter, but UCS-4. Tru64 UNIX controls byte order with the environment variable ICONV_BYTEORDER. Here is a patch for utils.c *** Src/utils.c.ORG Tue May 19 20:18:11 2009 --- Src/utils.c Tue Oct 20 14:42:32 2009 *************** *** 5120,5126 **** --- 5120,5130 ---- if (!codesetstr || !*codesetstr) codesetstr = "US-ASCII"; #endif + # if defined (__digital__) && defined (__unix__) + cd = iconv_open(codesetstr, "UCS-4"); + # else /* defined (__digital__) && defined (__unix__) */ cd = iconv_open(codesetstr, "UCS-4BE"); + # endif /* defined (__digital__) && defined (__unix__) */ #ifdef ICONV_FROM_LIBICONV if (cd == (iconv_t)-1 && !strcmp(codesetstr, "646")) { codesetstr = "US-ASCII"; *************** *** 5128,5133 **** --- 5132,5139 ---- } #endif if (cd == (iconv_t)-1) { + perror("iconv_open: "); + fprintf(stderr, "errno = %d\n", errno); zerr("cannot do charset conversion (iconv failed)"); CHARSET_FAILED(); }