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 744190 - Fix build on Compilers That Do Not Use inline for Plain C Code
Fix build on Compilers That Do Not Use inline for Plain C Code
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-02-09 07:36 UTC by Fan, Chun-wei
Modified: 2015-02-10 15:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gmem.h, gthread.h: Include glib/gutils.h (1.14 KB, patch)
2015-02-09 07:44 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2015-02-09 07:36:37 UTC
Hi,

Commits 1404d3e ("Add GMutexLocker") and e668796 ("Add new API g_steal_pointer()") made use of the "inline" keyword that is not available on all compilers in C-mode, causing builds to break.  I will attach a simple patch in a bit to include gutils.h, which does the necessary thing to handle the "inline" keyword issue in a bit to fix the build.

With blessings, thank you!
Comment 1 Fan, Chun-wei 2015-02-09 07:44:23 UTC
Created attachment 296410 [details] [review]
gmem.h, gthread.h: Include glib/gutils.h

Hi,

This is the simple patch that fixes the build on compilers that do not have inline in C-mode.

With blessings, thank you!
Comment 2 Allison Karlitskaya (desrt) 2015-02-10 12:22:49 UTC
hi Chun-wei Fan,

I am unable to properly review this patch at the moment (possibly due to fallout from the bugzilla upgrade) but it looks fine.  Please merge it.

I didn't realise all this time that 'inline' was only working on MSVC because we redefined it in gutils.h.  TIL.

Cheers
Comment 3 Fan, Chun-wei 2015-02-10 15:20:25 UTC
Hello Ryan,

Thanks for the review and response.

Patch was committed as 433fc947 (somehow I was not able to change the patch status via "review"), will close this bug shortly.

With blessings, thank you!