Re: [Mingw-w64-public] [PATCH] wtypes.h: replace #include <...> with #include "..." for rpc
在 9/4/21 1:18 PM, Jonathan Marler 写道: I could but this project builds with MSVC and I noticed that the MSVC headers are using the same include style for these 2 particular files. Note that we only need to change these 2 lines, to fix this. What reason is there not to change these 2 lines to fix this issue? If you google it there appears to be many projects with a header file named "rpc.h". My personal guidance for common projects is that, if header X and header Y are maintained by the same people and their relative path does not seem to vary, then "" should be preferred to <>, so this relationship is maintained when the header directory tree is copied (recursively) elsewhere. But in mingw-w64, all headers are system headers, so probably this doesn't apply any more. I suggest that we maintain the same scheme with Windows SDK headers, which is "" here. Many headers (such as windows.h) include others with <>, so Microsoft's choice for OLE headers might imply there had been some issues with <>. Thoughts? -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] wtypes.h: replace #include <...> with #include "..." for rpc
I could but this project builds with MSVC and I noticed that the MSVC headers are using the same include style for these 2 particular files. Note that we only need to change these 2 lines, to fix this. What reason is there not to change these 2 lines to fix this issue? If you google it there appears to be many projects with a header file named "rpc.h". On Fri, Sep 3, 2021 at 10:49 PM Biswapriyo Nath wrote: > I disagree with this change. Your project contains files with similar > name in mingw-w64. You should change your project file instead of the > opposite. > > > ___ > 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] wtypes.h: replace #include <...> with #include "..." for rpc
I disagree with this change. Your project contains files with similar name in mingw-w64. You should change your project file instead of the opposite. ___ 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] wtypes.h: replace #include <...> with #include "..." for rpc
Hi Jonathan, On 9/3/21 11:48 PM, Jonathan Marler wrote: Been another 4 days, anyone able to bring this patch in or review? Your patch never arrived to the mailing list, it looks like the attachment is missing. 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] [PATCH] wtypes.h: replace #include <...> with #include "..." for rpc
That's odd, I attached it in the first email sent Aug 25. Here's the patch inline with my email and attached again >From 2ba8f0e43213f09f85cf653a8f0a726d9873399d Mon Sep 17 00:00:00 2001 From: Jonathan Marler Date: Wed, 25 Aug 2021 10:35:19 -0600 Subject: [PATCH] wtypes.h: replace #include <...> with #include "..." for rpc headers This replaces the include style for rpc.h and rpcndr.h inside the wtypes.h header. I found this issue when trying to compile my WindowsNfs project found here: https://github.com/marler8997/WindowsNfs. This project contains a file named "Rpc.h". This broke the mingw header files because wtypes.h ends up including my file instead of the one in the toolchain. I also verified that if I had a file named rpcndr.h in my project then the same issue occured. By changing these 2 lines to use #include "...", projects can have files named rpc.h and rpcndr.h and include without breaking the headers. Signed-off-by: Jonathan Marler --- mingw-w64-headers/include/wtypes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mingw-w64-headers/include/wtypes.h b/mingw-w64-headers/include/wtypes.h index 773716df8..fd60edb01 100644 --- a/mingw-w64-headers/include/wtypes.h +++ b/mingw-w64-headers/include/wtypes.h @@ -4,8 +4,8 @@ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 475 #endif -#include -#include +#include "rpc.h" +#include "rpcndr.h" #endif #ifndef COM_NO_WINDOWS_H -- 2.25.4 On Fri, Sep 3, 2021 at 3:54 PM Jacek Caban wrote: > Hi Jonathan, > > On 9/3/21 11:48 PM, Jonathan Marler wrote: > > Been another 4 days, anyone able to bring this patch in or review? > > > Your patch never arrived to the mailing list, it looks like the > attachment is missing. > > > 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] [PATCH] wtypes.h: replace #include <...> with #include "..." for rpc
Been another 4 days, anyone able to bring this patch in or review? On Mon, Aug 30, 2021 at 3:36 PM Jonathan Marler wrote: > Ping. The issue that this fixes is easy to reproduce. Just try to > compile any project with the mingw headers and add a file named "rpc.h" to > one of your local include directories and you'll get a bunch of errors > related to missing definitions. The 2-line patch attached to my previous > message should fix it. > > On Wed, Aug 25, 2021 at 10:42 AM Jonathan Marler > wrote: > >> This replaces the include style for rpc.h and rpcndr.h inside the >> wtypes.h header. I found this issue when trying to compile my WindowsNfs >> project found here: https://github.com/marler8997/WindowsNfs. This >> project contains a file named "Rpc.h". This broke the mingw header files >> because wtypes.h ends up including my file instead of the one in the >> toolchain. I also verified that if I had a file named rpcndr.h in my >> project then the same issue occurred. By changing these 2 lines to use >> #include "...", projects can have files named rpc.h and rpcndr.h and >> include without breaking the headers. >> > ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public