From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: automating pg_config.h.win32 maintenance
Date: Tue, 17 Dec 2019 11:56:17 +0100
Message-ID: <ebe2ccfe-ab5b-f7e2-242d-988daf594346@2ndquadrant.com> (raw)
In-Reply-To: <20191217063038.GM2344@paquier.xyz>
References: <1441b834-f434-e0bf-46ed-9c4d5c29c2d4@2ndquadrant.com>
<594b0e2a-6343-039a-1bac-a3ec7e74f2bf@iki.fi>
<20191213134416.GB103520@paquier.xyz>
<21839.1576245392@sss.pgh.pa.us>
<2ccaf97f-5bdc-cc9c-5441-706469642776@2ndquadrant.com>
<20191217063038.GM2344@paquier.xyz>
On 2019-12-17 07:30, Michael Paquier wrote:
> The patch looks pretty clean. I have a few minor comments.
>
> - if (/^AC_INIT\(\[PostgreSQL\], \[([^\]]+)\]/)
> + if (/^AC_INIT\(\[([^\]]+)\], \[([^\]]+)\], \[([^\]]+)\]/)
> {
> Why did you remove the bit about "PostgreSQL"?
Just to make it more general. If we're going to parse the arguments,
why not parse all of them the same way.
> + open(my $i, '<', "src/include/pg_config.h.in")
> + || confess "Could not open pg_config.h.in\n";
> + open(my $o, '>', "src/include/pg_config.h")
> + || confess "Could not write to pg_config.h\n";
> Failure to open pg_config.h.
>
> Wouldn't it be better to remove pg_config_ext.h.win32 as well?
Yeah, good idea. Attached patch is refactored so all three header files
managed by AC_CONFIG_HEADERS are processed the same way.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From b60719bd445fd63f0c42db8823f7d6cda89a6732 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Thu, 7 Nov 2019 15:56:22 +0100
Subject: [PATCH v3 1/2] Generate pg_config.h from pg_config.h.in on Windows
---
src/tools/msvc/Solution.pm | 544 +++++++++++++++++++++++++++++--------
1 file changed, 435 insertions(+), 109 deletions(-)
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pmindex ac626dfa53..0a40557f9e 100644--- a/src/tools/msvc/Solution.pm+++ b/src/tools/msvc/Solution.pm@@ -20,7 +20,6 @@ sub _new
projects => {},
options => $options,
numver => '',
- strver => '',
VisualStudioVersion => undef,
MinimumVisualStudioVersion => undef,
vcver => undef,
@@ -140,16 +139,22 @@ sub GenerateFiles
{
my $self = shift;
my $bits = $self->{platform} eq 'Win32' ? 32 : 64;
+ my $package_name;+ my $package_version;+ my $package_bugreport;
# Parse configure.in to get version numbers
open(my $c, '<', "configure.in")
|| confess("Could not open configure.in for reading\n");
while (<$c>)
{
- if (/^AC_INIT\(\[PostgreSQL\], \[([^\]]+)\]/)+ if (/^AC_INIT\(\[([^\]]+)\], \[([^\]]+)\], \[([^\]]+)\]/)
{
- $self->{strver} = $1;- if ($self->{strver} !~ /^(\d+)(?:\.(\d+))?/)+ $package_name = $1;+ $package_version = $2;+ $package_bugreport = $3;++ if ($package_version !~ /^(\d+)(?:\.(\d+))?/)
{
confess "Bad format of version: $self->{strver}\n";
}
@@ -159,7 +164,10 @@ sub GenerateFiles
}
close($c);
confess "Unable to parse configure.in for all variables!"
- if ($self->{strver} eq '' || $self->{numver} eq '');+ if ( $package_name eq ''+ || $package_version eq ''+ || $self->{numver} eq ''+ || $package_bugreport eq '');
if (IsNewer("src/include/pg_config_os.h", "src/include/port/win32.h"))
{
@@ -167,100 +175,371 @@ sub GenerateFiles
copyFile("src/include/port/win32.h", "src/include/pg_config_os.h");
}
- if (IsNewer("src/include/pg_config.h", "src/include/pg_config.h.win32"))+ print "Generating configuration headers...\n";+ my $extraver = $self->{options}->{extraver};+ $extraver = '' unless defined $extraver;+ my $port = $self->{options}->{"--with-pgport"} || 5432;++ # Every symbol in pg_config.h.in must be accounted for here. Set+ # to undef if the symbol should not be defined.+ my %define = (+ ACCEPT_TYPE_ARG1 => 'unsigned int',+ ACCEPT_TYPE_ARG2 => 'struct sockaddr *',+ ACCEPT_TYPE_ARG3 => 'int',+ ACCEPT_TYPE_RETURN => 'unsigned int PASCAL',+ ALIGNOF_DOUBLE => 8,+ ALIGNOF_INT => 4,+ ALIGNOF_LONG => 4,+ ALIGNOF_LONG_LONG_INT => 8,+ ALIGNOF_PG_INT128_TYPE => undef,+ ALIGNOF_SHORT => 2,+ AC_APPLE_UNIVERSAL_BUILD => undef,+ BLCKSZ => 1024 * $self->{options}->{blocksize},+ DEF_PGPORT => $port,+ DEF_PGPORT_STR => qq{"$port"},+ ENABLE_GSS => $self->{options}->{gss} ? 1 : undef,+ ENABLE_NLS => $self->{options}->{nls} ? 1 : undef,+ ENABLE_THREAD_SAFETY => 1,+ FLEXIBLE_ARRAY_MEMBER => '/**/',+ GETTIMEOFDAY_1ARG => undef,+ HAVE_APPEND_HISTORY => undef,+ HAVE_ASN1_STRING_GET0_DATA => undef,+ HAVE_ATOMICS => 1,+ HAVE_ATOMIC_H => undef,+ HAVE_BACKTRACE_SYMBOLS => undef,+ HAVE_BIO_GET_DATA => undef,+ HAVE_BIO_METH_NEW => undef,+ HAVE_CBRT => undef,+ HAVE_CLASS => undef,+ HAVE_CLOCK_GETTIME => undef,+ HAVE_COMPUTED_GOTO => undef,+ HAVE_COPYFILE => undef,+ HAVE_COPYFILE_H => undef,+ HAVE_CRTDEFS_H => undef,+ HAVE_CRYPTO_LOCK => undef,+ HAVE_DECL_FDATASYNC => 0,+ HAVE_DECL_F_FULLFSYNC => 0,+ HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER => undef,+ HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER => undef,+ HAVE_DECL_LLVMGETHOSTCPUNAME => 0,+ HAVE_DECL_LLVMGETHOSTCPUFEATURES => 0,+ HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN => 0,+ HAVE_DECL_POSIX_FADVISE => undef,+ HAVE_DECL_RTLD_GLOBAL => 0,+ HAVE_DECL_RTLD_NOW => 0,+ HAVE_DECL_STRLCAT => undef,+ HAVE_DECL_STRLCPY => undef,+ HAVE_DECL_STRNLEN => 1,+ HAVE_DECL_STRTOLL => 1,+ HAVE_DECL_STRTOULL => 1,+ HAVE_DLOPEN => undef,+ HAVE_EDITLINE_HISTORY_H => undef,+ HAVE_EDITLINE_READLINE_H => undef,+ HAVE_EXECINFO_H => undef,+ HAVE_EXPLICIT_BZERO => undef,+ HAVE_FDATASYNC => undef,+ HAVE_FLS => undef,+ HAVE_FPCLASS => undef,+ HAVE_FP_CLASS => undef,+ HAVE_FP_CLASS_D => undef,+ HAVE_FP_CLASS_H => undef,+ HAVE_FSEEKO => 1,+ HAVE_FUNCNAME__FUNC => undef,+ HAVE_FUNCNAME__FUNCTION => 1,+ HAVE_GCC__ATOMIC_INT32_CAS => undef,+ HAVE_GCC__ATOMIC_INT64_CAS => undef,+ HAVE_GCC__SYNC_CHAR_TAS => undef,+ HAVE_GCC__SYNC_INT32_CAS => undef,+ HAVE_GCC__SYNC_INT32_TAS => undef,+ HAVE_GCC__SYNC_INT64_CAS => undef,+ HAVE_GETADDRINFO => undef,+ HAVE_GETHOSTBYNAME_R => undef,+ HAVE_GETIFADDRS => undef,+ HAVE_GETOPT => undef,+ HAVE_GETOPT_H => undef,+ HAVE_GETOPT_LONG => undef,+ HAVE_GETPEEREID => undef,+ HAVE_GETPEERUCRED => undef,+ HAVE_GETPWUID_R => undef,+ HAVE_GETRLIMIT => undef,+ HAVE_GETRUSAGE => undef,+ HAVE_GETTIMEOFDAY => undef,+ HAVE_GSSAPI_GSSAPI_H => undef,+ HAVE_GSSAPI_H => undef,+ HAVE_HISTORY_H => undef,+ HAVE_HISTORY_TRUNCATE_FILE => undef,+ HAVE_IEEEFP_H => undef,+ HAVE_IFADDRS_H => undef,+ HAVE_INET_ATON => undef,+ HAVE_INT_TIMEZONE => 1,+ HAVE_INT64 => undef,+ HAVE_INT8 => undef,+ HAVE_INTPTR_T => undef,+ HAVE_INTTYPES_H => undef,+ HAVE_INT_OPTERR => undef,+ HAVE_INT_OPTRESET => undef,+ HAVE_IPV6 => 1,+ HAVE_ISINF => 1,+ HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P => undef,+ HAVE_LANGINFO_H => undef,+ HAVE_LDAP_H => undef,+ HAVE_LDAP_INITIALIZE => undef,+ HAVE_LIBCRYPTO => undef,+ HAVE_LIBLDAP => undef,+ HAVE_LIBLDAP_R => undef,+ HAVE_LIBM => undef,+ HAVE_LIBPAM => undef,+ HAVE_LIBREADLINE => undef,+ HAVE_LIBSELINUX => undef,+ HAVE_LIBSSL => undef,+ HAVE_LIBWLDAP32 => undef,+ HAVE_LIBXML2 => undef,+ HAVE_LIBXSLT => undef,+ HAVE_LIBZ => $self->{options}->{zlib} ? 1 : undef,+ HAVE_LOCALE_T => 1,+ HAVE_LONG_INT_64 => undef,+ HAVE_LONG_LONG_INT_64 => 1,+ HAVE_MBARRIER_H => undef,+ HAVE_MBSTOWCS_L => 1,+ HAVE_MEMMOVE => 1,+ HAVE_MEMORY_H => 1,+ HAVE_MEMSET_S => undef,+ HAVE_MINIDUMP_TYPE => 1,+ HAVE_MKDTEMP => undef,+ HAVE_NETINET_TCP_H => undef,+ HAVE_NET_IF_H => undef,+ HAVE_OPENSSL_INIT_SSL => undef,+ HAVE_OSSP_UUID_H => undef,+ HAVE_PAM_PAM_APPL_H => undef,+ HAVE_POLL => undef,+ HAVE_POLL_H => undef,+ HAVE_POSIX_FADVISE => undef,+ HAVE_POSIX_FALLOCATE => undef,+ HAVE_PPC_LWARX_MUTEX_HINT => undef,+ HAVE_PPOLL => undef,+ HAVE_PREAD => undef,+ HAVE_PSTAT => undef,+ HAVE_PS_STRINGS => undef,+ HAVE_PTHREAD => undef,+ HAVE_PTHREAD_IS_THREADED_NP => undef,+ HAVE_PTHREAD_PRIO_INHERIT => undef,+ HAVE_PWRITE => undef,+ HAVE_RANDOM => undef,+ HAVE_READLINE_H => undef,+ HAVE_READLINE_HISTORY_H => undef,+ HAVE_READLINE_READLINE_H => undef,+ HAVE_READLINK => undef,+ HAVE_RINT => 1,+ HAVE_RL_COMPLETION_APPEND_CHARACTER => undef,+ HAVE_RL_COMPLETION_MATCHES => undef,+ HAVE_RL_FILENAME_COMPLETION_FUNCTION => undef,+ HAVE_RL_RESET_SCREEN_SIZE => undef,+ HAVE_SECURITY_PAM_APPL_H => undef,+ HAVE_SETPROCTITLE => undef,+ HAVE_SETPROCTITLE_FAST => undef,+ HAVE_SETSID => undef,+ HAVE_SHM_OPEN => undef,+ HAVE_SPINLOCKS => 1,+ HAVE_SRANDOM => undef,+ HAVE_STDBOOL_H => 1,+ HAVE_STDINT_H => undef,+ HAVE_STDLIB_H => 1,+ HAVE_STRCHRNUL => undef,+ HAVE_STRERROR_R => undef,+ HAVE_STRINGS_H => undef,+ HAVE_STRING_H => 1,+ HAVE_STRLCAT => undef,+ HAVE_STRLCPY => undef,+ HAVE_STRNLEN => 1,+ HAVE_STRSIGNAL => undef,+ HAVE_STRTOF => 1,+ HAVE_STRTOLL => 1,+ HAVE_STRTOQ => undef,+ HAVE_STRTOULL => 1,+ HAVE_STRTOUQ => undef,+ HAVE_STRUCT_ADDRINFO => 1,+ HAVE_STRUCT_CMSGCRED => undef,+ HAVE_STRUCT_OPTION => undef,+ HAVE_STRUCT_SOCKADDR_SA_LEN => undef,+ HAVE_STRUCT_SOCKADDR_STORAGE => 1,+ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY => 1,+ HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN => undef,+ HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY => undef,+ HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN => undef,+ HAVE_STRUCT_TM_TM_ZONE => undef,+ HAVE_SYNC_FILE_RANGE => undef,+ HAVE_SYMLINK => 1,+ HAVE_SYSLOG => undef,+ HAVE_SYS_EPOLL_H => undef,+ HAVE_SYS_IPC_H => undef,+ HAVE_SYS_PRCTL_H => undef,+ HAVE_SYS_PROCCTL_H => undef,+ HAVE_SYS_PSTAT_H => undef,+ HAVE_SYS_RESOURCE_H => undef,+ HAVE_SYS_SELECT_H => undef,+ HAVE_SYS_SEM_H => undef,+ HAVE_SYS_SHM_H => undef,+ HAVE_SYS_SOCKIO_H => undef,+ HAVE_SYS_STAT_H => 1,+ HAVE_SYS_TAS_H => undef,+ HAVE_SYS_TYPES_H => 1,+ HAVE_SYS_UCRED_H => undef,+ HAVE_SYS_UN_H => undef,+ HAVE_TERMIOS_H => undef,+ HAVE_TYPEOF => undef,+ HAVE_UCRED_H => undef,+ HAVE_UINT64 => undef,+ HAVE_UINT8 => undef,+ HAVE_UINTPTR_T => undef,+ HAVE_UNION_SEMUN => undef,+ HAVE_UNISTD_H => 1,+ HAVE_UNIX_SOCKETS => undef,+ HAVE_UNSETENV => undef,+ HAVE_USELOCALE => undef,+ HAVE_UTIME => 1,+ HAVE_UTIMES => undef,+ HAVE_UTIME_H => 1,+ HAVE_UUID_BSD => undef,+ HAVE_UUID_E2FS => undef,+ HAVE_UUID_OSSP => undef,+ HAVE_UUID_H => undef,+ HAVE_UUID_UUID_H => undef,+ HAVE_WINLDAP_H => undef,+ HAVE_WCHAR_H => 1,+ HAVE_WCSTOMBS_L => 1,+ HAVE_WCTYPE_H => 1,+ HAVE_X509_GET_SIGNATURE_NID => 1,+ HAVE_X86_64_POPCNTQ => undef,+ HAVE__BOOL => undef,+ HAVE__BUILTIN_BSWAP16 => undef,+ HAVE__BUILTIN_BSWAP32 => undef,+ HAVE__BUILTIN_BSWAP64 => undef,+ HAVE__BUILTIN_CLZ => undef,+ HAVE__BUILTIN_CONSTANT_P => undef,+ HAVE__BUILTIN_CTZ => undef,+ HAVE__BUILTIN_OP_OVERFLOW => undef,+ HAVE__BUILTIN_POPCOUNT => undef,+ HAVE__BUILTIN_TYPES_COMPATIBLE_P => undef,+ HAVE__BUILTIN_UNREACHABLE => undef,+ HAVE__CONFIGTHREADLOCALE => 1,+ HAVE__CPUID => 1,+ HAVE__GET_CPUID => undef,+ HAVE__STATIC_ASSERT => undef,+ HAVE___STRTOLL => undef,+ HAVE___STRTOULL => undef,+ INT64_MODIFIER => qq{"ll"},+ LOCALE_T_IN_XLOCALE => undef,+ MAXIMUM_ALIGNOF => 8,+ MEMSET_LOOP_LIMIT => 1024,+ PACKAGE_BUGREPORT => qq{"$package_bugreport"},+ PACKAGE_NAME => qq{"$package_name"},+ PACKAGE_STRING => qq{"$package_name $package_version"},+ PACKAGE_TARNAME => lc qq{"$package_name"},+ PACKAGE_URL => undef,+ PACKAGE_VERSION => qq{"$package_version"},+ PG_INT128_TYPE => undef,+ PG_INT64_TYPE => 'long long int',+ PG_KRB_SRVNAM => qq{"postgres"},+ PG_MAJORVERSION => qq{"$self->{majorver}"},+ PG_PRINTF_ATTRIBUTE => undef,+ PG_USE_STDBOOL => 1,+ PG_VERSION => qq{"$package_version$extraver"},+ PG_VERSION_NUM => $self->{numver},+ PG_VERSION_STR =>+ qq{"PostgreSQL $package_version$extraver, compiled by Visual C++ build " CppAsString2(_MSC_VER) ", $bits-bit"},+ PROFILE_PID_DIR => undef,+ PTHREAD_CREATE_JOINABLE => undef,+ RELSEG_SIZE => (1024 / $self->{options}->{blocksize}) *+ $self->{options}->{segsize} * 1024,+ SIZEOF_BOOL => 1,+ SIZEOF_LONG => 4,+ SIZEOF_OFF_T => undef,+ SIZEOF_SIZE_T => $bits / 8,+ SIZEOF_VOID_P => $bits / 8,+ STDC_HEADERS => 1,+ STRERROR_R_INT => undef,+ USE_ARMV8_CRC32C => undef,+ USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK => undef,+ USE_ASSERT_CHECKING => $self->{options}->{asserts} ? 1 : undef,+ USE_BONJOUR => undef,+ USE_BSD_AUTH => undef,+ USE_DEV_URANDOM => undef,+ USE_ICU => $self->{options}->{icu} ? 1 : undef,+ USE_LIBXML => undef,+ USE_LIBXSLT => undef,+ USE_LDAP => $self->{options}->{ldap} ? 1 : undef,+ USE_LLVM => undef,+ USE_NAMED_POSIX_SEMAPHORES => undef,+ USE_OPENSSL => undef,+ USE_OPENSSL_RANDOM => undef,+ USE_PAM => undef,+ USE_SLICING_BY_8_CRC32C => undef,+ USE_SSE42_CRC32C => undef,+ USE_SSE42_CRC32C_WITH_RUNTIME_CHECK => 1,+ USE_SYSTEMD => undef,+ USE_SYSV_SEMAPHORES => undef,+ USE_SYSV_SHARED_MEMORY => undef,+ USE_UNNAMED_POSIX_SEMAPHORES => undef,+ USE_WIN32_RANDOM => 1,+ USE_WIN32_SEMAPHORES => 1,+ USE_WIN32_SHARED_MEMORY => 1,+ WCSTOMBS_L_IN_XLOCALE => undef,+ WORDS_BIGENDIAN => undef,+ XLOG_BLCKSZ => 1024 * $self->{options}->{wal_blocksize},+ _FILE_OFFSET_BITS => undef,+ _LARGEFILE_SOURCE => undef,+ _LARGE_FILES => undef,+ inline => '__inline',+ intptr_t => undef,+ pg_restrict => '__restrict',+ # not defined, because it'd conflict with __declspec(restrict)+ restrict => undef,+ signed => undef,+ typeof => undef,+ uintptr_t => undef,);++ if ($self->{options}->{uuid})
{
- print "Generating pg_config.h...\n";- open(my $i, '<', "src/include/pg_config.h.win32")- || confess "Could not open pg_config.h.win32\n";- open(my $o, '>', "src/include/pg_config.h")- || confess "Could not write to pg_config.h\n";- my $extraver = $self->{options}->{extraver};- $extraver = '' unless defined $extraver;- while (<$i>)- {- s{PG_VERSION "[^"]+"}{PG_VERSION "$self->{strver}$extraver"};- s{PG_VERSION_NUM \d+}{PG_VERSION_NUM $self->{numver}};- s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, compiled by Visual C++ build " CppAsString2(_MSC_VER) ", $bits-bit"};- print $o $_;- }- print $o "#define PG_MAJORVERSION \"$self->{majorver}\"\n";- print $o "/* defines added by config steps */\n";- print $o "#ifndef IGNORE_CONFIGURED_SETTINGS\n";- print $o "#define USE_ASSERT_CHECKING 1\n"- if ($self->{options}->{asserts});- print $o "#define USE_LDAP 1\n" if ($self->{options}->{ldap});- print $o "#define HAVE_LIBZ 1\n" if ($self->{options}->{zlib});- print $o "#define ENABLE_NLS 1\n" if ($self->{options}->{nls});-- print $o "#define BLCKSZ ", 1024 * $self->{options}->{blocksize},- "\n";- print $o "#define RELSEG_SIZE ",- (1024 / $self->{options}->{blocksize}) *- $self->{options}->{segsize} * 1024, "\n";- print $o "#define XLOG_BLCKSZ ",- 1024 * $self->{options}->{wal_blocksize}, "\n";-- if ($self->{options}->{uuid})- {- print $o "#define HAVE_UUID_OSSP\n";- print $o "#define HAVE_UUID_H\n";- }- if ($self->{options}->{xml})- {- print $o "#define HAVE_LIBXML2\n";- print $o "#define USE_LIBXML\n";- }- if ($self->{options}->{xslt})- {- print $o "#define HAVE_LIBXSLT\n";- print $o "#define USE_LIBXSLT\n";- }- if ($self->{options}->{gss})- {- print $o "#define ENABLE_GSS 1\n";- }- if ($self->{options}->{openssl})- {- print $o "#define USE_OPENSSL 1\n";+ $define{HAVE_UUID_OSSP} = 1;+ $define{HAVE_UUID_H} = 1;+ }+ if ($self->{options}->{xml})+ {+ $define{HAVE_LIBXML2} = 1;+ $define{USE_LIBXML} = 1;+ }+ if ($self->{options}->{xslt})+ {+ $define{HAVE_LIBXSLT} = 1;+ $define{USE_LIBXSLT} = 1;+ }+ if ($self->{options}->{openssl})+ {+ $define{USE_OPENSSL} = 1;- my ($digit1, $digit2, $digit3) = $self->GetOpenSSLVersion();+ my ($digit1, $digit2, $digit3) = $self->GetOpenSSLVersion();- # More symbols are needed with OpenSSL 1.1.0 and above.- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')- {- print $o "#define HAVE_ASN1_STRING_GET0_DATA 1\n";- print $o "#define HAVE_BIO_GET_DATA 1\n";- print $o "#define HAVE_BIO_METH_NEW 1\n";- print $o "#define HAVE_OPENSSL_INIT_SSL 1\n";- }- }- if ($self->{options}->{icu})- {- print $o "#define USE_ICU 1\n";- }- if (my $port = $self->{options}->{"--with-pgport"})+ # More symbols are needed with OpenSSL 1.1.0 and above.+ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
{
- print $o "#undef DEF_PGPORT\n";- print $o "#undef DEF_PGPORT_STR\n";- print $o "#define DEF_PGPORT $port\n";- print $o "#define DEF_PGPORT_STR \"$port\"\n";+ $define{HAVE_ASN1_STRING_GET0_DATA} = 1;+ $define{HAVE_BIO_GET_DATA} = 1;+ $define{HAVE_BIO_METH_NEW} = 1;+ $define{HAVE_OPENSSL_INIT_SSL} = 1;
}
- print $o "#define VAL_CONFIGURE \""- . $self->GetFakeConfigure() . "\"\n";- print $o "#endif /* IGNORE_CONFIGURED_SETTINGS */\n";- close($o);- close($i);
}
- if (IsNewer(- "src/include/pg_config_ext.h",- "src/include/pg_config_ext.h.win32"))- {- print "Copying pg_config_ext.h...\n";- copyFile(- "src/include/pg_config_ext.h.win32",- "src/include/pg_config_ext.h");- }+ $self->GenerateConfigHeader('src/include/pg_config.h', \%define, 1);+ $self->GenerateConfigHeader('src/include/pg_config_ext.h', \%define, 0);+ $self->GenerateConfigHeader('src/interfaces/ecpg/include/ecpg_config.h', \%define, 0);++ # XXX+ open(my $f, '>>', 'src/include/pg_config.h')+ || confess "Could not write to src/include/pg_config.h\n";+ print $f "\n";+ print $f "#define VAL_CONFIGURE \""+ . $self->GetFakeConfigure() . "\"\n";+ close($f);
$self->GenerateDefFile(
"src/interfaces/libpq/libpqdll.def",
@@ -475,22 +754,6 @@ sub GenerateFiles
chdir('../../../..');
}
- if (IsNewer(- 'src/interfaces/ecpg/include/ecpg_config.h',- 'src/interfaces/ecpg/include/ecpg_config.h.in'))- {- print "Generating ecpg_config.h...\n";- open(my $o, '>', 'src/interfaces/ecpg/include/ecpg_config.h')- || confess "Could not open ecpg_config.h";- print $o <<EOF;-#define HAVE_LONG_LONG_INT 1-#define HAVE_LONG_LONG_INT_64 1-#define PG_USE_STDBOOL 1-#define ENABLE_THREAD_SAFETY 1-EOF- close($o);- }-
unless (-f "src/port/pg_config_paths.h")
{
print "Generating pg_config_paths.h...\n";
@@ -581,13 +844,76 @@ EOF
open(my $o, '>', "doc/src/sgml/version.sgml")
|| croak "Could not write to version.sgml\n";
print $o <<EOF;
-<!ENTITY version "$self->{strver}">+<!ENTITY version "$package_version">
<!ENTITY majorversion "$self->{majorver}">
EOF
close($o);
return;
}
+# Read lines from input file and substitute symbols using the same+# logic that config.status uses. There should be one call of this for+# each AC_CONFIG_HEADERS call in configure.in.+#+# If the "required" argument is true, we also keep track which of our+# defines have been found and error out if any are left unused at the+# end. That way we avoid accumulating defines in this file that are+# no longer used by configure.+sub GenerateConfigHeader+{+ my ($self, $config_header, $defines, $required) = @_;+ my %defines_copy = %$defines;++ my $config_header_in = $config_header . '.in';++ if (IsNewer($config_header, $config_header_in) ||+ IsNewer($config_header, __FILE__))+ {+ open(my $i, '<', $config_header_in)+ || confess "Could not open $config_header_in\n";+ open(my $o, '>', $config_header)+ || confess "Could not write to $config_header\n";++ print $o+ "/* $config_header. Generated from $config_header_in by src/tools/msvc/Solution.pm. */\n";++ while (<$i>)+ {+ if (m/^#(\s*)undef\s+(\w+)/)+ {+ my $ws = $1;+ my $macro = $2;+ if (exists $defines->{$macro})+ {+ if (defined $defines->{$macro})+ {+ print $o "#${ws}define $macro ", $defines->{$macro}, "\n";+ }+ else+ {+ print $o "/* #${ws}undef $macro */\n";+ }+ delete $defines_copy{$macro};+ }+ else+ {+ croak "undefined symbol: $macro at $config_header line $.";+ }+ }+ else+ {+ print $o $_;+ }+ }+ close($o);+ close($i);+ }+ if ($required && scalar(keys %defines_copy) > 0)+ {+ croak "unused defines: " . join(' ', keys %defines_copy);+ }+}+
sub GenerateDefFile
{
my ($self, $deffile, $txtfile, $libname) = @_;
--
2.24.1
From 5472bdde3fbda526e3d9ecbadb6627a29066031a Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Thu, 7 Nov 2019 15:59:59 +0100
Subject: [PATCH v3 2/2] Remove pg_config.h.win32
---
src/include/pg_config.h.win32 | 736 ------------------------------
src/include/pg_config_ext.h.win32 | 7 -
src/tools/version_stamp.pl | 7 -
3 files changed, 750 deletions(-)
delete mode 100644 src/include/pg_config.h.win32
delete mode 100644 src/include/pg_config_ext.h.win32
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32deleted file mode 100644index 808f5abcdb..0000000000--- a/src/include/pg_config.h.win32+++ /dev/null@@ -1,736 +0,0 @@-/* src/include/pg_config.h. Generated by configure. */-/* src/include/pg_config.h.in. Generated from configure.in by autoheader. */--/* This file is generated from MingW ./configure, and with the following- * changes to be valid for Visual C++ (and compatible):- *- * HAVE_CBRT, HAVE_FUNCNAME_FUNC, HAVE_GETOPT, HAVE_GETOPT_H, HAVE_INTTYPES_H,- * HAVE_GETOPT_LONG, HAVE_LOCALE_T, HAVE_RINT, HAVE_STRINGS_H, HAVE_STRTOLL,- * HAVE_STRTOULL, HAVE_STRUCT_OPTION, ENABLE_THREAD_SAFETY,- * inline, USE_SSE42_CRC32C_WITH_RUNTIME_CHECK- */--/* Define to the type of arg 1 of 'accept' */-#define ACCEPT_TYPE_ARG1 unsigned int--/* Define to the type of arg 2 of 'accept' */-#define ACCEPT_TYPE_ARG2 struct sockaddr *--/* Define to the type of arg 3 of 'accept' */-#define ACCEPT_TYPE_ARG3 int--/* Define to the return type of 'accept' */-#define ACCEPT_TYPE_RETURN unsigned int PASCAL--/* The normal alignment of `double', in bytes. */-#define ALIGNOF_DOUBLE 8--/* The normal alignment of `int', in bytes. */-#define ALIGNOF_INT 4--/* The normal alignment of `long', in bytes. */-#define ALIGNOF_LONG 4--/* The normal alignment of `long long int', in bytes. */-#define ALIGNOF_LONG_LONG_INT 8--/* The normal alignment of `PG_INT128_TYPE', in bytes. */-#undef ALIGNOF_PG_INT128_TYPE--/* The normal alignment of `short', in bytes. */-#define ALIGNOF_SHORT 2--/* Define to the default TCP port number on which the server listens and to- which clients will try to connect. This can be overridden at run-time, but- it's convenient if your clients have the right default compiled in.- (--with-pgport=PORTNUM) */-#define DEF_PGPORT 5432--/* Define to the default TCP port number as a string constant. */-#define DEF_PGPORT_STR "5432"--/* Define to 1 if you want National Language Support. (--enable-nls) */-/* #undef ENABLE_NLS */--/* Define to 1 to build client libraries as thread-safe code.- (--enable-thread-safety) */-#define ENABLE_THREAD_SAFETY 1--/* Define to nothing if C supports flexible array members, and to 1 if it does- not. That way, with a declaration like `struct s { int n; double- d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99- compilers. When computing the size of such an object, don't use 'sizeof- (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'- instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with- MSVC and with C++ compilers. */-#define FLEXIBLE_ARRAY_MEMBER--/* Define to 1 if gettimeofday() takes only 1 argument. */-/* #undef GETTIMEOFDAY_1ARG */--#ifdef GETTIMEOFDAY_1ARG-# define gettimeofday(a,b) gettimeofday(a)-#endif--/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */-/* #undef HAVE_ASN1_STRING_GET0_DATA */--/* Define to 1 if you want to use atomics if available. */-#define HAVE_ATOMICS 1--/* Define to 1 if you have the `BIO_get_data' function. */-/* #undef HAVE_BIO_GET_DATA */--/* Define to 1 if you have the `BIO_meth_new' function. */-/* #undef HAVE_BIO_METH_NEW */--/* Define to 1 if you have the `cbrt' function. */-//#define HAVE_CBRT 1--/* Define to 1 if you have the `class' function. */-/* #undef HAVE_CLASS */--/* Define to 1 if you have the `clock_gettime' function. */-/* #undef HAVE_CLOCK_GETTIME */--/* Define to 1 if your compiler handles computed gotos. */-/* #undef HAVE_COMPUTED_GOTO */--/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you- don't. */-#define HAVE_DECL_FDATASYNC 0--/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you- don't. */-#define HAVE_DECL_F_FULLFSYNC 0--/* Define to 1 if you have the declaration of- `LLVMCreateGDBRegistrationListener', and to 0 if you don't. */-#undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER--/* Define to 1 if you have the declaration of- `LLVMCreatePerfJITEventListener', and to 0 if you don't. */-#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER--/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to- 0 if you don't. */-#define HAVE_DECL_LLVMGETHOSTCPUFEATURES 0--/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0- if you don't. */-#define HAVE_DECL_LLVMGETHOSTCPUNAME 0--/* Define to 1 if you have the declaration of `LLVMOrcGetSymbolAddressIn', and- to 0 if you don't. */-#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN 0--/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you- don't. */-#define HAVE_DECL_RTLD_GLOBAL 0--/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you- don't. */-#define HAVE_DECL_RTLD_NOW 0--/* Define to 1 if you have the declaration of `strnlen', and to 0 if you- don't. */-#define HAVE_DECL_STRNLEN 1--/* Define to 1 if you have the declaration of `strtoll', and to 0 if you- don't. */-#define HAVE_DECL_STRTOLL 1--/* Define to 1 if you have the declaration of `strtoull', and to 0 if you- don't. */-#define HAVE_DECL_STRTOULL 1--/* Define to 1 if you have the `dlopen' function. */-/* #undef HAVE_DLOPEN */--/* Define to 1 if you have the <editline/history.h> header file. */-/* #undef HAVE_EDITLINE_HISTORY_H */--/* Define to 1 if you have the <editline/readline.h> header file. */-/* #undef HAVE_EDITLINE_READLINE_H */--/* Define to 1 if you have the `explicit_bzero' function. */-/* #undef HAVE_EXPLICIT_BZERO */--/* Define to 1 if you have the `fdatasync' function. */-/* #undef HAVE_FDATASYNC */--/* Define to 1 if you have the `fpclass' function. */-/* #undef HAVE_FPCLASS */--/* Define to 1 if you have the `fp_class' function. */-/* #undef HAVE_FP_CLASS */--/* Define to 1 if you have the `fp_class_d' function. */-/* #undef HAVE_FP_CLASS_D */--/* Define to 1 if you have the <fp_class.h> header file. */-/* #undef HAVE_FP_CLASS_H */--/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */-#define HAVE_FSEEKO 1--/* Define to 1 if your compiler understands __func__. */-//#define HAVE_FUNCNAME__FUNC 1--/* Define to 1 if your compiler understands __FUNCTION__. */-#define HAVE_FUNCNAME__FUNCTION 1--/* Define to 1 if you have the `getaddrinfo' function. */-/* #undef HAVE_GETADDRINFO */--/* Define to 1 if you have the `gethostbyname_r' function. */-/* #undef HAVE_GETHOSTBYNAME_R */--/* Define to 1 if you have the `getopt' function. */-//#define HAVE_GETOPT 1--/* Define to 1 if you have the <getopt.h> header file. */-//#define HAVE_GETOPT_H 1--/* Define to 1 if you have the `getopt_long' function. */-//#define HAVE_GETOPT_LONG 1--/* Define to 1 if you have the `getpeereid' function. */-/* #undef HAVE_GETPEEREID */--/* Define to 1 if you have the `getpwuid_r' function. */-/* #undef HAVE_GETPWUID_R */--/* Define to 1 if you have the `getrusage' function. */-/* #undef HAVE_GETRUSAGE */--/* Define to 1 if you have the <history.h> header file. */-/* #undef HAVE_HISTORY_H */--/* Define to 1 if you have the <ieeefp.h> header file. */-/* #undef HAVE_IEEEFP_H */--/* Define to 1 if you have the `inet_aton' function. */-/* #undef HAVE_INET_ATON */--/* Define to 1 if the system has the type `int64'. */-/* #undef HAVE_INT64 */--/* Define to 1 if the system has the type `int8'. */-/* #undef HAVE_INT8 */--/* Define to 1 if you have the <inttypes.h> header file. */-//#define HAVE_INTTYPES_H 1--/* Define to 1 if you have the global variable 'int timezone'. */-#define HAVE_INT_TIMEZONE 1--/* Define to 1 if you have support for IPv6. */-#define HAVE_IPV6 1--/* Define to 1 if you have isinf(). */-#define HAVE_ISINF 1--/* Define to 1 if you have the <langinfo.h> header file. */-/* #undef HAVE_LANGINFO_H */--/* Define to 1 if you have the <ldap.h> header file. */-/* #undef HAVE_LDAP_H */--/* Define to 1 if you have the `ldap_initialize' function. */-/* #undef HAVE_LDAP_INITIALIZE */--/* Define to 1 if you have the `crypto' library (-lcrypto). */-/* #undef HAVE_LIBCRYPTO */--/* Define to 1 if you have the `ldap' library (-lldap). */-/* #undef HAVE_LIBLDAP */--/* Define to 1 if you have the `pam' library (-lpam). */-/* #undef HAVE_LIBPAM */--/* Define if you have a function readline library */-/* #undef HAVE_LIBREADLINE */--/* Define to 1 if you have the `ssl' library (-lssl). */-/* #undef HAVE_LIBSSL */--/* Define to 1 if you have the `wldap32' library (-lwldap32). */-/* #undef HAVE_LIBWLDAP32 */--/* Define to 1 if you have the `z' library (-lz). */-/* #undef HAVE_LIBZ */--/* Define to 1 if the system has the type `locale_t'. */-#define HAVE_LOCALE_T 1--/* Define to 1 if `long int' works and is 64 bits. */-/* #undef HAVE_LONG_INT_64 */--/* Define to 1 if `long long int' works and is 64 bits. */-#define HAVE_LONG_LONG_INT_64 1--/* Define to 1 if you have the `mbstowcs_l' function. */-#define HAVE_MBSTOWCS_L 1--/* Define to 1 if you have the `memmove' function. */-#define HAVE_MEMMOVE 1--/* Define to 1 if you have the <memory.h> header file. */-#define HAVE_MEMORY_H 1--/* Define to 1 if you have the `memset_s' function. */-/* #undef HAVE_MEMSET_S */--/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */-#define HAVE_MINIDUMP_TYPE 1--/* Define to 1 if you have the `mkdtemp' function. */-/* #undef HAVE_MKDTEMP */--/* Define to 1 if you have the <netinet/tcp.h> header file. */-/* #undef HAVE_NETINET_TCP_H */--/* Define to 1 if you have the `OPENSSL_init_ssl' function. */-/* #undef HAVE_OPENSSL_INIT_SSL */--/* Define to 1 if you have the <pam/pam_appl.h> header file. */-/* #undef HAVE_PAM_PAM_APPL_H */--/* Define to 1 if you have the `poll' function. */-/* #undef HAVE_POLL */--/* Define to 1 if you have the <poll.h> header file. */-/* #undef HAVE_POLL_H */--/* Define to 1 if you have the `posix_fallocate' function. */-/* #undef HAVE_POSIX_FALLOCATE */--/* Define to 1 if you have the `ppoll' function. */-/* #undef HAVE_PPOLL */--/* Define to 1 if you have the `pread' function. */-/* #undef HAVE_PREAD */--/* Define to 1 if you have the `pstat' function. */-/* #undef HAVE_PSTAT */--/* Define to 1 if the PS_STRINGS thing exists. */-/* #undef HAVE_PS_STRINGS */--/* Define to 1 if you have the `pwrite' function. */-/* #undef HAVE_PWRITE */--/* Define to 1 if you have the `random' function. */-/* #undef HAVE_RANDOM */--/* Define to 1 if you have the <readline.h> header file. */-/* #undef HAVE_READLINE_H */--/* Define to 1 if you have the <readline/history.h> header file. */-/* #undef HAVE_READLINE_HISTORY_H */--/* Define to 1 if you have the <readline/readline.h> header file. */-/* #undef HAVE_READLINE_READLINE_H */--/* Define to 1 if you have the `readlink' function. */-/* #undef HAVE_READLINK */--/* Define to 1 if you have the `rint' function. */-#define HAVE_RINT 1--/* Define to 1 if you have the global variable- 'rl_completion_append_character'. */-/* #undef HAVE_RL_COMPLETION_APPEND_CHARACTER */--/* Define to 1 if you have the `rl_completion_matches' function. */-/* #undef HAVE_RL_COMPLETION_MATCHES */--/* Define to 1 if you have the `rl_filename_completion_function' function. */-/* #undef HAVE_RL_FILENAME_COMPLETION_FUNCTION */--/* Define to 1 if you have the <security/pam_appl.h> header file. */-/* #undef HAVE_SECURITY_PAM_APPL_H */--/* Define to 1 if you have the `setproctitle' function. */-/* #undef HAVE_SETPROCTITLE */--/* Define to 1 if you have the `setsid' function. */-/* #undef HAVE_SETSID */--/* Define to 1 if you have spinlocks. */-#define HAVE_SPINLOCKS 1--/* Define to 1 if you have the `srandom' function. */-/* #undef HAVE_SRANDOM */--/* Define to 1 if stdbool.h conforms to C99. */-#define HAVE_STDBOOL_H 1--/* Define to 1 if you have the <stdint.h> header file. */-/* #undef HAVE_STDINT_H */--/* Define to 1 if you have the <stdlib.h> header file. */-#define HAVE_STDLIB_H 1--/* Define to 1 if you have the `strchrnul' function. */-/* #undef HAVE_STRCHRNUL */--/* Define to 1 if you have the `strerror_r' function. */-/* #undef HAVE_STRERROR_R */--/* Define to 1 if you have the <strings.h> header file. */-/*#define HAVE_STRINGS_H 1 */--/* Define to 1 if you have the <string.h> header file. */-#define HAVE_STRING_H 1--/* Define to 1 if you have the `strnlen' function. */-#define HAVE_STRNLEN 1--/* Define to 1 if you have the `strsignal' function. */-/* #undef HAVE_STRSIGNAL */--/* Define to 1 if you have the `strtof' function. */-#define HAVE_STRTOF 1--/* Define to 1 if you have the `strtoll' function. */-#ifdef HAVE_LONG_LONG_INT_64-#define HAVE_STRTOLL 1-#endif--/* Define to 1 if you have the `strtoull' function. */-#ifdef HAVE_LONG_LONG_INT_64-#define HAVE_STRTOULL 1-#endif--/* Define to 1 if the system has the type `struct addrinfo'. */-#define HAVE_STRUCT_ADDRINFO 1--/* Define to 1 if the system has the type `struct cmsgcred'. */-/* #undef HAVE_STRUCT_CMSGCRED */--/* Define to 1 if the system has the type `struct option'. */-//#define HAVE_STRUCT_OPTION 1--/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */-/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */--/* Define to 1 if the system has the type `struct sockaddr_storage'. */-#define HAVE_STRUCT_SOCKADDR_STORAGE 1--/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */-#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1--/* Define to 1 if `ss_len' is a member of `struct sockaddr_storage'. */-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */--/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */--/* Define to 1 if `__ss_len' is a member of `struct sockaddr_storage'. */-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */--/* Define to 1 if `tm_zone' is a member of `struct tm'. */-/* #undef HAVE_STRUCT_TM_TM_ZONE */--/* Define to 1 if you have the `symlink' function. */-#define HAVE_SYMLINK 1--/* Define to 1 if you have the `sync_file_range' function. */-/* #undef HAVE_SYNC_FILE_RANGE */--/* Define to 1 if you have the syslog interface. */-/* #undef HAVE_SYSLOG */--/* Define to 1 if you have the <sys/ipc.h> header file. */-/* #undef HAVE_SYS_IPC_H */--/* Define to 1 if you have the <sys/prctl.h> header file. */-/* #undef HAVE_SYS_PRCTL_H */--/* Define to 1 if you have the <sys/pstat.h> header file. */-/* #undef HAVE_SYS_PSTAT_H */--/* Define to 1 if you have the <sys/select.h> header file. */-/* #undef HAVE_SYS_SELECT_H */--/* Define to 1 if you have the <sys/sem.h> header file. */-/* #undef HAVE_SYS_SEM_H */--/* Define to 1 if you have the <sys/shm.h> header file. */-/* #undef HAVE_SYS_SHM_H */--/* Define to 1 if you have the <sys/stat.h> header file. */-#define HAVE_SYS_STAT_H 1--/* Define to 1 if you have the <sys/types.h> header file. */-#define HAVE_SYS_TYPES_H 1--/* Define to 1 if you have the <sys/ucred.h> header file. */-/* #undef HAVE_SYS_UCRED_H */--/* Define to 1 if you have the <sys/un.h> header file. */-/* #undef HAVE_SYS_UN_H */--/* Define to 1 if you have the <termios.h> header file. */-/* #undef HAVE_TERMIOS_H */--/* Define to 1 if your compiler understands `typeof' or something similar. */-/* #undef HAVE_TYPEOF */--/* Define to 1 if the system has the type `uint64'. */-/* #undef HAVE_UINT64 */--/* Define to 1 if the system has the type `uint8'. */-/* #undef HAVE_UINT8 */--/* Define to 1 if the system has the type `union semun'. */-/* #undef HAVE_UNION_SEMUN */--/* Define to 1 if you have the <unistd.h> header file. */-#define HAVE_UNISTD_H 1--/* Define to 1 if you have unix sockets. */-/* #undef HAVE_UNIX_SOCKETS */--/* Define to 1 if you have the `unsetenv' function. */-/* #undef HAVE_UNSETENV */--/* Define to 1 if you have the `uselocale' function. */-/* #undef HAVE_USELOCALE */--/* Define to 1 if you have the `utime' function. */-#define HAVE_UTIME 1--/* Define to 1 if you have the `utimes' function. */-/* #undef HAVE_UTIMES */--/* Define to 1 if you have the <utime.h> header file. */-#define HAVE_UTIME_H 1--/* Define to 1 if you have the <wchar.h> header file. */-#define HAVE_WCHAR_H 1--/* Define to 1 if you have the `wcstombs_l' function. */-#define HAVE_WCSTOMBS_L 1--/* Define to 1 if you have the <wctype.h> header file. */-#define HAVE_WCTYPE_H 1--/* Define to 1 if you have the <winldap.h> header file. */-/* #undef HAVE_WINLDAP_H */--/* Define to 1 if you have the `X509_get_signature_nid' function. */-#define HAVE_X509_GET_SIGNATURE_NID 1--/* Define to 1 if the assembler supports X86_64's POPCNTQ instruction. */-/* #undef HAVE_X86_64_POPCNTQ */--/* Define to 1 if the system has the type `_Bool'. */-/* #undef HAVE__BOOL */--/* Define to 1 if your compiler understands __builtin_bswap16. */-/* #undef HAVE__BUILTIN_BSWAP16 */--/* Define to 1 if your compiler understands __builtin_bswap32. */-/* #undef HAVE__BUILTIN_BSWAP32 */--/* Define to 1 if your compiler understands __builtin_bswap64. */-/* #undef HAVE__BUILTIN_BSWAP64 */--/* Define to 1 if your compiler understands __builtin_clz. */-/* #undef HAVE__BUILTIN_CLZ */--/* Define to 1 if your compiler understands __builtin_constant_p. */-/* #undef HAVE__BUILTIN_CONSTANT_P */--/* Define to 1 if your compiler understands __builtin_ctz. */-/* #undef HAVE__BUILTIN_CTZ */--/* Define to 1 if your compiler understands __builtin_$op_overflow. */-/* #undef HAVE__BUILTIN_OP_OVERFLOW */--/* Define to 1 if your compiler understands __builtin_popcount. */-/* #undef HAVE__BUILTIN_POPCOUNT */--/* Define to 1 if your compiler understands __builtin_types_compatible_p. */-/* #undef HAVE__BUILTIN_TYPES_COMPATIBLE_P */--/* Define to 1 if your compiler understands __builtin_unreachable. */-/* #undef HAVE__BUILTIN_UNREACHABLE */--/* Define to 1 if you have the `_configthreadlocale' function. */-#define HAVE__CONFIGTHREADLOCALE 1--/* Define to 1 if you have __cpuid. */-#define HAVE__CPUID 1--/* Define to 1 if you have __get_cpuid. */-#undef HAVE__GET_CPUID--/* Define to 1 if your compiler understands _Static_assert. */-/* #undef HAVE__STATIC_ASSERT */--/* Define to the appropriate printf length modifier for 64-bit ints. */-#define INT64_MODIFIER "ll"--/* Define to 1 if `locale_t' requires <xlocale.h>. */-/* #undef LOCALE_T_IN_XLOCALE */--/* Define as the maximum alignment requirement of any C data type. */-#define MAXIMUM_ALIGNOF 8--/* Define bytes to use libc memset(). */-#define MEMSET_LOOP_LIMIT 1024--/* Define to the address where bug reports for this package should be sent. */-#define PACKAGE_BUGREPORT "pgsql-bugs@lists.postgresql.org"--/* Define to the full name of this package. */-#define PACKAGE_NAME "PostgreSQL"--/* Define to the full name and version of this package. */-#define PACKAGE_STRING "PostgreSQL 13devel"--/* Define to the one symbol short name of this package. */-#define PACKAGE_TARNAME "postgresql"--/* Define to the version of this package. */-#define PACKAGE_VERSION "13devel"--/* Define to the name of a signed 128-bit integer type. */-#undef PG_INT128_TYPE--/* Define to the name of a signed 64-bit integer type. */-#define PG_INT64_TYPE long long int--/* Define to the name of the default PostgreSQL service principal in Kerberos- (GSSAPI). (--with-krb-srvnam=NAME) */-#define PG_KRB_SRVNAM "postgres"--/* Define to 1 to use <stdbool.h> to define type bool. */-#define PG_USE_STDBOOL 1--/* PostgreSQL version as a string */-#define PG_VERSION "13devel"--/* PostgreSQL version as a number */-#define PG_VERSION_NUM 130000--/* A string containing the version number, platform, and C compiler */-#define PG_VERSION_STR "Uninitialized version string (win32)"--/* The size of `bool', as computed by sizeof. */-#define SIZEOF_BOOL 1--/* The size of `long', as computed by sizeof. */-#define SIZEOF_LONG 4--/* The size of `size_t', as computed by sizeof. */-#ifndef _WIN64-#define SIZEOF_SIZE_T 4-#else-#define SIZEOF_SIZE_T 8-#endif--/* The size of `void *', as computed by sizeof. */-#ifndef _WIN64-#define SIZEOF_VOID_P 4-#else-#define SIZEOF_VOID_P 8-#endif--/* Define to 1 if you have the ANSI C header files. */-#define STDC_HEADERS 1--/* Define to 1 if strerror_r() returns int. */-/* #undef STRERROR_R_INT */--/* Define to 1 to build with assertion checks. (--enable-cassert) */-/* #undef USE_ASSERT_CHECKING */--/* Define to 1 to build with Bonjour support. (--with-bonjour) */-/* #undef USE_BONJOUR */--/* Define to 1 to build with BSD Authentication support. (--with-bsd-auth) */-/* #undef USE_BSD_AUTH */--/* Define to use /dev/urandom for random number generation */-/* #undef USE_DEV_URANDOM */--/* Define to 1 to build with LDAP support. (--with-ldap) */-/* #undef USE_LDAP */--/* Define to 1 to build with LLVM based JIT support. (--with-llvm) */-/* #undef USE_LLVM */--/* Define to select named POSIX semaphores. */-/* #undef USE_NAMED_POSIX_SEMAPHORES */--/* Define to build with OpenSSL support. (--with-openssl) */-/* #undef USE_OPENSSL */--/* Define to use OpenSSL for random number generation */-/* #undef USE_OPENSSL_RANDOM */--/* Define to 1 to build with PAM support. (--with-pam) */-/* #undef USE_PAM */--/* Define to 1 to use software CRC-32C implementation (slicing-by-8). */-/* #undef USE_SLICING_BY_8_CRC32C */--/* Define to 1 use Intel SSE 4.2 CRC instructions. */-/* #undef USE_SSE42_CRC32C */--/* Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check. */-#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK--/* Define to select SysV-style semaphores. */-/* #undef USE_SYSV_SEMAPHORES */--/* Define to select SysV-style shared memory. */-#define USE_SYSV_SHARED_MEMORY 1--/* Define to select unnamed POSIX semaphores. */-/* #undef USE_UNNAMED_POSIX_SEMAPHORES */--/* Define to use native Windows API for random number generation */-#define USE_WIN32_RANDOM 1--/* Define to select Win32-style semaphores. */-#define USE_WIN32_SEMAPHORES 1--/* Define to 1 if `wcstombs_l' requires <xlocale.h>. */-/* #undef WCSTOMBS_L_IN_XLOCALE */--/* Number of bits in a file offset, on hosts where this is settable. */-/* #undef _FILE_OFFSET_BITS */--/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */-/* #undef _LARGEFILE_SOURCE */--/* Define for large files, on AIX-style hosts. */-/* #undef _LARGE_FILES */--/* Define to `__inline__' or `__inline' if that's what the C compiler- calls it, or to nothing if 'inline' is not supported under any name. */-#ifndef __cplusplus-#define inline __inline-#endif--/* Define to keyword to use for C99 restrict support, or to nothing if not- supported */-/* Works for C and C++ in Visual Studio 2008 and upwards */-#define pg_restrict __restrict--/* Define to the equivalent of the C99 'restrict' keyword, or to- nothing if this is not supported. Do not define if restrict is- supported directly. */-/* not defined, because it'd conflict with __declspec(restrict) */--/* Define to empty if the C compiler does not understand signed types. */-/* #undef signed */--/* Define to how the compiler spells `typeof'. */-/* #undef typeof */diff --git a/src/include/pg_config_ext.h.win32 b/src/include/pg_config_ext.h.win32deleted file mode 100644index 65bbb5d80d..0000000000--- a/src/include/pg_config_ext.h.win32+++ /dev/null@@ -1,7 +0,0 @@-/*- * src/include/pg_config_ext.h.win32. This is generated manually, not by- * autoheader, since we want to limit which symbols get defined here.- */--/* Define to the name of a signed 64-bit integer type. */-#define PG_INT64_TYPE long long intdiff --git a/src/tools/version_stamp.pl b/src/tools/version_stamp.plindex 10ddc79d49..508985497f 100755--- a/src/tools/version_stamp.pl+++ b/src/tools/version_stamp.pl@@ -102,13 +102,6 @@
"-e 's/AC_INIT(\\[PostgreSQL\\], \\[[0-9a-z.]*\\]/AC_INIT([PostgreSQL], [$fullversion]/'"
);
-sed_file("src/include/pg_config.h.win32",- "-e 's/#define PACKAGE_STRING \"PostgreSQL .*\"/#define PACKAGE_STRING \"PostgreSQL $fullversion\"/' "- . "-e 's/#define PACKAGE_VERSION \".*\"/#define PACKAGE_VERSION \"$fullversion\"/' "- . "-e 's/#define PG_VERSION \".*\"/#define PG_VERSION \"$fullversion\"/' "- . "-e 's/#define PG_VERSION_NUM .*/#define PG_VERSION_NUM $padnumericversion/'"-);-
sed_file("src/interfaces/libpq/libpq.rc.in",
"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' "
. "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $majorversion,0,$numericminor,0/' "
--
2.24.1
Attachments:
[text/plain] v3-0001-Generate-pg_config.h-from-pg_config.h.in-on-Windo.patch (24.8K, ../ebe2ccfe-ab5b-f7e2-242d-988daf594346@2ndquadrant.com/2-v3-0001-Generate-pg_config.h-from-pg_config.h.in-on-Windo.patch)
download | inline diff:
From b60719bd445fd63f0c42db8823f7d6cda89a6732 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Thu, 7 Nov 2019 15:56:22 +0100
Subject: [PATCH v3 1/2] Generate pg_config.h from pg_config.h.in on Windows
---
src/tools/msvc/Solution.pm | 544 +++++++++++++++++++++++++++++--------
1 file changed, 435 insertions(+), 109 deletions(-)
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pmindex ac626dfa53..0a40557f9e 100644--- a/src/tools/msvc/Solution.pm+++ b/src/tools/msvc/Solution.pm@@ -20,7 +20,6 @@ sub _new
projects => {},
options => $options,
numver => '',
- strver => '',
VisualStudioVersion => undef,
MinimumVisualStudioVersion => undef,
vcver => undef,
@@ -140,16 +139,22 @@ sub GenerateFiles
{
my $self = shift;
my $bits = $self->{platform} eq 'Win32' ? 32 : 64;
+ my $package_name;+ my $package_version;+ my $package_bugreport;
# Parse configure.in to get version numbers
open(my $c, '<', "configure.in")
|| confess("Could not open configure.in for reading\n");
while (<$c>)
{
- if (/^AC_INIT\(\[PostgreSQL\], \[([^\]]+)\]/)+ if (/^AC_INIT\(\[([^\]]+)\], \[([^\]]+)\], \[([^\]]+)\]/)
{
- $self->{strver} = $1;- if ($self->{strver} !~ /^(\d+)(?:\.(\d+))?/)+ $package_name = $1;+ $package_version = $2;+ $package_bugreport = $3;++ if ($package_version !~ /^(\d+)(?:\.(\d+))?/)
{
confess "Bad format of version: $self->{strver}\n";
}
@@ -159,7 +164,10 @@ sub GenerateFiles
}
close($c);
confess "Unable to parse configure.in for all variables!"
- if ($self->{strver} eq '' || $self->{numver} eq '');+ if ( $package_name eq ''+ || $package_version eq ''+ || $self->{numver} eq ''+ || $package_bugreport eq '');
if (IsNewer("src/include/pg_config_os.h", "src/include/port/win32.h"))
{
@@ -167,100 +175,371 @@ sub GenerateFiles
copyFile("src/include/port/win32.h", "src/include/pg_config_os.h");
}
- if (IsNewer("src/include/pg_config.h", "src/include/pg_config.h.win32"))+ print "Generating configuration headers...\n";+ my $extraver = $self->{options}->{extraver};+ $extraver = '' unless defined $extraver;+ my $port = $self->{options}->{"--with-pgport"} || 5432;++ # Every symbol in pg_config.h.in must be accounted for here. Set+ # to undef if the symbol should not be defined.+ my %define = (+ ACCEPT_TYPE_ARG1 => 'unsigned int',+ ACCEPT_TYPE_ARG2 => 'struct sockaddr *',+ ACCEPT_TYPE_ARG3 => 'int',+ ACCEPT_TYPE_RETURN => 'unsigned int PASCAL',+ ALIGNOF_DOUBLE => 8,+ ALIGNOF_INT => 4,+ ALIGNOF_LONG => 4,+ ALIGNOF_LONG_LONG_INT => 8,+ ALIGNOF_PG_INT128_TYPE => undef,+ ALIGNOF_SHORT => 2,+ AC_APPLE_UNIVERSAL_BUILD => undef,+ BLCKSZ => 1024 * $self->{options}->{blocksize},+ DEF_PGPORT => $port,+ DEF_PGPORT_STR => qq{"$port"},+ ENABLE_GSS => $self->{options}->{gss} ? 1 : undef,+ ENABLE_NLS => $self->{options}->{nls} ? 1 : undef,+ ENABLE_THREAD_SAFETY => 1,+ FLEXIBLE_ARRAY_MEMBER => '/**/',+ GETTIMEOFDAY_1ARG => undef,+ HAVE_APPEND_HISTORY => undef,+ HAVE_ASN1_STRING_GET0_DATA => undef,+ HAVE_ATOMICS => 1,+ HAVE_ATOMIC_H => undef,+ HAVE_BACKTRACE_SYMBOLS => undef,+ HAVE_BIO_GET_DATA => undef,+ HAVE_BIO_METH_NEW => undef,+ HAVE_CBRT => undef,+ HAVE_CLASS => undef,+ HAVE_CLOCK_GETTIME => undef,+ HAVE_COMPUTED_GOTO => undef,+ HAVE_COPYFILE => undef,+ HAVE_COPYFILE_H => undef,+ HAVE_CRTDEFS_H => undef,+ HAVE_CRYPTO_LOCK => undef,+ HAVE_DECL_FDATASYNC => 0,+ HAVE_DECL_F_FULLFSYNC => 0,+ HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER => undef,+ HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER => undef,+ HAVE_DECL_LLVMGETHOSTCPUNAME => 0,+ HAVE_DECL_LLVMGETHOSTCPUFEATURES => 0,+ HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN => 0,+ HAVE_DECL_POSIX_FADVISE => undef,+ HAVE_DECL_RTLD_GLOBAL => 0,+ HAVE_DECL_RTLD_NOW => 0,+ HAVE_DECL_STRLCAT => undef,+ HAVE_DECL_STRLCPY => undef,+ HAVE_DECL_STRNLEN => 1,+ HAVE_DECL_STRTOLL => 1,+ HAVE_DECL_STRTOULL => 1,+ HAVE_DLOPEN => undef,+ HAVE_EDITLINE_HISTORY_H => undef,+ HAVE_EDITLINE_READLINE_H => undef,+ HAVE_EXECINFO_H => undef,+ HAVE_EXPLICIT_BZERO => undef,+ HAVE_FDATASYNC => undef,+ HAVE_FLS => undef,+ HAVE_FPCLASS => undef,+ HAVE_FP_CLASS => undef,+ HAVE_FP_CLASS_D => undef,+ HAVE_FP_CLASS_H => undef,+ HAVE_FSEEKO => 1,+ HAVE_FUNCNAME__FUNC => undef,+ HAVE_FUNCNAME__FUNCTION => 1,+ HAVE_GCC__ATOMIC_INT32_CAS => undef,+ HAVE_GCC__ATOMIC_INT64_CAS => undef,+ HAVE_GCC__SYNC_CHAR_TAS => undef,+ HAVE_GCC__SYNC_INT32_CAS => undef,+ HAVE_GCC__SYNC_INT32_TAS => undef,+ HAVE_GCC__SYNC_INT64_CAS => undef,+ HAVE_GETADDRINFO => undef,+ HAVE_GETHOSTBYNAME_R => undef,+ HAVE_GETIFADDRS => undef,+ HAVE_GETOPT => undef,+ HAVE_GETOPT_H => undef,+ HAVE_GETOPT_LONG => undef,+ HAVE_GETPEEREID => undef,+ HAVE_GETPEERUCRED => undef,+ HAVE_GETPWUID_R => undef,+ HAVE_GETRLIMIT => undef,+ HAVE_GETRUSAGE => undef,+ HAVE_GETTIMEOFDAY => undef,+ HAVE_GSSAPI_GSSAPI_H => undef,+ HAVE_GSSAPI_H => undef,+ HAVE_HISTORY_H => undef,+ HAVE_HISTORY_TRUNCATE_FILE => undef,+ HAVE_IEEEFP_H => undef,+ HAVE_IFADDRS_H => undef,+ HAVE_INET_ATON => undef,+ HAVE_INT_TIMEZONE => 1,+ HAVE_INT64 => undef,+ HAVE_INT8 => undef,+ HAVE_INTPTR_T => undef,+ HAVE_INTTYPES_H => undef,+ HAVE_INT_OPTERR => undef,+ HAVE_INT_OPTRESET => undef,+ HAVE_IPV6 => 1,+ HAVE_ISINF => 1,+ HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P => undef,+ HAVE_LANGINFO_H => undef,+ HAVE_LDAP_H => undef,+ HAVE_LDAP_INITIALIZE => undef,+ HAVE_LIBCRYPTO => undef,+ HAVE_LIBLDAP => undef,+ HAVE_LIBLDAP_R => undef,+ HAVE_LIBM => undef,+ HAVE_LIBPAM => undef,+ HAVE_LIBREADLINE => undef,+ HAVE_LIBSELINUX => undef,+ HAVE_LIBSSL => undef,+ HAVE_LIBWLDAP32 => undef,+ HAVE_LIBXML2 => undef,+ HAVE_LIBXSLT => undef,+ HAVE_LIBZ => $self->{options}->{zlib} ? 1 : undef,+ HAVE_LOCALE_T => 1,+ HAVE_LONG_INT_64 => undef,+ HAVE_LONG_LONG_INT_64 => 1,+ HAVE_MBARRIER_H => undef,+ HAVE_MBSTOWCS_L => 1,+ HAVE_MEMMOVE => 1,+ HAVE_MEMORY_H => 1,+ HAVE_MEMSET_S => undef,+ HAVE_MINIDUMP_TYPE => 1,+ HAVE_MKDTEMP => undef,+ HAVE_NETINET_TCP_H => undef,+ HAVE_NET_IF_H => undef,+ HAVE_OPENSSL_INIT_SSL => undef,+ HAVE_OSSP_UUID_H => undef,+ HAVE_PAM_PAM_APPL_H => undef,+ HAVE_POLL => undef,+ HAVE_POLL_H => undef,+ HAVE_POSIX_FADVISE => undef,+ HAVE_POSIX_FALLOCATE => undef,+ HAVE_PPC_LWARX_MUTEX_HINT => undef,+ HAVE_PPOLL => undef,+ HAVE_PREAD => undef,+ HAVE_PSTAT => undef,+ HAVE_PS_STRINGS => undef,+ HAVE_PTHREAD => undef,+ HAVE_PTHREAD_IS_THREADED_NP => undef,+ HAVE_PTHREAD_PRIO_INHERIT => undef,+ HAVE_PWRITE => undef,+ HAVE_RANDOM => undef,+ HAVE_READLINE_H => undef,+ HAVE_READLINE_HISTORY_H => undef,+ HAVE_READLINE_READLINE_H => undef,+ HAVE_READLINK => undef,+ HAVE_RINT => 1,+ HAVE_RL_COMPLETION_APPEND_CHARACTER => undef,+ HAVE_RL_COMPLETION_MATCHES => undef,+ HAVE_RL_FILENAME_COMPLETION_FUNCTION => undef,+ HAVE_RL_RESET_SCREEN_SIZE => undef,+ HAVE_SECURITY_PAM_APPL_H => undef,+ HAVE_SETPROCTITLE => undef,+ HAVE_SETPROCTITLE_FAST => undef,+ HAVE_SETSID => undef,+ HAVE_SHM_OPEN => undef,+ HAVE_SPINLOCKS => 1,+ HAVE_SRANDOM => undef,+ HAVE_STDBOOL_H => 1,+ HAVE_STDINT_H => undef,+ HAVE_STDLIB_H => 1,+ HAVE_STRCHRNUL => undef,+ HAVE_STRERROR_R => undef,+ HAVE_STRINGS_H => undef,+ HAVE_STRING_H => 1,+ HAVE_STRLCAT => undef,+ HAVE_STRLCPY => undef,+ HAVE_STRNLEN => 1,+ HAVE_STRSIGNAL => undef,+ HAVE_STRTOF => 1,+ HAVE_STRTOLL => 1,+ HAVE_STRTOQ => undef,+ HAVE_STRTOULL => 1,+ HAVE_STRTOUQ => undef,+ HAVE_STRUCT_ADDRINFO => 1,+ HAVE_STRUCT_CMSGCRED => undef,+ HAVE_STRUCT_OPTION => undef,+ HAVE_STRUCT_SOCKADDR_SA_LEN => undef,+ HAVE_STRUCT_SOCKADDR_STORAGE => 1,+ HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY => 1,+ HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN => undef,+ HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY => undef,+ HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN => undef,+ HAVE_STRUCT_TM_TM_ZONE => undef,+ HAVE_SYNC_FILE_RANGE => undef,+ HAVE_SYMLINK => 1,+ HAVE_SYSLOG => undef,+ HAVE_SYS_EPOLL_H => undef,+ HAVE_SYS_IPC_H => undef,+ HAVE_SYS_PRCTL_H => undef,+ HAVE_SYS_PROCCTL_H => undef,+ HAVE_SYS_PSTAT_H => undef,+ HAVE_SYS_RESOURCE_H => undef,+ HAVE_SYS_SELECT_H => undef,+ HAVE_SYS_SEM_H => undef,+ HAVE_SYS_SHM_H => undef,+ HAVE_SYS_SOCKIO_H => undef,+ HAVE_SYS_STAT_H => 1,+ HAVE_SYS_TAS_H => undef,+ HAVE_SYS_TYPES_H => 1,+ HAVE_SYS_UCRED_H => undef,+ HAVE_SYS_UN_H => undef,+ HAVE_TERMIOS_H => undef,+ HAVE_TYPEOF => undef,+ HAVE_UCRED_H => undef,+ HAVE_UINT64 => undef,+ HAVE_UINT8 => undef,+ HAVE_UINTPTR_T => undef,+ HAVE_UNION_SEMUN => undef,+ HAVE_UNISTD_H => 1,+ HAVE_UNIX_SOCKETS => undef,+ HAVE_UNSETENV => undef,+ HAVE_USELOCALE => undef,+ HAVE_UTIME => 1,+ HAVE_UTIMES => undef,+ HAVE_UTIME_H => 1,+ HAVE_UUID_BSD => undef,+ HAVE_UUID_E2FS => undef,+ HAVE_UUID_OSSP => undef,+ HAVE_UUID_H => undef,+ HAVE_UUID_UUID_H => undef,+ HAVE_WINLDAP_H => undef,+ HAVE_WCHAR_H => 1,+ HAVE_WCSTOMBS_L => 1,+ HAVE_WCTYPE_H => 1,+ HAVE_X509_GET_SIGNATURE_NID => 1,+ HAVE_X86_64_POPCNTQ => undef,+ HAVE__BOOL => undef,+ HAVE__BUILTIN_BSWAP16 => undef,+ HAVE__BUILTIN_BSWAP32 => undef,+ HAVE__BUILTIN_BSWAP64 => undef,+ HAVE__BUILTIN_CLZ => undef,+ HAVE__BUILTIN_CONSTANT_P => undef,+ HAVE__BUILTIN_CTZ => undef,+ HAVE__BUILTIN_OP_OVERFLOW => undef,+ HAVE__BUILTIN_POPCOUNT => undef,+ HAVE__BUILTIN_TYPES_COMPATIBLE_P => undef,+ HAVE__BUILTIN_UNREACHABLE => undef,+ HAVE__CONFIGTHREADLOCALE => 1,+ HAVE__CPUID => 1,+ HAVE__GET_CPUID => undef,+ HAVE__STATIC_ASSERT => undef,+ HAVE___STRTOLL => undef,+ HAVE___STRTOULL => undef,+ INT64_MODIFIER => qq{"ll"},+ LOCALE_T_IN_XLOCALE => undef,+ MAXIMUM_ALIGNOF => 8,+ MEMSET_LOOP_LIMIT => 1024,+ PACKAGE_BUGREPORT => qq{"$package_bugreport"},+ PACKAGE_NAME => qq{"$package_name"},+ PACKAGE_STRING => qq{"$package_name $package_version"},+ PACKAGE_TARNAME => lc qq{"$package_name"},+ PACKAGE_URL => undef,+ PACKAGE_VERSION => qq{"$package_version"},+ PG_INT128_TYPE => undef,+ PG_INT64_TYPE => 'long long int',+ PG_KRB_SRVNAM => qq{"postgres"},+ PG_MAJORVERSION => qq{"$self->{majorver}"},+ PG_PRINTF_ATTRIBUTE => undef,+ PG_USE_STDBOOL => 1,+ PG_VERSION => qq{"$package_version$extraver"},+ PG_VERSION_NUM => $self->{numver},+ PG_VERSION_STR =>+ qq{"PostgreSQL $package_version$extraver, compiled by Visual C++ build " CppAsString2(_MSC_VER) ", $bits-bit"},+ PROFILE_PID_DIR => undef,+ PTHREAD_CREATE_JOINABLE => undef,+ RELSEG_SIZE => (1024 / $self->{options}->{blocksize}) *+ $self->{options}->{segsize} * 1024,+ SIZEOF_BOOL => 1,+ SIZEOF_LONG => 4,+ SIZEOF_OFF_T => undef,+ SIZEOF_SIZE_T => $bits / 8,+ SIZEOF_VOID_P => $bits / 8,+ STDC_HEADERS => 1,+ STRERROR_R_INT => undef,+ USE_ARMV8_CRC32C => undef,+ USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK => undef,+ USE_ASSERT_CHECKING => $self->{options}->{asserts} ? 1 : undef,+ USE_BONJOUR => undef,+ USE_BSD_AUTH => undef,+ USE_DEV_URANDOM => undef,+ USE_ICU => $self->{options}->{icu} ? 1 : undef,+ USE_LIBXML => undef,+ USE_LIBXSLT => undef,+ USE_LDAP => $self->{options}->{ldap} ? 1 : undef,+ USE_LLVM => undef,+ USE_NAMED_POSIX_SEMAPHORES => undef,+ USE_OPENSSL => undef,+ USE_OPENSSL_RANDOM => undef,+ USE_PAM => undef,+ USE_SLICING_BY_8_CRC32C => undef,+ USE_SSE42_CRC32C => undef,+ USE_SSE42_CRC32C_WITH_RUNTIME_CHECK => 1,+ USE_SYSTEMD => undef,+ USE_SYSV_SEMAPHORES => undef,+ USE_SYSV_SHARED_MEMORY => undef,+ USE_UNNAMED_POSIX_SEMAPHORES => undef,+ USE_WIN32_RANDOM => 1,+ USE_WIN32_SEMAPHORES => 1,+ USE_WIN32_SHARED_MEMORY => 1,+ WCSTOMBS_L_IN_XLOCALE => undef,+ WORDS_BIGENDIAN => undef,+ XLOG_BLCKSZ => 1024 * $self->{options}->{wal_blocksize},+ _FILE_OFFSET_BITS => undef,+ _LARGEFILE_SOURCE => undef,+ _LARGE_FILES => undef,+ inline => '__inline',+ intptr_t => undef,+ pg_restrict => '__restrict',+ # not defined, because it'd conflict with __declspec(restrict)+ restrict => undef,+ signed => undef,+ typeof => undef,+ uintptr_t => undef,);++ if ($self->{options}->{uuid})
{
- print "Generating pg_config.h...\n";- open(my $i, '<', "src/include/pg_config.h.win32")- || confess "Could not open pg_config.h.win32\n";- open(my $o, '>', "src/include/pg_config.h")- || confess "Could not write to pg_config.h\n";- my $extraver = $self->{options}->{extraver};- $extraver = '' unless defined $extraver;- while (<$i>)- {- s{PG_VERSION "[^"]+"}{PG_VERSION "$self->{strver}$extraver"};- s{PG_VERSION_NUM \d+}{PG_VERSION_NUM $self->{numver}};- s{PG_VERSION_STR "[^"]+"}{PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, compiled by Visual C++ build " CppAsString2(_MSC_VER) ", $bits-bit"};- print $o $_;- }- print $o "#define PG_MAJORVERSION \"$self->{majorver}\"\n";- print $o "/* defines added by config steps */\n";- print $o "#ifndef IGNORE_CONFIGURED_SETTINGS\n";- print $o "#define USE_ASSERT_CHECKING 1\n"- if ($self->{options}->{asserts});- print $o "#define USE_LDAP 1\n" if ($self->{options}->{ldap});- print $o "#define HAVE_LIBZ 1\n" if ($self->{options}->{zlib});- print $o "#define ENABLE_NLS 1\n" if ($self->{options}->{nls});-- print $o "#define BLCKSZ ", 1024 * $self->{options}->{blocksize},- "\n";- print $o "#define RELSEG_SIZE ",- (1024 / $self->{options}->{blocksize}) *- $self->{options}->{segsize} * 1024, "\n";- print $o "#define XLOG_BLCKSZ ",- 1024 * $self->{options}->{wal_blocksize}, "\n";-- if ($self->{options}->{uuid})- {- print $o "#define HAVE_UUID_OSSP\n";- print $o "#define HAVE_UUID_H\n";- }- if ($self->{options}->{xml})- {- print $o "#define HAVE_LIBXML2\n";- print $o "#define USE_LIBXML\n";- }- if ($self->{options}->{xslt})- {- print $o "#define HAVE_LIBXSLT\n";- print $o "#define USE_LIBXSLT\n";- }- if ($self->{options}->{gss})- {- print $o "#define ENABLE_GSS 1\n";- }- if ($self->{options}->{openssl})- {- print $o "#define USE_OPENSSL 1\n";+ $define{HAVE_UUID_OSSP} = 1;+ $define{HAVE_UUID_H} = 1;+ }+ if ($self->{options}->{xml})+ {+ $define{HAVE_LIBXML2} = 1;+ $define{USE_LIBXML} = 1;+ }+ if ($self->{options}->{xslt})+ {+ $define{HAVE_LIBXSLT} = 1;+ $define{USE_LIBXSLT} = 1;+ }+ if ($self->{options}->{openssl})+ {+ $define{USE_OPENSSL} = 1;- my ($digit1, $digit2, $digit3) = $self->GetOpenSSLVersion();+ my ($digit1, $digit2, $digit3) = $self->GetOpenSSLVersion();- # More symbols are needed with OpenSSL 1.1.0 and above.- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')- {- print $o "#define HAVE_ASN1_STRING_GET0_DATA 1\n";- print $o "#define HAVE_BIO_GET_DATA 1\n";- print $o "#define HAVE_BIO_METH_NEW 1\n";- print $o "#define HAVE_OPENSSL_INIT_SSL 1\n";- }- }- if ($self->{options}->{icu})- {- print $o "#define USE_ICU 1\n";- }- if (my $port = $self->{options}->{"--with-pgport"})+ # More symbols are needed with OpenSSL 1.1.0 and above.+ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0')
{
- print $o "#undef DEF_PGPORT\n";- print $o "#undef DEF_PGPORT_STR\n";- print $o "#define DEF_PGPORT $port\n";- print $o "#define DEF_PGPORT_STR \"$port\"\n";+ $define{HAVE_ASN1_STRING_GET0_DATA} = 1;+ $define{HAVE_BIO_GET_DATA} = 1;+ $define{HAVE_BIO_METH_NEW} = 1;+ $define{HAVE_OPENSSL_INIT_SSL} = 1;
}
- print $o "#define VAL_CONFIGURE \""- . $self->GetFakeConfigure() . "\"\n";- print $o "#endif /* IGNORE_CONFIGURED_SETTINGS */\n";- close($o);- close($i);
}
- if (IsNewer(- "src/include/pg_config_ext.h",- "src/include/pg_config_ext.h.win32"))- {- print "Copying pg_config_ext.h...\n";- copyFile(- "src/include/pg_config_ext.h.win32",- "src/include/pg_config_ext.h");- }+ $self->GenerateConfigHeader('src/include/pg_config.h', \%define, 1);+ $self->GenerateConfigHeader('src/include/pg_config_ext.h', \%define, 0);+ $self->GenerateConfigHeader('src/interfaces/ecpg/include/ecpg_config.h', \%define, 0);++ # XXX+ open(my $f, '>>', 'src/include/pg_config.h')+ || confess "Could not write to src/include/pg_config.h\n";+ print $f "\n";+ print $f "#define VAL_CONFIGURE \""+ . $self->GetFakeConfigure() . "\"\n";+ close($f);
$self->GenerateDefFile(
"src/interfaces/libpq/libpqdll.def",
@@ -475,22 +754,6 @@ sub GenerateFiles
chdir('../../../..');
}
- if (IsNewer(- 'src/interfaces/ecpg/include/ecpg_config.h',- 'src/interfaces/ecpg/include/ecpg_config.h.in'))- {- print "Generating ecpg_config.h...\n";- open(my $o, '>', 'src/interfaces/ecpg/include/ecpg_config.h')- || confess "Could not open ecpg_config.h";- print $o <<EOF;-#define HAVE_LONG_LONG_INT 1-#define HAVE_LONG_LONG_INT_64 1-#define PG_USE_STDBOOL 1-#define ENABLE_THREAD_SAFETY 1-EOF- close($o);- }-
unless (-f "src/port/pg_config_paths.h")
{
print "Generating pg_config_paths.h...\n";
@@ -581,13 +844,76 @@ EOF
open(my $o, '>', "doc/src/sgml/version.sgml")
|| croak "Could not write to version.sgml\n";
print $o <<EOF;
-<!ENTITY version "$self->{strver}">+<!ENTITY version "$package_version">
<!ENTITY majorversion "$self->{majorver}">
EOF
close($o);
return;
}
+# Read lines from input file and substitute symbols using the same+# logic that config.status uses. There should be one call of this for+# each AC_CONFIG_HEADERS call in configure.in.+#+# If the "required" argument is true, we also keep track which of our+# defines have been found and error out if any are left unused at the+# end. That way we avoid accumulating defines in this file that are+# no longer used by configure.+sub GenerateConfigHeader+{+ my ($self, $config_header, $defines, $required) = @_;+ my %defines_copy = %$defines;++ my $config_header_in = $config_header . '.in';++ if (IsNewer($config_header, $config_header_in) ||+ IsNewer($config_header, __FILE__))+ {+ open(my $i, '<', $config_header_in)+ || confess "Could not open $config_header_in\n";+ open(my $o, '>', $config_header)+ || confess "Could not write to $config_header\n";++ print $o+ "/* $config_header. Generated from $config_header_in by src/tools/msvc/Solution.pm. */\n";++ while (<$i>)+ {+ if (m/^#(\s*)undef\s+(\w+)/)+ {+ my $ws = $1;+ my $macro = $2;+ if (exists $defines->{$macro})+ {+ if (defined $defines->{$macro})+ {+ print $o "#${ws}define $macro ", $defines->{$macro}, "\n";+ }+ else+ {+ print $o "/* #${ws}undef $macro */\n";+ }+ delete $defines_copy{$macro};+ }+ else+ {+ croak "undefined symbol: $macro at $config_header line $.";+ }+ }+ else+ {+ print $o $_;+ }+ }+ close($o);+ close($i);+ }+ if ($required && scalar(keys %defines_copy) > 0)+ {+ croak "unused defines: " . join(' ', keys %defines_copy);+ }+}+
sub GenerateDefFile
{
my ($self, $deffile, $txtfile, $libname) = @_;
--
2.24.1
[text/plain] v3-0002-Remove-pg_config.h.win32.patch (24.8K, ../ebe2ccfe-ab5b-f7e2-242d-988daf594346@2ndquadrant.com/3-v3-0002-Remove-pg_config.h.win32.patch)
download | inline diff:
From 5472bdde3fbda526e3d9ecbadb6627a29066031a Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Thu, 7 Nov 2019 15:59:59 +0100
Subject: [PATCH v3 2/2] Remove pg_config.h.win32
---
src/include/pg_config.h.win32 | 736 ------------------------------
src/include/pg_config_ext.h.win32 | 7 -
src/tools/version_stamp.pl | 7 -
3 files changed, 750 deletions(-)
delete mode 100644 src/include/pg_config.h.win32
delete mode 100644 src/include/pg_config_ext.h.win32
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32deleted file mode 100644index 808f5abcdb..0000000000--- a/src/include/pg_config.h.win32+++ /dev/null@@ -1,736 +0,0 @@-/* src/include/pg_config.h. Generated by configure. */-/* src/include/pg_config.h.in. Generated from configure.in by autoheader. */--/* This file is generated from MingW ./configure, and with the following- * changes to be valid for Visual C++ (and compatible):- *- * HAVE_CBRT, HAVE_FUNCNAME_FUNC, HAVE_GETOPT, HAVE_GETOPT_H, HAVE_INTTYPES_H,- * HAVE_GETOPT_LONG, HAVE_LOCALE_T, HAVE_RINT, HAVE_STRINGS_H, HAVE_STRTOLL,- * HAVE_STRTOULL, HAVE_STRUCT_OPTION, ENABLE_THREAD_SAFETY,- * inline, USE_SSE42_CRC32C_WITH_RUNTIME_CHECK- */--/* Define to the type of arg 1 of 'accept' */-#define ACCEPT_TYPE_ARG1 unsigned int--/* Define to the type of arg 2 of 'accept' */-#define ACCEPT_TYPE_ARG2 struct sockaddr *--/* Define to the type of arg 3 of 'accept' */-#define ACCEPT_TYPE_ARG3 int--/* Define to the return type of 'accept' */-#define ACCEPT_TYPE_RETURN unsigned int PASCAL--/* The normal alignment of `double', in bytes. */-#define ALIGNOF_DOUBLE 8--/* The normal alignment of `int', in bytes. */-#define ALIGNOF_INT 4--/* The normal alignment of `long', in bytes. */-#define ALIGNOF_LONG 4--/* The normal alignment of `long long int', in bytes. */-#define ALIGNOF_LONG_LONG_INT 8--/* The normal alignment of `PG_INT128_TYPE', in bytes. */-#undef ALIGNOF_PG_INT128_TYPE--/* The normal alignment of `short', in bytes. */-#define ALIGNOF_SHORT 2--/* Define to the default TCP port number on which the server listens and to- which clients will try to connect. This can be overridden at run-time, but- it's convenient if your clients have the right default compiled in.- (--with-pgport=PORTNUM) */-#define DEF_PGPORT 5432--/* Define to the default TCP port number as a string constant. */-#define DEF_PGPORT_STR "5432"--/* Define to 1 if you want National Language Support. (--enable-nls) */-/* #undef ENABLE_NLS */--/* Define to 1 to build client libraries as thread-safe code.- (--enable-thread-safety) */-#define ENABLE_THREAD_SAFETY 1--/* Define to nothing if C supports flexible array members, and to 1 if it does- not. That way, with a declaration like `struct s { int n; double- d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99- compilers. When computing the size of such an object, don't use 'sizeof- (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'- instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with- MSVC and with C++ compilers. */-#define FLEXIBLE_ARRAY_MEMBER--/* Define to 1 if gettimeofday() takes only 1 argument. */-/* #undef GETTIMEOFDAY_1ARG */--#ifdef GETTIMEOFDAY_1ARG-# define gettimeofday(a,b) gettimeofday(a)-#endif--/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */-/* #undef HAVE_ASN1_STRING_GET0_DATA */--/* Define to 1 if you want to use atomics if available. */-#define HAVE_ATOMICS 1--/* Define to 1 if you have the `BIO_get_data' function. */-/* #undef HAVE_BIO_GET_DATA */--/* Define to 1 if you have the `BIO_meth_new' function. */-/* #undef HAVE_BIO_METH_NEW */--/* Define to 1 if you have the `cbrt' function. */-//#define HAVE_CBRT 1--/* Define to 1 if you have the `class' function. */-/* #undef HAVE_CLASS */--/* Define to 1 if you have the `clock_gettime' function. */-/* #undef HAVE_CLOCK_GETTIME */--/* Define to 1 if your compiler handles computed gotos. */-/* #undef HAVE_COMPUTED_GOTO */--/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you- don't. */-#define HAVE_DECL_FDATASYNC 0--/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you- don't. */-#define HAVE_DECL_F_FULLFSYNC 0--/* Define to 1 if you have the declaration of- `LLVMCreateGDBRegistrationListener', and to 0 if you don't. */-#undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER--/* Define to 1 if you have the declaration of- `LLVMCreatePerfJITEventListener', and to 0 if you don't. */-#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER--/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to- 0 if you don't. */-#define HAVE_DECL_LLVMGETHOSTCPUFEATURES 0--/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0- if you don't. */-#define HAVE_DECL_LLVMGETHOSTCPUNAME 0--/* Define to 1 if you have the declaration of `LLVMOrcGetSymbolAddressIn', and- to 0 if you don't. */-#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN 0--/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you- don't. */-#define HAVE_DECL_RTLD_GLOBAL 0--/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you- don't. */-#define HAVE_DECL_RTLD_NOW 0--/* Define to 1 if you have the declaration of `strnlen', and to 0 if you- don't. */-#define HAVE_DECL_STRNLEN 1--/* Define to 1 if you have the declaration of `strtoll', and to 0 if you- don't. */-#define HAVE_DECL_STRTOLL 1--/* Define to 1 if you have the declaration of `strtoull', and to 0 if you- don't. */-#define HAVE_DECL_STRTOULL 1--/* Define to 1 if you have the `dlopen' function. */-/* #undef HAVE_DLOPEN */--/* Define to 1 if you have the <editline/history.h> header file. */-/* #undef HAVE_EDITLINE_HISTORY_H */--/* Define to 1 if you have the <editline/readline.h> header file. */-/* #undef HAVE_EDITLINE_READLINE_H */--/* Define to 1 if you have the `explicit_bzero' function. */-/* #undef HAVE_EXPLICIT_BZERO */--/* Define to 1 if you have the `fdatasync' function. */-/* #undef HAVE_FDATASYNC */--/* Define to 1 if you have the `fpclass' function. */-/* #undef HAVE_FPCLASS */--/* Define to 1 if you have the `fp_class' function. */-/* #undef HAVE_FP_CLASS */--/* Define to 1 if you have the `fp_class_d' function. */-/* #undef HAVE_FP_CLASS_D */--/* Define to 1 if you have the <fp_class.h> header file. */-/* #undef HAVE_FP_CLASS_H */--/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */-#define HAVE_FSEEKO 1--/* Define to 1 if your compiler understands __func__. */-//#define HAVE_FUNCNAME__FUNC 1--/* Define to 1 if your compiler understands __FUNCTION__. */-#define HAVE_FUNCNAME__FUNCTION 1--/* Define to 1 if you have the `getaddrinfo' function. */-/* #undef HAVE_GETADDRINFO */--/* Define to 1 if you have the `gethostbyname_r' function. */-/* #undef HAVE_GETHOSTBYNAME_R */--/* Define to 1 if you have the `getopt' function. */-//#define HAVE_GETOPT 1--/* Define to 1 if you have the <getopt.h> header file. */-//#define HAVE_GETOPT_H 1--/* Define to 1 if you have the `getopt_long' function. */-//#define HAVE_GETOPT_LONG 1--/* Define to 1 if you have the `getpeereid' function. */-/* #undef HAVE_GETPEEREID */--/* Define to 1 if you have the `getpwuid_r' function. */-/* #undef HAVE_GETPWUID_R */--/* Define to 1 if you have the `getrusage' function. */-/* #undef HAVE_GETRUSAGE */--/* Define to 1 if you have the <history.h> header file. */-/* #undef HAVE_HISTORY_H */--/* Define to 1 if you have the <ieeefp.h> header file. */-/* #undef HAVE_IEEEFP_H */--/* Define to 1 if you have the `inet_aton' function. */-/* #undef HAVE_INET_ATON */--/* Define to 1 if the system has the type `int64'. */-/* #undef HAVE_INT64 */--/* Define to 1 if the system has the type `int8'. */-/* #undef HAVE_INT8 */--/* Define to 1 if you have the <inttypes.h> header file. */-//#define HAVE_INTTYPES_H 1--/* Define to 1 if you have the global variable 'int timezone'. */-#define HAVE_INT_TIMEZONE 1--/* Define to 1 if you have support for IPv6. */-#define HAVE_IPV6 1--/* Define to 1 if you have isinf(). */-#define HAVE_ISINF 1--/* Define to 1 if you have the <langinfo.h> header file. */-/* #undef HAVE_LANGINFO_H */--/* Define to 1 if you have the <ldap.h> header file. */-/* #undef HAVE_LDAP_H */--/* Define to 1 if you have the `ldap_initialize' function. */-/* #undef HAVE_LDAP_INITIALIZE */--/* Define to 1 if you have the `crypto' library (-lcrypto). */-/* #undef HAVE_LIBCRYPTO */--/* Define to 1 if you have the `ldap' library (-lldap). */-/* #undef HAVE_LIBLDAP */--/* Define to 1 if you have the `pam' library (-lpam). */-/* #undef HAVE_LIBPAM */--/* Define if you have a function readline library */-/* #undef HAVE_LIBREADLINE */--/* Define to 1 if you have the `ssl' library (-lssl). */-/* #undef HAVE_LIBSSL */--/* Define to 1 if you have the `wldap32' library (-lwldap32). */-/* #undef HAVE_LIBWLDAP32 */--/* Define to 1 if you have the `z' library (-lz). */-/* #undef HAVE_LIBZ */--/* Define to 1 if the system has the type `locale_t'. */-#define HAVE_LOCALE_T 1--/* Define to 1 if `long int' works and is 64 bits. */-/* #undef HAVE_LONG_INT_64 */--/* Define to 1 if `long long int' works and is 64 bits. */-#define HAVE_LONG_LONG_INT_64 1--/* Define to 1 if you have the `mbstowcs_l' function. */-#define HAVE_MBSTOWCS_L 1--/* Define to 1 if you have the `memmove' function. */-#define HAVE_MEMMOVE 1--/* Define to 1 if you have the <memory.h> header file. */-#define HAVE_MEMORY_H 1--/* Define to 1 if you have the `memset_s' function. */-/* #undef HAVE_MEMSET_S */--/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */-#define HAVE_MINIDUMP_TYPE 1--/* Define to 1 if you have the `mkdtemp' function. */-/* #undef HAVE_MKDTEMP */--/* Define to 1 if you have the <netinet/tcp.h> header file. */-/* #undef HAVE_NETINET_TCP_H */--/* Define to 1 if you have the `OPENSSL_init_ssl' function. */-/* #undef HAVE_OPENSSL_INIT_SSL */--/* Define to 1 if you have the <pam/pam_appl.h> header file. */-/* #undef HAVE_PAM_PAM_APPL_H */--/* Define to 1 if you have the `poll' function. */-/* #undef HAVE_POLL */--/* Define to 1 if you have the <poll.h> header file. */-/* #undef HAVE_POLL_H */--/* Define to 1 if you have the `posix_fallocate' function. */-/* #undef HAVE_POSIX_FALLOCATE */--/* Define to 1 if you have the `ppoll' function. */-/* #undef HAVE_PPOLL */--/* Define to 1 if you have the `pread' function. */-/* #undef HAVE_PREAD */--/* Define to 1 if you have the `pstat' function. */-/* #undef HAVE_PSTAT */--/* Define to 1 if the PS_STRINGS thing exists. */-/* #undef HAVE_PS_STRINGS */--/* Define to 1 if you have the `pwrite' function. */-/* #undef HAVE_PWRITE */--/* Define to 1 if you have the `random' function. */-/* #undef HAVE_RANDOM */--/* Define to 1 if you have the <readline.h> header file. */-/* #undef HAVE_READLINE_H */--/* Define to 1 if you have the <readline/history.h> header file. */-/* #undef HAVE_READLINE_HISTORY_H */--/* Define to 1 if you have the <readline/readline.h> header file. */-/* #undef HAVE_READLINE_READLINE_H */--/* Define to 1 if you have the `readlink' function. */-/* #undef HAVE_READLINK */--/* Define to 1 if you have the `rint' function. */-#define HAVE_RINT 1--/* Define to 1 if you have the global variable- 'rl_completion_append_character'. */-/* #undef HAVE_RL_COMPLETION_APPEND_CHARACTER */--/* Define to 1 if you have the `rl_completion_matches' function. */-/* #undef HAVE_RL_COMPLETION_MATCHES */--/* Define to 1 if you have the `rl_filename_completion_function' function. */-/* #undef HAVE_RL_FILENAME_COMPLETION_FUNCTION */--/* Define to 1 if you have the <security/pam_appl.h> header file. */-/* #undef HAVE_SECURITY_PAM_APPL_H */--/* Define to 1 if you have the `setproctitle' function. */-/* #undef HAVE_SETPROCTITLE */--/* Define to 1 if you have the `setsid' function. */-/* #undef HAVE_SETSID */--/* Define to 1 if you have spinlocks. */-#define HAVE_SPINLOCKS 1--/* Define to 1 if you have the `srandom' function. */-/* #undef HAVE_SRANDOM */--/* Define to 1 if stdbool.h conforms to C99. */-#define HAVE_STDBOOL_H 1--/* Define to 1 if you have the <stdint.h> header file. */-/* #undef HAVE_STDINT_H */--/* Define to 1 if you have the <stdlib.h> header file. */-#define HAVE_STDLIB_H 1--/* Define to 1 if you have the `strchrnul' function. */-/* #undef HAVE_STRCHRNUL */--/* Define to 1 if you have the `strerror_r' function. */-/* #undef HAVE_STRERROR_R */--/* Define to 1 if you have the <strings.h> header file. */-/*#define HAVE_STRINGS_H 1 */--/* Define to 1 if you have the <string.h> header file. */-#define HAVE_STRING_H 1--/* Define to 1 if you have the `strnlen' function. */-#define HAVE_STRNLEN 1--/* Define to 1 if you have the `strsignal' function. */-/* #undef HAVE_STRSIGNAL */--/* Define to 1 if you have the `strtof' function. */-#define HAVE_STRTOF 1--/* Define to 1 if you have the `strtoll' function. */-#ifdef HAVE_LONG_LONG_INT_64-#define HAVE_STRTOLL 1-#endif--/* Define to 1 if you have the `strtoull' function. */-#ifdef HAVE_LONG_LONG_INT_64-#define HAVE_STRTOULL 1-#endif--/* Define to 1 if the system has the type `struct addrinfo'. */-#define HAVE_STRUCT_ADDRINFO 1--/* Define to 1 if the system has the type `struct cmsgcred'. */-/* #undef HAVE_STRUCT_CMSGCRED */--/* Define to 1 if the system has the type `struct option'. */-//#define HAVE_STRUCT_OPTION 1--/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */-/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */--/* Define to 1 if the system has the type `struct sockaddr_storage'. */-#define HAVE_STRUCT_SOCKADDR_STORAGE 1--/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */-#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1--/* Define to 1 if `ss_len' is a member of `struct sockaddr_storage'. */-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */--/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */--/* Define to 1 if `__ss_len' is a member of `struct sockaddr_storage'. */-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */--/* Define to 1 if `tm_zone' is a member of `struct tm'. */-/* #undef HAVE_STRUCT_TM_TM_ZONE */--/* Define to 1 if you have the `symlink' function. */-#define HAVE_SYMLINK 1--/* Define to 1 if you have the `sync_file_range' function. */-/* #undef HAVE_SYNC_FILE_RANGE */--/* Define to 1 if you have the syslog interface. */-/* #undef HAVE_SYSLOG */--/* Define to 1 if you have the <sys/ipc.h> header file. */-/* #undef HAVE_SYS_IPC_H */--/* Define to 1 if you have the <sys/prctl.h> header file. */-/* #undef HAVE_SYS_PRCTL_H */--/* Define to 1 if you have the <sys/pstat.h> header file. */-/* #undef HAVE_SYS_PSTAT_H */--/* Define to 1 if you have the <sys/select.h> header file. */-/* #undef HAVE_SYS_SELECT_H */--/* Define to 1 if you have the <sys/sem.h> header file. */-/* #undef HAVE_SYS_SEM_H */--/* Define to 1 if you have the <sys/shm.h> header file. */-/* #undef HAVE_SYS_SHM_H */--/* Define to 1 if you have the <sys/stat.h> header file. */-#define HAVE_SYS_STAT_H 1--/* Define to 1 if you have the <sys/types.h> header file. */-#define HAVE_SYS_TYPES_H 1--/* Define to 1 if you have the <sys/ucred.h> header file. */-/* #undef HAVE_SYS_UCRED_H */--/* Define to 1 if you have the <sys/un.h> header file. */-/* #undef HAVE_SYS_UN_H */--/* Define to 1 if you have the <termios.h> header file. */-/* #undef HAVE_TERMIOS_H */--/* Define to 1 if your compiler understands `typeof' or something similar. */-/* #undef HAVE_TYPEOF */--/* Define to 1 if the system has the type `uint64'. */-/* #undef HAVE_UINT64 */--/* Define to 1 if the system has the type `uint8'. */-/* #undef HAVE_UINT8 */--/* Define to 1 if the system has the type `union semun'. */-/* #undef HAVE_UNION_SEMUN */--/* Define to 1 if you have the <unistd.h> header file. */-#define HAVE_UNISTD_H 1--/* Define to 1 if you have unix sockets. */-/* #undef HAVE_UNIX_SOCKETS */--/* Define to 1 if you have the `unsetenv' function. */-/* #undef HAVE_UNSETENV */--/* Define to 1 if you have the `uselocale' function. */-/* #undef HAVE_USELOCALE */--/* Define to 1 if you have the `utime' function. */-#define HAVE_UTIME 1--/* Define to 1 if you have the `utimes' function. */-/* #undef HAVE_UTIMES */--/* Define to 1 if you have the <utime.h> header file. */-#define HAVE_UTIME_H 1--/* Define to 1 if you have the <wchar.h> header file. */-#define HAVE_WCHAR_H 1--/* Define to 1 if you have the `wcstombs_l' function. */-#define HAVE_WCSTOMBS_L 1--/* Define to 1 if you have the <wctype.h> header file. */-#define HAVE_WCTYPE_H 1--/* Define to 1 if you have the <winldap.h> header file. */-/* #undef HAVE_WINLDAP_H */--/* Define to 1 if you have the `X509_get_signature_nid' function. */-#define HAVE_X509_GET_SIGNATURE_NID 1--/* Define to 1 if the assembler supports X86_64's POPCNTQ instruction. */-/* #undef HAVE_X86_64_POPCNTQ */--/* Define to 1 if the system has the type `_Bool'. */-/* #undef HAVE__BOOL */--/* Define to 1 if your compiler understands __builtin_bswap16. */-/* #undef HAVE__BUILTIN_BSWAP16 */--/* Define to 1 if your compiler understands __builtin_bswap32. */-/* #undef HAVE__BUILTIN_BSWAP32 */--/* Define to 1 if your compiler understands __builtin_bswap64. */-/* #undef HAVE__BUILTIN_BSWAP64 */--/* Define to 1 if your compiler understands __builtin_clz. */-/* #undef HAVE__BUILTIN_CLZ */--/* Define to 1 if your compiler understands __builtin_constant_p. */-/* #undef HAVE__BUILTIN_CONSTANT_P */--/* Define to 1 if your compiler understands __builtin_ctz. */-/* #undef HAVE__BUILTIN_CTZ */--/* Define to 1 if your compiler understands __builtin_$op_overflow. */-/* #undef HAVE__BUILTIN_OP_OVERFLOW */--/* Define to 1 if your compiler understands __builtin_popcount. */-/* #undef HAVE__BUILTIN_POPCOUNT */--/* Define to 1 if your compiler understands __builtin_types_compatible_p. */-/* #undef HAVE__BUILTIN_TYPES_COMPATIBLE_P */--/* Define to 1 if your compiler understands __builtin_unreachable. */-/* #undef HAVE__BUILTIN_UNREACHABLE */--/* Define to 1 if you have the `_configthreadlocale' function. */-#define HAVE__CONFIGTHREADLOCALE 1--/* Define to 1 if you have __cpuid. */-#define HAVE__CPUID 1--/* Define to 1 if you have __get_cpuid. */-#undef HAVE__GET_CPUID--/* Define to 1 if your compiler understands _Static_assert. */-/* #undef HAVE__STATIC_ASSERT */--/* Define to the appropriate printf length modifier for 64-bit ints. */-#define INT64_MODIFIER "ll"--/* Define to 1 if `locale_t' requires <xlocale.h>. */-/* #undef LOCALE_T_IN_XLOCALE */--/* Define as the maximum alignment requirement of any C data type. */-#define MAXIMUM_ALIGNOF 8--/* Define bytes to use libc memset(). */-#define MEMSET_LOOP_LIMIT 1024--/* Define to the address where bug reports for this package should be sent. */-#define PACKAGE_BUGREPORT "pgsql-bugs@lists.postgresql.org"--/* Define to the full name of this package. */-#define PACKAGE_NAME "PostgreSQL"--/* Define to the full name and version of this package. */-#define PACKAGE_STRING "PostgreSQL 13devel"--/* Define to the one symbol short name of this package. */-#define PACKAGE_TARNAME "postgresql"--/* Define to the version of this package. */-#define PACKAGE_VERSION "13devel"--/* Define to the name of a signed 128-bit integer type. */-#undef PG_INT128_TYPE--/* Define to the name of a signed 64-bit integer type. */-#define PG_INT64_TYPE long long int--/* Define to the name of the default PostgreSQL service principal in Kerberos- (GSSAPI). (--with-krb-srvnam=NAME) */-#define PG_KRB_SRVNAM "postgres"--/* Define to 1 to use <stdbool.h> to define type bool. */-#define PG_USE_STDBOOL 1--/* PostgreSQL version as a string */-#define PG_VERSION "13devel"--/* PostgreSQL version as a number */-#define PG_VERSION_NUM 130000--/* A string containing the version number, platform, and C compiler */-#define PG_VERSION_STR "Uninitialized version string (win32)"--/* The size of `bool', as computed by sizeof. */-#define SIZEOF_BOOL 1--/* The size of `long', as computed by sizeof. */-#define SIZEOF_LONG 4--/* The size of `size_t', as computed by sizeof. */-#ifndef _WIN64-#define SIZEOF_SIZE_T 4-#else-#define SIZEOF_SIZE_T 8-#endif--/* The size of `void *', as computed by sizeof. */-#ifndef _WIN64-#define SIZEOF_VOID_P 4-#else-#define SIZEOF_VOID_P 8-#endif--/* Define to 1 if you have the ANSI C header files. */-#define STDC_HEADERS 1--/* Define to 1 if strerror_r() returns int. */-/* #undef STRERROR_R_INT */--/* Define to 1 to build with assertion checks. (--enable-cassert) */-/* #undef USE_ASSERT_CHECKING */--/* Define to 1 to build with Bonjour support. (--with-bonjour) */-/* #undef USE_BONJOUR */--/* Define to 1 to build with BSD Authentication support. (--with-bsd-auth) */-/* #undef USE_BSD_AUTH */--/* Define to use /dev/urandom for random number generation */-/* #undef USE_DEV_URANDOM */--/* Define to 1 to build with LDAP support. (--with-ldap) */-/* #undef USE_LDAP */--/* Define to 1 to build with LLVM based JIT support. (--with-llvm) */-/* #undef USE_LLVM */--/* Define to select named POSIX semaphores. */-/* #undef USE_NAMED_POSIX_SEMAPHORES */--/* Define to build with OpenSSL support. (--with-openssl) */-/* #undef USE_OPENSSL */--/* Define to use OpenSSL for random number generation */-/* #undef USE_OPENSSL_RANDOM */--/* Define to 1 to build with PAM support. (--with-pam) */-/* #undef USE_PAM */--/* Define to 1 to use software CRC-32C implementation (slicing-by-8). */-/* #undef USE_SLICING_BY_8_CRC32C */--/* Define to 1 use Intel SSE 4.2 CRC instructions. */-/* #undef USE_SSE42_CRC32C */--/* Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check. */-#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK--/* Define to select SysV-style semaphores. */-/* #undef USE_SYSV_SEMAPHORES */--/* Define to select SysV-style shared memory. */-#define USE_SYSV_SHARED_MEMORY 1--/* Define to select unnamed POSIX semaphores. */-/* #undef USE_UNNAMED_POSIX_SEMAPHORES */--/* Define to use native Windows API for random number generation */-#define USE_WIN32_RANDOM 1--/* Define to select Win32-style semaphores. */-#define USE_WIN32_SEMAPHORES 1--/* Define to 1 if `wcstombs_l' requires <xlocale.h>. */-/* #undef WCSTOMBS_L_IN_XLOCALE */--/* Number of bits in a file offset, on hosts where this is settable. */-/* #undef _FILE_OFFSET_BITS */--/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */-/* #undef _LARGEFILE_SOURCE */--/* Define for large files, on AIX-style hosts. */-/* #undef _LARGE_FILES */--/* Define to `__inline__' or `__inline' if that's what the C compiler- calls it, or to nothing if 'inline' is not supported under any name. */-#ifndef __cplusplus-#define inline __inline-#endif--/* Define to keyword to use for C99 restrict support, or to nothing if not- supported */-/* Works for C and C++ in Visual Studio 2008 and upwards */-#define pg_restrict __restrict--/* Define to the equivalent of the C99 'restrict' keyword, or to- nothing if this is not supported. Do not define if restrict is- supported directly. */-/* not defined, because it'd conflict with __declspec(restrict) */--/* Define to empty if the C compiler does not understand signed types. */-/* #undef signed */--/* Define to how the compiler spells `typeof'. */-/* #undef typeof */diff --git a/src/include/pg_config_ext.h.win32 b/src/include/pg_config_ext.h.win32deleted file mode 100644index 65bbb5d80d..0000000000--- a/src/include/pg_config_ext.h.win32+++ /dev/null@@ -1,7 +0,0 @@-/*- * src/include/pg_config_ext.h.win32. This is generated manually, not by- * autoheader, since we want to limit which symbols get defined here.- */--/* Define to the name of a signed 64-bit integer type. */-#define PG_INT64_TYPE long long intdiff --git a/src/tools/version_stamp.pl b/src/tools/version_stamp.plindex 10ddc79d49..508985497f 100755--- a/src/tools/version_stamp.pl+++ b/src/tools/version_stamp.pl@@ -102,13 +102,6 @@
"-e 's/AC_INIT(\\[PostgreSQL\\], \\[[0-9a-z.]*\\]/AC_INIT([PostgreSQL], [$fullversion]/'"
);
-sed_file("src/include/pg_config.h.win32",- "-e 's/#define PACKAGE_STRING \"PostgreSQL .*\"/#define PACKAGE_STRING \"PostgreSQL $fullversion\"/' "- . "-e 's/#define PACKAGE_VERSION \".*\"/#define PACKAGE_VERSION \"$fullversion\"/' "- . "-e 's/#define PG_VERSION \".*\"/#define PG_VERSION \"$fullversion\"/' "- . "-e 's/#define PG_VERSION_NUM .*/#define PG_VERSION_NUM $padnumericversion/'"-);-
sed_file("src/interfaces/libpq/libpq.rc.in",
"-e 's/FILEVERSION [0-9]*,[0-9]*,[0-9]*,0/FILEVERSION $majorversion,0,$numericminor,0/' "
. "-e 's/PRODUCTVERSION [0-9]*,[0-9]*,[0-9]*,0/PRODUCTVERSION $majorversion,0,$numericminor,0/' "
--
2.24.1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, michael@paquier.xyz, tgl@sss.pgh.pa.us, hlinnaka@iki.fi
Subject: Re: automating pg_config.h.win32 maintenance
In-Reply-To: <ebe2ccfe-ab5b-f7e2-242d-988daf594346@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox