1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-12 19:04:54 +03:00

login: Hidden prototypes for _getpt, __ptsname_r, grantpt, unlockpt

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2021-06-30 07:21:13 +02:00
parent 3640654575
commit 8d1f854d60
12 changed files with 19 additions and 2 deletions

View File

@@ -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)

View File

@@ -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. */

View File

@@ -28,5 +28,5 @@ grantpt (int fd __attribute__ ((unused)))
__set_errno (ENOSYS);
return -1;
}
libc_hidden_def (grantpt)
stub_warning (grantpt)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -39,3 +39,4 @@ unlockpt (int fd)
}
return __revoke (buf);
}
libc_hidden_def (unlockpt)

View File

@@ -258,3 +258,4 @@ grantpt (int fd)
return retval;
}
libc_hidden_def (grantpt)

View File

@@ -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)

View File

@@ -39,3 +39,4 @@ grantpt (int fd)
__set_errno (EINVAL);
return ret;
}
libc_hidden_def (grantpt)

View File

@@ -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)

View File

@@ -35,3 +35,4 @@ unlockpt (int fd)
__set_errno (EINVAL);
return ret;
}
libc_hidden_def (unlockpt)