diff options
| author | Florian Weimer <fweimer@redhat.com> | 2021-06-30 07:21:14 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2021-06-30 08:43:37 +0200 |
| commit | 734c60ebb607086ad6d67b2544d6b7baba72a652 (patch) | |
| tree | 3d0480b60b81da20b51df998f6585feeb85a8d14 | |
| parent | 98164ba55d01dfe517a71cbc5538ff1f5dc563d6 (diff) | |
| download | glibc-734c60ebb607086ad6d67b2544d6b7baba72a652.tar.xz glibc-734c60ebb607086ad6d67b2544d6b7baba72a652.zip | |
login: Move libutil into libc
The symbols forkpty, login, login_tty, logout, logwtmp, openpty
were moved using scripts/move-symbol-to-libc.py.
This is a single commit because most of the symbols are tied together
via forkpty, for example.
Several changes to use hidden prototypes are needed. This commit
also updates pseudoterminal terminology on modified lines.
For 390 (31-bit), this commit follows the existing style for the
compat symbol version creation.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
79 files changed, 640 insertions, 269 deletions
diff --git a/include/pty.h b/include/pty.h index 4979bb765f..93335fe3b6 100644 --- a/include/pty.h +++ b/include/pty.h @@ -3,7 +3,8 @@ # ifndef _ISOMAC -libutil_hidden_proto (openpty) +libc_hidden_proto (forkpty) +libc_hidden_proto (openpty) # endif /* !_ISOMAC */ #endif diff --git a/include/utmp.h b/include/utmp.h index e8162bd08d..b7921e5fb8 100644 --- a/include/utmp.h +++ b/include/utmp.h @@ -29,7 +29,10 @@ extern int __getutline_r (const struct utmp *__line, struct utmp *__buffer, struct utmp **__result); libc_hidden_proto (__getutline_r) -libutil_hidden_proto (login_tty) +libc_hidden_proto (login) +libc_hidden_proto (login_tty) +libc_hidden_proto (logout) +libc_hidden_proto (logwtmp) # endif /* !_ISOMAC */ #endif diff --git a/login/Makefile b/login/Makefile index bc72e6e5b4..4e6b97734d 100644 --- a/login/Makefile +++ b/login/Makefile @@ -28,7 +28,7 @@ headers := utmp.h bits/utmp.h lastlog.h pty.h routines := getlogin getlogin_r setlogin getlogin_r_chk \ getutent getutent_r getutid getutline getutid_r getutline_r \ utmp_file utmpname updwtmp getpt grantpt unlockpt ptsname \ - ptsname_r_chk + ptsname_r_chk login login_tty logout logwtmp openpty forkpty CFLAGS-grantpt.c += -DLIBEXECDIR='"$(libexecdir)"' @@ -46,11 +46,18 @@ vpath %.c programs tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin tst-updwtmpx \ tst-pututxline-lockfail tst-pututxline-cache -# Build the -lutil library with these extra functions. +ifeq ($(have-GLIBC_2.33),yes) +# Empty compatibility library for old binaries. extra-libs := libutil extra-libs-others := $(extra-libs) - -libutil-routines:= login login_tty logout logwtmp openpty forkpty +libutil-routines := libutil-compat +libutil-shared-only-routines := libutil-compat + +# Pretend that libutil.so is a linker script, so that the symbolic +# link is not installed. +install-lib-ldscripts = libutil.so +$(inst_libdir)/libutil.so: +endif # $(have-GLIBC_2.33) include ../Rules |
