[Mingw-w64-public] [PATCH] Fix compiler errors in shobjidl.h when NOGDI is defined

2021-05-30 Thread Orgad Shaneh
Signed-off-by: Orgad Shaneh 
---
 mingw-w64-headers/include/shobjidl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-headers/include/shobjidl.h
b/mingw-w64-headers/include/shobjidl.h
index bd1633ae..33b77648 100644
--- a/mingw-w64-headers/include/shobjidl.h
+++ b/mingw-w64-headers/include/shobjidl.h
@@ -7119,7 +7119,7 @@ static FORCEINLINE HRESULT
IFolderViewSettings_GetGroupSubsetCount(IFolderViewSe
 #endif
 #endif

-#if _WIN32_IE >= _WIN32_IE_IE70
+#if _WIN32_IE >= _WIN32_IE_IE70 && !defined(NOGDI)
 /*
  * IPreviewHandlerVisuals interface
  */
--
2.30.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] [PATCH] headers/wincon: Don't define `LF_FACESIZE` when `NOGDI` is in, effect

2021-05-25 Thread Orgad Shaneh
On Tue, May 25, 2021 at 4:40 PM Liu Hao  wrote:

> The issue indeed exists. However I don't think the other proposed patch is
> the correct way to
> address it. If you have a look at how Microsoft headers work, you will
> find that those functions are
> effectively available when `NOGDI` is defined.
>
> So apparently the types `LOGFONTW` etc. shall be defined even when `NOGDI`
> is in effect. But how
> could they be? Both we and Microsoft have them in 'shtypes.h' inside
> `#ifndef LF_FACESIZE` but this
> magic macro isn't referenced inside that block, so the cause is clear: The
> macro `LF_FACESIZE`
> ensures there shall be *exactly* one definition of those structs. If it is
> seen as defined
> somewhere, `LOGFONTW` etc. must have be defined, too.
>
> Searching for definitions of `LF_FACESIZE` reveals such a mismatch in
> 'wincon.h': `LF_FACESIZE` is
> defined without other types. We can also have a look at MS headers: They
> don't define it in case of
> `NOGDI`. Hence, adding an `#ifndef NOGDI` there to remove this macro when
> `NOGDI` is defined should
> resolve the issue.
>
>
> --
> Best regards,
> Liu Hao
>

Looks fine. Thanks for investigating.

- Orgad

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


[Mingw-w64-public] [PATCH] Fix compiler errors in shobjidl.h when NOGDI is defined

2021-05-24 Thread Orgad Shaneh
Fixes the following errors:

$ echo '#include ' | gcc -xc -c -DNOGDI -
In file included from :1:
C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7170:15: error:
unknown type name 'LOGFONTW'
 7170 | const LOGFONTW *plf);
  |   ^~~~
C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7324:15: error:
unknown type name 'LOGFONTW'
 7324 | const LOGFONTW *plf,
  |   ^~~~
C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7329:9: error:
unknown type name 'LOGFONTW'; did you mean 'LPFONT'?
 7329 | LOGFONTW *plf);
  | ^~~~
  | LPFONT

Signed-off-by: Orgad Shaneh 
---
 mingw-w64-headers/include/shobjidl.idl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-headers/include/shobjidl.idl
b/mingw-w64-headers/include/shobjidl.idl
index 6c3881a4..e054c753 100644
--- a/mingw-w64-headers/include/shobjidl.idl
+++ b/mingw-w64-headers/include/shobjidl.idl
@@ -828,7 +828,7 @@ cpp_quote("#endif")
 cpp_quote("#endif")

 cpp_quote("")
-cpp_quote("#if _WIN32_IE >= _WIN32_IE_IE70")
+cpp_quote("#if _WIN32_IE >= _WIN32_IE_IE70 && !defined(NOGDI)")
 [object, uuid (196bf9a5-b346-4ef0-aa1e-5dcdb76768b1), pointer_default (unique)]
 interface IPreviewHandlerVisuals : IUnknown {
   HRESULT SetBackgroundColor ([in] COLORREF color);
--
2.30.2


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


[Mingw-w64-public] [PATCH] Fix compiler errors in shobjidl.h when NOGDI is defined

2021-05-24 Thread Orgad Shaneh
Fixes the following errors:

$ echo '#include ' | gcc -xc -c -DNOGDI -
In file included from :1:
C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7170:15: error:
unknown type name 'LOGFONTW'
 7170 | const LOGFONTW *plf);
  |   ^~~~
C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7324:15: error:
unknown type name 'LOGFONTW'
 7324 | const LOGFONTW *plf,
  |   ^~~~
C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7329:9: error:
unknown type name 'LOGFONTW'; did you mean 'LPFONT'?
 7329 | LOGFONTW *plf);
  | ^~~~
  | LPFONT

Signed-off-by: Orgad Shaneh 
---
 mingw-w64-headers/include/shobjidl.h   | 2 +-
 mingw-w64-headers/include/shobjidl.idl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-headers/include/shobjidl.h
b/mingw-w64-headers/include/shobjidl.h
index bd1633ae..33b77648 100644
--- a/mingw-w64-headers/include/shobjidl.h
+++ b/mingw-w64-headers/include/shobjidl.h
@@ -7119,7 +7119,7 @@ static FORCEINLINE HRESULT
IFolderViewSettings_GetGroupSubsetCount(IFolderViewSe
 #endif
 #endif

-#if _WIN32_IE >= _WIN32_IE_IE70
+#if _WIN32_IE >= _WIN32_IE_IE70 && !defined(NOGDI)
 /*
  * IPreviewHandlerVisuals interface
  */
diff --git a/mingw-w64-headers/include/shobjidl.idl
b/mingw-w64-headers/include/shobjidl.idl
index 6c3881a4..e054c753 100644
--- a/mingw-w64-headers/include/shobjidl.idl
+++ b/mingw-w64-headers/include/shobjidl.idl
@@ -828,7 +828,7 @@ cpp_quote("#endif")
 cpp_quote("#endif")

 cpp_quote("")
-cpp_quote("#if _WIN32_IE >= _WIN32_IE_IE70")
+cpp_quote("#if _WIN32_IE >= _WIN32_IE_IE70 && !defined(NOGDI)")
 [object, uuid (196bf9a5-b346-4ef0-aa1e-5dcdb76768b1), pointer_default (unique)]
 interface IPreviewHandlerVisuals : IUnknown {
   HRESULT SetBackgroundColor ([in] COLORREF color);
--
2.30.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] [PATCH] Fix compiler errors in shobjidl.h when NOGDI is defined

2021-05-24 Thread Orgad Shaneh
On Mon, May 24, 2021 at 5:58 PM Orgad Shaneh  wrote:
>
> On Mon, May 24, 2021 at 4:40 PM Liu Hao  wrote:
> >
> > 0. 'shobjidl.h' is generated from 'shobjidl.idl' with
> >
> >   widl -DBOOL=WINBOOL -h -o include/shobjidl.{h,idl}
> >
> > so please submit patches against the IDL file instead.
>
> Thanks for the reference. Should the patch include both, or only the idl file?
>
> > 1. Please provide a testcase to illustrate how this can make a difference.
>
> Very easy:
> echo '#include ' | gcc -xc -c -DNOGDI -

Forgot to reply to all, and paste the error output :)

$ echo '#include ' | gcc -xc -c -DNOGDI -
In file included from :1:
C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7170:15: error:
unknown type name 'LOGFONTW'
 7170 | const LOGFONTW *plf);
  |   ^~~~
C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7324:15: error:
unknown type name 'LOGFONTW'
 7324 | const LOGFONTW *plf,
  |   ^~~~
C:/msys32/mingw32/i686-w64-mingw32/include/shobjidl.h:7329:9: error:
unknown type name 'LOGFONTW'; did you mean 'LPFONT'?
 7329 | LOGFONTW *plf);
  | ^~~~
  | LPFONT

- Orgad


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


[Mingw-w64-public] [PATCH] Fix compiler errors in shobjidl.h when NOGDI is defined

2021-05-24 Thread Orgad Shaneh
Signed-off-by: Orgad Shaneh 
---
 mingw-w64-headers/include/shobjidl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-headers/include/shobjidl.h
b/mingw-w64-headers/include/shobjidl.h
index bd1633ae..33b77648 100644
--- a/mingw-w64-headers/include/shobjidl.h
+++ b/mingw-w64-headers/include/shobjidl.h
@@ -7119,7 +7119,7 @@ static FORCEINLINE HRESULT
IFolderViewSettings_GetGroupSubsetCount(IFolderViewSe
 #endif
 #endif

-#if _WIN32_IE >= _WIN32_IE_IE70
+#if _WIN32_IE >= _WIN32_IE_IE70 && !defined(NOGDI)
 /*
  * IPreviewHandlerVisuals interface
  */
--
2.30.2


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


[Mingw-w64-public] [PATCH] Fix compiler errors in shobjidl.h when NOGDI is defined

2021-05-24 Thread Orgad Shaneh
Signed-off-by: Orgad Shaneh 
---
 mingw-w64-headers/include/shobjidl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mingw-w64-headers/include/shobjidl.h
b/mingw-w64-headers/include/shobjidl.h
index bd1633ae..33b77648 100644
--- a/mingw-w64-headers/include/shobjidl.h
+++ b/mingw-w64-headers/include/shobjidl.h
@@ -7119,7 +7119,7 @@ static FORCEINLINE HRESULT
IFolderViewSettings_GetGroupSubsetCount(IFolderViewSe
 #endif
 #endif

-#if _WIN32_IE >= _WIN32_IE_IE70
+#if _WIN32_IE >= _WIN32_IE_IE70 && !defined(NOGDI)
 /*
  * IPreviewHandlerVisuals interface
  */
--
2.30.2

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