[PATCH v2] Reinstate ftime and move define it for POSIX.1-2001 or older

Florian Weimer fweimer@redhat.com
Wed Oct 28 13:54:31 GMT 2020


* Adhemerval Zanella:

> On 26/10/2020 13:29, Florian Weimer wrote:
>> * Adhemerval Zanella:
>> 
>>> On 26/10/2020 13:19, Florian Weimer wrote:
>>>> * Adhemerval Zanella:
>>>>
>>>>> +struct timeb
>>>>> +  {
>>>>> +    time_t time;		/* Seconds since epoch, as from `time'.  */
>>>>> +    unsigned short int millitm;	/* Additional milliseconds.  */
>>>>> +    short int timezone;		/* Minutes west of GMT.  */
>>>>> +    short int dstflag;		/* Nonzero if Daylight Savings Time used.  */
>>>>> +  };
>>>>
>>>> I think you could add __attribute_deprecated_msg__ on the struct itself.
>>>
>>> I tried to add on it, but it would require to add the warning suppression
>>> on ftime.c build before the header inclusion and also on check-local header
>>> tests as well (since it includes).
>> 
>> Ahh, so you get a deprecation warning on the ftime function declaration,
>> even though itself it is marked deprecated.  Oh well.  That's not how
>> things work in Java.
>
> On the struct timeb declaration to be more exact, even when then ftime
> is not issued.  I would expect a deprecation warning iff the code
> actually uses the struct timeb.

The ftime prototype uses it (in the deprecation sense).  This use should
be ignored due to the deprecation attribute on ftime itself, though.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill



More information about the Libc-alpha mailing list