mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Replace time_t with pg_time_t (same values, but always int64) in on-disk
data structures and backend internal APIs. This solves problems we've seen recently with inconsistent layout of pg_control between machines that have 32-bit time_t and those that have already migrated to 64-bit time_t. Also, we can get out from under the problem that Windows' Unix-API emulation is not consistent about the width of time_t. There are a few remaining places where local time_t variables are used to hold the current or recent result of time(NULL). I didn't bother changing these since they do not affect any cross-module APIs and surely all platforms will have 64-bit time_t before overflow becomes an actual risk. time_t should be avoided for anything visible to extension modules, however.
This commit is contained in:
@ -3,7 +3,7 @@ package Project;
|
||||
#
|
||||
# Package that encapsulates a Visual C++ project file generation
|
||||
#
|
||||
# $PostgreSQL: pgsql/src/tools/msvc/Project.pm,v 1.16 2008/02/05 14:17:23 mha Exp $
|
||||
# $PostgreSQL: pgsql/src/tools/msvc/Project.pm,v 1.17 2008/02/17 02:09:32 tgl Exp $
|
||||
#
|
||||
use Carp;
|
||||
use strict;
|
||||
@ -494,7 +494,7 @@ sub WriteConfiguration
|
||||
ConfigurationType="$cfgtype" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2" WholeProgramOptimization="$p->{wholeopt}">
|
||||
<Tool Name="VCCLCompilerTool" Optimization="$p->{opt}"
|
||||
AdditionalIncludeDirectories="$self->{prefixincludes}src/include;src/include/port/win32;src/include/port/win32_msvc;$self->{includes}"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;__WINDOWS__;__WIN32__;EXEC_BACKEND;WIN32_STACK_RLIMIT=4194304;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T$self->{defines}$p->{defs}"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;__WINDOWS__;__WIN32__;EXEC_BACKEND;WIN32_STACK_RLIMIT=4194304;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE$self->{defines}$p->{defs}"
|
||||
StringPooling="$p->{strpool}"
|
||||
RuntimeLibrary="$p->{runtime}" DisableSpecificWarnings="$self->{disablewarnings}"
|
||||
EOF
|
||||
|
Reference in New Issue
Block a user