This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] S/390: Fix 31/64 bit utmp compat problem


Hello,

the utmp structure contains long type fields what makes it
incompatible between 32 and 64 bit systems.  For biarch architectures
like x86 and ppc therefore a compat macro (__WORDSIZE_COMPAT32)
assures that always the 32 bit variant is used. This avoids problems
when co-existing 32 and 64 programs access utmp/wtmp using the libc
interface.

Quite some time ago Martin tried to define this macro also for
s390/s390x:
http://sources.redhat.com/ml/libc-hacker/2002-10/msg00040.html

Unfortunately that patch never made it into glibc.  Fixing it
afterwards is a bit more difficult since there already is a lot of
64bit code passing a 64bit struct utmp to glibc functions.

The attached patch therefore introduces 64bit utmp accessor functions
with a GLIBC_2.2 version tag, defines the __WORDSIZE_COMPAT32 macro
for s390x and adds a GLIBC_2.8 default version tag to the 32bit utmp
accessor functions.

An alternate approach we discussed was switching the utmp file format
according to the cpu mode (esa or zarch).  That way libc could
determine using HW CAPS flags whether it runs on a 31bit or a biarch
31/64 bit kernel and switch to the 32bit format for esa and to the
64bit format for zarch mode.  The utmp accessor functions would stay
the same and the format switch would have been done under the hood (in
utmp_file.c).  Unfortunately that would break if someone is trying to
boot his 31bit system with a 64 bit kernel.  libc then would switch to
a different utmp format breaking existing entries.  That in turn could
have been fixed if it would be possible to determine the former utmp
format. This can be done in most cases but unfortunately not in all.
So we decided to drop this variant.

The disadvantage of the current approach is that you have to take care
if you upgrade from an older glibc on a 64bit system since that would
change the utmp format to 32bit.  Before performing an upgrade all the
utmp and wtmp files have to be deleted in order to avoid corrupted
data. Maybe that could be integrated as a rpm post install script
together with a lot of warnings.

The importance of the fix results from the latest LSB testsuite.  With
the current version of libc S/390 distros are jeopardized to lose the
LSB certificate which seems to be quite a problem.

There are only very small common code changes. The exported functions
having a "struct utmp" as parameter or return value get a different
symbol version with the newly introduced "utmp_compat_symbol" macro.
This macro is defined to "weak_alias" for all archs except S/390. So
the patch is a NOP for all other platforms.

I've tested the patch on s390 and s390x using the libc testsuite.  A
small 64bit utmp testcase linked against an older libc version runs
fine with the new version using the compat functions.

Ok to apply?

Bye,

-Andreas-



diff -N -p -U3 --exclude=.pc -r libc.orig/Versions.def libc/Versions.def
--- libc.orig/Versions.def	2008-04-24 11:09:18.000000000 +0200
+++ libc/Versions.def	2008-04-24 08:42:34.000000000 +0200
@@ -105,6 +105,7 @@ librt {
 }
 libutil {
   GLIBC_2.0
+  GLIBC_2.8
 }
 ld {
   GLIBC_2.0
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutent.c libc/login/getutent.c
--- libc.orig/login/getutent.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutent.c	2008-04-24 08:42:34.000000000 +0200
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <utmp.h>
 
+#include "utmp-compat.h"
 
 /* Local buffer to store the result.  */
 libc_freeres_ptr (static struct utmp *buffer);
@@ -42,4 +43,4 @@ __getutent (void)
 
   return result;
 }
-weak_alias (__getutent, getutent)
+utmp_compat_symbol (__getutent, getutent);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutent_r.c libc/login/getutent_r.c
--- libc.orig/login/getutent_r.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutent_r.c	2008-04-24 08:42:34.000000000 +0200
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <utmp.h>
 
+#include "utmp-compat.h"
 #include "utmp-private.h"
 
 
@@ -152,7 +153,7 @@ __getutent_r (struct utmp *buffer, struc
 
   return retval;
 }
-weak_alias (__getutent_r, getutent_r)
+utmp_compat_symbol (__getutent_r, getutent_r)
 
 
 struct utmp *
@@ -168,7 +169,7 @@ __pututline (const struct utmp *data)
 
   return buffer;
 }
-weak_alias (__pututline, pututline)
+utmp_compat_symbol (__pututline, pututline);
 
 
 void
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutid.c libc/login/getutid.c
--- libc.orig/login/getutid.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutid.c	2008-04-24 08:42:34.000000000 +0200
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <utmp.h>
 
+#include "utmp-compat.h"
 
 /* Local buffer to store the result.  */
 libc_freeres_ptr (static struct utmp *buffer);
@@ -40,4 +41,5 @@ __getutid (const struct utmp *id)
 
   return result;
 }
-weak_alias (__getutid, getutid)
+
+utmp_compat_symbol (__getutid, getutid);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutid_r.c libc/login/getutid_r.c
--- libc.orig/login/getutid_r.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutid_r.c	2008-04-24 08:42:34.000000000 +0200
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <utmp.h>
 
+#include "utmp-compat.h"
 #include "utmp-private.h"
 
 
@@ -60,4 +61,4 @@ __getutid_r (const struct utmp *id, stru
   return -1;
 #endif
 }
-weak_alias (__getutid_r, getutid_r)
+utmp_compat_symbol (__getutid_r, getutid_r)
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutline.c libc/login/getutline.c
--- libc.orig/login/getutline.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutline.c	2008-04-24 09:51:13.000000000 +0200
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <utmp.h>
 
+#include "utmp-compat.h"
 
 /* Local buffer to store the result.  */
 libc_freeres_ptr (static struct utmp *buffer);
@@ -41,4 +42,4 @@ __getutline (const struct utmp *line)
 
   return result;
 }
-weak_alias (__getutline, getutline)
+utmp_compat_symbol (__getutline, getutline)
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutline_r.c libc/login/getutline_r.c
--- libc.orig/login/getutline_r.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutline_r.c	2008-04-24 08:42:34.000000000 +0200
@@ -22,6 +22,7 @@
 #include <bits/libc-lock.h>
 #include <utmp.h>
 
+#include "utmp-compat.h"
 #include "utmp-private.h"
 
 
@@ -43,4 +44,4 @@ __getutline_r (const struct utmp *line, 
 
   return retval;
 }
-weak_alias (__getutline_r, getutline_r)
+utmp_compat_symbol (__getutline_r, getutline_r)
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutmp.c libc/login/getutmp.c
--- libc.orig/login/getutmp.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutmp.c	2008-04-24 08:42:34.000000000 +0200
@@ -20,9 +20,11 @@
 #include <utmp.h>
 #include <utmpx.h>
 
+#include "utmp-compat.h"
+
 /* Copy the information in UTMPX to UTMP. */
 void
-getutmp (const struct utmpx *utmpx, struct utmp *utmp)
+__getutmp (const struct utmpx *utmpx, struct utmp *utmp)
 {
 #if _HAVE_UT_TYPE - 0
   utmp->ut_type = utmpx->ut_type;
@@ -44,3 +46,4 @@ getutmp (const struct utmpx *utmpx, stru
   utmp->ut_time = utmpx->ut_time;
 #endif
 }
+utmp_compat_symbol (__getutmp, getutmp);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutmpx.c libc/login/getutmpx.c
--- libc.orig/login/getutmpx.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutmpx.c	2008-04-24 08:42:34.000000000 +0200
@@ -20,9 +20,11 @@
 #include <utmp.h>
 #include <utmpx.h>
 
+#include "utmp-compat.h"
+
 /* Copy the information in UTMP to UTMPX. */
 void
-getutmpx (const struct utmp *utmp, struct utmpx *utmpx)
+__getutmpx (const struct utmp *utmp, struct utmpx *utmpx)
 {
   memset (utmpx, 0, sizeof (struct utmpx));
 
@@ -46,3 +48,4 @@ getutmpx (const struct utmp *utmp, struc
   utmpx->ut_time = utmp->ut_time;
 #endif
 }
+utmp_compat_symbol (__getutmpx, getutmpx);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutxent.c libc/login/getutxent.c
--- libc.orig/login/getutxent.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutxent.c	2008-04-24 08:42:34.000000000 +0200
@@ -20,8 +20,11 @@
 #include <utmp.h>
 #include <utmpx.h>
 
+#include "utmp-compat.h"
+
 struct utmpx *
-getutxent (void)
+__getutxent (void)
 {
   return (struct utmpx *) __getutent ();
 }
+utmp_compat_symbol (__getutxent, getutxent);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutxid.c libc/login/getutxid.c
--- libc.orig/login/getutxid.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutxid.c	2008-04-24 08:42:34.000000000 +0200
@@ -20,8 +20,11 @@
 #include <utmp.h>
 #include <utmpx.h>
 
+#include "utmp-compat.h"
+
 struct utmpx *
-getutxid (const struct utmpx *id)
+__getutxid (const struct utmpx *id)
 {
   return (struct utmpx *) __getutid ((const struct utmp *) id);
 }
+utmp_compat_symbol (__getutxid, getutxid);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/getutxline.c libc/login/getutxline.c
--- libc.orig/login/getutxline.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/getutxline.c	2008-04-24 08:42:34.000000000 +0200
@@ -20,8 +20,11 @@
 #include <utmp.h>
 #include <utmpx.h>
 
+#include "utmp-compat.h"
+
 struct utmpx *
-getutxline (const struct utmpx *line)
+__getutxline (const struct utmpx *line)
 {
   return (struct utmpx *) __getutline ((const struct utmp *) line);
 }
+utmp_compat_symbol (__getutxline, getutxline);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/login.c libc/login/login.c
--- libc.orig/login/login.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/login.c	2008-04-24 08:42:34.000000000 +0200
@@ -25,6 +25,8 @@
 #include <stdlib.h>
 #include <utmp.h>
 
+#include "utmp-compat.h"
+
 
 /* Return the result of ttyname in the buffer pointed to by TTY, which should
    be of length BUF_LEN.  If it is too long to fit in this buffer, a
@@ -79,7 +81,7 @@ tty_name (int fd, char **tty, size_t buf
 }
 
 void
-login (const struct utmp *ut)
+__login (const struct utmp *ut)
 {
 #ifdef PATH_MAX
   char _tty[PATH_MAX + UT_LINESIZE];
@@ -142,3 +144,4 @@ login (const struct utmp *ut)
   /* Update the WTMP file.  Here we have to add a new entry.  */
   updwtmp (_PATH_WTMP, &copy);
 }
+utmp_compat_symbol (__login, login);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/pututxline.c libc/login/pututxline.c
--- libc.orig/login/pututxline.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/pututxline.c	2008-04-24 08:42:34.000000000 +0200
@@ -20,8 +20,11 @@
 #include <utmp.h>
 #include <utmpx.h>
 
+#include "utmp-compat.h"
+
 struct utmpx *
-pututxline (const struct utmpx *utmpx)
+__pututxline (const struct utmpx *utmpx)
 {
   return (struct utmpx *) __pututline ((const struct utmp *) utmpx);
 }
+utmp_compat_symbol (__pututxline, pututxline);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/updwtmp.c libc/login/updwtmp.c
--- libc.orig/login/updwtmp.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/updwtmp.c	2008-04-24 08:42:34.000000000 +0200
@@ -19,6 +19,7 @@
 
 #include <utmp.h>
 
+#include "utmp-compat.h"
 #include "utmp-private.h"
 
 #ifndef TRANSFORM_UTMP_FILE_NAME
@@ -32,4 +33,4 @@ __updwtmp (const char *wtmp_file, const 
 
   (*__libc_utmp_file_functions.updwtmp) (file_name, utmp);
 }
-weak_alias (__updwtmp, updwtmp)
+utmp_compat_symbol (__updwtmp, updwtmp);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/updwtmpx.c libc/login/updwtmpx.c
--- libc.orig/login/updwtmpx.c	2008-04-24 11:09:18.000000000 +0200
+++ libc/login/updwtmpx.c	2008-04-24 08:42:34.000000000 +0200
@@ -20,8 +20,11 @@
 #include <utmp.h>
 #include <utmpx.h>
 
+#include "utmp-compat.h"
+
 void
-updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
+__updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
 {
   __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
 }
+utmp_compat_symbol (__updwtmpx, updwtmpx);
diff -N -p -U3 --exclude=.pc -r libc.orig/login/utmp-compat.h libc/login/utmp-compat.h
--- libc.orig/login/utmp-compat.h	1970-01-01 01:00:00.000000000 +0100
+++ libc/login/utmp-compat.h	2008-04-24 12:52:59.000000000 +0200
@@ -0,0 +1,30 @@
+/* Copyright (C) 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <bits/wordsize.h>
+#include <libc-symbols.h>
+
+/* __UTMP_COMPAT_BASE contains the version tag of the glibc version at
+   which the utmp 64 bit compat functions were added.  */
+#ifdef __UTMP_COMPAT_BASE
+# define utmp_compat_symbol(name, alias)			\
+   default_symbol_version (name, alias, __UTMP_COMPAT_BASE);
+#else
+# define utmp_compat_symbol(name, alias) weak_alias (name, alias)
+#endif
diff -N -p -U3 --exclude=.pc -r libc.orig/login/utmp-compat.h~ libc/login/utmp-compat.h~
--- libc.orig/login/utmp-compat.h~	2008-04-21 19:14:26.000000000 +0200
+++ libc/login/utmp-compat.h~	2008-04-24 08:42:34.000000000 +0200
@@ -20,6 +20,8 @@
 #include <bits/wordsize.h>
 #include <libc-symbols.h>
 
+/* __UTMP_COMPAT_BASE contains the version tag of the glibc version at
+   which the utmp 64 bit compat functions were added.  */
 #ifdef __UTMP_COMPAT_BASE
 # define utmp_compat_symbol(name, alias)			\
    default_symbol_version (name, alias, __UTMP_COMPAT_BASE);
diff -N -p -U3 --exclude=.pc -r libc.orig/patches/diff-libc-utmp-symver libc/patches/diff-libc-utmp-symver
--- libc.orig/patches/diff-libc-utmp-symver	2008-04-24 09:51:25.000000000 +0200
+++ libc/patches/diff-libc-utmp-symver	2008-04-24 12:53:02.000000000 +0200
@@ -1,11 +1,11 @@
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h	2008-04-24 08:42:34.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h	2008-04-24 12:51:16.000000000 +0200
 ***************
 *** 0 ****
 --- 1,83 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -91,12 +91,12 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h	2008-04-24 08:42:34.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h	2008-04-24 12:47:55.000000000 +0200
 ***************
 *** 0 ****
 --- 1,62 ----
 + /* The `struct utmp' type, describing entries in the utmp file.  GNU version.
-+    Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002
++    Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008
 +    Free Software Foundation, Inc.
 +    This file is part of the GNU C Library.
 + 
@@ -211,11 +211,11 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c	2008-04-24 08:42:34.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c	2008-04-24 12:49:00.000000000 +0200
 ***************
 *** 0 ****
 --- 1,183 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -401,11 +401,11 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/login64.c
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/login64.c	2008-04-24 08:42:34.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/login64.c	2008-04-24 12:48:24.000000000 +0200
 ***************
 *** 0 ****
 --- 1,37 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -583,11 +583,11 @@ Index: login/getutid.c
 Index: login/utmp-compat.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- login/utmp-compat.h	2008-04-24 08:42:34.000000000 +0200
+--- login/utmp-compat.h	2008-04-24 12:52:59.000000000 +0200
 ***************
 *** 0 ****
 --- 1,30 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -748,11 +748,11 @@ Index: login/getutline_r.c
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h	2008-04-24 08:42:34.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h	2008-04-24 12:51:20.000000000 +0200
 ***************
 *** 0 ****
 --- 1,82 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -837,11 +837,11 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c	2008-04-24 08:42:34.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c	2008-04-24 12:48:38.000000000 +0200
 ***************
 *** 0 ****
 --- 1,171 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -1015,12 +1015,12 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h	2008-04-24 08:42:34.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h	2008-04-24 12:47:31.000000000 +0200
 ***************
 *** 0 ****
 --- 1,52 ----
-+ /* The `struct utmp' type, describing entries in the utmp file.  GNU version.
-+    Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002
++ /* The `struct utmpx' type, describing entries in the utmp file.  GNU version.
++    Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008
 +    Free Software Foundation, Inc.
 +    This file is part of the GNU C Library.
 + 
diff -N -p -U3 --exclude=.pc -r libc.orig/patches/diff-libc-utmp-symver~ libc/patches/diff-libc-utmp-symver~
--- libc.orig/patches/diff-libc-utmp-symver~	2008-04-23 18:02:39.000000000 +0200
+++ libc/patches/diff-libc-utmp-symver~	2008-04-24 12:51:26.000000000 +0200
@@ -1,11 +1,11 @@
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h	2008-04-23 18:02:21.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h	2008-04-24 12:51:16.000000000 +0200
 ***************
 *** 0 ****
 --- 1,83 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -91,12 +91,12 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h	2008-04-23 18:02:21.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h	2008-04-24 12:47:55.000000000 +0200
 ***************
 *** 0 ****
 --- 1,62 ----
 + /* The `struct utmp' type, describing entries in the utmp file.  GNU version.
-+    Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002
++    Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008
 +    Free Software Foundation, Inc.
 +    This file is part of the GNU C Library.
 + 
@@ -159,8 +159,8 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 + #endif  /* utmp64.h  */
 Index: sysdeps/s390/s390-32/bits/wordsize.h
 ===================================================================
-*** sysdeps/s390/s390-32/bits/wordsize.h.orig	2008-04-23 17:53:40.000000000 +0200
---- sysdeps/s390/s390-32/bits/wordsize.h	2008-04-23 18:02:21.000000000 +0200
+*** sysdeps/s390/s390-32/bits/wordsize.h.orig	2008-04-23 18:02:41.000000000 +0200
+--- sysdeps/s390/s390-32/bits/wordsize.h	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 2,7 ****
 --- 2,8 ----
@@ -173,8 +173,8 @@ Index: sysdeps/s390/s390-32/bits/wordsiz
   #endif
 Index: sysdeps/s390/s390-64/bits/wordsize.h
 ===================================================================
-*** sysdeps/s390/s390-64/bits/wordsize.h.orig	2008-04-23 17:53:40.000000000 +0200
---- sysdeps/s390/s390-64/bits/wordsize.h	2008-04-23 18:02:21.000000000 +0200
+*** sysdeps/s390/s390-64/bits/wordsize.h.orig	2008-04-23 18:02:41.000000000 +0200
+--- sysdeps/s390/s390-64/bits/wordsize.h	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 2,7 ****
 --- 2,8 ----
@@ -195,8 +195,8 @@ Index: sysdeps/s390/s390-64/bits/wordsiz
 + #define __UTMP_COMPAT_BASE GLIBC_2.8
 Index: sysdeps/unix/sysv/linux/s390/s390-64/Makefile
 ===================================================================
-*** sysdeps/unix/sysv/linux/s390/s390-64/Makefile.orig	2008-04-23 17:53:40.000000000 +0200
---- sysdeps/unix/sysv/linux/s390/s390-64/Makefile	2008-04-23 18:02:21.000000000 +0200
+*** sysdeps/unix/sysv/linux/s390/s390-64/Makefile.orig	2008-04-23 18:02:41.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/Makefile	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 1,3 ****
 --- 1,8 ----
@@ -211,11 +211,11 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c	2008-04-23 18:02:21.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c	2008-04-24 12:49:00.000000000 +0200
 ***************
 *** 0 ****
 --- 1,183 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -401,11 +401,11 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/login64.c
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/login64.c	2008-04-23 18:02:21.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/login64.c	2008-04-24 12:48:24.000000000 +0200
 ***************
 *** 0 ****
 --- 1,37 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -444,8 +444,8 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 + symbol_version (__login64, login, GLIBC_2.2);
 Index: sysdeps/unix/sysv/linux/s390/s390-64/Versions
 ===================================================================
-*** sysdeps/unix/sysv/linux/s390/s390-64/Versions.orig	2008-04-23 17:53:40.000000000 +0200
---- sysdeps/unix/sysv/linux/s390/s390-64/Versions	2008-04-23 18:02:21.000000000 +0200
+*** sysdeps/unix/sysv/linux/s390/s390-64/Versions.orig	2008-04-23 18:02:41.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/Versions	2008-04-24 08:42:34.000000000 +0200
 *************** libc {
 *** 4,7 ****
       __register_frame; __register_frame_table; __deregister_frame;
@@ -483,8 +483,8 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 ! };
 Index: login/getutent_r.c
 ===================================================================
-*** login/getutent_r.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutent_r.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutent_r.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutent_r.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 22,27 ****
 --- 22,28 ----
@@ -531,8 +531,8 @@ Index: login/getutent_r.c
   void
 Index: login/getutent.c
 ===================================================================
-*** login/getutent.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutent.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutent.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutent.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 20,25 ****
 --- 20,26 ----
@@ -556,8 +556,8 @@ Index: login/getutent.c
 ! utmp_compat_symbol (__getutent, getutent);
 Index: login/getutid.c
 ===================================================================
-*** login/getutid.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutid.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutid.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutid.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 20,25 ****
 --- 20,26 ----
@@ -583,7 +583,7 @@ Index: login/getutid.c
 Index: login/utmp-compat.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- login/utmp-compat.h	2008-04-23 18:02:21.000000000 +0200
+--- login/utmp-compat.h	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 0 ****
 --- 1,30 ----
@@ -619,8 +619,8 @@ Index: login/utmp-compat.h
 + #endif
 Index: Versions.def
 ===================================================================
-*** Versions.def.orig	2008-04-23 17:53:40.000000000 +0200
---- Versions.def	2008-04-23 18:02:21.000000000 +0200
+*** Versions.def.orig	2008-04-23 18:02:41.000000000 +0200
+--- Versions.def	2008-04-24 08:42:34.000000000 +0200
 *************** librt {
 *** 105,110 ****
 --- 105,111 ----
@@ -633,8 +633,8 @@ Index: Versions.def
     GLIBC_2.0
 Index: login/login.c
 ===================================================================
-*** login/login.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/login.c	2008-04-23 18:02:21.000000000 +0200
+*** login/login.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/login.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 25,30 ****
 --- 25,32 ----
@@ -672,8 +672,8 @@ Index: login/login.c
 + utmp_compat_symbol (__login, login);
 Index: login/updwtmp.c
 ===================================================================
-*** login/updwtmp.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/updwtmp.c	2008-04-23 18:02:21.000000000 +0200
+*** login/updwtmp.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/updwtmp.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 19,24 ****
 --- 19,25 ----
@@ -697,8 +697,8 @@ Index: login/updwtmp.c
 ! utmp_compat_symbol (__updwtmp, updwtmp);
 Index: login/getutid_r.c
 ===================================================================
-*** login/getutid_r.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutid_r.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutid_r.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutid_r.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 23,28 ****
 --- 23,29 ----
@@ -722,8 +722,8 @@ Index: login/getutid_r.c
 ! utmp_compat_symbol (__getutid_r, getutid_r)
 Index: login/getutline_r.c
 ===================================================================
-*** login/getutline_r.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutline_r.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutline_r.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutline_r.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 22,27 ****
 --- 22,28 ----
@@ -748,11 +748,11 @@ Index: login/getutline_r.c
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h	2008-04-23 18:02:34.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h	2008-04-24 12:51:20.000000000 +0200
 ***************
 *** 0 ****
 --- 1,82 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -837,11 +837,11 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c	2008-04-23 18:02:21.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c	2008-04-24 12:48:38.000000000 +0200
 ***************
 *** 0 ****
 --- 1,171 ----
-+ /* Copyright (C) 2000, 2001, 2007, 2008 Free Software Foundation, Inc.
++ /* Copyright (C) 2008 Free Software Foundation, Inc.
 +    Contributed by Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
 +    This file is part of the GNU C Library.
 + 
@@ -1015,12 +1015,12 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 Index: sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h
 ===================================================================
 *** /dev/null	1970-01-01 00:00:00.000000000 +0000
---- sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h	2008-04-23 18:02:21.000000000 +0200
+--- sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h	2008-04-24 12:47:31.000000000 +0200
 ***************
 *** 0 ****
 --- 1,52 ----
-+ /* The `struct utmp' type, describing entries in the utmp file.  GNU version.
-+    Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002
++ /* The `struct utmpx' type, describing entries in the utmp file.  GNU version.
++    Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008
 +    Free Software Foundation, Inc.
 +    This file is part of the GNU C Library.
 + 
@@ -1073,8 +1073,8 @@ Index: sysdeps/unix/sysv/linux/s390/s390
 + #endif /* utmpx64.h */
 Index: login/getutmp.c
 ===================================================================
-*** login/getutmp.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutmp.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutmp.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutmp.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 20,28 ****
   #include <utmp.h>
@@ -1107,8 +1107,8 @@ Index: login/getutmp.c
 + utmp_compat_symbol (__getutmp, getutmp);
 Index: login/getutmpx.c
 ===================================================================
-*** login/getutmpx.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutmpx.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutmpx.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutmpx.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 20,28 ****
   #include <utmp.h>
@@ -1141,8 +1141,8 @@ Index: login/getutmpx.c
 + utmp_compat_symbol (__getutmpx, getutmpx);
 Index: login/getutxent.c
 ===================================================================
-*** login/getutxent.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutxent.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutxent.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutxent.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 20,27 ****
   #include <utmp.h>
@@ -1167,8 +1167,8 @@ Index: login/getutxent.c
 + utmp_compat_symbol (__getutxent, getutxent);
 Index: login/getutxid.c
 ===================================================================
-*** login/getutxid.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutxid.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutxid.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutxid.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 20,27 ****
   #include <utmp.h>
@@ -1193,8 +1193,8 @@ Index: login/getutxid.c
 + utmp_compat_symbol (__getutxid, getutxid);
 Index: login/getutxline.c
 ===================================================================
-*** login/getutxline.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/getutxline.c	2008-04-23 18:02:21.000000000 +0200
+*** login/getutxline.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/getutxline.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 20,27 ****
   #include <utmp.h>
@@ -1219,8 +1219,8 @@ Index: login/getutxline.c
 + utmp_compat_symbol (__getutxline, getutxline);
 Index: login/pututxline.c
 ===================================================================
-*** login/pututxline.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/pututxline.c	2008-04-23 18:02:21.000000000 +0200
+*** login/pututxline.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/pututxline.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 20,27 ****
   #include <utmp.h>
@@ -1245,8 +1245,8 @@ Index: login/pututxline.c
 + utmp_compat_symbol (__pututxline, pututxline);
 Index: login/updwtmpx.c
 ===================================================================
-*** login/updwtmpx.c.orig	2008-04-23 17:53:40.000000000 +0200
---- login/updwtmpx.c	2008-04-23 18:02:21.000000000 +0200
+*** login/updwtmpx.c.orig	2008-04-23 18:02:41.000000000 +0200
+--- login/updwtmpx.c	2008-04-24 08:42:34.000000000 +0200
 ***************
 *** 20,27 ****
   #include <utmp.h>
@@ -1269,3 +1269,28 @@ Index: login/updwtmpx.c
     __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
   }
 + utmp_compat_symbol (__updwtmpx, updwtmpx);
+Index: login/getutline.c
+===================================================================
+*** login/getutline.c.orig	2002-11-01 21:43:44.000000000 +0100
+--- login/getutline.c	2008-04-24 09:51:13.000000000 +0200
+***************
+*** 20,25 ****
+--- 20,26 ----
+  #include <stdlib.h>
+  #include <utmp.h>
+  
++ #include "utmp-compat.h"
+  
+  /* Local buffer to store the result.  */
+  libc_freeres_ptr (static struct utmp *buffer);
+*************** __getutline (const struct utmp *line)
+*** 41,44 ****
+  
+    return result;
+  }
+! weak_alias (__getutline, getutline)
+--- 42,45 ----
+  
+    return result;
+  }
+! utmp_compat_symbol (__getutline, getutline)
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/s390/s390-32/bits/wordsize.h libc/sysdeps/s390/s390-32/bits/wordsize.h
--- libc.orig/sysdeps/s390/s390-32/bits/wordsize.h	2008-04-24 11:09:18.000000000 +0200
+++ libc/sysdeps/s390/s390-32/bits/wordsize.h	2008-04-24 08:42:34.000000000 +0200
@@ -2,6 +2,7 @@
 
 #if defined __s390x__
 # define __WORDSIZE	64
+# define __WORDSIZE_COMPAT32	1
 #else
 # define __WORDSIZE	32
 #endif
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/s390/s390-64/bits/wordsize.h libc/sysdeps/s390/s390-64/bits/wordsize.h
--- libc.orig/sysdeps/s390/s390-64/bits/wordsize.h	2008-04-24 11:09:18.000000000 +0200
+++ libc/sysdeps/s390/s390-64/bits/wordsize.h	2008-04-24 08:42:34.000000000 +0200
@@ -2,6 +2,7 @@
 
 #if defined __s390x__
 # define __WORDSIZE	64
+# define __WORDSIZE_COMPAT32	1
 #else
 # define __WORDSIZE	32
 #endif
@@ -16,3 +17,5 @@
 #  define __NO_LONG_DOUBLE_MATH        1
 # endif
 #endif
+
+#define __UTMP_COMPAT_BASE GLIBC_2.8
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/Makefile libc/sysdeps/unix/sysv/linux/s390/s390-64/Makefile
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/Makefile	2008-04-24 11:09:18.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/Makefile	2008-04-24 08:42:34.000000000 +0200
@@ -1,3 +1,8 @@
+ifeq ($(subdir),login)
+sysdep_routines += utmp64 utmpx64
+libutil-routines += login64
+endif
+
 ifeq ($(subdir),misc)
 sysdep_headers += sys/elf.h
 endif
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/Versions libc/sysdeps/unix/sysv/linux/s390/s390-64/Versions
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/Versions	2008-04-24 11:09:18.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/Versions	2008-04-24 08:42:34.000000000 +0200
@@ -4,4 +4,28 @@ libc {
     __register_frame; __register_frame_table; __deregister_frame;
     __frame_state_for; __register_frame_info_table;
   }
-}
+  GLIBC_2.8 {
+    updwtmp;
+    getutent;
+    getutid;
+    getutline;
+    pututline;
+    updwtmp;
+    getutent_r;
+    getutid_r;
+    getutline_r;
+    getutxent;
+    getutxid;
+    getutxline;
+    pututxline;
+    updwtmpx;
+    getutmp;
+    getutmpx;
+  }
+};
+
+libutil {
+  GLIBC_2.8 {
+    login;
+  }
+};
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/login64.c libc/sysdeps/unix/sysv/linux/s390/s390-64/login64.c
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/login64.c	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/login64.c	2008-04-24 12:48:24.000000000 +0200
@@ -0,0 +1,37 @@
+/* Copyright (C) 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sys/types.h>
+#include <utmp.h>
+#include <libc-symbols.h>
+
+#include "utmp64.h"
+#include "utmp-convert.h"
+
+/* Write the given entry into utmp and wtmp.  */
+void
+__login64 (__const struct utmp64 *__entry)
+{
+  const struct utmp tmp32;
+
+  __utmp_convert64to32 (__entry, &tmp32);
+  login (&tmp32);
+}
+
+symbol_version (__login64, login, GLIBC_2.2);
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/login64.c~ libc/sysdeps/unix/sysv/linux/s390/s390-64/login64.c~
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/login64.c~	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/login64.c~	2008-04-24 08:42:34.000000000 +0200
@@ -0,0 +1,37 @@
+/* Copyright (C) 2000, 2001, 2007, 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sys/types.h>
+#include <utmp.h>
+#include <libc-symbols.h>
+
+#include "utmp64.h"
+#include "utmp-convert.h"
+
+/* Write the given entry into utmp and wtmp.  */
+void
+__login64 (__const struct utmp64 *__entry)
+{
+  const struct utmp tmp32;
+
+  __utmp_convert64to32 (__entry, &tmp32);
+  login (&tmp32);
+}
+
+symbol_version (__login64, login, GLIBC_2.2);
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h	2008-04-24 12:51:16.000000000 +0200
@@ -0,0 +1,83 @@
+/* Copyright (C) 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+/* This file provides functions converting between the 31 and 64 bit
+   struct utmp variants.  */
+
+#ifndef _UTMP_CONVERT_H
+#define _UTMP_CONVERT_H 1
+
+#include <string.h>
+
+#include "utmp64.h"
+
+static inline void
+__utmp_convert32to64 (const struct utmp *from, struct utmp64 *to)
+{
+#if _HAVE_UT_TYPE - 0
+  to->ut_type = from->ut_type;
+#endif
+#if _HAVE_UT_PID - 0
+  to->ut_pid = from->ut_pid;
+#endif
+  memcpy (to->ut_line, from->ut_line, UT_LINESIZE);
+  memcpy (to->ut_user, from->ut_user, UT_NAMESIZE);
+#if _HAVE_UT_ID - 0
+  memcpy (to->ut_id, from->ut_id, 4);
+#endif
+#if _HAVE_UT_HOST - 0
+  memcpy (to->ut_host, from->ut_host, UT_HOSTSIZE);
+#endif
+  to->ut_exit = from->ut_exit;
+  to->ut_session = (int64_t)from->ut_session;
+#if _HAVE_UT_TV - 0
+  to->ut_tv.tv_sec = (int64_t)from->ut_tv.tv_sec;
+  to->ut_tv.tv_usec = (int64_t)from->ut_tv.tv_usec;
+#endif
+  memcpy (to->ut_addr_v6, from->ut_addr_v6, 4 * 4);
+}
+
+static inline void
+__utmp_convert64to32 (const struct utmp64 *from, struct utmp *to)
+{
+#if _HAVE_UT_TYPE - 0
+  to->ut_type = from->ut_type;
+#endif
+#if _HAVE_UT_PID - 0
+  to->ut_pid = from->ut_pid;
+#endif
+  memcpy (to->ut_line, from->ut_line, UT_LINESIZE);
+  memcpy (to->ut_user, from->ut_user, UT_NAMESIZE);
+#if _HAVE_UT_ID - 0
+  memcpy (to->ut_id, from->ut_id, 4);
+#endif
+#if _HAVE_UT_HOST - 0
+  memcpy (to->ut_host, from->ut_host, UT_HOSTSIZE);
+#endif
+  to->ut_exit = from->ut_exit;
+  to->ut_session = (int32_t)from->ut_session;
+#if _HAVE_UT_TV - 0
+  to->ut_tv.tv_sec = (int32_t)from->ut_tv.tv_sec;
+  to->ut_tv.tv_usec = (int32_t)from->ut_tv.tv_usec;
+#endif
+  memcpy (to->ut_addr_v6, from->ut_addr_v6, 4 * 4);
+}
+
+#endif /* utmp-convert.h */
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h~ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h~
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h~	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp-convert.h~	2008-04-24 08:42:34.000000000 +0200
@@ -0,0 +1,83 @@
+/* Copyright (C) 2000, 2001, 2007, 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+/* This file provides functions converting between the 31 and 64 bit
+   struct utmp variants.  */
+
+#ifndef _UTMP_CONVERT_H
+#define _UTMP_CONVERT_H 1
+
+#include <string.h>
+
+#include "utmp64.h"
+
+static inline void
+__utmp_convert32to64 (const struct utmp *from, struct utmp64 *to)
+{
+#if _HAVE_UT_TYPE - 0
+  to->ut_type = from->ut_type;
+#endif
+#if _HAVE_UT_PID - 0
+  to->ut_pid = from->ut_pid;
+#endif
+  memcpy (to->ut_line, from->ut_line, UT_LINESIZE);
+  memcpy (to->ut_user, from->ut_user, UT_NAMESIZE);
+#if _HAVE_UT_ID - 0
+  memcpy (to->ut_id, from->ut_id, 4);
+#endif
+#if _HAVE_UT_HOST - 0
+  memcpy (to->ut_host, from->ut_host, UT_HOSTSIZE);
+#endif
+  to->ut_exit = from->ut_exit;
+  to->ut_session = (int64_t)from->ut_session;
+#if _HAVE_UT_TV - 0
+  to->ut_tv.tv_sec = (int64_t)from->ut_tv.tv_sec;
+  to->ut_tv.tv_usec = (int64_t)from->ut_tv.tv_usec;
+#endif
+  memcpy (to->ut_addr_v6, from->ut_addr_v6, 4 * 4);
+}
+
+static inline void
+__utmp_convert64to32 (const struct utmp64 *from, struct utmp *to)
+{
+#if _HAVE_UT_TYPE - 0
+  to->ut_type = from->ut_type;
+#endif
+#if _HAVE_UT_PID - 0
+  to->ut_pid = from->ut_pid;
+#endif
+  memcpy (to->ut_line, from->ut_line, UT_LINESIZE);
+  memcpy (to->ut_user, from->ut_user, UT_NAMESIZE);
+#if _HAVE_UT_ID - 0
+  memcpy (to->ut_id, from->ut_id, 4);
+#endif
+#if _HAVE_UT_HOST - 0
+  memcpy (to->ut_host, from->ut_host, UT_HOSTSIZE);
+#endif
+  to->ut_exit = from->ut_exit;
+  to->ut_session = (int32_t)from->ut_session;
+#if _HAVE_UT_TV - 0
+  to->ut_tv.tv_sec = (int32_t)from->ut_tv.tv_sec;
+  to->ut_tv.tv_usec = (int32_t)from->ut_tv.tv_usec;
+#endif
+  memcpy (to->ut_addr_v6, from->ut_addr_v6, 4 * 4);
+}
+
+#endif /* utmp-convert.h */
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c	2008-04-24 12:49:00.000000000 +0200
@@ -0,0 +1,183 @@
+/* Copyright (C) 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sys/types.h>
+#include <utmp.h>
+#include <errno.h>
+#include <libc-symbols.h>
+
+#include "utmp64.h"
+#include "utmp-convert.h"
+
+/* Allocate a static buffer to be returned to the caller.  As well as
+   with the existing version of these functions the caller has to be
+   aware that the contents of this buffer will change with subsequent
+   calls.  */
+#define ALLOCATE_UTMP64_OUT(OUT)			\
+  static struct utmp64 *OUT = NULL;			\
+  							\
+  if (OUT == NULL)					\
+    {							\
+      OUT = malloc (sizeof (struct utmp64));		\
+      if (OUT == NULL)					\
+	{						\
+	  __set_errno (ENOMEM);				\
+	  return NULL;					\
+	}						\
+    }
+
+#define ACCESS_UTMP_ENTRY(FUNC, FIELD)			\
+  struct utmp in32;					\
+  struct utmp *out32;					\
+  ALLOCATE_UTMP64_OUT (out64);				\
+							\
+  __utmp_convert64to32 (FIELD, &in32);			\
+  out32 = FUNC (&in32);					\
+							\
+  if (out32 == NULL)					\
+    return NULL;					\
+							\
+  __utmp_convert32to64 (out32, out64);			\
+							\
+  return out64;
+
+/* Search forward from the current point in the utmp file until the
+   next entry with a ut_type matching ID->ut_type.  */
+struct utmp64 *
+__getutid64 (__const struct utmp64 *__id)
+{
+  ACCESS_UTMP_ENTRY (getutid, __id)
+}
+
+/* Search forward from the current point in the utmp file until the
+   next entry with a ut_line matching LINE->ut_line.  */
+struct utmp64 *
+__getutline64 (__const struct utmp64 *__line)
+{
+  ACCESS_UTMP_ENTRY (getutline, __line)
+}
+
+/* Write out entry pointed to by UTMP_PTR into the utmp file.  */
+struct utmp64 *
+__pututline64 (__const struct utmp64 *__utmp_ptr)
+{
+  ACCESS_UTMP_ENTRY (pututline, __utmp_ptr)
+}
+
+/* Read next entry from a utmp-like file.  */
+struct utmp64 *
+__getutent64 ()
+{
+  struct utmp *out32;
+  ALLOCATE_UTMP64_OUT (out64);
+
+  out32 = getutent ();
+  if (!out32)
+    return NULL;
+
+  __utmp_convert32to64 (out32, out64);
+  return out64;
+}
+
+
+/* Reentrant versions of the file for handling utmp files.  */
+
+int
+__getutent_r64 (struct utmp64 *__buffer, struct utmp64 **__result)
+{
+  struct utmp out32, *out32p;
+  int ret;
+
+  ret = getutent_r (&out32, &out32p);
+  if (ret == -1)
+    {
+      *__result = NULL;
+      return -1;
+    }
+
+  __utmp_convert32to64 (out32p, __buffer);
+  *__result = __buffer;
+
+  return 0;
+}
+
+int
+__getutid_r64 (__const struct utmp64 *__id, struct utmp64 *__buffer,
+	       struct utmp64 **__result)
+{
+  struct utmp in32, out32, *out32p;
+  int ret;
+
+  __utmp_convert64to32 (__id, &in32);
+
+  ret = getutid_r (&in32, &out32, &out32p);
+  if (ret == -1)
+    {
+      *__result = NULL;
+      return -1;
+    }
+
+  __utmp_convert32to64 (out32p, __buffer);
+  *__result = __buffer;
+
+  return 0;
+}
+
+int __getutline_r64 (__const struct utmp64 *__line,
+		     struct utmp64 *__buffer, struct utmp64 **__result)
+{
+  struct utmp in32, out32, *out32p;
+  int ret;
+
+  __utmp_convert32to64 (__line, &in32);
+
+  ret = getutline_r (&in32, &out32, &out32p);
+  if (ret == -1)
+    {
+      *__result = NULL;
+      return -1;
+    }
+
+  __utmp_convert64to32 (out32p, __buffer);
+  *__result = __buffer;
+
+  return 0;
+
+}
+
+/* Append entry UTMP to the wtmp-like file WTMP_FILE.  */
+void
+__updwtmp64 (__const char *__wtmp_file, __const struct utmp64 *__utmp)
+{
+  const struct utmp tmp32;
+
+  __utmp_convert64to32 (__utmp, &tmp32);
+  updwtmp (__wtmp_file, &tmp32);
+}
+
+symbol_version (__getutent64, getutent, GLIBC_2.2);
+symbol_version (__getutid64, getutid, GLIBC_2.2);
+symbol_version (__getutline64, getutline, GLIBC_2.2);
+symbol_version (__pututline64, pututline, GLIBC_2.2);
+
+symbol_version (__getutent_r64, getutent_r, GLIBC_2.2);
+symbol_version (__getutid_r64, getutid_r, GLIBC_2.2);
+symbol_version (__getutline_r64, getutline_r, GLIBC_2.2);
+
+symbol_version (__updwtmp64, updwtmp, GLIBC_2.2);
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c~ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c~
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c~	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.c~	2008-04-24 08:42:34.000000000 +0200
@@ -0,0 +1,183 @@
+/* Copyright (C) 2000, 2001, 2007, 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sys/types.h>
+#include <utmp.h>
+#include <errno.h>
+#include <libc-symbols.h>
+
+#include "utmp64.h"
+#include "utmp-convert.h"
+
+/* Allocate a static buffer to be returned to the caller.  As well as
+   with the existing version of these functions the caller has to be
+   aware that the contents of this buffer will change with subsequent
+   calls.  */
+#define ALLOCATE_UTMP64_OUT(OUT)			\
+  static struct utmp64 *OUT = NULL;			\
+  							\
+  if (OUT == NULL)					\
+    {							\
+      OUT = malloc (sizeof (struct utmp64));		\
+      if (OUT == NULL)					\
+	{						\
+	  __set_errno (ENOMEM);				\
+	  return NULL;					\
+	}						\
+    }
+
+#define ACCESS_UTMP_ENTRY(FUNC, FIELD)			\
+  struct utmp in32;					\
+  struct utmp *out32;					\
+  ALLOCATE_UTMP64_OUT (out64);				\
+							\
+  __utmp_convert64to32 (FIELD, &in32);			\
+  out32 = FUNC (&in32);					\
+							\
+  if (out32 == NULL)					\
+    return NULL;					\
+							\
+  __utmp_convert32to64 (out32, out64);			\
+							\
+  return out64;
+
+/* Search forward from the current point in the utmp file until the
+   next entry with a ut_type matching ID->ut_type.  */
+struct utmp64 *
+__getutid64 (__const struct utmp64 *__id)
+{
+  ACCESS_UTMP_ENTRY (getutid, __id)
+}
+
+/* Search forward from the current point in the utmp file until the
+   next entry with a ut_line matching LINE->ut_line.  */
+struct utmp64 *
+__getutline64 (__const struct utmp64 *__line)
+{
+  ACCESS_UTMP_ENTRY (getutline, __line)
+}
+
+/* Write out entry pointed to by UTMP_PTR into the utmp file.  */
+struct utmp64 *
+__pututline64 (__const struct utmp64 *__utmp_ptr)
+{
+  ACCESS_UTMP_ENTRY (pututline, __utmp_ptr)
+}
+
+/* Read next entry from a utmp-like file.  */
+struct utmp64 *
+__getutent64 ()
+{
+  struct utmp *out32;
+  ALLOCATE_UTMP64_OUT (out64);
+
+  out32 = getutent ();
+  if (!out32)
+    return NULL;
+
+  __utmp_convert32to64 (out32, out64);
+  return out64;
+}
+
+
+/* Reentrant versions of the file for handling utmp files.  */
+
+int
+__getutent_r64 (struct utmp64 *__buffer, struct utmp64 **__result)
+{
+  struct utmp out32, *out32p;
+  int ret;
+
+  ret = getutent_r (&out32, &out32p);
+  if (ret == -1)
+    {
+      *__result = NULL;
+      return -1;
+    }
+
+  __utmp_convert32to64 (out32p, __buffer);
+  *__result = __buffer;
+
+  return 0;
+}
+
+int
+__getutid_r64 (__const struct utmp64 *__id, struct utmp64 *__buffer,
+	       struct utmp64 **__result)
+{
+  struct utmp in32, out32, *out32p;
+  int ret;
+
+  __utmp_convert64to32 (__id, &in32);
+
+  ret = getutid_r (&in32, &out32, &out32p);
+  if (ret == -1)
+    {
+      *__result = NULL;
+      return -1;
+    }
+
+  __utmp_convert32to64 (out32p, __buffer);
+  *__result = __buffer;
+
+  return 0;
+}
+
+int __getutline_r64 (__const struct utmp64 *__line,
+		     struct utmp64 *__buffer, struct utmp64 **__result)
+{
+  struct utmp in32, out32, *out32p;
+  int ret;
+
+  __utmp_convert32to64 (__line, &in32);
+
+  ret = getutline_r (&in32, &out32, &out32p);
+  if (ret == -1)
+    {
+      *__result = NULL;
+      return -1;
+    }
+
+  __utmp_convert64to32 (out32p, __buffer);
+  *__result = __buffer;
+
+  return 0;
+
+}
+
+/* Append entry UTMP to the wtmp-like file WTMP_FILE.  */
+void
+__updwtmp64 (__const char *__wtmp_file, __const struct utmp64 *__utmp)
+{
+  const struct utmp tmp32;
+
+  __utmp_convert64to32 (__utmp, &tmp32);
+  updwtmp (__wtmp_file, &tmp32);
+}
+
+symbol_version (__getutent64, getutent, GLIBC_2.2);
+symbol_version (__getutid64, getutid, GLIBC_2.2);
+symbol_version (__getutline64, getutline, GLIBC_2.2);
+symbol_version (__pututline64, pututline, GLIBC_2.2);
+
+symbol_version (__getutent_r64, getutent_r, GLIBC_2.2);
+symbol_version (__getutid_r64, getutid_r, GLIBC_2.2);
+symbol_version (__getutline_r64, getutline_r, GLIBC_2.2);
+
+symbol_version (__updwtmp64, updwtmp, GLIBC_2.2);
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h	2008-04-24 12:47:55.000000000 +0200
@@ -0,0 +1,62 @@
+/* The `struct utmp' type, describing entries in the utmp file.  GNU version.
+   Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _UTMP64_H
+#define _UTMP64_H 1
+
+#include <paths.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <bits/wordsize.h>
+#include <utmp.h>
+
+/* The structure describing an entry in the database of
+   previous logins.  */
+struct lastlog64
+  {
+    int64_t ll_time;
+    char ll_line[UT_LINESIZE];
+    char ll_host[UT_HOSTSIZE];
+  };
+
+/* The structure describing an entry in the user accounting database.  */
+struct utmp64
+{
+  short int ut_type;		/* Type of login.  */
+  pid_t ut_pid;			/* Process ID of login process.  */
+  char ut_line[UT_LINESIZE];	/* Devicename.  */
+  char ut_id[4];		/* Inittab ID.  */
+  char ut_user[UT_NAMESIZE];	/* Username.  */
+  char ut_host[UT_HOSTSIZE];	/* Hostname for remote login.  */
+  struct exit_status ut_exit;	/* Exit status of a process marked
+				   as DEAD_PROCESS.  */
+  int64_t ut_session;		/* Session ID, used for windowing.  */
+  struct
+  {
+    int64_t tv_sec;		/* Seconds.  */
+    int64_t tv_usec;		/* Microseconds.  */
+  } ut_tv;			/* Time entry was made.  */
+
+  int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
+  char __unused[20];		/* Reserved for future use.  */
+};
+
+
+#endif  /* utmp64.h  */
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h~ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h~
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h~	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmp64.h~	2008-04-24 08:42:34.000000000 +0200
@@ -0,0 +1,62 @@
+/* The `struct utmp' type, describing entries in the utmp file.  GNU version.
+   Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _UTMP64_H
+#define _UTMP64_H 1
+
+#include <paths.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <bits/wordsize.h>
+#include <utmp.h>
+
+/* The structure describing an entry in the database of
+   previous logins.  */
+struct lastlog64
+  {
+    int64_t ll_time;
+    char ll_line[UT_LINESIZE];
+    char ll_host[UT_HOSTSIZE];
+  };
+
+/* The structure describing an entry in the user accounting database.  */
+struct utmp64
+{
+  short int ut_type;		/* Type of login.  */
+  pid_t ut_pid;			/* Process ID of login process.  */
+  char ut_line[UT_LINESIZE];	/* Devicename.  */
+  char ut_id[4];		/* Inittab ID.  */
+  char ut_user[UT_NAMESIZE];	/* Username.  */
+  char ut_host[UT_HOSTSIZE];	/* Hostname for remote login.  */
+  struct exit_status ut_exit;	/* Exit status of a process marked
+				   as DEAD_PROCESS.  */
+  int64_t ut_session;		/* Session ID, used for windowing.  */
+  struct
+  {
+    int64_t tv_sec;		/* Seconds.  */
+    int64_t tv_usec;		/* Microseconds.  */
+  } ut_tv;			/* Time entry was made.  */
+
+  int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
+  char __unused[20];		/* Reserved for future use.  */
+};
+
+
+#endif  /* utmp64.h  */
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h	2008-04-24 12:51:20.000000000 +0200
@@ -0,0 +1,82 @@
+/* Copyright (C) 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+/* This file provides functions converting between the 31 and 64 bit
+   struct utmp variants.  */
+
+#ifndef _UTMPX_CONVERT_H
+#define _UTMPX_CONVERT_H 1
+
+#include <string.h>
+#include "utmpx64.h"
+
+static inline void
+__utmpx_convert32to64 (const struct utmpx *from, struct utmpx64 *to)
+{
+#if _HAVE_UT_TYPE - 0
+  to->ut_type = from->ut_type;
+#endif
+#if _HAVE_UT_PID - 0
+  to->ut_pid = from->ut_pid;
+#endif
+  memcpy (to->ut_line, from->ut_line, __UT_LINESIZE);
+  memcpy (to->ut_user, from->ut_user, __UT_NAMESIZE);
+#if _HAVE_UT_ID - 0
+  memcpy (to->ut_id, from->ut_id, 4);
+#endif
+#if _HAVE_UT_HOST - 0
+  memcpy (to->ut_host, from->ut_host, __UT_HOSTSIZE);
+#endif
+  to->ut_exit = from->ut_exit;
+  to->ut_session = (int64_t)from->ut_session;
+#if _HAVE_UT_TV - 0
+  to->ut_tv.tv_sec = (int64_t)from->ut_tv.tv_sec;
+  to->ut_tv.tv_usec = (int64_t)from->ut_tv.tv_usec;
+#endif
+  memcpy (to->ut_addr_v6, from->ut_addr_v6, 4 * 4);
+}
+
+static inline void
+__utmpx_convert64to32 (const struct utmpx64 *from, struct utmpx *to)
+{
+#if _HAVE_UT_TYPE - 0
+  to->ut_type = from->ut_type;
+#endif
+#if _HAVE_UT_PID - 0
+  to->ut_pid = from->ut_pid;
+#endif
+  memcpy (to->ut_line, from->ut_line, __UT_LINESIZE);
+  memcpy (to->ut_user, from->ut_user, __UT_NAMESIZE);
+#if _HAVE_UT_ID - 0
+  memcpy (to->ut_id, from->ut_id, 4);
+#endif
+#if _HAVE_UT_HOST - 0
+  memcpy (to->ut_host, from->ut_host, __UT_HOSTSIZE);
+#endif
+  to->ut_exit = from->ut_exit;
+  to->ut_session = (int32_t)from->ut_session;
+#if _HAVE_UT_TV - 0
+  to->ut_tv.tv_sec = (int32_t)from->ut_tv.tv_sec;
+  to->ut_tv.tv_usec = (int32_t)from->ut_tv.tv_usec;
+#endif
+  memcpy (to->ut_addr_v6, from->ut_addr_v6, 4 * 4);
+}
+
+#endif /* utmpx-convert.h */
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h~ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h~
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h~	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx-convert.h~	2008-04-24 08:42:34.000000000 +0200
@@ -0,0 +1,82 @@
+/* Copyright (C) 2000, 2001, 2007, 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+/* This file provides functions converting between the 31 and 64 bit
+   struct utmp variants.  */
+
+#ifndef _UTMPX_CONVERT_H
+#define _UTMPX_CONVERT_H 1
+
+#include <string.h>
+#include "utmpx64.h"
+
+static inline void
+__utmpx_convert32to64 (const struct utmpx *from, struct utmpx64 *to)
+{
+#if _HAVE_UT_TYPE - 0
+  to->ut_type = from->ut_type;
+#endif
+#if _HAVE_UT_PID - 0
+  to->ut_pid = from->ut_pid;
+#endif
+  memcpy (to->ut_line, from->ut_line, __UT_LINESIZE);
+  memcpy (to->ut_user, from->ut_user, __UT_NAMESIZE);
+#if _HAVE_UT_ID - 0
+  memcpy (to->ut_id, from->ut_id, 4);
+#endif
+#if _HAVE_UT_HOST - 0
+  memcpy (to->ut_host, from->ut_host, __UT_HOSTSIZE);
+#endif
+  to->ut_exit = from->ut_exit;
+  to->ut_session = (int64_t)from->ut_session;
+#if _HAVE_UT_TV - 0
+  to->ut_tv.tv_sec = (int64_t)from->ut_tv.tv_sec;
+  to->ut_tv.tv_usec = (int64_t)from->ut_tv.tv_usec;
+#endif
+  memcpy (to->ut_addr_v6, from->ut_addr_v6, 4 * 4);
+}
+
+static inline void
+__utmpx_convert64to32 (const struct utmpx64 *from, struct utmpx *to)
+{
+#if _HAVE_UT_TYPE - 0
+  to->ut_type = from->ut_type;
+#endif
+#if _HAVE_UT_PID - 0
+  to->ut_pid = from->ut_pid;
+#endif
+  memcpy (to->ut_line, from->ut_line, __UT_LINESIZE);
+  memcpy (to->ut_user, from->ut_user, __UT_NAMESIZE);
+#if _HAVE_UT_ID - 0
+  memcpy (to->ut_id, from->ut_id, 4);
+#endif
+#if _HAVE_UT_HOST - 0
+  memcpy (to->ut_host, from->ut_host, __UT_HOSTSIZE);
+#endif
+  to->ut_exit = from->ut_exit;
+  to->ut_session = (int32_t)from->ut_session;
+#if _HAVE_UT_TV - 0
+  to->ut_tv.tv_sec = (int32_t)from->ut_tv.tv_sec;
+  to->ut_tv.tv_usec = (int32_t)from->ut_tv.tv_usec;
+#endif
+  memcpy (to->ut_addr_v6, from->ut_addr_v6, 4 * 4);
+}
+
+#endif /* utmpx-convert.h */
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c	2008-04-24 12:48:38.000000000 +0200
@@ -0,0 +1,171 @@
+/* Copyright (C) 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sys/types.h>
+#include <utmp.h>
+#include <errno.h>
+#include <libc-symbols.h>
+
+#include "utmp64.h"
+#include "utmp-convert.h"
+
+#include "utmpx64.h"
+#include "utmpx-convert.h"
+
+/* Allocate a static buffer to be returned to the caller.  As well as
+   with the existing version of these functions the caller has to be
+   aware that the contents of this buffer will change with subsequent
+   calls.  */
+#define ALLOCATE_UTMPX64_OUT(OUT)			\
+  static struct utmpx64 *OUT = NULL;			\
+  							\
+  if (OUT == NULL)					\
+    {							\
+      OUT = malloc (sizeof (struct utmpx64));		\
+      if (OUT == NULL)					\
+	{						\
+	  __set_errno (ENOMEM);				\
+	  return NULL;					\
+	}						\
+    }
+
+#define ACCESS_UTMPX_ENTRY(FUNC, FIELD)			\
+  struct utmpx in32;					\
+  struct utmpx *out32;					\
+  ALLOCATE_UTMPX64_OUT (out64);				\
+							\
+  __utmpx_convert64to32 (FIELD, &in32);			\
+  out32 = FUNC (&in32);					\
+							\
+  if (out32 == NULL)					\
+    return NULL;					\
+							\
+  __utmpx_convert32to64 (out32, out64);			\
+							\
+  return out64;
+
+
+/* Get the next entry from the user accounting database.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+struct utmpx64 *
+__getutxent64 ()
+{
+  struct utmpx *out32;
+  ALLOCATE_UTMPX64_OUT (out64);
+
+  out32 = getutxent ();
+  if (!out32)
+    return NULL;
+
+  __utmpx_convert32to64 (out32, out64);
+  return out64;
+
+}
+
+/* Get the user accounting database entry corresponding to ID.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+struct utmpx64 *
+__getutxid64 (__const struct utmpx64 *__id)
+{
+  ACCESS_UTMPX_ENTRY (getutxid, __id);
+}
+
+/* Get the user accounting database entry corresponding to LINE.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+struct utmpx64 *
+__getutxline64 (__const struct utmpx64 *__line)
+{
+  ACCESS_UTMPX_ENTRY (getutxline, __line);
+}
+
+/* Write the entry UTMPX into the user accounting database.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+struct utmpx64 *
+__pututxline64 (__const struct utmpx64 *__utmpx)
+{
+  ACCESS_UTMPX_ENTRY (pututxline, __utmpx);
+}
+
+/* Append entry UTMP to the wtmpx-like file WTMPX_FILE.
+
+   This function is not part of POSIX and therefore no official
+   cancellation point.  But due to similarity with an POSIX interface
+   or due to the implementation it is a cancellation point and
+   therefore not marked with __THROW.  */
+void
+__updwtmpx64 (__const char *__wtmpx_file, __const struct utmpx64 *__utmpx)
+{
+  struct utmpx in32;
+
+  __utmpx_convert64to32 (__utmpx, &in32);
+  updwtmpx (__wtmpx_file, &in32);
+}
+
+
+/* Copy the information in UTMPX to UTMP.
+
+   This function is not part of POSIX and therefore no official
+   cancellation point.  But due to similarity with an POSIX interface
+   or due to the implementation it is a cancellation point and
+   therefore not marked with __THROW.  */
+void
+__getutmp64 (__const struct utmpx64 *__utmpx, struct utmp64 *__utmp)
+{
+  struct utmpx in32;
+  struct utmp out32;
+
+  __utmpx_convert64to32 (__utmpx, &in32);
+  getutmp (&in32, &out32);
+  __utmp_convert32to64 (&out32, __utmp);
+}
+
+/* Copy the information in UTMP to UTMPX.
+
+   This function is not part of POSIX and therefore no official
+   cancellation point.  But due to similarity with an POSIX interface
+   or due to the implementation it is a cancellation point and
+   therefore not marked with __THROW.  */
+void
+__getutmpx64 (__const struct utmp64 *__utmp, struct utmpx64 *__utmpx)
+{
+  struct utmp in32;
+  struct utmpx out32;
+
+  __utmp_convert64to32 (__utmp, &in32);
+  getutmpx (&in32, &out32);
+  __utmpx_convert32to64 (&out32, __utmpx);
+}
+
+symbol_version (__getutxent64, getutxent, GLIBC_2.2);
+symbol_version (__getutxid64, getutxid, GLIBC_2.2);
+symbol_version (__getutxline64, getutxline, GLIBC_2.2);
+symbol_version (__pututxline64, pututxline, GLIBC_2.2);
+
+symbol_version (__updwtmpx64, updwtmpx, GLIBC_2.2);
+
+symbol_version (__getutmp64, getutmp, GLIBC_2.2);
+symbol_version (__getutmpx64, getutmpx, GLIBC_2.2);
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c~ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c~
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c~	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.c~	2008-04-24 08:42:34.000000000 +0200
@@ -0,0 +1,171 @@
+/* Copyright (C) 2000, 2001, 2007, 2008 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sys/types.h>
+#include <utmp.h>
+#include <errno.h>
+#include <libc-symbols.h>
+
+#include "utmp64.h"
+#include "utmp-convert.h"
+
+#include "utmpx64.h"
+#include "utmpx-convert.h"
+
+/* Allocate a static buffer to be returned to the caller.  As well as
+   with the existing version of these functions the caller has to be
+   aware that the contents of this buffer will change with subsequent
+   calls.  */
+#define ALLOCATE_UTMPX64_OUT(OUT)			\
+  static struct utmpx64 *OUT = NULL;			\
+  							\
+  if (OUT == NULL)					\
+    {							\
+      OUT = malloc (sizeof (struct utmpx64));		\
+      if (OUT == NULL)					\
+	{						\
+	  __set_errno (ENOMEM);				\
+	  return NULL;					\
+	}						\
+    }
+
+#define ACCESS_UTMPX_ENTRY(FUNC, FIELD)			\
+  struct utmpx in32;					\
+  struct utmpx *out32;					\
+  ALLOCATE_UTMPX64_OUT (out64);				\
+							\
+  __utmpx_convert64to32 (FIELD, &in32);			\
+  out32 = FUNC (&in32);					\
+							\
+  if (out32 == NULL)					\
+    return NULL;					\
+							\
+  __utmpx_convert32to64 (out32, out64);			\
+							\
+  return out64;
+
+
+/* Get the next entry from the user accounting database.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+struct utmpx64 *
+__getutxent64 ()
+{
+  struct utmpx *out32;
+  ALLOCATE_UTMPX64_OUT (out64);
+
+  out32 = getutxent ();
+  if (!out32)
+    return NULL;
+
+  __utmpx_convert32to64 (out32, out64);
+  return out64;
+
+}
+
+/* Get the user accounting database entry corresponding to ID.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+struct utmpx64 *
+__getutxid64 (__const struct utmpx64 *__id)
+{
+  ACCESS_UTMPX_ENTRY (getutxid, __id);
+}
+
+/* Get the user accounting database entry corresponding to LINE.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+struct utmpx64 *
+__getutxline64 (__const struct utmpx64 *__line)
+{
+  ACCESS_UTMPX_ENTRY (getutxline, __line);
+}
+
+/* Write the entry UTMPX into the user accounting database.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+struct utmpx64 *
+__pututxline64 (__const struct utmpx64 *__utmpx)
+{
+  ACCESS_UTMPX_ENTRY (pututxline, __utmpx);
+}
+
+/* Append entry UTMP to the wtmpx-like file WTMPX_FILE.
+
+   This function is not part of POSIX and therefore no official
+   cancellation point.  But due to similarity with an POSIX interface
+   or due to the implementation it is a cancellation point and
+   therefore not marked with __THROW.  */
+void
+__updwtmpx64 (__const char *__wtmpx_file, __const struct utmpx64 *__utmpx)
+{
+  struct utmpx in32;
+
+  __utmpx_convert64to32 (__utmpx, &in32);
+  updwtmpx (__wtmpx_file, &in32);
+}
+
+
+/* Copy the information in UTMPX to UTMP.
+
+   This function is not part of POSIX and therefore no official
+   cancellation point.  But due to similarity with an POSIX interface
+   or due to the implementation it is a cancellation point and
+   therefore not marked with __THROW.  */
+void
+__getutmp64 (__const struct utmpx64 *__utmpx, struct utmp64 *__utmp)
+{
+  struct utmpx in32;
+  struct utmp out32;
+
+  __utmpx_convert64to32 (__utmpx, &in32);
+  getutmp (&in32, &out32);
+  __utmp_convert32to64 (&out32, __utmp);
+}
+
+/* Copy the information in UTMP to UTMPX.
+
+   This function is not part of POSIX and therefore no official
+   cancellation point.  But due to similarity with an POSIX interface
+   or due to the implementation it is a cancellation point and
+   therefore not marked with __THROW.  */
+void
+__getutmpx64 (__const struct utmp64 *__utmp, struct utmpx64 *__utmpx)
+{
+  struct utmp in32;
+  struct utmpx out32;
+
+  __utmp_convert64to32 (__utmp, &in32);
+  getutmpx (&in32, &out32);
+  __utmpx_convert32to64 (&out32, __utmpx);
+}
+
+symbol_version (__getutxent64, getutxent, GLIBC_2.2);
+symbol_version (__getutxid64, getutxid, GLIBC_2.2);
+symbol_version (__getutxline64, getutxline, GLIBC_2.2);
+symbol_version (__pututxline64, pututxline, GLIBC_2.2);
+
+symbol_version (__updwtmpx64, updwtmpx, GLIBC_2.2);
+
+symbol_version (__getutmp64, getutmp, GLIBC_2.2);
+symbol_version (__getutmpx64, getutmpx, GLIBC_2.2);
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h	2008-04-24 12:47:31.000000000 +0200
@@ -0,0 +1,52 @@
+/* The `struct utmpx' type, describing entries in the utmp file.  GNU version.
+   Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2008
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _UTMPX64_H
+#define _UTMPX64_H 1
+
+#include <paths.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <bits/wordsize.h>
+#include <utmpx.h>
+
+/* The structure describing an entry in the user accounting database.  */
+struct utmpx64
+{
+  short int ut_type;		/* Type of login.  */
+  __pid_t ut_pid;		/* Process ID of login process.  */
+  char ut_line[__UT_LINESIZE];	/* Devicename.  */
+  char ut_id[4];		/* Inittab ID. */
+  char ut_user[__UT_NAMESIZE];	/* Username.  */
+  char ut_host[__UT_HOSTSIZE];	/* Hostname for remote login.  */
+  struct __exit_status ut_exit;	/* Exit status of a process marked
+				   as DEAD_PROCESS.  */
+  __int64_t ut_session;		/* Session ID, used for windowing.  */
+  struct
+  {
+    __int64_t tv_sec;		/* Seconds.  */
+    __int64_t tv_usec;		/* Microseconds.  */
+  } ut_tv;			/* Time entry was made.  */
+
+  __int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
+  char __unused[20];		/* Reserved for future use.  */
+};
+
+#endif /* utmpx64.h */
diff -N -p -U3 --exclude=.pc -r libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h~ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h~
--- libc.orig/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h~	1970-01-01 01:00:00.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/utmpx64.h~	2008-04-24 08:42:34.000000000 +0200
@@ -0,0 +1,52 @@
+/* The `struct utmp' type, describing entries in the utmp file.  GNU version.
+   Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002
+   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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _UTMPX64_H
+#define _UTMPX64_H 1
+
+#include <paths.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <bits/wordsize.h>
+#include <utmpx.h>
+
+/* The structure describing an entry in the user accounting database.  */
+struct utmpx64
+{
+  short int ut_type;		/* Type of login.  */
+  __pid_t ut_pid;		/* Process ID of login process.  */
+  char ut_line[__UT_LINESIZE];	/* Devicename.  */
+  char ut_id[4];		/* Inittab ID. */
+  char ut_user[__UT_NAMESIZE];	/* Username.  */
+  char ut_host[__UT_HOSTSIZE];	/* Hostname for remote login.  */
+  struct __exit_status ut_exit;	/* Exit status of a process marked
+				   as DEAD_PROCESS.  */
+  __int64_t ut_session;		/* Session ID, used for windowing.  */
+  struct
+  {
+    __int64_t tv_sec;		/* Seconds.  */
+    __int64_t tv_usec;		/* Microseconds.  */
+  } ut_tv;			/* Time entry was made.  */
+
+  __int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
+  char __unused[20];		/* Reserved for future use.  */
+};
+
+#endif /* utmpx64.h */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]