From owner-freebsd-sparc Thu Dec 26 10:43:26 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8095037B401 for ; Thu, 26 Dec 2002 10:43:24 -0800 (PST) Received: from mta6.snfc21.pbi.net (mta6.snfc21.pbi.net [206.13.28.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E0D843EE6 for ; Thu, 26 Dec 2002 10:43:23 -0800 (PST) (envelope-from mbsd@pacbell.net) Received: from atlas ([64.166.23.138]) by mta6.snfc21.pbi.net (iPlanet Messaging Server 5.1 HotFix 1.6 (built Oct 18 2002)) with ESMTP id <0H7Q0081SPCAH3@mta6.snfc21.pbi.net> for sparc@FreeBSD.org; Thu, 26 Dec 2002 10:43:22 -0800 (PST) Date: Thu, 26 Dec 2002 10:43:22 -0800 (PST) From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= Subject: Re: port fix test request In-reply-to: X-X-Sender: mikko@atlas.home To: "Bjoern A. Zeeb" Cc: sparc@FreeBSD.org Message-id: <20021226103324.E2299-100000@atlas.home> MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, 26 Dec 2002, Bjoern A. Zeeb wrote: > Hi, > > I maintain the port textproc/xerces-c2 that currently does not build on > sparc64 and I would like to ask if anybody can test the attached fix > before I will submit it. It creates two new files. > > Source is about 6.8MB and it need gnake and libiconv as dependencies. > > It would be enough to run make; no need for make install or make package. > > I assume that `uname -m` returns sparc64 ? Else please rename > Makefile.sparc64 to Makefile.`uanme -m` . Yes, it does. > Thanks in advance > > -- > Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT > 56 69 73 69 74 http://www.zabbadoz.net/ > > --- 8< 8< 8< --- > diff -urN xerces-c2.orig/Makefile.sparc64 xerces-c2/Makefile.sparc64 > --- xerces-c2.orig/Makefile.sparc64 Thu Jan 1 00:00:00 1970 > +++ xerces-c2/Makefile.sparc64 Thu Dec 26 15:28:31 2002 > @@ -0,0 +1,11 @@ > +# Date created: 26 December 2002 > +# Whom: "Bjoern A. Zeeb" (bzeeb+freebsdports@zabbadoz.net) > +# > +# $FreeBSD$ > +# > +# When there are no probs with libc_r / pthreads on sparc64-freebsd we > +# should remove this files or make it conditional on OSVERSION > +# > + > +NO_THREADS= yes > + > diff -urN xerces-c2.orig/files/patch-aa xerces-c2/files/patch-aa > --- xerces-c2.orig/files/patch-aa Thu Jan 1 00:00:00 1970 > +++ xerces-c2/files/patch-aa Wed Dec 25 20:06:21 2002 > @@ -0,0 +1,11 @@ > +--- ./src/xercesc/util/Transcoders/IconvFBSD/IconvFBSDTransService.cpp.orig Wed Dec 25 19:52:38 2002 > ++++ ./src/xercesc/util/Transcoders/IconvFBSD/IconvFBSDTransService.cpp Wed Dec 25 19:52:45 2002 > +@@ -1091,7 +1091,7 @@ > + // perform conversion > + wLent *= uChSize(); > + char *ptr = retVal; > +- size_t rc = iconvTo(wideCharBuf, &wLent, &ptr, neededLen); > ++ size_t rc = iconvTo(wideCharBuf, (size_t *)&wLent, &ptr, neededLen); This isn't right (if I'm reading the source correctly, where "wLent" is an unsigned int, not a size_t; 32-bits vs 64-bits on sparc64, which is big-endian, so it won't even work by mistake ;-). You need to give iconvTo() the address of a genuine size_t, if that is what it wants; i.e. either make wLent a size_t or use a temporary variable. Or something. > + if (rc == (size_t)-1) { > + if (wBufPtr) > + delete [] wBufPtr; > --- 8< 8< 8< --- > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-sparc" in the body of the message > $.02, /Mikko To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message