From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71464 invoked by alias); 26 May 2019 16:37:18 -0000 Mailing-List: contact glibc-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: glibc-cvs-owner@sourceware.org List-Subscribe: Received: (qmail 71446 invoked by uid 9014); 26 May 2019 16:37:18 -0000 Date: Sun, 26 May 2019 16:37:00 -0000 Message-ID: <20190526163718.71445.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Zack Weinberg To: glibc-cvs@sourceware.org Subject: [glibc/zack/no-nested-includes] Don't include sys/types.h 3a/n: fixups for utmp{, x}.h X-Act-Checkin: glibc X-Git-Author: Zack Weinberg X-Git-Refname: refs/heads/zack/no-nested-includes X-Git-Oldrev: 9c85db187d07ad9023c1e08b980198ee06fad111 X-Git-Newrev: 6e3ccebdc581628eee22ee30788159eaa38e0c59 X-SW-Source: 2019-q2/txt/msg00256.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6e3ccebdc581628eee22ee30788159eaa38e0c59 commit 6e3ccebdc581628eee22ee30788159eaa38e0c59 Author: Zack Weinberg 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 #include +#include +#include #include /* 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 #include +#include +#include #include /* Get system dependent values and data structures. */