Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit94980c4

Browse files
committed
Remove support for old realpath() API
The now preferred way to call realpath() is by passing NULL as thesecond argument and get a malloc'ed result. We still supported theold way of providing our own buffer as a second argument, for someplatforms that didn't support the new way yet. Those were onlySolaris less than version 11 and some older AIX versions (7.1 andnewer appear to support the new variant). We don't support thoseplatforms 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
1 parentf0d1127 commit94980c4

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

‎src/common/exec.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -285,25 +285,6 @@ pg_realpath(const char *fname)
285285

286286
#ifndefWIN32
287287
path=realpath(fname,NULL);
288-
if (path==NULL&&errno==EINVAL)
289-
{
290-
/*
291-
* Cope with old-POSIX systems that require a user-provided buffer.
292-
* Assume MAXPGPATH is enough room on all such systems.
293-
*/
294-
char*buf=malloc(MAXPGPATH);
295-
296-
if (buf==NULL)
297-
returnNULL;/* assume errno is set */
298-
path=realpath(fname,buf);
299-
if (path==NULL)/* don't leak memory */
300-
{
301-
intsave_errno=errno;
302-
303-
free(buf);
304-
errno=save_errno;
305-
}
306-
}
307288
#else/* WIN32 */
308289

309290
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp