From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9950 invoked by alias); 14 Jun 2018 17:52:00 -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 9799 invoked by uid 89); 14 Jun 2018 17:51:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=felt X-HELO: smtp6-g21.free.fr Date: Thu, 14 Jun 2018 17:52:00 -0000 From: Albert ARIBAUD To: Paul Eggert Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v2 2/2] Y2038: make __tz_convert compatible with 64-bit-time Message-ID: <20180614195149.60f6114d@athena> In-Reply-To: References: <20180614135116.8767-1-albert.aribaud@3adev.fr> <20180614135116.8767-3-albert.aribaud@3adev.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2018-06/txt/msg00421.txt.bz2 Hi Paul, On Thu, 14 Jun 2018 10:07:18 -0700, Paul Eggert wrote : > On 06/14/2018 06:51 AM, Albert ARIBAUD (3ADEV) wrote: > > +#if __TIMESIZE =3D=3D 64 > > +# define __ctime64 ctime > > +# define __ctime64_r ctime_r > > +#endif > > + > > +#if __TIMESIZE =3D=3D 64 > > +# define __localtime64 localtime > > +#else > > +extern struct tm *__localtime64 (const __time64_t *__timer); > > +#endif=20=20 >=20 > These don't seem symmetric. Why don't we need an extern declaration for=20 > __ctime_64 or for __ctime_64_r? If the code is correct, maybe a comment w= hy? =20 The asymmetry (that ctime and ctime_r are only declared in time/time.h whereas localtime, localtime_r, gmtime and gmtime_r are declared both in include/time.h as well as time/time.h) existed before my patches, and I do not know the reason. I felt I should not add declarations for ctime / ctime_r in include/time as obviously glibc builds fine without these, and my patches are not about adding 32-bit declarations but about adding 64-bit support. However, I can add them if requested. > > +#if (__TIMESIZE !=3D 64)=20=20 > No parentheses here (and similarly elsewhere). Fixed everywhere. > +/* The C Standard says ctime (t) is equivalent to asctime (localtime (t)= ). > +=C2=A0=C2=A0 In particular, ctime and asctime must yield the same pointe= r. */ > +=C2=A0 return asctime (__localtime64 (t)); >=20 > Please indent the comment to be like what it was before. Done. > Otherwise looks good; thanks. Thanks to you for the reviews! Cordialement, Albert ARIBAUD 3ADEV