fix missing _rotl64 symbol on Visual C 2003
authorDaniel Dragan <bulk88@hotmail.com>
Thu, 9 Jan 2014 04:44:16 +0000 (23:44 -0500)
committerSteve Hay <steve.m.hay@googlemail.com>
Thu, 9 Jan 2014 21:37:17 +0000 (21:37 +0000)
Due to a bug in the CRT (msvcr71.dll), these 2 functions are not defined
in any lib Perl can use (static link CRTs dont apply, Perl only uses DLL
CRTs), but they are available as intrinsics. This solves a link error
about missing symbol __rotl64 in hv.obj, from usage in hv_func.h, on 32 bit
USE_64_BIT_INT VC 2003 builds. _rotr64 is included for completeness. This
fix is filed as [perl #120925].

win32/win32.h

index a521a41..3d1655a 100644 (file)
@@ -256,6 +256,11 @@ typedef unsigned short     mode_t;
 #define NAN_COMPARE_BROKEN 1
 #endif
 
+/* on VC2003, msvcrt.lib is missing these symbols */
+#if _MSC_VER >= 1300 && _MSC_VER < 1400
+#  pragma intrinsic(_rotl64,_rotr64)
+#endif
+
 #endif /* _MSC_VER */
 
 #ifdef __MINGW32__             /* Minimal Gnu-Win32 */