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 760612 - Fix Visual Studio builds on 2.47.x
Fix Visual Studio builds on 2.47.x
Status: RESOLVED FIXED
Product: glibmm
Classification: Bindings
Component: build
2.47.x
Other Windows
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2016-01-14 08:15 UTC by Fan, Chun-wei
Modified: 2016-01-20 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glibmmconfig.h.in: Fix build on Visual Studio 2013 for thread_local (1.52 KB, patch)
2016-01-14 08:18 UTC, Fan, Chun-wei
committed Details | Review
Fix Visual Studio builds of the thread example program (965 bytes, patch)
2016-01-14 08:21 UTC, Fan, Chun-wei
committed Details | Review

Description Fan, Chun-wei 2016-01-14 08:15:52 UTC
Hi,

As we move forward into using more C++-11 features in the *mm libraries, there needs to a few updates so that things will continue to work in Visual Studio, in particular Visual Studio 2013, which involve:

-The use of the thread_local keyword, throughout
-The use of the unique_* keywords, for the thread example program.

I will attach patches to fix these, which are actually quite simple patches.

With blessings, thank you!
Comment 1 Fan, Chun-wei 2016-01-14 08:18:36 UTC
Created attachment 318999 [details] [review]
glibmmconfig.h.in: Fix build on Visual Studio 2013 for thread_local

Hi,

We are now using the C++-11 keyword thread_local throughout the code, so we need to make sure that it is supported on Visual Studio 2013, via __declspec(thread)...

p.s. I have also re-organized the Visual Studio 2013 parts of this file a bit, so that it is clearer to people.  thread_local should be directly supported on Visual Studio 2015.
Comment 2 Fan, Chun-wei 2016-01-14 08:21:38 UTC
Created attachment 319000 [details] [review]
Fix Visual Studio builds of the thread example program

Hi,

We are also moving to using the system's C++ Runtime's native thread support, rather than doing it via glibmm, so the thread example program also needs to be updated, as the unique_* keywords are supported via the system's <memory> header.

Also, we need to make sure noexcept is supported, so on Visual Studio 2013, we need to include glibmmconfig.h here for this purpose.

With blessings, thank you!
Comment 3 Murray Cumming 2016-01-14 08:41:56 UTC
That looks fine.
Comment 4 Fan, Chun-wei 2016-01-20 14:44:08 UTC
Hi Murray,

Thanks!  I have pushed the patches as:
-attachment 318999 [details] [review]: 5319807
-attachment 319000 [details] [review]: 16fabd9

With blessings, thanks once again.