|
|
94084c |
commit 433ec4f14a5753c7689c83c20c9972915c53c204
|
|
|
94084c |
Author: Aurelien Jarno <aurelien@aurel32.net>
|
|
|
94084c |
Date: Fri Sep 10 19:39:35 2021 +0200
|
|
|
94084c |
|
|
|
94084c |
posix: Fix attribute access mode on getcwd [BZ #27476]
|
|
|
94084c |
|
|
|
94084c |
There is a GNU extension that allows to call getcwd(NULL, >0). It is
|
|
|
94084c |
described in the documentation, but also directly in the unistd.h
|
|
|
94084c |
header, just above the declaration.
|
|
|
94084c |
|
|
|
94084c |
Therefore the attribute access mode added in commit 06febd8c6705
|
|
|
94084c |
is not correct. Drop it.
|
|
|
94084c |
|
|
|
94084c |
diff --git a/posix/bits/unistd.h b/posix/bits/unistd.h
|
|
|
94084c |
index f0831386c7ddb574..622adeb2b28ed298 100644
|
|
|
94084c |
--- a/posix/bits/unistd.h
|
|
|
94084c |
+++ b/posix/bits/unistd.h
|
|
|
94084c |
@@ -199,10 +199,9 @@ __NTH (readlinkat (int __fd, const char *__restrict __path,
|
|
|
94084c |
#endif
|
|
|
94084c |
|
|
|
94084c |
extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
|
|
|
94084c |
- __THROW __wur __attr_access ((__write_only__, 1, 2));
|
|
|
94084c |
+ __THROW __wur;
|
|
|
94084c |
extern char *__REDIRECT_NTH (__getcwd_alias,
|
|
|
94084c |
- (char *__buf, size_t __size), getcwd)
|
|
|
94084c |
- __wur __attr_access ((__write_only__, 1, 2));
|
|
|
94084c |
+ (char *__buf, size_t __size), getcwd) __wur;
|
|
|
94084c |
extern char *__REDIRECT_NTH (__getcwd_chk_warn,
|
|
|
94084c |
(char *__buf, size_t __size, size_t __buflen),
|
|
|
94084c |
__getcwd_chk)
|
|
|
94084c |
diff --git a/posix/unistd.h b/posix/unistd.h
|
|
|
94084c |
index 3dca65732fdde52f..8224c5fbc956306f 100644
|
|
|
94084c |
--- a/posix/unistd.h
|
|
|
94084c |
+++ b/posix/unistd.h
|
|
|
94084c |
@@ -528,8 +528,7 @@ extern int fchdir (int __fd) __THROW __wur;
|
|
|
94084c |
an array is allocated with `malloc'; the array is SIZE
|
|
|
94084c |
bytes long, unless SIZE == 0, in which case it is as
|
|
|
94084c |
big as necessary. */
|
|
|
94084c |
-extern char *getcwd (char *__buf, size_t __size) __THROW __wur
|
|
|
94084c |
- __attr_access ((__write_only__, 1, 2));
|
|
|
94084c |
+extern char *getcwd (char *__buf, size_t __size) __THROW __wur;
|
|
|
94084c |
|
|
|
94084c |
#ifdef __USE_GNU
|
|
|
94084c |
/* Return a malloc'd string containing the current directory name.
|