From f0f2c0c1aef95757c4e7f144d5577e2b0d814279 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 29 Oct 2025 07:36:46 +0100 Subject: 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 Discussion: https://www.postgresql.org/message-id/flat/0e3d8644-c01d-4374-86ea-9f0a987981f0%40eisentraut.org --- src/common/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/string.c') diff --git a/src/common/string.c b/src/common/string.c index d8a3129c3ba..95c7c07d502 100644 --- a/src/common/string.c +++ b/src/common/string.c @@ -47,7 +47,7 @@ pg_str_endswith(const char *str, const char *end) * strtoint --- just like strtol, but returns int not long */ int -strtoint(const char *pg_restrict str, char **pg_restrict endptr, int base) +strtoint(const char *restrict str, char **restrict endptr, int base) { long val; -- cgit v1.2.3