Hi, Thank you for the reviews and clarifications. The current [arch] support in gendef solves the immediate problem, but I agree it diverges from how mingw-w64 handles this. In mingw-w64 the .def.in files are pre-processed with cpp, and macros like F_LD64(...) are used to express the long double == double aliasing in a portable, centralized way.
If the consensus is to keep Cygwin. Din aligned with mingw-w64, I'm happy to rework the patch in that direction. To break it down: instead of adding [arch] handling, I should extend gendef to recognize the F_LD64 macro and expand it appropriately (aliasing long double to double where required). This should unblock the patch, but please let me know if I'm misunderstanding. As a reference point, mingw-w64 recently did the same for _chgsignl: https://github.com/mingw-w64/mingw-w64/commit/fc3304f00802dcfa9ab85828ff6ceccd0df62efc My intent with the sqrtl change was just to provide a minimal exemplar to validate the approach. Once we agree on the right direction, I'll extend the same change across all the other long double functions in winsup/cygwin/math directory. Thanks again for the guidance. Thanks & regardsĀ Thirumalai N > Sorry about the long delay looking into this. > > So, I was about to apply Thiru's v2 patch, since that all seems > reasonable to me. But now I'm not so sure... > > I think that a good goal is to keep this file aligned with the > mingw-w64 version, if possible. > > If I'm understanding correctly, if we do that, this problem goes away, > but at the cost that fsqrtd and fsqrtl are potentially different > (although surely since it all boils down to a single instruction, > that's never going to happen > :) )? Right. Also, I expect whatever is done will need to be done with all the rest of the long double functions in winsup/cygwin/math also. I don't know if sqrt was intended as an exemplar before moving forward with the others, or if they really just had issues with this one.