Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Dec 2002 10:43:22 -0800 (PST)
From:      =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= <mbsd@pacbell.net>
To:        "Bjoern A. Zeeb" <bzeeb+freebsdports@zabbadoz.net>
Cc:        sparc@FreeBSD.org
Subject:   Re: port fix test request
Message-ID:  <20021226103324.E2299-100000@atlas.home>
In-Reply-To: <Pine.BSF.4.44.0212261535170.647-100000@e0-0.zab2.int.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021226103324.E2299-100000>