summaryrefslogtreecommitdiff
path: root/win32/win32.h
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2007-05-25 09:18:45 +0000
committerSteve Hay <SteveHay@planit.com>2007-05-25 09:18:45 +0000
commitd67249f4ee2e74bfb7d85025c937607c103c9c81 (patch)
treeb8c9467f4062b7019becbddad5b1eb54daf564fa /win32/win32.h
parent61f9802b72e0698621aaf73d88595b3d5d85df0a (diff)
downloadperl-d67249f4ee2e74bfb7d85025c937607c103c9c81.tar.gz
Fix the ext/IO/t/io_sock.t failure when built with VC++ 2005
Unknown to me win32/win32.h was defining USE_FIXED_OSFHANDLE, which arranged for a black magic fix to MSVCRT.DLL's _open_osfhandle() to be used. It seems that this is inappropriate for VC++ versions later than 6.x, since they don't use that DLL: simply not defining that symbol makes the io_sock.t failure go away. (Compare change #29233, which similarly disabled the fix to MSVCRT.DLL's read() for VC++ versions later than 6.x.) p4raw-link: @29233 on //depot/perl: 46e77f111828d72136c91f0837803182535da01d p4raw-id: //depot/perl@31271
Diffstat (limited to 'win32/win32.h')
-rw-r--r--win32/win32.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/win32/win32.h b/win32/win32.h
index d0e7d3d8dc..f6b5e3e559 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -127,8 +127,11 @@ struct utsname {
/* Define USE_FIXED_OSFHANDLE to fix MSVCRT's _open_osfhandle() on W95.
It now uses some black magic to work seamlessly with the DLL CRT and
works with MSVC++ 4.0+ or GCC/Mingw32
- -- BKS 1-24-2000 */
-#if (defined(_M_IX86) && _MSC_VER >= 1000) || defined(__MINGW32__)
+ -- BKS 1-24-2000
+ Only use this fix for VC++ 6.x or earlier (and for GCC, which we assume
+ uses MSVCRT.DLL). Later versions use MSVCR70.dll, MSVCR71.dll, etc, which
+ do not require the fix. */
+#if (defined(_M_IX86) && _MSC_VER >= 1000 && _MSC_VER <= 1200) || defined(__MINGW32__)
#define USE_FIXED_OSFHANDLE
#endif