Here are some more patches that clean up various minor issues.
From bc06fda7198d182dce73f39cfff8e4724e00b12d Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 4 May 2022 14:38:02 +0200
Subject: [PATCH 1/7] meson: Put genbki header files back into original order
The order affects the output order in postgres.bki and other files.
This makes it match the order in the makefiles.
---
src/include/catalog/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/include/catalog/meson.build b/src/include/catalog/meson.build
index b2acc3ce30..813a963493 100644
--- a/src/include/catalog/meson.build
+++ b/src/include/catalog/meson.build
@@ -30,7 +30,6 @@ catalog_headers = [
'pg_conversion.h',
'pg_depend.h',
'pg_database.h',
- 'pg_parameter_acl.h',
'pg_db_role_setting.h',
'pg_tablespace.h',
'pg_authid.h',
@@ -54,6 +53,7 @@ catalog_headers = [
'pg_seclabel.h',
'pg_shseclabel.h',
'pg_collation.h',
+ 'pg_parameter_acl.h',
'pg_partitioned_table.h',
'pg_range.h',
'pg_transform.h',
--
2.35.1
From b4ffaa02f1eb132b011871415c94b84e84fd5245 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 18 May 2022 09:22:22 +0200
Subject: [PATCH 2/7] meson: Some capitalization adjustments in setup output
This makes the style more uniform with what meson produces by itself.
---
meson.build | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/meson.build b/meson.build
index 7b1c8d47c4..3acae5c3e4 100644
--- a/meson.build
+++ b/meson.build
@@ -2583,10 +2583,10 @@ alias_target('backend', backend_targets)
if meson.version().version_compare('>=0.57')
summary({
- 'Data Block Size' : cdata.get('BLCKSZ'),
- 'WAL Block Size' : cdata.get('XLOG_BLCKSZ'),
- 'Segment Size' : cdata.get('RELSEG_SIZE')
- }, section: 'Data Layout'
+ 'data block size' : cdata.get('BLCKSZ'),
+ 'WAL block size' : cdata.get('XLOG_BLCKSZ'),
+ 'segment size' : cdata.get('RELSEG_SIZE')
+ }, section: 'Data layout'
)
summary(
@@ -2644,7 +2644,7 @@ if meson.version().version_compare('>=0.57')
'zlib': zlib,
'zstd': zstd,
},
- section: 'External Libraries'
+ section: 'External libraries'
)
endif
--
2.35.1
From 23a7e7ffb4db7554b2029ba3026d93f8e32b801f Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 18 May 2022 09:47:47 +0200
Subject: [PATCH 3/7] meson: Formatting tweaks for pg_config.h to match
autoheader better
---
meson.build | 26 +++++++++++---------------
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/meson.build b/meson.build
index 3acae5c3e4..20dea263a2 100644
--- a/meson.build
+++ b/meson.build
@@ -227,19 +227,14 @@ meson_bin = find_program(meson_binpath, native: true)
cdata.set('USE_ASSERT_CHECKING', get_option('cassert') ? 1 : false)
-cdata.set('BLCKSZ', 8192, description: '''
- Size of a disk block --- this also limits the size of a tuple. You
- can set it bigger if you need bigger tuples (although TOAST should
- reduce the need to have large tuples, since fields can be spread
- across multiple tuples).
-
- BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ
- is currently 2^15 (32768). This is determined by the 15-bit widths
- of the lp_off and lp_len fields in ItemIdData (see
- include/storage/itemid.h).
-
- Changing BLCKSZ requires an initdb.
-''')
+cdata.set('BLCKSZ', 8192, description:
+'''Size of a disk block --- this also limits the size of a tuple. You can set
+ it bigger if you need bigger tuples (although TOAST should reduce the need
+ to have large tuples, since fields can be spread across multiple tuples).
+ BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ is
+ currently 2^15 (32768). This is determined by the 15-bit widths of the
+ lp_off and lp_len fields in ItemIdData (see include/storage/itemid.h).
+ Changing BLCKSZ requires an initdb.''')
cdata.set('XLOG_BLCKSZ', get_option('wal-blocksize') * 1024)
cdata.set('RELSEG_SIZE', get_option('segsize') * 131072)
@@ -1000,7 +995,8 @@ if get_option('ssl') == 'openssl'
description: 'Define to 1 to build with OpenSSL support.
(-Dssl=openssl)')
cdata.set('OPENSSL_API_COMPAT', 0x10001000,
- description: 'Define to the OpenSSL API version in use. This
avoids deprecation warnings from newer OpenSSL versions.')
+ description: '''Define to the OpenSSL API version in use. This
avoids deprecation warnings
+ from newer OpenSSL versions.''')
else
ssl = dependency('', required : false)
endif
@@ -1639,7 +1635,7 @@ foreach c : decl_checks
kwargs: args)
cdata.set10(varname, found, description:
'''Define to 1 if you have the declaration of `@0@', and to 0 if you
- don't.'''.format(func))
+ don't.'''.format(func))
endforeach
--
2.35.1
From 1d2f4c3d7eb32a01e3ea75816f9ec09add6500db Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 18 May 2022 09:48:43 +0200
Subject: [PATCH 4/7] meson: Remove checks for random and srandom
Removed by 3804539e48e794781c6145c7f988f5d507418fa8.
---
meson.build | 2 --
1 file changed, 2 deletions(-)
diff --git a/meson.build b/meson.build
index 20dea263a2..e6dfb63981 100644
--- a/meson.build
+++ b/meson.build
@@ -1906,7 +1906,6 @@ func_checks = [
['pstat'],
['pthread_is_threaded_np', {'dependencies': [thread_dep]}],
['pwrite'],
- ['random'],
['readlink'],
['readv'],
['setenv'], # FIXME: windows handling
@@ -1915,7 +1914,6 @@ func_checks = [
['setsid'],
['shm_open', {'dependencies': [rt_dep]}],
['shm_unlink', {'dependencies': [rt_dep]}],
- ['srandom'],
['strchrnul'],
['strerror_r', {'dependencies': [thread_dep]}],
['strlcat'],
--
2.35.1
From b831c6caef6b240bb9074018d6e4788f34b82edf Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 18 May 2022 09:49:23 +0200
Subject: [PATCH 5/7] meson: Fix symbol for __builtin_frame_address check
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index e6dfb63981..6954fffc5c 100644
--- a/meson.build
+++ b/meson.build
@@ -1270,7 +1270,7 @@ if cc.has_function('__builtin_constant_p', args: g_c_args)
endif
if cc.has_function('__builtin_frame_address', args: g_c_args)
- cdata.set('HAVE__FRAME_ADDRESS', 1)
+ cdata.set('HAVE__BUILTIN_FRAME_ADDRESS', 1)
endif
--
2.35.1
From b2b65de167610bfb12e7366acf36a7fcf1da7ed0 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 18 May 2022 09:49:38 +0200
Subject: [PATCH 6/7] meson: Remove check for strsignal declaration
This appears to be unnecessary and not in configure.
---
meson.build | 1 -
1 file changed, 1 deletion(-)
diff --git a/meson.build b/meson.build
index 6954fffc5c..e7fd8aa64f 100644
--- a/meson.build
+++ b/meson.build
@@ -1612,7 +1612,6 @@ decl_checks = [
['strlcat', 'string.h'],
['strlcpy', 'string.h'],
['strnlen', 'string.h'],
- ['strsignal', 'string.h'],
['strtoll', 'stdlib.h'], ['strtoull', 'stdlib.h'], # strto[u]ll may exist
but not be declared
]
--
2.35.1
From aff3d38c793914c0098a3c25b0e583d96dd3b21f Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 18 May 2022 10:09:31 +0200
Subject: [PATCH 7/7] meson: Fix extra_version option
With the previous coding, the extra version did not appear in
PG_VERSION_STR.
---
meson.build | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index e7fd8aa64f..b772afef32 100644
--- a/meson.build
+++ b/meson.build
@@ -79,7 +79,8 @@ cdata.set_quoted('PACKAGE_NAME', 'PostgreSQL')
cdata.set_quoted('PACKAGE_BUGREPORT', 'pgsql-b...@lists.postgresql.org')
cdata.set_quoted('PACKAGE_URL', pg_url)
-cdata.set_quoted('PG_VERSION', pg_version + get_option('extra_version'))
+pg_version += get_option('extra_version')
+cdata.set_quoted('PG_VERSION', pg_version)
cdata.set_quoted('PG_VERSION_STR', 'PostgreSQL @0@ on @1@, compiled by
@2@-@3@'.format(
pg_version, target_machine.cpu_family(), cc.get_id(), cc.version()))
cdata.set_quoted('PG_MAJORVERSION', pg_version_major.to_string())
--
2.35.1