[PATCH] <time.h>: Make strptime available by default
Andreas Schwab
schwab@suse.de
Mon Nov 28 13:55:18 GMT 2022
On Nov 28 2022, Florian Weimer via Libc-alpha wrote:
> This matches what FreeBSD does.
Does it? What I see is that the strptime declaration is conditional on
__XSI_VISIBLE, which is their equivalent of __USE_XOPEN, I think.
> diff --git a/time/time.h b/time/time.h
> index d18089116e..f507b44228 100644
> --- a/time/time.h
> +++ b/time/time.h
> @@ -101,7 +101,7 @@ extern size_t strftime (char *__restrict __s, size_t __maxsize,
> const char *__restrict __format,
> const struct tm *__restrict __tp) __THROW;
>
> -#ifdef __USE_XOPEN
> +#if (defined __USE_XOPEN || defined __USE_MISC)
No need for parens.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Libc-alpha
mailing list