After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694339 - Fix build of GTK+ on Windows
Fix build of GTK+ on Windows
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.7.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-02-21 07:58 UTC by Fan, Chun-wei
Modified: 2013-03-13 05:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add round() fallback implementation into gdk/fallback-c89.c (845 bytes, patch)
2013-02-21 07:59 UTC, Fan, Chun-wei
none Details | Review
Include fallback-c89.c for round() (1.12 KB, patch)
2013-02-21 08:01 UTC, Fan, Chun-wei
none Details | Review
Fix build of gdk/win32/gdkevents-win32.c (1.22 KB, patch)
2013-03-06 10:14 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2013-02-21 07:58:02 UTC
Hi,

Recently, the use of round() has been introduced into gdk/gdkwindow.c and gtk/gtkwidget.c, which causes builds of these files to fail on compilers that don't support it (specifically C89 compilers).

I have copied the fallback implementation for round() from gtk/fallback-c89.c to gdk/fallback-c89.c and included fallback-c89.c in the aforementioned source files to rememdy this problem.

With blessings, thank you!
Comment 1 Fan, Chun-wei 2013-02-21 07:59:23 UTC
Created attachment 237017 [details] [review]
Add round() fallback implementation into gdk/fallback-c89.c

This just takes the fallback implementation of round() from gtk/fallback-c89.c.
Comment 2 Fan, Chun-wei 2013-02-21 08:01:09 UTC
Created attachment 237018 [details] [review]
Include fallback-c89.c for round()

gdk/gdkwindow.c and gtk/gtkwidget.c both use round(), so include fallback-c89.c in them so that a fallback implementation for them can be used if needed.

So, these would sum up the patches for this bug.

With blessings, thank you!
Comment 3 Fan, Chun-wei 2013-03-06 10:14:46 UTC
Created attachment 238187 [details] [review]
Fix build of gdk/win32/gdkevents-win32.c

Hi,

Recent changes to gdk/win32/gdkevents-win32.c in commit df3e19b4 ("Broadway/Quartz/Win32: make event source prepare()/check() note paused status") broke the build of gdk-win32 (the Win32 backend for GDK), by the accidental use of an undefined variable, display, in the changes.

Judging from the rest of the code, it seems reasonable that it should be _gdk_display that is the variable that was to be used in that change.

Thanks for the time for looking at this, with blessings.
Comment 4 Emmanuele Bassi (:ebassi) 2013-03-06 10:34:47 UTC
Review of attachment 238187 [details] [review]:

looks okay to me
Comment 5 Fan, Chun-wei 2013-03-06 14:23:03 UTC
Review of attachment 238187 [details] [review]:

Hi,

I pushed the patch as bb4cff8e.

With blessings, thank you!

p.s. Any comments on the other two patches are highly appreciated :)
Comment 6 Fan, Chun-wei 2013-03-13 05:46:53 UTC
Hi,

I have pushed the first two patches to gtk-3-8 (commits 46e7d853 and 75a19fdf) and master (commits 9b7c7ae6 and b9e18915).

I don't think this should cause any problems, but please let me know here if I accidentally did.

With blessings, thank you!