public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/zack/no-nested-includes] Don't include sys/types.h 3a/n: fixups for utmp{, x}.h
@ 2019-06-18 15:34 Zack Weinberg
  0 siblings, 0 replies; 2+ messages in thread
From: Zack Weinberg @ 2019-06-18 15:34 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f4fd9e948e38fe90d9cd652ee1813d88b1a19b60

commit f4fd9e948e38fe90d9cd652ee1813d88b1a19b60
Author: Zack Weinberg <zackw@panix.com>
Date:   Sun May 26 10:44:34 2019 -0400

    Don't include sys/types.h 3a/n: fixups for utmp{,x}.h
    
    The conform tests expect utmpx.h to define time_t and suseconds_t.
    These are the public names for the types of the fields of struct timeval,
    and utmpx.h is required to define struct timeval, so this is a reasonable
    expectation even though POSIX doesn't _explicitly_ say it's also required
    to define time_t and suseconds_t.
    
    utmp.h is not a standard header but it makes sense for it to be as consistent
    with utmpx.h as possible, especially in our implementation where /var/log/utmp
    and /var/log/utmpx have the same format.
    
    	* login/utmp.h, login/utmpx.h: Include bits/types/suseconds_t.h
    	and bits/types/time_t.h.

Diff:
---
 login/utmp.h  | 2 ++
 login/utmpx.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/login/utmp.h b/login/utmp.h
index a689322..9c12e3c 100644
--- a/login/utmp.h
+++ b/login/utmp.h
@@ -25,6 +25,8 @@
    consistent.  */
 #include <bits/types.h>
 #include <bits/types/pid_t.h>
+#include <bits/types/suseconds_t.h>
+#include <bits/types/time_t.h>
 #include <bits/types/struct_timeval.h>
 
 /* Get system dependent values and data structures.  */
diff --git a/login/utmpx.h b/login/utmpx.h
index c2887b2..de18f58 100644
--- a/login/utmpx.h
+++ b/login/utmpx.h
@@ -23,6 +23,8 @@
 /* Required according to Unix98.  */
 #include <bits/types.h>
 #include <bits/types/pid_t.h>
+#include <bits/types/suseconds_t.h>
+#include <bits/types/time_t.h>
 #include <bits/types/struct_timeval.h>
 
 /* Get system dependent values and data structures.  */


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [glibc/zack/no-nested-includes] Don't include sys/types.h 3a/n: fixups for utmp{, x}.h
@ 2019-05-26 16:37 Zack Weinberg
  0 siblings, 0 replies; 2+ messages in thread
From: Zack Weinberg @ 2019-05-26 16:37 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6e3ccebdc581628eee22ee30788159eaa38e0c59

commit 6e3ccebdc581628eee22ee30788159eaa38e0c59
Author: Zack Weinberg <zackw@panix.com>
Date:   Sun May 26 10:44:34 2019 -0400

    Don't include sys/types.h 3a/n: fixups for utmp{,x}.h
    
    The conform tests expect utmpx.h to define time_t and suseconds_t.
    These are the public names for the types of the fields of struct timeval,
    and utmpx.h is required to define struct timeval, so this is a reasonable
    expectation even though POSIX doesn't _explicitly_ say it's also required
    to define time_t and suseconds_t.
    
    utmp.h is not a standard header but it makes sense for it to be as consistent
    with utmpx.h as possible, especially in our implementation where /var/log/utmp
    and /var/log/utmpx have the same format.
    
    	* login/utmp.h, login/utmpx.h: Include bits/types/suseconds_t.h
    	and bits/types/time_t.h.

Diff:
---
 login/utmp.h  | 2 ++
 login/utmpx.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/login/utmp.h b/login/utmp.h
index a689322..9c12e3c 100644
--- a/login/utmp.h
+++ b/login/utmp.h
@@ -25,6 +25,8 @@
    consistent.  */
 #include <bits/types.h>
 #include <bits/types/pid_t.h>
+#include <bits/types/suseconds_t.h>
+#include <bits/types/time_t.h>
 #include <bits/types/struct_timeval.h>
 
 /* Get system dependent values and data structures.  */
diff --git a/login/utmpx.h b/login/utmpx.h
index c2887b2..de18f58 100644
--- a/login/utmpx.h
+++ b/login/utmpx.h
@@ -23,6 +23,8 @@
 /* Required according to Unix98.  */
 #include <bits/types.h>
 #include <bits/types/pid_t.h>
+#include <bits/types/suseconds_t.h>
+#include <bits/types/time_t.h>
 #include <bits/types/struct_timeval.h>
 
 /* Get system dependent values and data structures.  */


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-18 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-18 15:34 [glibc/zack/no-nested-includes] Don't include sys/types.h 3a/n: fixups for utmp{, x}.h Zack Weinberg
  -- strict thread matches above, loose matches on Subject: below --
2019-05-26 16:37 Zack Weinberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).