Re: [Mingw-w64-public] [PATCH] crt: Fix comments in msvcrt-common.def.in

2024-03-03 Thread Martin Storsjö

On Sun, 3 Mar 2024, Pali Rohár wrote:


On Sunday 03 March 2024 23:38:57 Martin Storsjö wrote:

On Sun, 3 Mar 2024, Pali Rohár wrote:


Ok, do you need me to resend this patch? Or would you fix this one
missing semicolon during applying patch?


I can fix the missing semicolon.


And... I do not know how to better write the commit message, so I would
be happy if give me example of how to rephrase it.


Does this sound like a good commit message? If it's ok with you, I can push
it in that form:

---8<---
crt: Fix comments in msvcrt-common.def.in

The ADD_UNDERSCORE macro adds an alias, without a leading underscore, for an
existing export with a leading underscore.

For some functions, we're not providing these aliases, e.g. because those
symbols are defined by other means, e.g. in source files (such as CRT_fp10.c
and CRT_fp8.c).

This patch improves the style of those cases, which are listed as commented
out instances of the ADD_UNDERSCORE macro.
---8<---

// Martin


That is nice, I like it! Thank you very much.


Pushed in that form, thanks!

// Martin

___
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] crt: Fix comments in msvcrt-common.def.in

2024-03-03 Thread Pali Rohár
On Sunday 03 March 2024 23:38:57 Martin Storsjö wrote:
> On Sun, 3 Mar 2024, Pali Rohár wrote:
> 
> > Ok, do you need me to resend this patch? Or would you fix this one
> > missing semicolon during applying patch?
> 
> I can fix the missing semicolon.
> 
> > And... I do not know how to better write the commit message, so I would
> > be happy if give me example of how to rephrase it.
> 
> Does this sound like a good commit message? If it's ok with you, I can push
> it in that form:
> 
> ---8<---
> crt: Fix comments in msvcrt-common.def.in
> 
> The ADD_UNDERSCORE macro adds an alias, without a leading underscore, for an
> existing export with a leading underscore.
> 
> For some functions, we're not providing these aliases, e.g. because those
> symbols are defined by other means, e.g. in source files (such as CRT_fp10.c
> and CRT_fp8.c).
> 
> This patch improves the style of those cases, which are listed as commented
> out instances of the ADD_UNDERSCORE macro.
> ---8<---
> 
> // Martin

That is nice, I like it! Thank you very much.


___
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] crt: Fix comments in msvcrt-common.def.in

2024-03-03 Thread Martin Storsjö

On Sun, 3 Mar 2024, Pali Rohár wrote:


Ok, do you need me to resend this patch? Or would you fix this one
missing semicolon during applying patch?


I can fix the missing semicolon.


And... I do not know how to better write the commit message, so I would
be happy if give me example of how to rephrase it.


Does this sound like a good commit message? If it's ok with you, I can 
push it in that form:


---8<---
crt: Fix comments in msvcrt-common.def.in

The ADD_UNDERSCORE macro adds an alias, without a leading underscore, for 
an existing export with a leading underscore.


For some functions, we're not providing these aliases, e.g. because those 
symbols are defined by other means, e.g. in source files (such as 
CRT_fp10.c and CRT_fp8.c).


This patch improves the style of those cases, which are listed as 
commented out instances of the ADD_UNDERSCORE macro.

---8<---

// Martin

___
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] crt: Fix comments in msvcrt-common.def.in

2024-03-03 Thread Pali Rohár
On Thursday 29 February 2024 10:16:47 Martin Storsjö wrote:
> On Thu, 29 Feb 2024, Pali Rohár wrote:
> 
> > On Wednesday 28 February 2024 23:24:25 Martin Storsjö wrote:
> > > On Wed, 28 Feb 2024, Pali Rohár wrote:
> > > 
> > > > All commented lines refers to non-underscore aliases for underscored
> > > > variant of functions. Aliases for some reasons are not prevent, e.g.
> > > > because some aliases are defined in other files (CRT_fp10.c and 
> > > > CRT_fp8.c).
> > > 
> > > I don't understand what the second sentence here is saying, can you 
> > > rephrase
> > > it?
> 
> Ah, now I see, with s/prevent/present/, the sentence is a bit more
> understandable.
> 
> > Ok, I will try to explain it a bit more. ADD_UNDERSCORE is a macro which
> > just adds a symbol alias. It does not export any new symbol.
> > 
> >  #define ADD_UNDERSCORE(symbol) symbol == _ ## symbol
> > 
> > Symbol "fpreset" is already defined in CRT_fp10.c and CRT_fp8.c files as
> > an alias to the "_fpreset" symbol.
> > 
> > So ADD_UNDERSCORE(fpreset) should not be added into msvcrt-common.def.in
> > because same job is already done by __attribute__((alias("_fpreset"))).
> 
> Thanks, that's more understandable :-)
> 
> > 
> > > > ---
> > > > mingw-w64-crt/def-include/msvcrt-common.def.in | 15 ---
> > > > 1 file changed, 8 insertions(+), 7 deletions(-)
> > > > 
> > > 
> > > > @@ -134,13 +135,13 @@ ADD_UNDERSCORE(y0)
> > > > ADD_UNDERSCORE(y1)
> > > > ADD_UNDERSCORE(yn)
> > > > ADD_UNDERSCORE(chgsign)
> > > > -;scalb
> > > > +ADD_UNDERSCORE(scalb)
> > > 
> > > This change here is, accidentally?, actually adding the alias even though 
> > > it
> > > was supposed to be commented out?
> > > 
> > > // Martin
> > 
> > Ah, it should not be there. My attempt was to cleanup comments without
> > any functional change. But all those parenthesis, semicolons and pluses
> > in diff make me hard to miss some accidental changes.
> 
> Yep. I'd be fine with the patch with the commit message typo fixed (or with
> the more verbose version), and this typo here fixed as well.
> 
> // Martin

Ok, do you need me to resend this patch? Or would you fix this one
missing semicolon during applying patch?

And... I do not know how to better write the commit message, so I would
be happy if give me example of how to rephrase it.


___
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] crt: Fix comments in msvcrt-common.def.in

2024-02-29 Thread Martin Storsjö

On Thu, 29 Feb 2024, Pali Rohár wrote:


On Wednesday 28 February 2024 23:24:25 Martin Storsjö wrote:

On Wed, 28 Feb 2024, Pali Rohár wrote:


All commented lines refers to non-underscore aliases for underscored
variant of functions. Aliases for some reasons are not prevent, e.g.
because some aliases are defined in other files (CRT_fp10.c and CRT_fp8.c).


I don't understand what the second sentence here is saying, can you rephrase
it?


Ah, now I see, with s/prevent/present/, the sentence is a bit more 
understandable.



Ok, I will try to explain it a bit more. ADD_UNDERSCORE is a macro which
just adds a symbol alias. It does not export any new symbol.

 #define ADD_UNDERSCORE(symbol) symbol == _ ## symbol

Symbol "fpreset" is already defined in CRT_fp10.c and CRT_fp8.c files as
an alias to the "_fpreset" symbol.

So ADD_UNDERSCORE(fpreset) should not be added into msvcrt-common.def.in
because same job is already done by __attribute__((alias("_fpreset"))).


Thanks, that's more understandable :-)




---
mingw-w64-crt/def-include/msvcrt-common.def.in | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)




@@ -134,13 +135,13 @@ ADD_UNDERSCORE(y0)
ADD_UNDERSCORE(y1)
ADD_UNDERSCORE(yn)
ADD_UNDERSCORE(chgsign)
-;scalb
+ADD_UNDERSCORE(scalb)


This change here is, accidentally?, actually adding the alias even though it
was supposed to be commented out?

// Martin


Ah, it should not be there. My attempt was to cleanup comments without
any functional change. But all those parenthesis, semicolons and pluses
in diff make me hard to miss some accidental changes.


Yep. I'd be fine with the patch with the commit message typo fixed (or 
with the more verbose version), and this typo here fixed as well.


// Martin

___
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] crt: Fix comments in msvcrt-common.def.in

2024-02-28 Thread Pali Rohár
On Wednesday 28 February 2024 23:24:25 Martin Storsjö wrote:
> On Wed, 28 Feb 2024, Pali Rohár wrote:
> 
> > All commented lines refers to non-underscore aliases for underscored
> > variant of functions. Aliases for some reasons are not prevent, e.g.
> > because some aliases are defined in other files (CRT_fp10.c and CRT_fp8.c).
> 
> I don't understand what the second sentence here is saying, can you rephrase
> it?

Ok, I will try to explain it a bit more. ADD_UNDERSCORE is a macro which
just adds a symbol alias. It does not export any new symbol.

  #define ADD_UNDERSCORE(symbol) symbol == _ ## symbol

Symbol "fpreset" is already defined in CRT_fp10.c and CRT_fp8.c files as
an alias to the "_fpreset" symbol.

So ADD_UNDERSCORE(fpreset) should not be added into msvcrt-common.def.in
because same job is already done by __attribute__((alias("_fpreset"))).

> > ---
> > mingw-w64-crt/def-include/msvcrt-common.def.in | 15 ---
> > 1 file changed, 8 insertions(+), 7 deletions(-)
> > 
> 
> > @@ -134,13 +135,13 @@ ADD_UNDERSCORE(y0)
> > ADD_UNDERSCORE(y1)
> > ADD_UNDERSCORE(yn)
> > ADD_UNDERSCORE(chgsign)
> > -;scalb
> > +ADD_UNDERSCORE(scalb)
> 
> This change here is, accidentally?, actually adding the alias even though it
> was supposed to be commented out?
> 
> // Martin

Ah, it should not be there. My attempt was to cleanup comments without
any functional change. But all those parenthesis, semicolons and pluses
in diff make me hard to miss some accidental changes.


___
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] crt: Fix comments in msvcrt-common.def.in

2024-02-28 Thread Martin Storsjö

On Wed, 28 Feb 2024, Pali Rohár wrote:


All commented lines refers to non-underscore aliases for underscored
variant of functions. Aliases for some reasons are not prevent, e.g.
because some aliases are defined in other files (CRT_fp10.c and CRT_fp8.c).


I don't understand what the second sentence here is saying, can you 
rephrase it?



---
mingw-w64-crt/def-include/msvcrt-common.def.in | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)




@@ -134,13 +135,13 @@ ADD_UNDERSCORE(y0)
ADD_UNDERSCORE(y1)
ADD_UNDERSCORE(yn)
ADD_UNDERSCORE(chgsign)
-;scalb
+ADD_UNDERSCORE(scalb)


This change here is, accidentally?, actually adding the alias even though 
it was supposed to be commented out?


// Martin

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


[Mingw-w64-public] [PATCH] crt: Fix comments in msvcrt-common.def.in

2024-02-28 Thread Pali Rohár
All commented lines refers to non-underscore aliases for underscored
variant of functions. Aliases for some reasons are not prevent, e.g.
because some aliases are defined in other files (CRT_fp10.c and CRT_fp8.c).
---
 mingw-w64-crt/def-include/msvcrt-common.def.in | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/mingw-w64-crt/def-include/msvcrt-common.def.in 
b/mingw-w64-crt/def-include/msvcrt-common.def.in
index b68964db0dca..c9d92bf8911a 100644
--- a/mingw-w64-crt/def-include/msvcrt-common.def.in
+++ b/mingw-w64-crt/def-include/msvcrt-common.def.in
@@ -41,11 +41,12 @@ ADD_UNDERSCORE(fgetchar)
 ADD_UNDERSCORE(fgetwchar)
 ADD_UNDERSCORE(filelength)
 ADD_UNDERSCORE(fileno)
-; fpreset)
+; Alias fpreset is set in CRT_fp10.c and CRT_fp8.c.
+; ADD_UNDERSCORE(fpreset)
 ADD_UNDERSCORE(fputchar)
 ADD_UNDERSCORE(fputwchar)
-;fstat)
-;ftime)
+; ADD_UNDERSCORE(fstat)
+; ADD_UNDERSCORE(ftime)
 ADD_UNDERSCORE(gcvt)
 ADD_UNDERSCORE(getch)
 ADD_UNDERSCORE(getche)
@@ -90,7 +91,7 @@ ADD_UNDERSCORE(spawnv)
 ADD_UNDERSCORE(spawnve)
 ADD_UNDERSCORE(spawnvp)
 ADD_UNDERSCORE(spawnvpe)
-;stat)
+; ADD_UNDERSCORE(stat)
 #ifndef UCRTBASE
 ADD_UNDERSCORE(strcmpi)
 #endif
@@ -134,13 +135,13 @@ ADD_UNDERSCORE(y0)
 ADD_UNDERSCORE(y1)
 ADD_UNDERSCORE(yn)
 ADD_UNDERSCORE(chgsign)
-;scalb
+ADD_UNDERSCORE(scalb)
 ADD_UNDERSCORE(finite)
 ADD_UNDERSCORE(fpclass)
 ; C99 functions
-;cabs
+; ADD_UNDERSCORE(cabs)
 ADD_UNDERSCORE(hypot)
-;logb
+; ADD_UNDERSCORE(logb)
 ADD_UNDERSCORE(nextafter)
 
 #ifndef UCRTBASE
-- 
2.20.1



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