[PATCH v2 1/2] timezone: sync to tzdb 2026b
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Tue May 19 13:17:32 GMT 2026
On 19/05/26 09:39, Florian Weimer wrote:
> * Adhemerval Zanella Netto:
>
>> On 19/05/26 09:04, Joseph Myers wrote:
>>> On Fri, 15 May 2026, Adhemerval Zanella Netto wrote:
>>>
>>>>> +#ifndef HAVE_MEMPCPY
>>>>> +# if (defined mempcpy \
>>>>> + || defined __FreeBSD__ || defined __NetBSD__ || defined __linux__)
>>
>> Maye use __GLIBC__ and something for musl instead?
>
> I think musl still strives to be difficult to identify.
>
>>>>> +# define HAVE_MEMPCPY 1
>>>>> +# else
>>>>> +# define HAVE_MEMPCPY 0
>>>>> +# endif
>>>>> +#endif
>>>>> +#if !HAVE_MEMPCPY
>>>>> +static void *
>>>>> +mempcpy(void *restrict s1, void const *restrict s2, size_t n)
>>>>> +{
>>>>> + char *p = memcpy(s1, s2, n);
>>>>> + return p + n;
>>>>> +}
>>>>> +#endif
>
> We already have this in include/libc-symbols.h:
>
> /* Define these macros for the benefit of portable GNU code that wants to check
> them. Of course, STDC_HEADERS is never false when building libc! */
> #define STDC_HEADERS 1
> #define HAVE_MBSTATE_T 1
> #define HAVE_MBSRTOWCS 1
> #define HAVE_LIBINTL_H 1
> #define HAVE_WCTYPE_H 1
> #define HAVE_ISWCTYPE 1
> #define ENABLE_NLS 1
>
> I think it would make sense to expand that.
Sounds reasonable, I will prepare a patch.
More information about the Libc-alpha
mailing list