login: Use aliases for most utmpx functions

Message ID 20180817144459.8136E4028A980@oldenburg.str.redhat.com
State Committed
Headers

Commit Message

Florian Weimer Aug. 17, 2018, 2:44 p.m. UTC
  The existing implementations simply called the utmp functions,
with casts if necessary (struct utmpx and struct utmp have the
same layout).

2018-08-17  Florian Weimer  <fweimer@redhat.com>

	[BZ #23518]
	* login/endutxent.c, login/getutxent.c, login/getutxid.c,
	login/getutxline.c, login/pututxline.c, login/updwtmpx.c,
	login/utmpxname.c,
	sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c,
	sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c,
	sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c,
	sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c,
	sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c: Remove files.
	* login/getutent.c (__getutent): Add getutxent, __getutxent
	aliases.
	* login/getutent_r.c (__setutent): Add setutxent, __setutxent
	aliases.
	(__pututline): Add pututxline, __pututxline aliases.
	(__endutent): Add endutxent, __endutxent aliases.
	* login/getutid.c (__getutid): Add getutxid, __getutxid aliases.
	* login/getutline.c (__getutline): Add getutxline, __getutxline
	aliases.
	* login/updwtmpx.c (__updwtmp): Add updwtmx, __updwtmpx aliases.
	* login/utmpname.c (__utmpname): Add utmpxname alias.
	* sysdeps/gnu/Makefile [$(subdir) == login] (sysdep_routines):
	Remove setutxent, getutxent, endutxent, getutxid, getutxline,
	pututxline, utmpxname, updwtmpx.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutent.c (__getutxent):
	Add getutxent alias.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
	(__setutent): Add setutxent alias.
	(__endutent): Add endutxent alias.
	(__pututxline): Add pututxline alias.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutid.c (__getutxid): Add
	getutxid alias.
	* sysdeps/unix/sysv/linux/s390/s390-32/getutline.c (__getutxline):
	Add getutxline alias.
  

Comments

Adhemerval Zanella Aug. 17, 2018, 4:33 p.m. UTC | #1
On 17/08/2018 11:44, Florian Weimer wrote:
> The existing implementations simply called the utmp functions,
> with casts if necessary (struct utmpx and struct utmp have the
> same layout).
> 
> 2018-08-17  Florian Weimer  <fweimer@redhat.com>
> 
> 	[BZ #23518]
> 	* login/endutxent.c, login/getutxent.c, login/getutxid.c,
> 	login/getutxline.c, login/pututxline.c, login/updwtmpx.c,
> 	login/utmpxname.c,
> 	sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c,
> 	sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c,
> 	sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c,
> 	sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c,
> 	sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c: Remove files.
> 	* login/getutent.c (__getutent): Add getutxent, __getutxent
> 	aliases.
> 	* login/getutent_r.c (__setutent): Add setutxent, __setutxent
> 	aliases.
> 	(__pututline): Add pututxline, __pututxline aliases.
> 	(__endutent): Add endutxent, __endutxent aliases.
> 	* login/getutid.c (__getutid): Add getutxid, __getutxid aliases.
> 	* login/getutline.c (__getutline): Add getutxline, __getutxline
> 	aliases.
> 	* login/updwtmpx.c (__updwtmp): Add updwtmx, __updwtmpx aliases.
> 	* login/utmpname.c (__utmpname): Add utmpxname alias.
> 	* sysdeps/gnu/Makefile [$(subdir) == login] (sysdep_routines):
> 	Remove setutxent, getutxent, endutxent, getutxid, getutxline,
> 	pututxline, utmpxname, updwtmpx.
> 	* sysdeps/unix/sysv/linux/s390/s390-32/getutent.c (__getutxent):
> 	Add getutxent alias.
> 	* sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
> 	(__setutent): Add setutxent alias.
> 	(__endutent): Add endutxent alias.
> 	(__pututxline): Add pututxline alias.
> 	* sysdeps/unix/sysv/linux/s390/s390-32/getutid.c (__getutxid): Add
> 	getutxid alias.
> 	* sysdeps/unix/sysv/linux/s390/s390-32/getutline.c (__getutxline):
> 	Add getutxline alias.

LGTM. I wonder if it is worth to add Static_assert to check for equality of
internal offsets from struct utmpx and struct utmp.
  

Patch

diff --git a/login/endutxent.c b/login/endutxent.c
deleted file mode 100644
index 5e2ddb20d0..0000000000
--- a/login/endutxent.c
+++ /dev/null
@@ -1,26 +0,0 @@ 
-/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
-
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-void
-endutxent (void)
-{
-  __endutent ();
-}
diff --git a/login/getutent.c b/login/getutent.c
index 4b7d6f863c..a73ef254d0 100644
--- a/login/getutent.c
+++ b/login/getutent.c
@@ -43,3 +43,5 @@  __getutent (void)
 }
 libc_hidden_def (__getutent)
 weak_alias (__getutent, getutent)
+weak_alias (__getutent, getutxent)
+strong_alias (__getutent, __getutxent)
diff --git a/login/getutent_r.c b/login/getutent_r.c
index 44239ecb81..1c6a6f1ff6 100644
--- a/login/getutent_r.c
+++ b/login/getutent_r.c
@@ -37,6 +37,8 @@  __setutent (void)
   __libc_lock_unlock (__libc_utmp_lock);
 }
 weak_alias (__setutent, setutent)
+weak_alias (__setutent, setutxent)
+strong_alias (__setutent, __setutxent)
 
 
 int
@@ -71,6 +73,8 @@  __pututline (const struct utmp *data)
 }
 libc_hidden_def (__pututline)
 weak_alias (__pututline, pututline)
+weak_alias (__pututline, pututxline)
+strong_alias (__pututline, __pututxline)
 
 
 void
@@ -83,3 +87,5 @@  __endutent (void)
   __libc_lock_unlock (__libc_utmp_lock);
 }
 weak_alias (__endutent, endutent)
+weak_alias (__endutent, endutxent)
+strong_alias (__endutent, __endutxent)
diff --git a/login/getutid.c b/login/getutid.c
index 9ef234327d..2172fadb0f 100644
--- a/login/getutid.c
+++ b/login/getutid.c
@@ -41,3 +41,5 @@  __getutid (const struct utmp *id)
 }
 libc_hidden_def (__getutid)
 weak_alias (__getutid, getutid)
+weak_alias (__getutid, getutxid)
+strong_alias (__getutid, __getutxid)
diff --git a/login/getutline.c b/login/getutline.c
index cc1a8615e7..05a4b3fcbf 100644
--- a/login/getutline.c
+++ b/login/getutline.c
@@ -42,3 +42,5 @@  __getutline (const struct utmp *line)
 }
 libc_hidden_def (__getutline)
 weak_alias (__getutline, getutline)
+weak_alias (__getutline, getutxline)
+strong_alias (__getutline, __getutxline)
diff --git a/login/getutxent.c b/login/getutxent.c
deleted file mode 100644
index aa6fd7beee..0000000000
--- a/login/getutxent.c
+++ /dev/null
@@ -1,26 +0,0 @@ 
-/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
-
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-struct utmpx *
-getutxent (void)
-{
-  return (struct utmpx *) __getutent ();
-}
diff --git a/login/getutxid.c b/login/getutxid.c
deleted file mode 100644
index d64f60be96..0000000000
--- a/login/getutxid.c
+++ /dev/null
@@ -1,26 +0,0 @@ 
-/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
-
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-struct utmpx *
-getutxid (const struct utmpx *id)
-{
-  return (struct utmpx *) __getutid ((const struct utmp *) id);
-}
diff --git a/login/getutxline.c b/login/getutxline.c
deleted file mode 100644
index 3169c05a68..0000000000
--- a/login/getutxline.c
+++ /dev/null
@@ -1,26 +0,0 @@ 
-/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
-
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-struct utmpx *
-getutxline (const struct utmpx *line)
-{
-  return (struct utmpx *) __getutline ((const struct utmp *) line);
-}
diff --git a/login/pututxline.c b/login/pututxline.c
deleted file mode 100644
index a58fba887c..0000000000
--- a/login/pututxline.c
+++ /dev/null
@@ -1,26 +0,0 @@ 
-/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
-
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-struct utmpx *
-pututxline (const struct utmpx *utmpx)
-{
-  return (struct utmpx *) __pututline ((const struct utmp *) utmpx);
-}
diff --git a/login/setutxent.c b/login/setutxent.c
deleted file mode 100644
index f9a86a59e6..0000000000
--- a/login/setutxent.c
+++ /dev/null
@@ -1,26 +0,0 @@ 
-/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
-
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-void
-setutxent (void)
-{
-  return __setutent ();
-}
diff --git a/login/updwtmp.c b/login/updwtmp.c
index 7ae96224ca..aee74f45bd 100644
--- a/login/updwtmp.c
+++ b/login/updwtmp.c
@@ -33,3 +33,5 @@  __updwtmp (const char *wtmp_file, const struct utmp *utmp)
 }
 libc_hidden_def (__updwtmp)
 weak_alias (__updwtmp, updwtmp)
+weak_alias (__updwtmp, updwtmpx)
+strong_alias (__updwtmp, __updwtmpx)
diff --git a/login/updwtmpx.c b/login/updwtmpx.c
deleted file mode 100644
index 04c7bab49c..0000000000
--- a/login/updwtmpx.c
+++ /dev/null
@@ -1,26 +0,0 @@ 
-/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
-
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-void
-updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
-{
-  __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
-}
diff --git a/login/utmpname.c b/login/utmpname.c
index 73b19c33ce..9c96922d23 100644
--- a/login/utmpname.c
+++ b/login/utmpname.c
@@ -73,3 +73,4 @@  done:
   return result;
 }
 weak_alias (__utmpname, utmpname)
+weak_alias (__utmpname, utmpxname)
diff --git a/login/utmpxname.c b/login/utmpxname.c
deleted file mode 100644
index a79f3306ea..0000000000
--- a/login/utmpxname.c
+++ /dev/null
@@ -1,26 +0,0 @@ 
-/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1998.
-
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-int
-utmpxname (const char *file)
-{
-  return __utmpname (file);
-}
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
index ae0c3fc0aa..8c9200e5e3 100644
--- a/sysdeps/gnu/Makefile
+++ b/sysdeps/gnu/Makefile
@@ -59,8 +59,7 @@  $(foreach o,$(object-suffixes) $(object-suffixes:=.d),\
 endif
 
 ifeq ($(subdir),login)
-sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
-		   pututxline utmpxname updwtmpx getutmpx getutmp
+sysdep_routines += getutmpx getutmp
 
 sysdep_headers += utmpx.h bits/utmpx.h
 endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c
index c424774910..820dd96068 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c
@@ -29,4 +29,5 @@ 
 
 #if defined SHARED
 default_symbol_version (__getutent, getutent, UTMP_COMPAT_BASE);
+default_symbol_version (__getutxent, getutxent, UTMP_COMPAT_BASE);
 #endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
index 2928d63bf9..d77b4eea44 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c
@@ -24,8 +24,11 @@ 
 #include "utmp-private.h"
 
 #if defined SHARED
+/* No compat symbols are needed for these functions.  */
 weak_alias (__setutent, setutent)
+weak_alias (__setutent, setutxent)
 weak_alias (__endutent, endutent)
+weak_alias (__endutent, endutxent)
 
 # undef weak_alias
 # define weak_alias(n,a)
@@ -35,4 +38,5 @@  weak_alias (__endutent, endutent)
 #if defined SHARED
 default_symbol_version (__getutent_r, getutent_r, UTMP_COMPAT_BASE);
 default_symbol_version (__pututline, pututline, UTMP_COMPAT_BASE);
+default_symbol_version (__pututxline, pututxline, UTMP_COMPAT_BASE);
 #endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c
index 6e36509a0a..e813040abb 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c
@@ -29,4 +29,5 @@ 
 
 #if defined SHARED
 default_symbol_version (__getutid, getutid, UTMP_COMPAT_BASE);
+default_symbol_version (__getutxid, getutxid, UTMP_COMPAT_BASE);
 #endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c
index dd1d98726e..3cd3ad85cc 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c
@@ -29,4 +29,5 @@ 
 
 #if defined SHARED
 default_symbol_version (__getutline, getutline, UTMP_COMPAT_BASE);
+default_symbol_version (__getutxline, getutxline, UTMP_COMPAT_BASE);
 #endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c
deleted file mode 100644
index f60c831fa3..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c
+++ /dev/null
@@ -1,30 +0,0 @@ 
-/* Copyright (C) 2008-2018 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define getutxent __getutxent
-#include "login/getutxent.c"
-#undef getutxent
-
-default_symbol_version (__getutxent, getutxent, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c
deleted file mode 100644
index c03f34b150..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c
+++ /dev/null
@@ -1,30 +0,0 @@ 
-/* Copyright (C) 2008-2018 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define getutxid __getutxid
-#include "login/getutxid.c"
-#undef getutxid
-
-default_symbol_version (__getutxid, getutxid, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c
deleted file mode 100644
index 9786e8bf0e..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c
+++ /dev/null
@@ -1,30 +0,0 @@ 
-/* Copyright (C) 2008-2018 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define getutxline __getutxline
-#include "login/getutxline.c"
-#undef getutxline
-
-default_symbol_version (__getutxline, getutxline, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c b/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c
deleted file mode 100644
index 705bf9c236..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c
+++ /dev/null
@@ -1,30 +0,0 @@ 
-/* Copyright (C) 2008-2018 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define pututxline __pututxline
-#include "login/pututxline.c"
-#undef pututxline
-
-default_symbol_version (__pututxline, pututxline, UTMP_COMPAT_BASE);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
index b27ae89cc4..77504dac52 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c
@@ -29,4 +29,5 @@ 
 
 #if defined SHARED
 default_symbol_version (__updwtmp, updwtmp, UTMP_COMPAT_BASE);
+default_symbol_version (__updwtmpx, updwtmpx, UTMP_COMPAT_BASE);
 #endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c
deleted file mode 100644
index 2f4c82d408..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c
+++ /dev/null
@@ -1,30 +0,0 @@ 
-/* Copyright (C) 2008-2018 Free Software Foundation, Inc.
-   Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>.
-   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
-   <http://www.gnu.org/licenses/>.  */
-
-#include <utmp.h>
-#include <utmpx.h>
-
-#include "utmp-compat.h"
-
-#undef weak_alias
-#define weak_alias(n,a)
-#define updwtmpx __updwtmpx
-#include "login/updwtmpx.c"
-#undef updwtmpx
-
-default_symbol_version (__updwtmpx, updwtmpx, UTMP_COMPAT_BASE);