summaryrefslogtreecommitdiff
path: root/src/include/common/logging.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-10-29 07:36:46 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-10-29 07:52:58 +0100
commitf0f2c0c1aef95757c4e7f144d5577e2b0d814279 (patch)
tree6ad22c3af3a815fc0683ae4dd6f1cd677d612787 /src/include/common/logging.h
parentc094be259b918fbcae5bed12d6c6b64bcb4c4846 (diff)
Replace pg_restrict by standard restrict
MSVC in C11 mode supports the standard restrict qualifier, so we don't need the workaround naming pg_restrict anymore. Even though restrict is in C99 and should be supported by all supported compilers, we keep the configure test and the hardcoded redirection to __restrict, because that will also work in C++ in all supported compilers. (restrict is not part of the C++ standard.) For backward compatibility for extensions, we keep a #define of pg_restrict around, but our own code doesn't use it anymore. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/0e3d8644-c01d-4374-86ea-9f0a987981f0%40eisentraut.org
Diffstat (limited to 'src/include/common/logging.h')
-rw-r--r--src/include/common/logging.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/common/logging.h b/src/include/common/logging.h
index 81529ee8f29..2e0333dc009 100644
--- a/src/include/common/logging.h
+++ b/src/include/common/logging.h
@@ -93,10 +93,10 @@ void pg_logging_set_pre_callback(void (*cb) (void));
void pg_logging_set_locus_callback(void (*cb) (const char **filename, uint64 *lineno));
void pg_log_generic(enum pg_log_level level, enum pg_log_part part,
- const char *pg_restrict fmt,...)
+ const char *restrict fmt,...)
pg_attribute_printf(3, 4);
void pg_log_generic_v(enum pg_log_level level, enum pg_log_part part,
- const char *pg_restrict fmt, va_list ap)
+ const char *restrict fmt, va_list ap)
pg_attribute_printf(3, 0);
/*