+2020-09-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ getcwd: merge recent glibc changes
+ * lib/getcwd.c (GETCWD_RETURN_TYPE) [!_LIBC]: New macro.
+ (__getcwd, getcwd) [_LIBC && !GETCWD_RETURN_TYPE]: Add aliases.
+
2020-09-06 Bruno Haible <bruno@clisp.org>
attribute: Clarify which file to include.
#endif
#if !_LIBC
+# define GETCWD_RETURN_TYPE char *
# define __close_nocancel_nostatus close
# define __getcwd_generic rpl_getcwd
# define stat64 stat
if BUF is NULL, an array is allocated with 'malloc'; the array is SIZE
bytes long, unless SIZE == 0, in which case it is as big as necessary. */
-char *
+GETCWD_RETURN_TYPE
__getcwd_generic (char *buf, size_t size)
{
/* Lengths of big file name components and entire file names, and a
}
return NULL;
}
+
+#if defined _LIBC && !defined GETCWD_RETURN_TYPE
+libc_hidden_def (__getcwd)
+weak_alias (__getcwd, getcwd)
+#endif