[PATCH v2] Reinstate ftime and move define it for POSIX.1-2001 or older
Florian Weimer
fweimer@redhat.com
Mon Oct 26 16:29:24 GMT 2020
* 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.
> I think adding on the function itself should suffice, using the struct
> without calling ftime should be unusual scenario.
Yes, given this compiler limitation, I do not really see an alternative.
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