From 8961ec415a480cac831348374bfebace980b0a81 Mon Sep 17 00:00:00 2001 From: Daniel Dragan Date: Wed, 8 Jan 2014 23:44:16 -0500 Subject: [PATCH] fix missing _rotl64 symbol on Visual C 2003 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/win32/win32.h b/win32/win32.h index a521a41..3d1655a 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -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 */ -- 2.7.4