aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-08-12 07:59:40 +0200
committerPeter Eisentraut <peter@eisentraut.org>2024-08-12 08:04:35 +0200
commit94980c45674fc2d1125f3ba7ce0bb5d34f770e00 (patch)
treef72c39788a7ec522e7eb6aa50d91683210b3d02a /src
parentf0d11275954719fd5d0281d4135e5c78de46e099 (diff)
downloadpostgresql-94980c45674fc2d1125f3ba7ce0bb5d34f770e00.tar.gz
postgresql-94980c45674fc2d1125f3ba7ce0bb5d34f770e00.zip
Remove support for old realpath() API
The now preferred way to call realpath() is by passing NULL as the second argument and get a malloc'ed result. We still supported the old way of providing our own buffer as a second argument, for some platforms that didn't support the new way yet. Those were only Solaris less than version 11 and some older AIX versions (7.1 and newer appear to support the new variant). We don't support those platforms versions anymore, so we can remove this extra code. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://www.postgresql.org/message-id/flat/9e638b49-5c3f-470f-a392-2cbedb2f7855%40eisentraut.org
Diffstat (limited to 'src')
-rw-r--r--src/common/exec.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/common/exec.c b/src/common/exec.c
index 0bee19c1e53..32fd56532aa 100644
--- a/src/common/exec.c
+++ b/src/common/exec.c
@@ -285,25 +285,6 @@ pg_realpath(const char *fname)
#ifndef WIN32
path = realpath(fname, NULL);
- if (path == NULL && errno == EINVAL)
- {
- /*
- * Cope with old-POSIX systems that require a user-provided buffer.
- * Assume MAXPGPATH is enough room on all such systems.
- */
- char *buf = malloc(MAXPGPATH);
-
- if (buf == NULL)
- return NULL; /* assume errno is set */
- path = realpath(fname, buf);
- if (path == NULL) /* don't leak memory */
- {
- int save_errno = errno;
-
- free(buf);
- errno = save_errno;
- }
- }
#else /* WIN32 */
/*