[Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-09-18 Thread Pali Rohár
--- mingw-w64-crt/Makefile.am| 3 +++ mingw-w64-crt/stdio/ucrt__scprintf.c | 21 + mingw-w64-crt/stdio/ucrt__snprintf.c | 21 + mingw-w64-crt/stdio/ucrt__snscanf.c | 21 + 4 files changed, 66 insertions(+) create mode 10064

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-12-04 Thread Pali Rohár
On Wednesday 21 September 2022 11:31:54 Martin Storsjö wrote: > On Tue, 20 Sep 2022, Pali Rohár wrote: > > > > There are many, many different variants of inline behaviour - C89 inline, > > > C99 inline, static inline, extern inline, gnu_inline, etc. There's a > > > couple > > > different styles u

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-12-23 Thread LIU Hao
在 2022-12-04 21:49, Pali Rohár 写道: Format attributes is interesting issue. Because there are already following printf implementations: 1) C89 (without %lld) (crtdll.dll, msvcrt10.dll) 2) C89 (without %lld) + MS extensions %I64d (msvcrt20.dll - msvcr110.dll) 3) C99 (with %lld) + MS extensions %I6

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-12-23 Thread Pali Rohár
On Friday 23 December 2022 22:20:25 LIU Hao wrote: > 在 2022-12-04 21:49, Pali Rohár 写道: > > Format attributes is interesting issue. Because there are already following > > printf implementations: > > > > 1) C89 (without %lld) (crtdll.dll, msvcrt10.dll) > > 2) C89 (without %lld) + MS extensions %I6

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2023-04-21 Thread Pali Rohár
On Friday 23 December 2022 17:21:38 Pali Rohár wrote: > On Friday 23 December 2022 22:20:25 LIU Hao wrote: > > 在 2022-12-04 21:49, Pali Rohár 写道: > > > Format attributes is interesting issue. Because there are already > > > following > > > printf implementations: > > > > > > 1) C89 (without %lld)

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2023-05-06 Thread Pali Rohár
On Friday 21 April 2023 18:46:01 Pali Rohár wrote: > On Friday 23 December 2022 17:21:38 Pali Rohár wrote: > > On Friday 23 December 2022 22:20:25 LIU Hao wrote: > > > 在 2022-12-04 21:49, Pali Rohár 写道: > > > > Format attributes is interesting issue. Because there are already > > > > following > >

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2023-05-09 Thread LIU Hao
在 2023-05-06 18:49, Pali Rohár 写道: Why not? How inline and non-inline differs here? The issue is with format attribute, but because gcc does not provide all 8 versions mentioned here, it just means that both inline and non-inline versions have same issues. Any comment on this last section? The

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-02-28 Thread Pali Rohár
On Tuesday 09 May 2023 22:29:31 LIU Hao wrote: > Our conclusion is that, in order to reduce possible UCRT dependency, moving > inline definitions out of headers makes sense; but the other part, such as > duplication of functions, will not be accepted. Ok, so does it mean that the one change with t

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-02-29 Thread LIU Hao
在 2024-02-29 04:25, Pali Rohár 写道: On Tuesday 09 May 2023 22:29:31 LIU Hao wrote: Our conclusion is that, in order to reduce possible UCRT dependency, moving inline definitions out of headers makes sense; but the other part, such as duplication of functions, will not be accepted. Ok, so does i

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-03-09 Thread Pali Rohár
On Thursday 29 February 2024 22:07:40 LIU Hao wrote: > 在 2024-02-29 04:25, Pali Rohár 写道: > > On Tuesday 09 May 2023 22:29:31 LIU Hao wrote: > > > Our conclusion is that, in order to reduce possible UCRT dependency, > > > moving > > > inline definitions out of headers makes sense; but the other pa

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-03-10 Thread LIU Hao
在 2024-03-09 23:58, Pali Rohár 写道: The point is that this one change allows to have object file with function calls to _scprintf or _snprintf to be CRT independent. Let me guess, you have an object file (maybe in a static library) which was compiled for MSVCRT (or an old variant, at least not

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-03-11 Thread Pali Rohár
On Monday 11 March 2024 13:14:02 LIU Hao wrote: > 在 2024-03-09 23:58, Pali Rohár 写道: > > The point is that this one change allows to have object file with > > function calls to _scprintf or _snprintf to be CRT independent. > > Let me guess, you have an object file (maybe in a static library) which

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-03-11 Thread LIU Hao
在 2024-03-11 15:52, Pali Rohár 写道: I know, but I'm trying to achieve it by small steps. For _scprintf it should fix this issue as mingw library starts providing required symbol for linking object files. Or do you see there some problem with it? That's acceptable, like 'ucrt_vfprintf.c' for exam

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-03-23 Thread Pali Rohár
On Monday 11 March 2024 19:02:09 LIU Hao wrote: > 在 2024-03-11 15:52, Pali Rohár 写道: > > I know, but I'm trying to achieve it by small steps. For _scprintf it > > should fix this issue as mingw library starts providing required symbol > > for linking object files. Or do you see there some problem w

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-03-23 Thread LIU Hao
在 2024-03-23 18:43, Pali Rohár 写道: On Monday 11 March 2024 19:02:09 LIU Hao wrote: 在 2024-03-11 15:52, Pali Rohár 写道: I know, but I'm trying to achieve it by small steps. For _scprintf it should fix this issue as mingw library starts providing required symbol for linking object files. Or do you

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-03-24 Thread Pali Rohár
On Saturday 23 March 2024 22:22:03 LIU Hao wrote: > 在 2024-03-23 18:43, Pali Rohár 写道: > > On Monday 11 March 2024 19:02:09 LIU Hao wrote: > > > 在 2024-03-11 15:52, Pali Rohár 写道: > > > > I know, but I'm trying to achieve it by small steps. For _scprintf it > > > > should fix this issue as mingw li

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-03-24 Thread LIU Hao
在 2024-03-24 23:17, Pali Rohár 写道: I see... The problem is that inline version of that function in stdio.h conflicts with non-inline version in ucrt__scprintf.c file. One option how to avoid this problem is to not include stdio.h into ucrt__scprintf.c file. Other option can be to remove inline

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-03-30 Thread Pali Rohár
On Monday 25 March 2024 13:59:49 LIU Hao wrote: > 在 2024-03-24 23:17, Pali Rohár 写道: > > I see... The problem is that inline version of that function in stdio.h > > conflicts with non-inline version in ucrt__scprintf.c file. > > > > One option how to avoid this problem is to not include stdio.h in

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2024-04-04 Thread Martin Storsjö
On Sat, 30 Mar 2024, Pali Rohár wrote: On Monday 25 March 2024 13:59:49 LIU Hao wrote: 在 2024-03-24 23:17, Pali Rohár 写道: I see... The problem is that inline version of that function in stdio.h conflicts with non-inline version in ucrt__scprintf.c file. One option how to avoid this problem is

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-09-19 Thread Martin Storsjö
On Sat, 17 Sep 2022, Pali Rohár wrote: --- mingw-w64-crt/Makefile.am| 3 +++ mingw-w64-crt/stdio/ucrt__scprintf.c | 21 + mingw-w64-crt/stdio/ucrt__snprintf.c | 21 + mingw-w64-crt/stdio/ucrt__snscanf.c | 21 + 4 files changed

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-09-19 Thread Pali Rohár
On Monday 19 September 2022 15:33:45 Martin Storsjö wrote: > On Sat, 17 Sep 2022, Pali Rohár wrote: > > > --- > > mingw-w64-crt/Makefile.am| 3 +++ > > mingw-w64-crt/stdio/ucrt__scprintf.c | 21 + > > mingw-w64-crt/stdio/ucrt__snprintf.c | 21 + >

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-09-19 Thread Martin Storsjö
On Mon, 19 Sep 2022, Pali Rohár wrote: On Monday 19 September 2022 15:33:45 Martin Storsjö wrote: On Sat, 17 Sep 2022, Pali Rohár wrote: --- mingw-w64-crt/Makefile.am| 3 +++ mingw-w64-crt/stdio/ucrt__scprintf.c | 21 + mingw-w64-crt/stdio/ucrt__snprintf.c | 21

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-09-20 Thread Pali Rohár
On Monday 19 September 2022 16:50:33 Martin Storsjö wrote: > On Mon, 19 Sep 2022, Pali Rohár wrote: > > > On Monday 19 September 2022 15:33:45 Martin Storsjö wrote: > > > On Sat, 17 Sep 2022, Pali Rohár wrote: > > > > > > > --- > > > > mingw-w64-crt/Makefile.am| 3 +++ > > > > mingw-w

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-09-21 Thread Martin Storsjö
On Tue, 20 Sep 2022, Pali Rohár wrote: There are many, many different variants of inline behaviour - C89 inline, C99 inline, static inline, extern inline, gnu_inline, etc. There's a couple different styles used here; all the inline functions that we're talking about here have static inline linka