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 /sysdeps/unix/sysv/linux/s390 | |
parent | 98164ba55d01dfe517a71cbc5538ff1f5dc563d6 (diff) | |
download | glibc-734c60ebb607086ad6d67b2544d6b7baba72a652.tar.gz 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>
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390')
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/Versions | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist | 13 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/libutil-compat.c | 23 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/libutil.abilist | 9 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/login.c | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/login32.c | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist | 7 |
9 files changed, 67 insertions, 26 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile index fd8cf92633..6b6d59b7dd 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/Makefile +++ b/sysdeps/unix/sysv/linux/s390/s390-32/Makefile @@ -2,8 +2,7 @@ default-abi := 32 ifeq ($(subdir),login) -sysdep_routines += utmp32 utmpx32 -libutil-routines += login32 +sysdep_routines += utmp32 utmpx32 login32 endif ifeq ($(subdir),misc) diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/Versions b/sysdeps/unix/sysv/linux/s390/s390-32/Versions index cc03e70015..bd1a46df88 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/Versions +++ b/sysdeps/unix/sysv/linux/s390/s390-32/Versions @@ -42,6 +42,7 @@ libc { updwtmpx; getutmp; getutmpx; + login; } GLIBC_2.11 { fallocate64; @@ -53,6 +54,6 @@ libc { libutil { GLIBC_2.9 { - login; + __libutil_version_placeholder; } } diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index 5497df2f61..8f11602d61 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -493,6 +493,7 @@ GLIBC_2.0 fnmatch F GLIBC_2.0 fopen F GLIBC_2.0 fopencookie F GLIBC_2.0 fork F +GLIBC_2.0 forkpty F GLIBC_2.0 fpathconf F GLIBC_2.0 fprintf F GLIBC_2.0 fputc F @@ -751,6 +752,10 @@ GLIBC_2.0 localtime F GLIBC_2.0 localtime_r F GLIBC_2.0 lockf F GLIBC_2.0 locs D 0x4 +GLIBC_2.0 login F +GLIBC_2.0 login_tty F +GLIBC_2.0 logout F +GLIBC_2.0 logwtmp F GLIBC_2.0 longjmp F GLIBC_2.0 lrand48 F GLIBC_2.0 lrand48_r F @@ -831,6 +836,7 @@ GLIBC_2.0 open F GLIBC_2.0 open_memstream F GLIBC_2.0 opendir F GLIBC_2.0 openlog F +GLIBC_2.0 openpty F GLIBC_2.0 optarg D 0x4 GLIBC_2.0 opterr D 0x4 GLIBC_2.0 optind D 0x4 @@ -2544,8 +2550,13 @@ GLIBC_2.34 dlopen F GLIBC_2.34 dlsym F GLIBC_2.34 dlvsym F GLIBC_2.34 execveat F +GLIBC_2.34 forkpty F GLIBC_2.34 lio_listio F GLIBC_2.34 lio_listio64 F +GLIBC_2.34 login F +GLIBC_2.34 login_tty F +GLIBC_2.34 logout F +GLIBC_2.34 logwtmp F GLIBC_2.34 mq_close F GLIBC_2.34 mq_getattr F GLIBC_2.34 mq_notify F @@ -2562,6 +2573,7 @@ GLIBC_2.34 mtx_lock F GLIBC_2.34 mtx_timedlock F GLIBC_2.34 mtx_trylock F GLIBC_2.34 mtx_unlock F +GLIBC_2.34 openpty F GLIBC_2.34 pthread_attr_getaffinity_np F GLIBC_2.34 pthread_attr_getguardsize F GLIBC_2.34 pthread_attr_getstack F @@ -3005,6 +3017,7 @@ GLIBC_2.9 getutxent F GLIBC_2.9 getutxid F GLIBC_2.9 getutxline F GLIBC_2.9 inotify_init1 F +GLIBC_2.9 login F GLIBC_2.9 pipe2 F GLIBC_2.9 pututline F GLIBC_2.9 pututxline F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libutil-compat.c b/sysdeps/unix/sysv/linux/s390/s390-32/libutil-compat.c new file mode 100644 index 0000000000..787b874e31 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libutil-compat.c @@ -0,0 +1,23 @@ +/* Placeholder compatibility symbols for libutil. s390 version. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#include "utmp-compat.h" +#include <login/libutil-compat.c> + +symbol_version (__libutil_version_placeholder_1, + __libutil_version_placeholder, UTMP_COMPAT_BASE); diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libutil.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libutil.abilist index bf735f7c00..5c9c8a5b00 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libutil.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libutil.abilist @@ -1,7 +1,2 @@ -GLIBC_2.0 forkpty F -GLIBC_2.0 login F -GLIBC_2.0 login_tty F -GLIBC_2.0 logout F -GLIBC_2.0 logwtmp F -GLIBC_2.0 openpty F -GLIBC_2.9 login F +GLIBC_2.0 __libutil_version_placeholder F +GLIBC_2.9 __libutil_version_placeholder F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/login.c b/sysdeps/unix/sysv/linux/s390/s390-32/login.c index 5df028298a..62742a8a5f 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/login.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/login.c @@ -23,13 +23,14 @@ #include <unistd.h> #include <stdlib.h> #include <utmp.h> +#include <shlib-compat.h> #include "utmp-compat.h" -#undef weak_alias -#define weak_alias(n,a) -#define login __login +#undef compat_symbol +#define compat_symbol(...) #include "login/login.c" -#undef login -default_symbol_version (__login, login, UTMP_COMPAT_BASE); +/* Compatibility symbol as formerly found in libutil. login@GLIBC_2.0 + is supplied by login32.c. */ +symbol_version (__login, login, UTMP_COMPAT_BASE); diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/login32.c b/sysdeps/unix/sysv/linux/s390/s390-32/login32.c index 45419bc092..e37da4e573 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/login32.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/login32.c @@ -16,12 +16,13 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ -#include <sys/types.h> -#include <utmp.h> -#include <libc-symbols.h> +#ifdef SHARED +# include <sys/types.h> +# include <utmp.h> +# include <libc-symbols.h> -#include "utmp32.h" -#include "utmp-convert.h" +# include "utmp32.h" +# include "utmp-convert.h" /* Write the given entry into utmp and wtmp. */ void @@ -34,3 +35,4 @@ login32 (const struct utmp32 *entry) } symbol_version (login32, login, GLIBC_2.0); +#endif diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist index 8a050a9374..876aa5ea80 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist @@ -826,6 +826,7 @@ GLIBC_2.2 fopen F GLIBC_2.2 fopen64 F GLIBC_2.2 fopencookie F GLIBC_2.2 fork F +GLIBC_2.2 forkpty F GLIBC_2.2 fpathconf F GLIBC_2.2 fprintf F GLIBC_2.2 fputc F @@ -1159,6 +1160,10 @@ GLIBC_2.2 localtime_r F GLIBC_2.2 lockf F GLIBC_2.2 lockf64 F GLIBC_2.2 locs D 0x8 +GLIBC_2.2 login F +GLIBC_2.2 login_tty F +GLIBC_2.2 logout F +GLIBC_2.2 logwtmp F GLIBC_2.2 longjmp F GLIBC_2.2 lrand48 F GLIBC_2.2 lrand48_r F @@ -1258,6 +1263,7 @@ GLIBC_2.2 open64 F GLIBC_2.2 open_memstream F GLIBC_2.2 opendir F GLIBC_2.2 openlog F +GLIBC_2.2 openpty F GLIBC_2.2 optarg D 0x8 GLIBC_2.2 opterr D 0x4 GLIBC_2.2 optind D 0x4 @@ -2353,8 +2359,13 @@ GLIBC_2.34 dlopen F GLIBC_2.34 dlsym F GLIBC_2.34 dlvsym F GLIBC_2.34 execveat F +GLIBC_2.34 forkpty F GLIBC_2.34 lio_listio F GLIBC_2.34 lio_listio64 F +GLIBC_2.34 login F +GLIBC_2.34 login_tty F +GLIBC_2.34 logout F +GLIBC_2.34 logwtmp F GLIBC_2.34 mq_close F GLIBC_2.34 mq_getattr F GLIBC_2.34 mq_notify F @@ -2371,6 +2382,7 @@ GLIBC_2.34 mtx_lock F GLIBC_2.34 mtx_timedlock F GLIBC_2.34 mtx_trylock F GLIBC_2.34 mtx_unlock F +GLIBC_2.34 openpty F GLIBC_2.34 pthread_attr_getaffinity_np F GLIBC_2.34 pthread_attr_getguardsize F GLIBC_2.34 pthread_attr_getstack F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist index 14bd135ea8..e6f3e6109f 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libutil.abilist @@ -1,6 +1 @@ -GLIBC_2.2 forkpty F -GLIBC_2.2 login F -GLIBC_2.2 login_tty F -GLIBC_2.2 logout F -GLIBC_2.2 logwtmp F -GLIBC_2.2 openpty F +GLIBC_2.2 __libutil_version_placeholder F |