Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-04 Thread Liu Hao
On 2017/4/4 1:19, David Grayson wrote: > What you say matches what I got from my experiments, but it's odd that it > doesn't match the GCC documentation I linked to, which says: > > If you specify both inline and extern in the function definition, then > the definition is used only for inlining.

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-03 Thread Liu Hao
On 2017/4/4 2:11, Jacek Caban wrote: > I'm sorry to jump into discussion so late. The patch looks good to me. OK I pushed it to master. -- Best regards, LH_Mouse -- Check out the vibrant tech community on one of the

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-03 Thread Jacek Caban
On 03.04.2017 19:02, Liu Hao wrote: > On 2017/4/4 0:48, David Grayson wrote: >> I'm a bit confused about the different inlining keywords. From the GCC >> documentation for inlining in the C language ( >> https://gcc.gnu.org/onlinedocs/gcc/Inline.html ) it seemed like "extern >> inline" (i.e.

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-03 Thread David Grayson
On Mon, Apr 3, 2017 at 10:02 AM, Liu Hao wrote: > On 2017/4/4 0:48, David Grayson wrote: > > I'm a bit confused about the different inlining keywords. From the GCC > > documentation for inlining in the C language ( > > https://gcc.gnu.org/onlinedocs/gcc/Inline.html ) it seemed

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-03 Thread Liu Hao
On 2017/4/4 0:48, David Grayson wrote: > I'm a bit confused about the different inlining keywords. From the GCC > documentation for inlining in the C language ( > https://gcc.gnu.org/onlinedocs/gcc/Inline.html ) it seemed like "extern > inline" (i.e. __CRT_INLINE) would be the best thing to use,

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-03 Thread David Grayson
I looked into it a little more. __NO_INLINE__ is a macro provided by GCC that is documented to be defined if "no functions will be inlined into their callers". This seems to be defined by GCC by default, but it is not defined when you provide the "-O2" option. __CRT__NO_INLINE is defined in

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-02 Thread David Grayson
Oops, I did a bad job of testing LH_Mouse's patch because I was trying to judge whether a broken build of a program got worse. It turns out his patch made the build worse, causing undefined reference errors for functions like StringCbLengthA that get defined in strsafe.h when compiled as a part

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-02 Thread David Grayson
I just tested LH_Mouse's patch and it seems to work fine, so I am OK with using it instead of mine. However, that patch seems like it could be wrong too, since when strsafe.h is used to compile the library, all the library functions will have __inline in their declarations even though we are

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-02 Thread Liu Hao
On 2017/4/3 0:54, David Grayson wrote: On April 2, 2017 2:55:35 AM GMT+02:00, David Grayson < davidegray...@gmail.com> wrote: In MSYS2 and in my own compilation of a mingw-w64 GCC 6.3.0 toolchain, strsafe.h was producing tons of warnings when included because it was declaring its functions as

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-02 Thread David Grayson
OK, I'm disappointed in gmail then. Here is a version with a .txt extension so it should have the right MIME type and get through. --David On Sun, Apr 2, 2017 at 1:00 AM, Mateusza Mikuła wrote: > Looks like patch couldn't make it through. > > On April 2, 2017 2:55:35 AM

Re: [Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-02 Thread Mateusza Mikuła
Looks like patch couldn't make it through. On April 2, 2017 2:55:35 AM GMT+02:00, David Grayson wrote: >In MSYS2 and in my own compilation of a mingw-w64 GCC 6.3.0 toolchain, >strsafe.h was producing tons of warnings when included because it was >declaring its functions

[Mingw-w64-public] [PATCH] strsafe.h: Change __inline to __CRT_INLINE

2017-04-01 Thread David Grayson
In MSYS2 and in my own compilation of a mingw-w64 GCC 6.3.0 toolchain, strsafe.h was producing tons of warnings when included because it was declaring its functions as inline but then not defining them. I think the right solution is to change "__inline" to "__CRT_INLINE" so I have attached a