Re: [Mingw-w64-public] [PATCH] wtypes.h: replace #include <...> with #include "..." for rpc
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
Re: [Mingw-w64-public] [PATCH] headers: Add headers for host compute system APIs
在 2021-08-31 00:07, NightStrike 写道: I only mentioned function parameters Yes; there is no need to uglify them, because they are unreferenced by standard headers. Keeping them the same with Windows SDK should be reasonably fine. -- 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] headers: Add headers for host compute system APIs
On Mon, Aug 30, 2021 at 8:59 AM LIU Hao wrote: > > 在 8/30/21 2:42 PM, NightStrike 写道: > > > > All of those function parameters need to be uglified or removed. I > > personally prefer removing them when they provide no additional > > context. Example: > > > > struct timespec * ts << "ts" is redundant here > > int timespec << assuming it is such a thing, here, the variable name > > tells you what the "int" is > > > > In your case, just about every single parameter name can just be removed. > > > > I'm working in a branch to do this to the crt (so that we can pass the > > libstdc++ testsuite), but we shouldn't introduce new headers with the > > problem. > > > > I do believe there is such a requirement on CRT headers, but it should not > apply to Windows headers. > CRT headers are not meant to include Windows ones. > > In addition, those macros, functions, struct/union members and tags can't be > renamed, either, so we > gain no more standard conformance form such uglification. I only mentioned function parameters ___ 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: Add headers for host compute system APIs
在 8/30/21 2:42 PM, NightStrike 写道: All of those function parameters need to be uglified or removed. I personally prefer removing them when they provide no additional context. Example: struct timespec * ts << "ts" is redundant here int timespec << assuming it is such a thing, here, the variable name tells you what the "int" is In your case, just about every single parameter name can just be removed. I'm working in a branch to do this to the crt (so that we can pass the libstdc++ testsuite), but we shouldn't introduce new headers with the problem. I do believe there is such a requirement on CRT headers, but it should not apply to Windows headers. CRT headers are not meant to include Windows ones. In addition, those macros, functions, struct/union members and tags can't be renamed, either, so we gain no more standard conformance form such uglification. -- 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] headers: Add headers for host compute system APIs
It's required by the language standard. On Sun, Aug 29, 2021, 23:03 Biswapriyo Nath wrote: > IMHO, I don't see any proper reason to "uglify" every header file. Some > issues: > 1. If parameters are removed the function declarations will look cryptic. > 2. If I want to see a function prototype quickly without opening a web > browser header files are handy at that time. > 3. If there is any wrong in code the compiler output shows the > functions parameters which also helps. > 4. Just asking. If a simple function parameters cause test failure, > should not those tests need a fix? These headers are not included in > any crt files. > ___ 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: Add headers for host compute system APIs
IMHO, I don't see any proper reason to "uglify" every header file. Some issues: 1. If parameters are removed the function declarations will look cryptic. 2. If I want to see a function prototype quickly without opening a web browser header files are handy at that time. 3. If there is any wrong in code the compiler output shows the functions parameters which also helps. 4. Just asking. If a simple function parameters cause test failure, should not those tests need a fix? These headers are not included in any crt files. ___ 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: Add headers for host compute system APIs
On Sun, Aug 29, 2021 at 5:39 AM LIU Hao wrote: > > 在 2021-08-27 03:22, Biswapriyo Nath 写道: > > From d8b3fa8e4c2ddaede22ca0b134b5dcccd34aa87f Mon Sep 17 00:00:00 2001 > > From: Biswapriyo Nath > > Date: Fri, 27 Aug 2021 00:51:06 +0530 > > Subject: [PATCH] headers: Add headers for host compute system APIs > > > > Signed-off-by: Biswapriyo Nath > > --- > > mingw-w64-headers/include/computecore.h| 82 ++ > > mingw-w64-headers/include/computedefs.h| 119 + > > mingw-w64-headers/include/computenetwork.h | 92 > > mingw-w64-headers/include/computestorage.h | 40 +++ > > 4 files changed, 333 insertions(+) > > create mode 100644 mingw-w64-headers/include/computecore.h > > create mode 100644 mingw-w64-headers/include/computedefs.h > > create mode 100644 mingw-w64-headers/include/computenetwork.h > > create mode 100644 mingw-w64-headers/include/computestorage.h > > Thanks, patch looks good to me. I pushed it to master. All of those function parameters need to be uglified or removed. I personally prefer removing them when they provide no additional context. Example: struct timespec * ts << "ts" is redundant here int timespec << assuming it is such a thing, here, the variable name tells you what the "int" is In your case, just about every single parameter name can just be removed. I'm working in a branch to do this to the crt (so that we can pass the libstdc++ testsuite), but we shouldn't introduce new headers with the problem. ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public