From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64335 invoked by alias); 19 Jun 2018 12:22:07 -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 63986 invoked by uid 89); 19 Jun 2018 12:22:06 -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= X-HELO: relay1.mentorg.com Date: Tue, 19 Jun 2018 12:22:00 -0000 From: Joseph Myers To: "Albert ARIBAUD (3ADEV)" CC: Subject: Re: [PATCH 1/1] Y2038: make __mktime_internal compatible with 64-bit-time In-Reply-To: <20180619121626.24902-2-albert.aribaud@3adev.fr> Message-ID: References: <20180619121626.24902-1-albert.aribaud@3adev.fr> <20180619121626.24902-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/msg00556.txt.bz2 On Tue, 19 Jun 2018, Albert ARIBAUD (3ADEV) wrote: > if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3) > { > - /* time_t isn't large enough to rule out overflows, so check > - for major overflows. A gross check suffices, since if t0 > + /* __time64_t is large enough to rule out overflows, but check > + for major overflows anyway. A gross check suffices, since if t0 Are you sure it's coherent to have code in this file using a TIME_T_MAX that's defined in terms of time_t, when the code is using __time64_t? I'd expect you to need to define TIME_T_MAX and TIME_T_MIN in terms of __time64_t instead. > + __set_errno(EOVERFLOW); Missing space before '('. You need to watch out for such issues throughout the patch series. > + __set_errno(EOVERFLOW); Likewise. -- Joseph S. Myers joseph@codesourcery.com