On 07/10/17 06:55, Alex Henrie wrote:
asinh is part of C89, so it is guaranteed to be present.
Are you sure about it? As far as I know it's part of C99. The manual for asinh looks strange (it says that it conforms to C89 and gives test macro that checks for never standards).
Thanks, Piotr
On 10 July 2017 at 13:20, Piotr Caban piotr.caban@gmail.com wrote:
On 07/10/17 06:55, Alex Henrie wrote:
asinh is part of C89, so it is guaranteed to be present.
Are you sure about it? As far as I know it's part of C99. The manual for asinh looks strange (it says that it conforms to C89 and gives test macro that checks for never standards).
My understanding was asinh() is C89, while asinhf() and asinhl() are C99.
On 10 July 2017 at 13:54, Henri Verbeet hverbeet@gmail.com wrote:
My understanding was asinh() is C89, while asinhf() and asinhl() are C99.
Although looking at the actual standard, I don't see asinh() in there.
Henri Verbeet hverbeet@gmail.com writes:
On 10 July 2017 at 13:54, Henri Verbeet hverbeet@gmail.com wrote:
My understanding was asinh() is C89, while asinhf() and asinhl() are C99.
Although looking at the actual standard, I don't see asinh() in there.
In general we don't care about the standards. Saying "asinh is in C89 so it's guaranteed to be available" doesn't make sense, nothing is guaranteed. There may or may not be a system out there that doesn't have it, no matter what the standards say.
So in principle we add checks as we find systems that require them, and we don't remove them because there's no easy way to check that they aren't still needed somewhere.
On 10 July 2017 at 15:06, Alexandre Julliard julliard@winehq.org wrote:
Henri Verbeet hverbeet@gmail.com writes:
On 10 July 2017 at 13:54, Henri Verbeet hverbeet@gmail.com wrote:
My understanding was asinh() is C89, while asinhf() and asinhl() are C99.
Although looking at the actual standard, I don't see asinh() in there.
In general we don't care about the standards. Saying "asinh is in C89 so it's guaranteed to be available" doesn't make sense, nothing is guaranteed. There may or may not be a system out there that doesn't have it, no matter what the standards say.
Sure, although at this point I'd have to wonder about the number of systems that don't conform to C89 and we still care about.
The reason I looked it up though, is simply because the man page I have is indeed ambiguous about whether asinh() is in C89 or in C99, and I was curious. It wasn't necessarily meant as an argument either for or against the actual patch.
2017-07-10 5:20 GMT-06:00 Piotr Caban piotr.caban@gmail.com:
On 07/10/17 06:55, Alex Henrie wrote:
asinh is part of C89, so it is guaranteed to be present.
Are you sure about it? As far as I know it's part of C99. The manual for asinh looks strange (it says that it conforms to C89 and gives test macro that checks for never standards).
I just looked, and I don't see it either. I also tried compiling a small program with asinh, and it would not compile with `gcc -std=c89`. So I think the man page must be mistaken.
2017-07-10 7:06 GMT-06:00 Alexandre Julliard julliard@winehq.org:
In general we don't care about the standards. Saying "asinh is in C89 so it's guaranteed to be available" doesn't make sense, nothing is guaranteed. There may or may not be a system out there that doesn't have it, no matter what the standards say.
So in principle we add checks as we find systems that require them, and we don't remove them because there's no easy way to check that they aren't still needed somewhere.
If we say that C89 (or more realistically, gnu89) is the minimum requirement for compiling Wine, it becomes much easier to decide when to add (or remove) feature test macros. I'd actually like to add checks around several other non-C89 functions that we use in math.c. But the decision is up to you.
Let's skip over the trigonometric functions for now; the other patches will still apply cleanly without them.
-Alex
Alex Henrie alexhenrie24@gmail.com writes:
If we say that C89 (or more realistically, gnu89) is the minimum requirement for compiling Wine, it becomes much easier to decide when to add (or remove) feature test macros. I'd actually like to add checks around several other non-C89 functions that we use in math.c. But the decision is up to you.
Like I said, standards are not interesting. What matters is what works in reality, on existing systems. It wouldn't make sense to add or remove a bunch of checks on the basis that the functions are or aren't in C89.
We have to do the checks that are necessary for Wine to build successfully on the systems that people are using, no matter what the standards may say.
2017-07-10 11:41 GMT-06:00 Alex Henrie alexhenrie24@gmail.com:
2017-07-10 5:20 GMT-06:00 Piotr Caban piotr.caban@gmail.com:
On 07/10/17 06:55, Alex Henrie wrote:
asinh is part of C89, so it is guaranteed to be present.
Are you sure about it? As far as I know it's part of C99. The manual for asinh looks strange (it says that it conforms to C89 and gives test macro that checks for never standards).
I just looked, and I don't see it either. I also tried compiling a small program with asinh, and it would not compile with `gcc -std=c89`. So I think the man page must be mistaken.
Okay, I still think the man page is wrong, but I was forgetting the -lm switch. `gcc -std=c89 -lm` will happily compile programs with asinh, acosh, and atanh. However, I found evidence that relatively recent MS compilers won't: https://stackoverflow.com/questions/15539116/atanh-arc-hyperbolic-tangent-fu... https://mail.kde.org/pipermail/calligra-devel/2012-December/007686.html
I'll submit new patches to add acosh and atanh with precompiler checks, preferably after the other patches in this series are approved.
-Alex