diff options
author | Jan Dubois <jand@activestate.com> | 2010-08-06 17:08:38 -0700 |
---|---|---|
committer | Jan Dubois <jand@activestate.com> | 2010-08-06 17:08:38 -0700 |
commit | 45f6403b40da58011eab17ad0159b353c7d92509 (patch) | |
tree | 7041a13502d197e5c2cd09d529c9c74d8d96f494 /win32 | |
parent | a18a68bd95c0722bf1f6b41e3867c270ecfd4ef1 (diff) | |
download | perl-45f6403b40da58011eab17ad0159b353c7d92509.tar.gz |
Define _USE_32BIT_TIME_T for VC6 and VC7
In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to
64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T
preprocessor option to revert back to the old functionality for
backward compatibility. We define this symbol here for older 32-bit
compilers only (which aren't using it at all) for the sole purpose
of getting it into $Config{ccflags}. That way if someone builds
Perl itself with e.g. VC6 but later installs an XS module using VC8
the time_t types will still be compatible.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/win32/Makefile b/win32/Makefile index 2f7c55ffe7..54def15820 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -452,6 +452,21 @@ OPTIMIZE = $(OPTIMIZE) -fp:precise DEFINES = $(DEFINES) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE !ENDIF +# In VS 2005 (VC++ 8.0) Microsoft changes time_t from 32-bit to +# 64-bit, even in 32-bit mode. It also provides the _USE_32BIT_TIME_T +# preprocessor option to revert back to the old functionality for +# backward compatibility. We define this symbol here for older 32-bit +# compilers only (which aren't using it at all) for the sole purpose +# of getting it into $Config{ccflags}. That way if someone builds +# Perl itself with e.g. VC6 but later installs an XS module using VC8 +# the time_t types will still be compatible. +!IF "$(WIN64)" == "undef" +! IF "$(CCTYPE)" == "MSVC60" || \ + "$(CCTYPE)" == "MSVC70" || "$(CCTYPE)" == "MSVC70FREE" +BUILDOPT = $(BUILDOPT) -D_USE_32BIT_TIME_T +! ENDIF +!ENDIF + # Use the MSVCRT read() fix only when using VC++ 6.x or earlier. Later # versions use MSVCR70.dll, MSVCR71.dll, etc, which do not require the # fix. |