From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110487 invoked by alias); 18 Jun 2018 11:34:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 110470 invoked by uid 89); 18 Jun 2018 11:34:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=albert, logically, Albert, capital X-HELO: relay1.mentorg.com Date: Mon, 18 Jun 2018 11:34:00 -0000 From: Joseph Myers To: "Albert ARIBAUD (3ADEV)" CC: Subject: Re: [PATCH v3 1/2] Y2038: Add 64-bit time for all architectures In-Reply-To: <20180616171331.25224-2-albert.aribaud@3adev.fr> Message-ID: References: <20180616171331.25224-1-albert.aribaud@3adev.fr> <20180616171331.25224-2-albert.aribaud@3adev.fr> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2018-06/txt/msg00477.txt.bz2 On Sat, 16 Jun 2018, Albert ARIBAUD (3ADEV) wrote: > +#include // for __WORDSIZE We should avoid // comments (in general, and in installed headers we want to be C90-compatible). And there's no point in a comment on an include when it's completely obvious what the include is for. > +/* Size in bits of the 'time_t' type; equals __WORDSIZE except for x32 */ > +#define __TIMESIZE __WORDSIZE Missing '.' at end of comment. I don't think you need the "equals __WORDSIZE except for x32" here (after all, it's logically a peculiarity of x32 for the Linux kernel and this is a generic file). > +#if __TIMESIZE == 64 > +/* If we already have 64-bit time then use it */ > +#define __TIME64_T_TYPE __TIME_T_TYPE > +#else > +/* Define a 64-bit type alongsize the 32-bit one */ > +#define __TIME64_T_TYPE __SQUAD_TYPE > +#endif Comments should end ". " (full stop, two spaces). Missing preprocessor indentation ("# define" inside #if, with an extra space per level of conditionals other than the multiple-include guards on a whole header file). > +/* check whether a time64_t value fits in a time_t */ Comments should start with a capital letter, end ". " as above. -- Joseph S. Myers joseph@codesourcery.com