public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Lukasz Majewski <lukma@denx.de>
Cc: Joseph Myers <joseph@codesourcery.com>,
	Paul Eggert <eggert@cs.ucla.edu>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Alistair Francis <alistair23@gmail.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	GNU C Library <libc-alpha@sourceware.org>,
	Siddhesh Poyarekar <siddhesh@gotplt.org>,
	Florian Weimer <fweimer@redhat.com>,
	Florian Weimer <fw@deneb.enyo.de>,
	Zack Weinberg <zackw@panix.com>,
	Carlos O'Donell <carlos@redhat.com>,
	Andreas Schwab <schwab@suse.de>
Subject: Re: [PATCH 2/6] y2038: hurd: Provide __clock_settime64 function
Date: Tue, 21 Jan 2020 17:22:00 -0000	[thread overview]
Message-ID: <238a5728-7394-b388-2798-6ebf1bd72933@linaro.org> (raw)
In-Reply-To: <20200121173430.01c03fa6@jawa>



On 21/01/2020 13:34, Lukasz Majewski wrote:
> Hi Adhemerval,
> 
>> On 20/01/2020 15:08, Lukasz Majewski wrote:
>>> Hi Adhemerval,
>>>   
>>>> On 18/01/2020 04:20, Lukasz Majewski wrote:  
>>>>> For Linux glibc ports the __TIMESIZE == 64 ensures proper aliasing
>>>>> for __clock_settime64 (to __clock_settime).
>>>>> When __TIMESIZE != 64 (like ARM32, PPC) the glibc expects separate
>>>>> definition of the __clock_settime64.
>>>>>
>>>>> The HURD port only provides __clock_settime, so this patch adds
>>>>> __clock_settime64 as a tiny wrapper on it.
>>>>> ---
>>>>>  sysdeps/mach/hurd/clock_settime.c | 9 +++++++++
>>>>>  1 file changed, 9 insertions(+)
>>>>>
>>>>> diff --git a/sysdeps/mach/hurd/clock_settime.c
>>>>> b/sysdeps/mach/hurd/clock_settime.c index 2c77bad71a..db1ba860dc
>>>>> 100644 --- a/sysdeps/mach/hurd/clock_settime.c
>>>>> +++ b/sysdeps/mach/hurd/clock_settime.c
>>>>> @@ -53,3 +53,12 @@ versioned_symbol (libc, __clock_settime,
>>>>> clock_settime, GLIBC_2_17); strong_alias (__clock_settime,
>>>>> __clock_settime_2); compat_symbol (libc, __clock_settime_2,
>>>>> clock_settime, GLIBC_2_2); #endif
>>>>> +
>>>>> +int
>>>>> +__clock_settime64 (clockid_t clock_id, const struct __timespec64
>>>>> *ts64) +{
>>>>> +  struct timespec ts = valid_timespec64_to_timespec (*ts64);
>>>>> +
>>>>> +  return __clock_settime (clock_id, &ts);
>>>>> +}
>>>>> +libc_hidden_def (__clock_settime64)
>>>>>     
>>>>
>>>> As for https://sourceware.org/ml/libc-alpha/2020-01/msg00445.html I
>>>> don't think this patch is really required now.  
>>>
>>> I think that it is required to allow using __clock_settime64() calls
>>> internally in glibc.  
>>
>>
>> Ok, I missed the patch where you adjusted the generic settimeofday.
>> In any case, I would like to avoid mess with generic implementation
>> for time64 since I am not sure how/when Hurd will try to fix it and
>> currently all time64 fixes are compartmentalized on Linux sysdep
>> folder.
>>
>> I think it might be add Linux specific version of settimeofday to 
>> handle the time64 support.
> 
> Please correct me if I'm wrong - you suggest moving the code from this
> patch (to convert settimeofday to __settimeofday64) to
> sysdeps/unix/sysv/linux/settimeofday.c and do not modify
> ./time/settimeofday.c.
> 
> In that way there would be no need to add any code (regarding time64)
> to HURD at all?
> 

Yes, I would like to change the generic files for time64_t support once
Hurd wants to actually pursuit it. What I would like is to eventually
sets the generic interface to assume 64 bit time_t, as currently the
generic bits/typesizes.h still sets __TIME_T_TYPE as __SLONGWORD_TYPE.

  reply	other threads:[~2020-01-21 17:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-18  7:34 [PATCH 0/6] y2038: Convert settimeofday to be Y2038 safe Lukasz Majewski
2020-01-18  7:21 ` [PATCH 4/6] y2038: alpha: Rename valid_timeval_to_timeval64 to valid_timeval32_to_timeval Lukasz Majewski
2020-01-18 23:03   ` Alistair Francis
2020-01-18  7:21 ` [PATCH 6/6] y2038: linux: Provide __settimeofday64 implementation Lukasz Majewski
2020-01-19  1:13   ` Alistair Francis
2020-01-18  7:21 ` [PATCH 2/6] y2038: hurd: Provide __clock_settime64 function Lukasz Majewski
2020-01-20 17:12   ` Adhemerval Zanella
2020-01-20 18:10     ` Lukasz Majewski
2020-01-20 18:29       ` Adhemerval Zanella
2020-01-21 16:46         ` Lukasz Majewski
2020-01-21 17:22           ` Adhemerval Zanella [this message]
2020-01-21 17:25             ` Samuel Thibault
2020-01-28  0:36             ` Samuel Thibault
2020-01-18  7:21 ` [PATCH 3/6] y2038: Introduce struct __timeval64 - new internal glibc type Lukasz Majewski
2020-01-18 22:49   ` Alistair Francis
2020-01-19 15:22     ` Arnd Bergmann
2020-01-19 15:39       ` Lukasz Majewski
2020-01-19 21:30         ` Arnd Bergmann
2020-01-20  2:12           ` Lukasz Majewski
2020-01-20 13:01             ` Lukasz Majewski
2020-01-20 13:03               ` Arnd Bergmann
2020-01-20 16:58                 ` Adhemerval Zanella
2020-01-20 19:25                   ` Arnd Bergmann
2020-01-21 16:55                     ` Lukasz Majewski
2020-01-21 17:31                       ` Adhemerval Zanella
2020-01-21 22:02                         ` Lukasz Majewski
2020-01-18  7:21 ` [PATCH 1/6] y2038: Use __clock_settime64 in deprecated stime function Lukasz Majewski
2020-01-20 17:01   ` Adhemerval Zanella
2020-01-20 18:01     ` Lukasz Majewski
2020-01-20 18:26       ` Adhemerval Zanella
2020-01-21 17:16         ` Lukasz Majewski
2020-01-21 17:20           ` Adhemerval Zanella
2020-01-18  7:21 ` [PATCH 5/6] y2038: Provide conversion helpers for struct __timeval64 Lukasz Majewski
2020-01-18 23:47   ` Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=238a5728-7394-b388-2798-6ebf1bd72933@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=alistair23@gmail.com \
    --cc=carlos@redhat.com \
    --cc=eggert@cs.ucla.edu \
    --cc=fw@deneb.enyo.de \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=lukma@denx.de \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=schwab@suse.de \
    --cc=siddhesh@gotplt.org \
    --cc=zackw@panix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).