summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Wasser <clemens.wasser@gmail.com>2022-05-31 09:35:09 +0200
committerTony Cook <tony@develop-help.com>2022-06-09 14:59:18 +1000
commit068732a96a3b9c9cbed2622259797b10ec5015ab (patch)
treeb22f1fec00de42cdf0fbf8fe60bb441909f63c6b
parentb69fafb32afb587af3e34d4e930c6d42f2866eaf (diff)
downloadperl-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--.mailmap1
-rw-r--r--AUTHORS1
-rw-r--r--win32/win32.h4
3 files changed, 4 insertions, 2 deletions
diff --git a/.mailmap b/.mailmap
index 22d5170b9c..39a9f2be76 100644
--- a/.mailmap
+++ b/.mailmap
@@ -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>
diff --git a/AUTHORS b/AUTHORS
index c1aabf957f..d90c4881bd 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -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. */