Subject: | Compilation failure using MS VC++.(List-MoreUtils-0.25_01) |
Dear Tassilo,
Unfortunately the compilation fails using MS VC++ 7.0.
Could you apply the attached patch?
Best regards,
Taro Nishino
Subject: | MoreUtils.xs.diff.txt |
--- MoreUtils.xs.orig Fri Jul 31 09:38:13 2009
+++ MoreUtils.xs Fri Jul 31 10:29:02 2009
@@ -155,7 +155,13 @@
#define FUNC_NAME GvNAME(GvEGV(ST(items)))
-inline static int
+#ifdef _MSC_VER
+# define INLINE
+#else
+# define INLINE inline
+#endif
+
+INLINE static int
in_pad (const char *name, SV *code) {
GV *gv;
@@ -1516,8 +1522,11 @@
CV *cv;
I32 gimme = GIMME; /* perl-5.5.4 bus-errors out later when using GIMME
therefore we save its value in a fresh variable */
-
- register long long i, j;
+#ifdef _MSC_VER
+ register __int64 i, j, k;
+#else
+ register long long i, j, k;
+#endif
int val = -1;
if (items > 1) {
@@ -1531,7 +1540,7 @@
i = 0;
j = items - 1;
do {
- long long k = ((double)(i + j)) / 2.0;
+ k = ((double)(i + j)) / 2.0;
if (k >= items-1)
break;