diff options
author | Clemens Wasser <clemens.wasser@gmail.com> | 2022-05-31 09:35:09 +0200 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2022-06-09 14:59:18 +1000 |
commit | 068732a96a3b9c9cbed2622259797b10ec5015ab (patch) | |
tree | b22f1fec00de42cdf0fbf8fe60bb441909f63c6b | |
parent | b69fafb32afb587af3e34d4e930c6d42f2866eaf (diff) | |
download | perl-068732a96a3b9c9cbed2622259797b10ec5015ab.tar.gz |
Fix building with clang-cl
As mentioned in https://lists.llvm.org/pipermail/llvm-dev/2015-July/088122.html
and https://github.com/llvm/llvm-project/issues/24625 building with clang-cl currently fails due to the declaration of __PL_nan_u.
By declaring it like this, cl and clang-cl are happy to parse it.
-rw-r--r-- | .mailmap | 1 | ||||
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | win32/win32.h | 4 |
3 files changed, 4 insertions, 2 deletions
@@ -408,6 +408,7 @@ Claes Jacobsson <claes@surfar.nu> Claes Jacobsson <claes@surfar.nu> Claes Jacobsson <claes@surfar.nu> Claes Jakobsson <claes@surfar.nu> Claes Jacobsson <claes@surfar.nu> Claes Jakobsson <claes@versed.se> Claudio Ramirez <nxadm@cpan.org> Claudio Ramirez <nxadm@cpan.org> +Clemens Wasser <clemens.wasser@gmail.com> Clemens Wasser <clemens.wasser@gmail.com> Clinton A. Pierce <clintp@geeksalad.org> Clinton A. Pierce <clintp@geeksalad.org> Clinton A. Pierce <clintp@geeksalad.org> Clinton Pierce <cpierce1@ford.com> Clinton Gormley <unknown> Clinton Gormley <unknown> @@ -283,6 +283,7 @@ Chunhui Teng <cteng@nortel.ca> Claes Jacobsson <claes@surfar.nu> Clark Cooper <coopercc@netheaven.com> Claudio Ramirez <nxadm@cpan.org> +Clemens Wasser <clemens.wasser@gmail.com> Clinton A. Pierce <clintp@geeksalad.org> Clinton Gormley Colin Kuskie <ckuskie@cadence.com> diff --git a/win32/win32.h b/win32/win32.h index fea567f787..be88b540af 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -284,8 +284,8 @@ MSVC_DIAG_RESTORE importing __PL_nan_u across DLL boundaries in size in the importing DLL will be more than the 8 bytes it will take up being in each XS DLL if that DLL actually uses __PL_nan_u */ -extern const __declspec(selectany) union { unsigned __int64 __q; double __d; } -__PL_nan_u = { 0x7FF8000000000000UI64 }; +union PerlNan { unsigned __int64 __q; double __d; }; +extern const __declspec(selectany) union PerlNan __PL_nan_u = { 0x7FF8000000000000UI64 }; #define NV_NAN ((NV)__PL_nan_u.__d) /* The CRT was rewritten in VS2015. */ |