Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-05 Thread Morten Welinder
> Currently, there are 2 rounding functions in the fall backs, round() > and rint(), with rint() having the better less biased IEEE > round-to-even behavior for the 0.5 case. Is known and it is a problem that the fallbacks for round and rint are only mostly working? For example, there is a

Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-05 Thread Emmanuele Bassi
This issue relates to gdk-pixbuf, which does not have the C89 fallback code that GTK has. Personally, I'd be completely open to stop suppprting MSVC older than 2015 in newer releases of G* libraries and start requiring C99 features, like we did for GTK in the master branch. Nevertheless, I

Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-05 Thread Martin Guy
On 05/02/2017, Yale Zhang wrote: > I suggest adding a lrintf() fallback to fallback-c89.c too. > > Currently, there are 2 rounding functions in the fall backs, round() > and rint(), with rint() having the better less biased IEEE > round-to-even behavior for the 0.5 case. > >

Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-05 Thread Yale Zhang
It should be in both the gdk and gtk directories for GTK+ 3.22. I don't know about GTK+2 On Sun, Feb 5, 2017 at 1:43 AM, John Emmas via gtk-devel-list wrote: > On 05/02/2017 03:59, Yale Zhang wrote: >> >> I suggest adding a lrintf() fallback to fallback-c89.c too. >> >>

Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-05 Thread John Emmas via gtk-devel-list
On 05/02/2017 03:59, Yale Zhang wrote: I suggest adding a lrintf() fallback to fallback-c89.c too. Currently, there are 2 rounding functions in the fall backs, round() and rint() Where does fallback-c89.c come from? Some auto-generated file maybe? I can't seem to find it on my system :-(

Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-04 Thread Yale Zhang
I suggest adding a lrintf() fallback to fallback-c89.c too. Currently, there are 2 rounding functions in the fall backs, round() and rint(), with rint() having the better less biased IEEE round-to-even behavior for the 0.5 case. lrintf() is preferable because it can be done in a single

Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-04 Thread John Emmas via gtk-devel-list
On 4 Feb 2017, at 19:44, Emmanuele Bassi wrote: > > Please, file a bug against gdk-pixbuf: > > https://bugzilla.gnome.org/enter_bug.cgi?product=gdk-pixbuf > > I'd rather have a check at configure-time that looks if we have > lrint() available, and if not, provides a fallback. We used this >

Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-04 Thread Emmanuele Bassi
Hi John; On 4 February 2017 at 18:17, John Emmas via gtk-devel-list wrote: > On 04/02/2017 16:07, Martin Guy wrote: >> >> On 04/02/2017, John Emmas via gtk-devel-list >> wrote: >>> >>> I took a quick look through glib, gtk+ (v2) and gdk-pixbuf

Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-04 Thread John Emmas via gtk-devel-list
On 04/02/2017 16:07, Martin Guy wrote: On 04/02/2017, John Emmas via gtk-devel-list wrote: I took a quick look through glib, gtk+ (v2) and gdk-pixbuf but I can't see lrint getting used anywhere else. Any chance of a fix? Thanks. The quick fix is to replace them with

Re: Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-04 Thread Martin Guy
On 04/02/2017, John Emmas via gtk-devel-list wrote: > Commit #61e3edeb79 (6th Jan 2017) introduced these 2 calls in > 'gdk-pixbuf/pixops/pixops.c' (at lines 1847 and 1848):- > > tmp_width = lrint (src_width * prescale_x); > tmp_height = lrint (src_height *

Use of lrint() in 'gdk-pixbuf/pixops/pixops.c'

2017-02-04 Thread John Emmas via gtk-devel-list
Is this the right mailing list for gdk-pixbuf issues? Commit #61e3edeb79 (6th Jan 2017) introduced these 2 calls in 'gdk-pixbuf/pixops/pixops.c' (at lines 1847 and 1848):- tmp_width = lrint (src_width * prescale_x); tmp_height = lrint (src_height * prescale_y); AFAIK Microsoft's MSVC