Re: [Mingw-w64-public] [PATCH] Revert "Avoid declaring something extern AND initializing it

2016-09-27 Thread Kai Tietz
Hello dw,

please go ahead and apply your patch.

Thanks for your work,
Kai


2016-09-20 21:35 GMT+02:00 Mario Emmenlauer :
>
> I can confirm that the patch works for me with gcc-6.1.0 to build qt5.
>
> Thanks! Mario
>
>
> On 17.09.2016 23:56, David Wohlferd wrote:
>> It took me a bit to figure out the difference between my test code (which
>> requires the patch) and yours (which can't have it). It was subtle.
>>
>> Try this patch (attached).
>>
>> dw
>>
>> On 9/16/2016 1:39 AM, Mateusz wrote:
>>> Hello,
>>> Since this commit I'm not able to compile Qt5 with GCC 6.1.0 and 6.2.0
>>> errors:
>>>
>>> In file included from
>>> D:/msys64/mingw64/x86_64-w64-mingw32/include/mfidl.h:73:0,
>>>   from example.cc:1:
>>> D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:709:47: error:
>>> 'selectany' attribute applies only to initialized variables with external
>>> linkage
>>>   EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFPKEY_CLSID =
>>> {{0xc57a84c0,0x1a80,0x40a3,{0x97,0xb5,0x92,0x72,0xa4,0x3,0xc8,0xae}}, 0x01};
>>> ^~~~
>
>
>
> --
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Revert "Avoid declaring something extern AND initializing it

2016-09-20 Thread Mario Emmenlauer

I can confirm that the patch works for me with gcc-6.1.0 to build qt5.

Thanks! Mario


On 17.09.2016 23:56, David Wohlferd wrote:
> It took me a bit to figure out the difference between my test code (which
> requires the patch) and yours (which can't have it). It was subtle.
> 
> Try this patch (attached).
> 
> dw
> 
> On 9/16/2016 1:39 AM, Mateusz wrote:
>> Hello,
>> Since this commit I'm not able to compile Qt5 with GCC 6.1.0 and 6.2.0
>> errors:
>>
>> In file included from
>> D:/msys64/mingw64/x86_64-w64-mingw32/include/mfidl.h:73:0,
>>   from example.cc:1:
>> D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:709:47: error:
>> 'selectany' attribute applies only to initialized variables with external
>> linkage
>>   EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFPKEY_CLSID =
>> {{0xc57a84c0,0x1a80,0x40a3,{0x97,0xb5,0x92,0x72,0xa4,0x3,0xc8,0xae}}, 0x01};
>> ^~~~



--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Revert \"Avoid declaring something extern AND initializing it

2016-09-19 Thread Kai Tietz
Patch is ok.  Please go aheah.

Thanks,
Kai

2016-09-19 7:09 GMT+02:00 David Wohlferd :
> I assume someone still needs to approve this before I push?
>
> dw
>
> On 9/18/2016 6:10 AM, Mateusz wrote:
>> Hello,
>> While I'm not able to reply to the mailing list directly (forgot to
>> subscribe). Please discard my patch and commit your new patch.
>> Thank you for your help!
>> Best regards,
>> Mateusz
>
>
> --
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Revert \"Avoid declaring something extern AND initializing it

2016-09-18 Thread David Wohlferd
I assume someone still needs to approve this before I push?

dw

On 9/18/2016 6:10 AM, Mateusz wrote:
> Hello,
> While I'm not able to reply to the mailing list directly (forgot to 
> subscribe). Please discard my patch and commit your new patch.
> Thank you for your help!
> Best regards,
> Mateusz


--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] Revert "Avoid declaring something extern AND initializing it

2016-09-17 Thread David Wohlferd
It took me a bit to figure out the difference between my test code 
(which requires the patch) and yours (which can't have it). It was subtle.


Try this patch (attached).

dw

On 9/16/2016 1:39 AM, Mateusz wrote:

Hello,
Since this commit I'm not able to compile Qt5 with GCC 6.1.0 and 6.2.0
errors:

In file included from
D:/msys64/mingw64/x86_64-w64-mingw32/include/mfidl.h:73:0,
  from example.cc:1:
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:709:47: error:
'selectany' attribute applies only to initialized variables with external
linkage
  EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFPKEY_CLSID =
{{0xc57a84c0,0x1a80,0x40a3,{0x97,0xb5,0x92,0x72,0xa4,0x3,0xc8,0xae}}, 0x01};
^~~~



diff --git a/mingw-w64-headers/include/mftransform.h b/mingw-w64-headers/include/mftransform.h
index 4738b4a..954c861 100644
--- a/mingw-w64-headers/include/mftransform.h
+++ b/mingw-w64-headers/include/mftransform.h
@@ -701,7 +701,7 @@ void __RPC_STUB IMFTransform_ProcessMessage_Stub(
 
 #endif  /* __IMFTransform_INTERFACE_DEFINED__ */
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__cplusplus)
 #undef EXTERN_C
 #define EXTERN_C
 #endif
diff --git a/mingw-w64-headers/include/mftransform.idl b/mingw-w64-headers/include/mftransform.idl
index 11d5988..bea0182 100644
--- a/mingw-w64-headers/include/mftransform.idl
+++ b/mingw-w64-headers/include/mftransform.idl
@@ -145,7 +145,7 @@ interface IMFTransform : IUnknown
 
 /* In gcc, declaring something 'extern' and then initializing it
generates a warning.  */
-cpp_quote("#ifdef __GNUC__")
+cpp_quote("#if defined(__GNUC__) && !defined(__cplusplus)")
 cpp_quote("#undef EXTERN_C")
 cpp_quote("#define EXTERN_C")
 cpp_quote("#endif")
--
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] [PATCH] Revert "Avoid declaring something extern AND initializing it

2016-09-17 Thread Mateusz
Hello,
Since this commit I'm not able to compile Qt5 with GCC 6.1.0 and 6.2.0
errors:

In file included from
D:/msys64/mingw64/x86_64-w64-mingw32/include/mfidl.h:73:0,
 from example.cc:1:
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:709:47: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFPKEY_CLSID =
{{0xc57a84c0,0x1a80,0x40a3,{0x97,0xb5,0x92,0x72,0xa4,0x3,0xc8,0xae}}, 0x01};
   ^~~~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:710:47: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFPKEY_CATEGORY =
{{0xc57a84c0,0x1a80,0x40a3,{0x97,0xb5,0x92,0x72,0xa4,0x3,0xc8,0xae}}, 0x02
};
   ^~~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:711:47: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFPKEY_EXATTRIBUTE_SUPPORTED
= {{0x456fe843,0x3c87,0x40c0,{0x94,0x9d,0x14,0x9,0xc9,0x7d,0xab,0x2c}},
0x01};
   ^~~~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:712:47: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY
MFPKEY_MULTICHANNEL_CHANNEL_MASK  =
{{0x58bdaf8c,0x3224,0x4692,{0x86,0xd0,0x44,0xd6,0x5c,0x5b,0xf8,0x2b}},
0x01};

^~~~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:713:40: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY GUID MF_SA_D3D_AWARE =
{0xeaa35c29,0x775e,0x488e,{0x9b,0x61,0xb3,0x28,0x3e,0x49,0x58,0x3b}};
^~~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:714:40: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY GUID MF_SA_REQUIRED_SAMPLE_COUNT =
{0x18802c61,0x324b,0x4952,{0xab,0xd0,0x17,0x6f,0xf5,0xc6,0x96,0xff}};
^~~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:715:40: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY GUID MF_TRANSFORM_ASYNC =
{0xf81a699a,0x649a,0x497d,{0x8c,0x73,0x29,0xf8,0xfe,0xd6,0xad,0x7a}};
^~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:716:40: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY GUID MF_TRANSFORM_ASYNC_UNLOCK =
{0xe5666d6b,0x3422,0x4eb6,{0xa4,0x21,0xda,0x7d,0xb1,0xf8,0xe2,0x7}};
^
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:717:40: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY GUID MF_TRANSFORM_FLAGS_Attribute =
{0x9359bb7e,0x6275,0x46c4,{0xa0,0x25,0x1c,0x1,0xe4,0x5f,0x1a,0x86}};
^~~~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:718:40: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY GUID MF_TRANSFORM_CATEGORY_Attribute =
{0xceabba49,0x506d,0x4757,{0xa6,0xff,0x66,0xc1,0x84,0x98,0x7e,0x4e}};
^~~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:719:40: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY GUID MFT_TRANSFORM_CLSID_Attribute =
{0x6821c42b,0x65a4,0x4e82,{0x99,0xbc,0x9a,0x88,0x20,0x5e,0xcd,0xc}};
^
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:720:40: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY GUID MFT_INPUT_TYPES_Attributes =
{0x4276c9b1,0x759d,0x4bf3, {0x9c,0xd0,0xd,0x72,0x3d,0x13,0x8f,0x96}};
^~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:721:40: error:
'selectany' attribute applies only to initialized variables with external
linkage
 EXTERN_C const DECLSPEC_SELECTANY GUID MFT_OUTPUT_TYPES_Attributes =
{0x8eae8cf3,0xa44f,0x4306,{0xba,0x5c,0xbf,0x5d,0xda,0x24,0x28,0x18}};
^~~
D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:722:40: error:
'selectany' attribute