about summary refs log tree commit diff
path: root/bits
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-04-19 14:38:17 +0200
committerFlorian Weimer <fweimer@redhat.com>2024-05-02 22:04:35 +0200
commitbb2ec7502289aaf794d7e9ac7f12c9d03ab8cf7c (patch)
tree693d7990d1687de63780db74565416f76959f952 /bits
parent93e98f092cf25941d80f23511fb0b51eda353bd6 (diff)
downloadglibc-bb2ec7502289aaf794d7e9ac7f12c9d03ab8cf7c.tar.gz
glibc-bb2ec7502289aaf794d7e9ac7f12c9d03ab8cf7c.tar.xz
glibc-bb2ec7502289aaf794d7e9ac7f12c9d03ab8cf7c.zip
login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701)
These structs describe file formats under /var/log, and should not
depend on the definition of _TIME_BITS.  This is achieved by
defining __WORDSIZE_TIME64_COMPAT32 to 1 on 32-bit ports that
support 32-bit time_t values (where __time_t is 32 bits).

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
(cherry picked from commit 9abdae94c7454c45e02e97e4ed1eb1b1915d13d8)
Diffstat (limited to 'bits')
-rw-r--r--bits/wordsize.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/bits/wordsize.h b/bits/wordsize.h
index 14edae3a11..53013a9275 100644
--- a/bits/wordsize.h
+++ b/bits/wordsize.h
@@ -21,7 +21,9 @@
 #define __WORDSIZE32_PTRDIFF_LONG
 
 /* Set to 1 in order to force time types to be 32 bits instead of 64 bits in
-   struct lastlog and struct utmp{,x} on 64-bit ports.  This may be done in
+   struct lastlog and struct utmp{,x}.  This may be done in
    order to make 64-bit ports compatible with 32-bit ports.  Set to 0 for
-   64-bit ports where the time types are 64-bits or for any 32-bit ports.  */
+   64-bit ports where the time types are 64-bits and new 32-bit ports
+   where time_t is 64 bits, and there is no companion architecture with
+   32-bit time_t.  */
 #define __WORDSIZE_TIME64_COMPAT32