VC++ 7.x onwards use their own MSVCR7x.dll, MSVCR8x.dll, etc, rather
than MSVCRT.dll, so they do not require the read() fix.
Therefore, we also don't need to update the ioinfo struct used by the
read() fix w.r.t. VC++ 8.x, so back out that part of change #29218
p4raw-link: @29218 on //depot/perl:
0448a0bdbfbd5e00696d6b3361b97fb1190434c1
p4raw-id: //depot/perl@29233
OPTIMIZE = $(OPTIMIZE) -Wp64 -fp:precise
!ENDIF
-# Use the MSVCRT read() fix if the PerlCRT was not chosen. This may be not
-# necessary with recent MSVCRT's, but we use the fix anyway in case this build
-# is going to be run on a system with an old MSVCRT.
-!IF "$(USE_PERLCRT)" != "define"
+# Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using
+# VC++ 6.x or earlier. Later versions use MSVCR70.dll, MSVCR71.dll, etc, which
+# do not require the fix.
+!IF "$(CCTYPE)" == "MSVC20" || "$(CCTYPE)" == "MSVC" || "$(CCTYPE)" == "MSVC60"
+! IF "$(USE_PERLCRT)" != "define"
BUILDOPT = $(BUILDOPT) -DPERL_MSVCRT_READFIX
+! ENDIF
!ENDIF
LIBBASEFILES = $(CRYPT_LIB) \
LIBOUT_FLAG =
# NOTE: we assume that GCC uses MSVCRT.DLL
-# See comments about PERL_MSVCRT_rEADFIX in the "cl" compiler section below.
+# See comments about PERL_MSVCRT_READFIX in the "cl" compiler section below.
BUILDOPT += -fno-strict-aliasing -DPERL_MSVCRT_READFIX
.ELSE
OPTIMIZE += -Wp64 -fp:precise
.ENDIF
-# Use the MSVCRT read() fix if the PerlCRT was not chosen. This may be not
-# necessary with recent MSVCRT's, but we use the fix anyway in case this build
-# is going to be run on a system with an old MSVCRT.
+# Use the MSVCRT read() fix if the PerlCRT was not chosen, but only when using
+# VC++ 6.x or earlier. Later versions use MSVCR70.dll, MSVCR71.dll, etc, which
+# do not require the fix.
+.IF "$(CCTYPE)" == "MSVC20" || "$(CCTYPE)" == "MSVC" || "$(CCTYPE)" == "MSVC60"
.IF "$(USE_PERLCRT)" != "define"
BUILDOPT += -DPERL_MSVCRT_READFIX
.ENDIF
+.ENDIF
LIBBASEFILES = $(CRYPT_LIB) \
oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib \
char pipech; /* one char buffer for handles opened on pipes */
int lockinitflag;
CRITICAL_SECTION lock;
-#if _MSC_VER >= 1400
-# ifndef _SAFECRT_IMPL
- /* Not used in the safecrt downlevel. We do not define them, so we cannot
- * use them accidentally */
- char textmode : 7;/* __IOINFO_TM_ANSI or __IOINFO_TM_UTF8 or __IOINFO_TM_UTF16LE */
- char unicode : 1; /* Was the file opened as unicode? */
- char pipech2[2]; /* 2 more peak ahead chars for UNICODE mode */
-# endif
-#endif
} ioinfo;