summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/ptsname.c5
-rw-r--r--libc/stdlib/realpath.c1
-rw-r--r--libc/stdlib/stdlib.c1
-rw-r--r--libc/stdlib/unix_grantpt.c4
4 files changed, 7 insertions, 4 deletions
diff --git a/libc/stdlib/ptsname.c b/libc/stdlib/ptsname.c
index d4e99a035..8cac95783 100644
--- a/libc/stdlib/ptsname.c
+++ b/libc/stdlib/ptsname.c
@@ -62,7 +62,7 @@ extern const char _ptyname2[];
/* Store at most BUFLEN characters of the pathname of the slave pseudo
terminal associated with the master FD is open on in BUF.
Return 0 on success, otherwise an error number. */
-int ptsname_r (int fd, char *buf, size_t buflen)
+int attribute_hidden __ptsname_r (int fd, char *buf, size_t buflen)
{
int save_errno = errno;
#if !defined __UNIX98PTY_ONLY__
@@ -179,6 +179,7 @@ int ptsname_r (int fd, char *buf, size_t buflen)
errno = save_errno;
return 0;
}
+strong_alias(__ptsname_r,ptsname_r)
/* Return the pathname of the pseudo terminal slave assoicated with
the master FD is open on, or NULL on errors.
@@ -188,5 +189,5 @@ ptsname (int fd)
{
static char buffer[sizeof (_PATH_DEVPTS) + 20];
- return ptsname_r (fd, buffer, sizeof (buffer)) != 0 ? NULL : buffer;
+ return __ptsname_r (fd, buffer, sizeof (buffer)) != 0 ? NULL : buffer;
}
diff --git a/libc/stdlib/realpath.c b/libc/stdlib/realpath.c
index 2a018b4b7..88677f7a7 100644
--- a/libc/stdlib/realpath.c
+++ b/libc/stdlib/realpath.c
@@ -14,6 +14,7 @@
*/
#define readlink __readlink
+#define getcwd __getcwd
#ifdef HAVE_CONFIG_H
#include <config.h>
diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c
index 0c78c4c70..3bfdcfea5 100644
--- a/libc/stdlib/stdlib.c
+++ b/libc/stdlib/stdlib.c
@@ -38,6 +38,7 @@
#define mbrlen __mbrlen
#define iswspace __iswspace
#define iswspace_l __iswspace_l
+#define wcrtomb __wcrtomb
#define _ISOC99_SOURCE /* for ULLONG primarily... */
#define _GNU_SOURCE
diff --git a/libc/stdlib/unix_grantpt.c b/libc/stdlib/unix_grantpt.c
index bf451a4d3..e087d18c8 100644
--- a/libc/stdlib/unix_grantpt.c
+++ b/libc/stdlib/unix_grantpt.c
@@ -44,7 +44,7 @@
#define vfork fork
#endif
-extern int ptsname_r (int fd, char *buf, size_t buflen);
+extern int __ptsname_r (int fd, char *buf, size_t buflen) attribute_hidden;
/* Return the result of ptsname_r in the buffer pointed to by PTS,
which should be of length BUF_LEN. If it is too long to fit in
@@ -62,7 +62,7 @@ pts_name (int fd, char **pts, size_t buf_len)
if (buf_len)
{
- rv = ptsname_r (fd, buf, buf_len);
+ rv = __ptsname_r (fd, buf, buf_len);
if (rv != 0 || memchr (buf, '\0', buf_len))
/* We either got an error, or we succeeded and the