Broken 'C' compilation when building from Master with MSVC

2015-11-02 Thread John Emmas
Hi guys, I just updated from git master and noticed a problem when building with MSVC... Round about line 427, 'gtypes.h' has added a small section with some function definitions that look like this:- static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 b)

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-02 Thread Emmanuele Bassi
Hi; you should try the patch attached to this bug: https://bugzilla.gnome.org/show_bug.cgi?id=503096#c26 and see if it fixes the issue for you. Ciao, Emmanuele. On 2 November 2015 at 16:49, John Emmas wrote: > Hi guys, > > I just updated from git master and noticed a problem when building

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-02 Thread John Emmas
This is my third attempt to reply to Emmanuele so apologies if this comes through in duplicate (or even triplicate!!) My posts to this list seem to frequently get lost somewhere (for some reason I've never understood). Anyway, here's what I wrote... On 02/11/2015 16:56, Emmanuele Bassi wrote

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-02 Thread Emmanuele Bassi
Hi; On 2 November 2015 at 20:10, John Emmas wrote: > This is my third attempt to reply to Emmanuele so apologies if this comes > through in duplicate (or even triplicate!!) My posts to this list seem to > frequently get lost somewhere (for some reason I've never understood). > Anyway, here's wha

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-02 Thread Arnavion
https://github.com/GNOME/glib/blob/236e804/glib/gutils.h#L69 Presumably this is not being included by gtypes.h inline in C is a C99 feature, which is why older VS doesn't support it. VS2015 does. -Arnav On Mon, Nov 2, 2015 at 2:27 PM, Emmanuele Bassi wrote: > Hi; > > On 2 November 2015 at 20:10

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-02 Thread Emmanuele Bassi
Hi; On 2 November 2015 at 22:50, Arnavion wrote: > https://github.com/GNOME/glib/blob/236e804/glib/gutils.h#L69 > Presumably this is not being included by gtypes.h > > inline in C is a C99 feature, which is why older VS doesn't support > it. VS2015 does. I'm pretty sure MSVC versions prior to th

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-02 Thread Tim-Philipp Müller
On Mon, 2015-11-02 at 23:20 +, Emmanuele Bassi wrote: > > inline in C is a C99 feature, which is why older VS doesn't support > > it. VS2015 does. > > I'm pretty sure MSVC versions prior to the one in Visual Studio 2015 > support `static inline` function declarations. MS Visual C++ Express 2

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-03 Thread John Emmas
2nd attempt - sorry if this comes through twice... On 02/11/2015 22:50, Arnavion wrote: > https://github.com/GNOME/glib/blob/236e804/glib/gutils.h#L69 > Presumably this is not being included by gtypes.h > Yeah, that's true - and fixing it kinda works but it leaves a couple of problems... 1) F

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-03 Thread Simon McVittie
On 03/11/15 09:30, John Emmas wrote: > On 02/11/2015 22:50, Arnavion wrote: >> https://github.com/GNOME/glib/blob/236e804/glib/gutils.h#L69 >> Presumably this is not being included by gtypes.h > > 1) Firstly, it needs to get #included quite a long way down (around line > 95 of gtypes.h). The reas

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-03 Thread John Emmas
On 3 Nov 2015, at 11:50, Simon McVittie wrote: > > Perhaps the "inline" stuff should move to gtypes.h, or somewhere even > lower-level, like glibconfig.h? > As an experiment, I tried moving the inline stuff out of gutils.h and straight into gtypes.h (at line 391 - immediately before those newl

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-05 Thread Emmanuele Bassi
Hi; On 3 November 2015 at 16:19, John Emmas wrote: > On 3 Nov 2015, at 11:50, Simon McVittie wrote: > >> >> Perhaps the "inline" stuff should move to gtypes.h, or somewhere even >> lower-level, like glibconfig.h? >> > > As an experiment, I tried moving the inline stuff out of gutils.h and > stra

Re: Broken 'C' compilation when building from Master with MSVC

2015-11-05 Thread John Emmas
On 5 Nov 2015, at 11:35, Emmanuele Bassi wrote: > > On 3 November 2015 at 16:19, John Emmas wrote: >> As an experiment, I tried moving the inline stuff out of gutils.h and >> straight into gtypes.h (at line 391 - immediately before those newly added >> functions). As far as MSVC was concerned