From owner-freebsd-ports@FreeBSD.ORG Tue Mar 8 10:53:08 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A98916A4CE for ; Tue, 8 Mar 2005 10:53:08 +0000 (GMT) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id CED8343D55 for ; Tue, 8 Mar 2005 10:53:06 +0000 (GMT) (envelope-from michaelnottebrock@gmx.net) Received: (qmail invoked by alias); 08 Mar 2005 10:53:05 -0000 Received: from p508BD0D1.dip.t-dialin.net (EHLO lofi.dyndns.org) (80.139.208.209) by mail.gmx.net (mp008) with SMTP; 08 Mar 2005 11:53:05 +0100 X-Authenticated: #443188 Received: from [192.168.8.4] (lofi@kiste.my.domain [192.168.8.4]) (authenticated bits=0) by lofi.dyndns.org (8.12.10/8.12.10) with ESMTP id j28Aqsmb091266 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 8 Mar 2005 11:52:56 +0100 (CET) (envelope-from michaelnottebrock@gmx.net) From: Michael Nottebrock To: "Vanilla I. Shu" Date: Tue, 8 Mar 2005 11:52:50 +0100 User-Agent: KMail/1.7.2 References: <1110223267.1739.64.camel@think> <200503081019.14427.michaelnottebrock@gmx.net> <20050308094914.GA58071@fatpipi.cirx.org> In-Reply-To: <20050308094914.GA58071@fatpipi.cirx.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1180537.gPHzkPQ7K3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200503081152.54237.michaelnottebrock@gmx.net> X-Virus-Scanned: by amavisd-new X-Y-GMX-Trusted: 0 cc: freebsd-ports@freebsd.org Subject: Re: imlib2 port broken on RELENG_4? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2005 10:53:08 -0000 --nextPart1180537.gPHzkPQ7K3 Content-Type: multipart/mixed; boundary="Boundary-01=_DQYLC+D3uxfBLsr" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_DQYLC+D3uxfBLsr Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday, 8. March 2005 10:49, Vanilla I. Shu wrote: > On Tue, Mar 08, 2005 at 10:19:10AM +0100, Michael Nottebrock wrote: > > On Tuesday, 8. March 2005 00:11, Michael C. Shultz wrote: > > > ../../src/lib/.libs/libImlib2.so: undefined reference to `round' > > > > So replace round() with rint() as well (no extra cast required). > > thanks. Uh, sorry, that reply was kinda bogus, I didn't read the whole thread. round() isn't in 4.x either and the extra cast for lround to rint is correc= t=20 of course. Here's a complete patch for imlib2, tested on 4.11. Note that it's not wort= h=20 the effort to conditionalize the patch on OSVERSION, since [l]lround[f] hav= e=20 only been very recently added to FreeBSD. Better add a configure-check for= =20 lround and some rounding-macro to the upstream sources (I've done that a lo= t=20 in KDE recently, too). =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --Boundary-01=_DQYLC+D3uxfBLsr Content-Type: text/plain; charset="big5"; name="imlib2.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="imlib2.diff" Index: files/patch-src-lib-color_helpers.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: files/patch-src-lib-color_helpers.c diff -N files/patch-src-lib-color_helpers.c =2D-- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-src-lib-color_helpers.c 8 Mar 2005 10:49:59 -0000 @@ -0,0 +1,78 @@ +--- src/lib/color_helpers.c.orig Tue Mar 8 11:34:57 2005 ++++ src/lib/color_helpers.c Tue Mar 8 11:35:40 2005 +@@ -54,9 +54,9 @@ + =20 + if (s =3D=3D 0.0) + { +- *r =3D lround ((v*255.0)/100.0); +- *g =3D lround ((v*255.0)/100.0); +- *b =3D lround ((v*255.0)/100.0); ++ *r =3D (long int)rint ((v*255.0)/100.0); ++ *g =3D (long int)rint ((v*255.0)/100.0); ++ *b =3D (long int)rint ((v*255.0)/100.0); + =09 + return; + } +@@ -73,44 +73,44 @@ + { + case 0: + { +- *r =3D lround (v*255.0 / 100.0); +- *g =3D lround (t*255.0); +- *b =3D lround (p*255.0); ++ *r =3D (long int)rint (v*255.0 / 100.0); ++ *g =3D (long int)rint (t*255.0); ++ *b =3D (long int)rint (p*255.0); + break; + } + case 1: + { +- *r =3D lround (q*255.0); +- *g =3D lround (v*255.0 / 100.0); +- *b =3D lround (p*255.0); ++ *r =3D (long int)rint (q*255.0); ++ *g =3D (long int)rint (v*255.0 / 100.0); ++ *b =3D (long int)rint (p*255.0); + break; + } + case 2: + { +- *r =3D lround (p*255.0); +- *g =3D lround (v*255.0 / 100.0); +- *b =3D lround (t*255.0); ++ *r =3D (long int)rint (p*255.0); ++ *g =3D (long int)rint (v*255.0 / 100.0); ++ *b =3D (long int)rint (t*255.0); + break; + } + case 3: + { +- *r =3D lround (p*255.0); +- *g =3D lround (q*255.0); +- *b =3D lround (v*255.0 / 100.0); ++ *r =3D (long int)rint (p*255.0); ++ *g =3D (long int)rint (q*255.0); ++ *b =3D (long int)rint (v*255.0 / 100.0); + break; + } + case 4: + { +- *r =3D lround (t*255.0); +- *g =3D lround (p*255.0); +- *b =3D lround (v*255.0 / 100.0); ++ *r =3D (long int)rint (t*255.0); ++ *g =3D (long int)rint (p*255.0); ++ *b =3D (long int)rint (v*255.0 / 100.0); + break; + } + case 5: + { +- *r =3D lround (v*255.0 / 100.0); +- *g =3D lround (p*255.0); +- *b =3D lround (q*255.0); ++ *r =3D (long int)rint (v*255.0 / 100.0); ++ *g =3D (long int)rint (p*255.0); ++ *b =3D (long int)rint (q*255.0); + break; + } + } --Boundary-01=_DQYLC+D3uxfBLsr-- --nextPart1180537.gPHzkPQ7K3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBCLYQGXhc68WspdLARAuB+AJ4p2GZkwvmkP2wJwDor3eR7CLZUwQCeIlzM LWC3BsE8QnnaTIpTXUAdXkk= =6wdA -----END PGP SIGNATURE----- --nextPart1180537.gPHzkPQ7K3--