[Mingw-w64-public] [PATCH] ddk/ntifs.h: fix compilation with struct STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE

2020-05-22 Thread Biswapriyo Nath

From 1707457560fd0b7f1370b4d1cee721d1b7cad29f Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath 
Date: Sat, 23 May 2020 11:31:55 +0530
Subject: [PATCH] ddk/ntifs.h: fix compilation with struct 
STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE

flexible array member in union is not supported in GCC standard
mingw-w64 bug: https://sourceforge.net/p/mingw-w64/bugs/777/

Signed-off-by: Biswapriyo Nath 
---
 mingw-w64-headers/ddk/include/ddk/ntifs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-headers/ddk/include/ddk/ntifs.h 
b/mingw-w64-headers/ddk/include/ddk/ntifs.h
index e2dc959..673eb36 100644
--- a/mingw-w64-headers/ddk/include/ddk/ntifs.h
+++ b/mingw-w64-headers/ddk/include/ddk/ntifs.h
@@ -4254,8 +4254,8 @@ typedef struct _STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE {
   ULONG ResponseLevel;
   ULONG NumberEntries;
   _ANONYMOUS_UNION union {
-STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY Lev1Depends[];
-STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY Lev2Depends[];
+STORAGE_QUERY_DEPENDENT_VOLUME_LEV1_ENTRY Lev1Depends[0];
+STORAGE_QUERY_DEPENDENT_VOLUME_LEV2_ENTRY Lev2Depends[0];
   } DUMMYUNIONNAME;
 } STORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE, 
*PSTORAGE_QUERY_DEPENDENT_VOLUME_RESPONSE;
 
-- 
2.26.2

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


Re: [Mingw-w64-public] Using midl/widl with MinGW

2020-05-22 Thread Jacek Caban

Hi Björn,

On 02.05.2020 09:42, Björn Schäpers | MIMOT GmbH wrote:

Then I learned there is widl and tried that. But the generated files are no 
good to me:
Error: wine/exception.h: No such file or directory

As far as I can tell, there is no package within msys2 where I could get 
wine/exception.h



You may try to use interpreted stubs, those should not need exceptions. 
Please try -Oif widl option. midl uses this mode by default, we should 
probably change widl to do the same at some point as well.



Jacek



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


Re: [Mingw-w64-public] Using midl/widl with MinGW

2020-05-22 Thread Björn Schäpers | MIMOT GmbH
> -Ursprüngliche Nachricht-
> Von: Björn Schäpers | MIMOT GmbH [mailto:bjoern.schaep...@mimot.de]
> Gesendet: Dienstag, 5. Mai 2020 07:51
> An: mingw-w64-public@lists.sourceforge.net
> Betreff: Re: [Mingw-w64-public] Using midl/widl with MinGW
>
> -Ursprüngliche Nachricht-
> Von: Biswapriyo Nath [mailto:nathbap...@gmail.com]
> Gesendet: Samstag, 2. Mai 2020 10:47
> An: mingw-w64-public@lists.sourceforge.net
> Betreff: Re: [Mingw-w64-public] Using midl/widl with MinGW
>
> Looking at the errors, it seems that the code is missing some include headers.
> For example, IUnknown_QueryInterface_Proxy is in unknwnbase.h and
> IRpcStubBufferVtbl is in objidlbase.h.Try to add `import "unknwn.idl";` in the
> IDL file that you want to compile. If you have a simple, minimal, reproducible
> code example[1] please provide it. It will help to debug the issue quickly.
>
> And for msys2, check if you've installed mingw-w64-x86_64-toolchain (i686
> for 32bit) group package properly.
>
> [1]: https://stackoverflow.com/help/minimal-reproducible-example
>
> Hi,
>
> although I do not have unknwn.idl directly imported, it is imported through
> the oaidl.idl. The same (from midl) generated code compiles fine with
> Embarcaderos compiler, which uses its own headers. They are nearly
> identical to those from the windows sdk.
>
> My minimum example is attached, when I ran the response file with "MIDL
> Compiler Version 8.01.0622" the initial error is:
> C:/msys64/mingw32/i686-w64-mingw32/include/_mingw.h(581) : error
> MIDL2025 : syntax error : expecting a type specification or a storage specifer
> or a type qualifier near "__inline__"
> I've attached the patch to fix this.
>
> With gcc dlldata.c proxy.c example_i.c I still get
> 'IUnknown_QueryInterface_Proxy' undeclared here (not in a function)
>
> Adding -DWIDL_C_INLINE_WRAPPERS -DCOBJMACROS spams a lot of similar
> errors:
> c:/msys64/mingw32/i686-w64-mingw32/include/unknwnbase.h:152:1: error:
> multiple storage classes in declaration specifiers
>   152 | static FORCEINLINE HRESULT IUnknown_QueryInterface(IUnknown*
> This,REFIID riid,void **ppvObject) { Precompiled (also attached) this results
> to static extern __inline__
> __attribute__((__always_inline__,__gnu_inline__)) HRESULT
> IUnknown_QueryInterface(IUnknown* This,const IID *const riid,void
> **ppvObject) {
>
> Compiling it with g++ results in the same errors I've mentioned in the initial
> message.
>
> When I compile the Code with bcc32c (the Clang based Embarcadero
> Compiler) it compiles (and runs, because that's what we use right now). I've
> also attached the command line for bcc32c which is rather long. You may
> notice -DWIN32 and -DREGISTER_PROXY_DLL, I've also tried to add that to
> the gcc call which doesn't change anything.
>
> With widl the wine headers are obviously still missing.
>
> There is no package called "mingw-w64-x86_64-toolchain", so I assume you
> just meant the toolchain. I've mingw32/mingw-w64-i686-
> {gcc|gdb|make|tools-git} and many more. The same for 64 Bit, but right now
> I focused on 32 Bit. Are there any other packages I need? I think my compiler
> is running fine, because I've already compiled Qt, LLVM, qbs, QtCreator, and
> some other programs.
>
> [1] Precompiled with GCC: https://nopaste.nl/EbYeIl8bvy [2] Precompiled
> with GCC and -DWIDL_C_INLINE_WRAPPERS -DCOBJMACROS:
> https://nopaste.nl/4NwyiSWFmu [3] Precompiled with bcc32c:
> https://nopaste.nl/T1N52sHZP4
>
>
> ---
> Mit freundlichen Grüßen
> With Best Regards
>
> Björn Schäpers
> Entwicklung Systemsoftware
>
> Mimot GmbH
> ---
>
>
>
> __
>
> MIMOT GmbH, Berner Weg 11, D-79539 Lörrach, Telefon +49-7621-9578-0,
> Telefax +49-7621-9578-10, www.mimot.com
> Geschäftsführer: Jürgen Philipp • Amtsgericht Freiburg HRB 705553 • UST-ID-
> Nr. DE 272524976
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Hi,

I just wonder:
Is this the correct mailing list, or is there another one better suited for my 
question?
Or is there a forum where I should go?
Or am I on my own?

---
Mit freundlichen Grüßen
With Best Regards

Björn Schäpers
Entwicklung Systemsoftware

Mimot GmbH
---



__

MIMOT GmbH, Berner Weg 11, D-79539 Lörrach, Telefon +49-7621-9578-0, Telefax 
+49-7621-9578-10, www.mimot.com
Geschäftsführer: Jürgen Philipp • Amtsgericht Freiburg HRB 705553 • UST-ID-Nr. 
DE 272524976

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