aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-06-30 07:21:13 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-06-30 07:28:12 +0200
commit8d1f854d60d159931594f31993599b9d9168552b (patch)
treeaa19e4f4bc12be041f2f1fb67b6a9d38fb7dab7d
parent3640654575bef7b56840fbadc1a6d6180ea011a7 (diff)
downloadglibc-8d1f854d60d159931594f31993599b9d9168552b.zip
glibc-8d1f854d60d159931594f31993599b9d9168552b.tar.gz
glibc-8d1f854d60d159931594f31993599b9d9168552b.tar.bz2
login: Hidden prototypes for _getpt, __ptsname_r, grantpt, unlockpt
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r--include/stdlib.h6
-rw-r--r--login/getpt.c1
-rw-r--r--login/grantpt.c2
-rw-r--r--login/ptsname.c1
-rw-r--r--sysdeps/mach/hurd/ptsname.c1
-rw-r--r--sysdeps/unix/bsd/getpt.c3
-rw-r--r--sysdeps/unix/bsd/unlockpt.c1
-rw-r--r--sysdeps/unix/grantpt.c1
-rw-r--r--sysdeps/unix/sysv/linux/getpt.c2
-rw-r--r--sysdeps/unix/sysv/linux/grantpt.c1
-rw-r--r--sysdeps/unix/sysv/linux/ptsname.c1
-rw-r--r--sysdeps/unix/sysv/linux/unlockpt.c1
12 files changed, 19 insertions, 2 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index e2453c1..1f6e150 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -137,6 +137,12 @@ libc_hidden_proto (__libc_reallocarray)
extern int __libc_system (const char *line);
+extern __typeof (getpt) __getpt;
+extern __typeof (ptsname_r) __ptsname_r;
+libc_hidden_proto (__getpt)
+libc_hidden_proto (__ptsname_r)
+libc_hidden_proto (grantpt)
+libc_hidden_proto (unlockpt)
extern double __strtod_internal (const char *__restrict __nptr,
char **__restrict __endptr, int __group)
diff --git a/login/getpt.c b/login/getpt.c
index 585bc3b..9b71765 100644
--- a/login/getpt.c
+++ b/login/getpt.c
@@ -27,6 +27,7 @@ __getpt (void)
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__getpt)
weak_alias (__getpt, getpt)
/* We cannot define posix_openpt in general for BSD systems. */
diff --git a/login/grantpt.c b/login/grantpt.c
index 7dc5db3..9390966 100644
--- a/login/grantpt.c
+++ b/login/grantpt.c
@@ -28,5 +28,5 @@ grantpt (int fd __attribute__ ((unused)))
__set_errno (ENOSYS);
return -1;
}
-
+libc_hidden_def (grantpt)
stub_warning (grantpt)
diff --git a/login/ptsname.c b/login/ptsname.c
index c42f27d..ae94fbd 100644
--- a/login/ptsname.c
+++ b/login/ptsname.c
@@ -38,6 +38,7 @@ __ptsname_r (int fd __attribute__ ((unused)),
__set_errno (ENOSYS);
return ENOSYS;
}
+libc_hidden_def (__ptsname_r)
weak_alias (__ptsname_r, ptsname_r)
stub_warning(ptsname)
diff --git a/sysdeps/mach/hurd/ptsname.c b/sysdeps/mach/hurd/ptsname.c
index d5f21a7..5405b8f 100644
--- a/sysdeps/mach/hurd/ptsname.c
+++ b/sysdeps/mach/hurd/ptsname.c
@@ -88,4 +88,5 @@ __ptsname_r (int fd, char *buf, size_t buflen)
{
return __ptsname_internal (fd, buf, buflen, NULL);
}
+libc_hidden_def (__ptsname_r)
weak_alias (__ptsname_r, ptsname_r)
diff --git a/sysdeps/unix/bsd/getpt.c b/sysdeps/unix/bsd/getpt.c
index 1dde0cc..2fa6632 100644
--- a/sysdeps/unix/bsd/getpt.c
+++ b/sysdeps/unix/bsd/getpt.c
@@ -20,7 +20,7 @@
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
-
+#include <stdlib.h>
/* Prefix for master pseudo terminal nodes. */
#define _PATH_PTY "/dev/pty"
@@ -79,6 +79,7 @@ __getpt (void)
{
return __bsd_openpt (O_RDWR);
}
+libc_hidden_def (__getpt)
weak_alias (__getpt, getpt)
int
diff --git a/sysdeps/unix/bsd/unlockpt.c b/sysdeps/unix/bsd/unlockpt.c
index 6cfdb93..181e615 100644
--- a/sysdeps/unix/bsd/unlockpt.c
+++ b/sysdeps/unix/bsd/unlockpt.c
@@ -39,3 +39,4 @@ unlockpt (int fd)
}
return __revoke (buf);
}
+libc_hidden_def (unlockpt)
diff --git a/sysdeps/unix/grantpt.c b/sysdeps/unix/grantpt.c
index 46b6f56..6269ee2 100644
--- a/sysdeps/unix/grantpt.c
+++ b/sysdeps/unix/grantpt.c
@@ -258,3 +258,4 @@ grantpt (int fd)
return retval;
}
+libc_hidden_def (grantpt)
diff --git a/sysdeps/unix/sysv/linux/getpt.c b/sysdeps/unix/sysv/linux/getpt.c
index 784110a..52532f7 100644
--- a/sysdeps/unix/sysv/linux/getpt.c
+++ b/sysdeps/unix/sysv/linux/getpt.c
@@ -19,6 +19,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <paths.h>
+#include <stdlib.h>
/* Path to the master pseudo terminal cloning device. */
#define _PATH_DEVPTMX _PATH_DEV "ptmx"
@@ -37,4 +38,5 @@ __getpt (void)
{
return __posix_openpt (O_RDWR);
}
+libc_hidden_def (__getpt)
weak_alias (__getpt, getpt)
diff --git a/sysdeps/unix/sysv/linux/grantpt.c b/sysdeps/unix/sysv/linux/grantpt.c
index b4addfd..57e988f 100644
--- a/sysdeps/unix/sysv/linux/grantpt.c
+++ b/sysdeps/unix/sysv/linux/grantpt.c
@@ -39,3 +39,4 @@ grantpt (int fd)
__set_errno (EINVAL);
return ret;
}
+libc_hidden_def (grantpt)
diff --git a/sysdeps/unix/sysv/linux/ptsname.c b/sysdeps/unix/sysv/linux/ptsname.c
index b9701da..9f78ef4 100644
--- a/sysdeps/unix/sysv/linux/ptsname.c
+++ b/sysdeps/unix/sysv/linux/ptsname.c
@@ -79,4 +79,5 @@ __ptsname_r (int fd, char *buf, size_t buflen)
__set_errno (save_errno);
return 0;
}
+libc_hidden_def (__ptsname_r)
weak_alias (__ptsname_r, ptsname_r)
diff --git a/sysdeps/unix/sysv/linux/unlockpt.c b/sysdeps/unix/sysv/linux/unlockpt.c
index 57d08d8..ae5148a 100644
--- a/sysdeps/unix/sysv/linux/unlockpt.c
+++ b/sysdeps/unix/sysv/linux/unlockpt.c
@@ -35,3 +35,4 @@ unlockpt (int fd)
__set_errno (EINVAL);
return ret;
}
+libc_hidden_def (unlockpt)